<div dir="ltr">In phpagi <div><br></div><div>$agi->set_variable("<span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px">CDR(clid)</span> 11111111")<br clear="all"><div dir="ltr">and to get it </div>
<div dir="ltr"> $agi->get_variable("<span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px">CDR(clid)")</span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px"><br>
</span></div><div dir="ltr">Regards,<br>Zohair Raza<div><br></div><div><a href="http://www.zuhair.info" target="_blank">www.zuhair.info</a><br><div><p><span><b><span style="font-size:10pt;font-family:Verdana;color:blue"><a href="http://ae.linkedin.com/in/zuhairraza" target="_blank">http://ae.linkedin.com/in/zuhairraza</a></span></b></span><span><b><span style="font-size:10pt;font-family:Verdana;color:rgb(136,136,136)"> </span></b></span><b><span style="font-size:10pt;font-family:Verdana" lang="DE"></span></b></p>
<br></div></div></div><br>
<br><br><div class="gmail_quote">On Thu, Jan 12, 2012 at 12:51 PM, virendra bhati <span dir="ltr"><<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">How to used it in AGI ? I think it's Dialplan apps.<div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jan 12, 2012 at 2:18 PM, Zohair Raza <span dir="ltr"><<a href="mailto:engineerzuhairraza@gmail.com" target="_blank">engineerzuhairraza@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div><span style="font-size:12px;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif">Try setting CDR(clid)</span></div>
<div><span style="font-size:12px;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif"> </span><br clear="all">
<div dir="ltr">Regards,<br>Zohair Raza<div><br></div><div><div> <br></div></div></div><br>
<br><br><div class="gmail_quote"><div><div></div><div>On Thu, Jan 12, 2012 at 12:44 PM, virendra bhati <span dir="ltr"><<a href="mailto:virbhati@gmail.com" target="_blank">virbhati@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
<div dir="ltr">Hi, <br>I am using phpagi for agi scripting. and want to update callerid number but didn't get any success. please help me how to update PHPAGI is new for me. Below is the code which I write.<br><br><span style="color:rgb(0,102,0)">#!/usr/bin/php -q</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)"><?php</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">set_time_limit(30);</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">//require(.phpagi.php.);</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">include("phpagi.php");</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi = new AGI();</span><br style="color:rgb(0,102,0)"><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">//answer the call</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-> answer();</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi->verbose("------------------------------------------");</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">$agi-> exec('Set',"CALLERID(num)=<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a>");</span><br style="color:rgb(0,102,0)"><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">$ani = $agi->request['agi_callerid'];</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">$agi->noop("My CalleID: <<<<<<<=".$ani);</span><br style="color:rgb(0,102,0)"><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi->set_variable("CALLERID(num)","<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a>");</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">$ani = $agi->request['agi_callerid'];</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi->noop("My CalleID: <<<<<<<=".$ani);</span><br style="color:rgb(0,102,0)">
<br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-> exec('Dial',"SIP/<a href="mailto:00918885268942@sip.trunk.gradwell.com" target="_blank">00918885268942@sip.trunk.gradwell.com</a>,60,r");</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">//$agi-> exec('Dial',"SIP/<a href="tel:00918885268942" value="+918885268942" target="_blank">00918885268942</a>@voipon,60,r");</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">?> </span><br style="color:rgb(0,102,0)" clear="all">
<br>And CLI> <br><br> <span style="color:rgb(102,0,0)">== Using SIP RTP CoS mark 5</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> -- Executing [101@outbound:1] Answer("SIP/2209-000026d3", "") in new stack</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> -- Executing [101@outbound:2] AGI("SIP/2209-000026d3", "/home/virendra.bhati/outdial.php") in new stack</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> -- Launched AGI Script /home/virendra.bhati/outdial.php</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_request: /home/virendra.bhati/outdial.php</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_channel: SIP/2209-000026d3</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_language: en</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_type: SIP</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_uniqueid: 1326357644.10070</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_version: 1.6.2.20</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_callerid: 2209</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_calleridname: unknown</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_callingpres: 0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_callingani2: 0</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_callington: 0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_callingtns: 0</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_dnid: 101</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_rdnis: unknown</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_context: outbound</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_extension: 101</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_priority: 2</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_enhanced: 0.0</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_accountcode:</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> agi_threadid: 1386719552</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >></span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << ANSWER</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << VERBOSE "------------------------------------------" 1</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> /home/virendra.bhati/outdial.php: ------------------------------------------</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=1</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << EXEC Set CALLERID(num)=<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a></span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> -- AGI Script Executing Application: (Set) Options: (CALLERID(num)=<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a>)</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << NOOP "My CalleID: <<<<<<<=2209"</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << SET VARIABLE CALLERID(num) "<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a>"</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=1</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << NOOP "My CalleID: <<<<<<<=2209"</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Rx << EXEC Dial SIP/<a href="mailto:00918885268942@sip.trunk.gradwell.com" target="_blank">00918885268942@sip.trunk.gradwell.com</a>,60,r</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> -- AGI Script Executing Application: (Dial) Options: (SIP/<a href="mailto:00918885268942@sip.trunk.gradwell.com" target="_blank">00918885268942@sip.trunk.gradwell.com</a>,60,r)</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> == Using SIP RTP CoS mark 5</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> > ast_get_srv: SRV lookup for '_sip._<a href="http://udp.sip.trunk.gradwell.com" target="_blank">udp.sip.trunk.gradwell.com</a>' mapped to host <a href="http://v-sip-trunk-out-f1.gradwell.net" target="_blank">v-sip-trunk-out-f1.gradwell.net</a>, port 5060</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> -- Called <a href="mailto:00918885268942@sip.trunk.gradwell.com" target="_blank">00918885268942@sip.trunk.gradwell.com</a></span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">[Jan 12 14:10:52] WARNING[28001]: chan_sip.c:18463 handle_response_invite: Received response: "Forbidden" from '"<a href="tel:01133200274" value="+911133200274" target="_blank">01133200274</a>" <<a href="mailto:sip%3A01133200274@10.10.10.181" target="_blank">sip:01133200274@10.10.10.181</a>>;tag=as76229e88'</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> -- SIP/sip.trunk.gradwell.com-000026d4 is circuit-busy</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> == Everyone is busy/congested at this time (1:0/1/0)</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"><SIP/2209-000026d3>AGI Tx >> 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)"> -- <SIP/2209-000026d3>AGI Script /home/virendra.bhati/outdial.php completed, returning 0</span><br style="color:rgb(102,0,0)">
<span style="color:rgb(102,0,0)"> -- Executing [101@outbound:3] Hangup("SIP/2209-000026d3", "") in new stack</span><span><font color="#888888"><br style="color:rgb(102,0,0)"><br>-- <br>
<div dir="ltr"><br>Thanks and regards<br>
<br> Virendra Bhati<br><a href="tel:%2B91-8885268942" value="+918885268942" target="_blank">+91-8885268942</a><br>Software Engineer<br></div><br>
</font></span></div>
<br></div></div>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><br>Thanks and regards<br>
<br> Virendra Bhati<br><a href="tel:%2B91-8885268942" value="+918885268942" target="_blank">+91-8885268942</a><br>Software Engineer<br></div><br>
</div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>