<div dir="ltr">Hi, <div><br></div><div><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">Try setting CDR(clid)</span></div><div><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> </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">On Thu, Jan 12, 2012 at 12:44 PM, virendra bhati <span dir="ltr">&lt;<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>&gt;</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, <br>I am using phpagi for agi scripting. and want to update callerid number but didn&#39;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)">&lt;?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(&quot;phpagi.php&quot;);</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-&gt; answer();</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-&gt;verbose(&quot;------------------------------------------&quot;);</span><br style="color:rgb(0,102,0)">


<span style="color:rgb(0,102,0)">$agi-&gt; exec(&#39;Set&#39;,&quot;CALLERID(num)=01133200274&quot;);</span><br style="color:rgb(0,102,0)"><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$ani = $agi-&gt;request[&#39;agi_callerid&#39;];</span><br style="color:rgb(0,102,0)">


<span style="color:rgb(0,102,0)">$agi-&gt;noop(&quot;My CalleID: &lt;&lt;&lt;&lt;&lt;&lt;&lt;=&quot;.$ani);</span><br style="color:rgb(0,102,0)"><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-&gt;set_variable(&quot;CALLERID(num)&quot;,&quot;01133200274&quot;);</span><br style="color:rgb(0,102,0)">


<span style="color:rgb(0,102,0)">$ani = $agi-&gt;request[&#39;agi_callerid&#39;];</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-&gt;noop(&quot;My CalleID: &lt;&lt;&lt;&lt;&lt;&lt;&lt;=&quot;.$ani);</span><br style="color:rgb(0,102,0)">


<br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">$agi-&gt; exec(&#39;Dial&#39;,&quot;SIP/<a href="mailto:00918885268942@sip.trunk.gradwell.com" target="_blank">00918885268942@sip.trunk.gradwell.com</a>,60,r&quot;);</span><br style="color:rgb(0,102,0)">


<span style="color:rgb(0,102,0)">//$agi-&gt; exec(&#39;Dial&#39;,&quot;SIP/00918885268942@voipon,60,r&quot;);</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">?&gt; </span><br style="color:rgb(0,102,0)" clear="all">


<br>And CLI&gt; <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(&quot;SIP/2209-000026d3&quot;, &quot;&quot;) in new stack</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">    -- Executing [101@outbound:2] AGI(&quot;SIP/2209-000026d3&quot;, &quot;/home/virendra.bhati/outdial.php&quot;) 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)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_request: /home/virendra.bhati/outdial.php</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_channel: SIP/2209-000026d3</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_language: en</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_type: SIP</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_uniqueid: 1326357644.10070</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_version: 1.6.2.20</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_callerid: 2209</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_calleridname: unknown</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_callingpres: 0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_callingani2: 0</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_callington: 0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_callingtns: 0</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_dnid: 101</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_rdnis: unknown</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_context: outbound</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_extension: 101</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_priority: 2</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_enhanced: 0.0</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_accountcode:</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; agi_threadid: 1386719552</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt;</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; ANSWER</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; VERBOSE &quot;------------------------------------------&quot; 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)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=1</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; EXEC Set CALLERID(num)=01133200274</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">    -- AGI Script Executing Application: (Set) Options: (CALLERID(num)=01133200274)</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; NOOP &quot;My CalleID: &lt;&lt;&lt;&lt;&lt;&lt;&lt;=2209&quot;</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; SET VARIABLE CALLERID(num) &quot;01133200274&quot;</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=1</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; NOOP &quot;My CalleID: &lt;&lt;&lt;&lt;&lt;&lt;&lt;=2209&quot;</span><br style="color:rgb(102,0,0)">


<span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">&lt;SIP/2209-000026d3&gt;AGI Rx &lt;&lt; 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)">       &gt; ast_get_srv: SRV lookup for &#39;_sip._<a href="http://udp.sip.trunk.gradwell.com" target="_blank">udp.sip.trunk.gradwell.com</a>&#39; 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: &quot;Forbidden&quot; from &#39;&quot;01133200274&quot; &lt;<a href="mailto:sip%3A01133200274@10.10.10.181" target="_blank">sip:01133200274@10.10.10.181</a>&gt;;tag=as76229e88&#39;</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)">&lt;SIP/2209-000026d3&gt;AGI Tx &gt;&gt; 200 result=0</span><br style="color:rgb(102,0,0)"><span style="color:rgb(102,0,0)">    -- &lt;SIP/2209-000026d3&gt;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(&quot;SIP/2209-000026d3&quot;, &quot;&quot;) in new stack</span><span class="HOEnZb"><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>--<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>