Hi, All
Sorry for my english )
Were challenged to add the possibility to use the address book to subscribers of ZAP devices, as well as make outgoing calls via the user's Context. It should be added at the beginning of the file manager.conf following lines:
| Code: : |
$chanzap = exec("cat /etc/asterisk/zapata_additional.conf | awk '/\[$ext\]/,/channel/ {print}' | grep 'channel=>' | sed 's/channel=>//'");
if($chanzap=='')
{
$tech='SIP';
$number=$ext;
$usercontext = exec("cat /etc/asterisk/sip_additional.conf | awk '/\[$ext\]/,/context/ {print}' | grep 'context=' | sed 's/context=//'");
}
if($chanzap!='')
{
$tech='ZAP';
$number=$chanzap;
$usercontext = exec("cat /etc/asterisk/zapata_additional.conf | awk '/\[$ext\]/,/context/ {print}' | grep 'context=' | sed 's/context=//'");
}
|
And to change the variables in rows:
| Code: : |
fputs($socket, "Channel: SIP/$ext\r_CRLF_" );
fputs($socket, "Context: $context\r_CRLF_" );
|
to
| Code: : |
fputs($socket, "Channel: $tech/$number\r_CRLF_" );
fputs($socket, "Context: $usercontext\r_CRLF_" );
|
You can also check for IAX2 and Zaptel or Dahdi, but this problem has not yet faced
P.S. And also I have a translation in Russian language