Greetings,
Further look at code revels that the callerid value when user types it into the VOIP settings is defined and updated based on
its definition in file FG_var_friend.inc:
$HD_Form -> AddEditElement (gettext("CALLERID"),
"callerid",
'',
"INPUT",
"size=40 maxlength=60",
"",
gettext("Insert the callerid"),
"" , "", "", "", "", "", "", "" );
It looks like it indeed should take in the format like:
"John Smith"<1234567890>
But when I tried to enter this sting, only the name part went into the database:
| id | id_cc_card | name | accountcode | regexten | amaflags | callgroup | callerid
| 51 | 50 | 7741674580 | 7741674580 | 7741674580 | billing | | \"John Smith\" |
********This is a BUG in A2Billing - Version 1.5.1 (Lignum Vitae) - Released : 19 January 2010***********
********And I want to file a bug for it
Secondly, when the callerid is read from database to further use, the logic/call used to set caller ID after its retrieval
appears to be done by call set_callerid(xxx), see the following calls made at different places:
$agi->set_callerid($this->useralias);
$agi -> set_callerid($this->agiconfig['force_callerid']);
$agi->set_callerid($cid_sanitized);
$agi->set_callerid($res_dtmf ["result"]);
$agi -> set_callerid($outcid);
Now, the function set_callerid itself looks like (in file phpagi.php)
function set_callerid($cid)
{
return $this->evaluate("SET CALLERID $cid");
}
which appears to return whatever is passed to it.
If "John Smith"<1234567890> format is used, to parse it properly, there exist a function called parse_callerid(xx) in file phpagi.php but is never used.
Per
http://www.voip-info.org/wiki/view/set+callerid, the current callerid format is doesn't conform to it.
*************I would like to file second BUG to have A2Billing accept "FName LName"<number> format and pass it properly downwords where it can be used
further such as for proper outbound calleridnumber and calleridname setting**************************
A2Billing team, please let me know your take on this.
Thanks for your support