|
Nedi, Portech GSM gateway does not provide asterisk with caller ID from GSM network. However, it is possible to extract this information from SIP header. This PHP script accomplishes this task. #!/usr/bin/php -f <?PHP $cidnum = $_SERVER[argv][1]; // Caller Number (CallerID) // Fix CallerID for GSM Gateway Portech MV-370 - Pass SIP_HEADER(FROM) if (ereg(" <sip:", $cidnum)) { $cidnum = trim(ereg_replace("(\")|(<.*)", "", $cidnum)); if ($cidnum[0] == "+") { if (ereg("^\+39", $cidnum)) $cidnum = substr($cidnum,3); else $cidnum="00".substr($cidnum,1); } elseif ($cidnum == "N") { $cidnum=""; } echo "set variable CALLERID(number) \"$cidnum\"\n"; } Name the script anything you like, e.g. fixcid_mv370.php. Put the script in the /var/lib/asterisk/agi-bin directory and make sure it is executable. chmod +x /var/lib/asterisk/agi-bin/fixcid_mv370.php When you need to know the real caller ID in dialplan, you can get it like this (the script will adjust "CALLERID(number)" variable): EAGI(fixcid_mv370.php,${SIP_HEADER(FROM)}) Niksa Baldun Nedi wrote: Hi list 1.) I need Wake On Lan Software in Astlinux, to wake some PCs in my Home Network if I'm away. how can I install the ethtool? I try the command apt-get install ethtool.. |
------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________ Astlinux-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [email protected].
