<br clear="all"><font face="Verdana, sans-serif"><font size="2"><font color="#000000">Best
Regards, <br><br>Mahesh Katta</font><br><font color="#ff9900"><b>BUZZ</b></font><font color="#000000"><b>WORKS</b></font><font color="#000000">
Business Services Private Limited<br></font><font color="#999999">BANGALORE
</font><font color="#000000">| </font><font color="#999999">CHENNAI </font><font color="#808080">|
</font><font color="#999999">HYDERABAD </font><font color="#000000">|
</font><font color="#ff9900">MUMBAI| </font><font color="#999999">DELHI<br></font><font color="#000000">201, Crystal Tower, 75 Gundavali Cross Lane, Andheri Kurla Road, Andheri (E) Mumbai 400069</font><font color="#666666"><br>

</font><font color="#ff9900">GSM</font><font color="#000000">
+91.97029.70779 | </font><font color="#ff9900">Phone </font><font color="#000000">+91.22.4229.2634
| </font><font color="#ff9900">Fax </font><font color="#000000">+91.22.4229.2634<br></font><font color="#ff9900">Web</font><font color="#000000">
<a href="http://www.buzzworks.com/" target="_blank">http://www.buzzworks.com<br></a></font></font></font><br>
<br><br><div class="gmail_quote">On Thu, Jun 16, 2011 at 1:40 PM, A J Stiles <span dir="ltr">&lt;<a href="mailto:asterisk_list@earthshod.co.uk">asterisk_list@earthshod.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Thursday 16 Jun 2011, mahesh katta wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I have 100 DID&#39;s which is 4578900 to 4578999 , and i have 5001 to 5099<br>
&gt; extensions. when incomming call come to this DID no. (4578901) that time<br>
&gt; 5001 extestinsion should ring.<br>
&gt; below my dial plan is not getting any result , inthat has any mistakes.<br>
&gt; please help.<br>
&gt;<br>
&gt; exten =&gt; _45789XX,1,AGI(agi://<a href="http://127.0.0.1:4577/call_log" target="_blank">127.0.0.1:4577/call_log</a>)<br>
&gt; exten =&gt; _45789XX,1,Set(Dest=2{EXTEN:-2})<br>
&gt; exten =&gt;<br>
&gt; _45789XX,2,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALLERIDNUM<br>
&gt;}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0)) exten =&gt;<br>
&gt; _45789XX,3,Dial(SIP/${Dest},,tTo)<br>
&gt; exten =&gt; _45789XX,4,Hangup<br>
<br>
</div>Firstly, you&#39;ve got two &quot;1&quot; steps in that.  Unless you are doing something<br>
complicated with GOTOs  (and if you are, then there&#39;s probably a better way<br>
of doing it),  use &quot;1&quot; for the first step and &quot;n&quot;  (next)  for all subsequent<br>
steps.<br>
<br>
If nothing else, it means you can add extra NoOp() statements to put debugging<br>
information on the console, and later comment out or remove them without<br>
forced renumbering  (which brings its own opportunities to introduce errors).<br>
<br>
<br>
Secondly, you&#39;re setting ${Dest} to &quot;2&quot; followed by the last 2 digits of the<br>
dialled number.  But what you really want is &quot;50&quot; followed by the last 2<br>
digits of the dialled number.  So it should be<br>
<br>
exten =&gt; _45789XX,n,Set(Dest=50{EXTEN:-2})<br>
<font color="#888888"><br></font></blockquote><div>&gt;&gt;&gt; sir when I add this its not ringing on sip exten <br>log will come like <br>Accepting call from &#39;0559566768&#39; to &#39;4578924&#39; on channel 0/3, span 1                                                                                             <br>

    -- Executing AGI(&quot;Zap/3-1&quot;, &quot;agi://<a href="http://127.0.0.1:4577/call_log">127.0.0.1:4577/call_log</a>&quot;) in new stack                                                                                           <br>

    -- AGI Script agi://<a href="http://127.0.0.1:4577/call_log">127.0.0.1:4577/call_log</a> completed, returning 0                                                                                                  <br>    -- Executing Set(&quot;Zap/3-1&quot;, &quot;Dest=50{EXTEN:-2}&quot;) in new stack                                                                                                       <br>

    -- Executing MixMonitor(&quot;Zap/3-1&quot;, &quot;/var/spool/asterisk/astrec/20110616-122003-0559566768-4578924-1308212403.2225.gsm|av(0)V(0)&quot;) in new stack                      <br><span style="color: rgb(255, 0, 0);">    -- Executing Dial(&quot;Zap/3-1&quot;, &quot;SIP/50{EXTEN:-2}||tTo&quot;) in new stack                                                                                                  </span><br>

  == Begin MixMonitor Recording Zap/3-1                                                                                                                                 <br>  == Parsing &#39;/etc/asterisk/manager.conf&#39;: Found                                                                                                                        <br>

  == Manager &#39;sendcron&#39; logged on from 127.0.0.1                                                                                                                        <br>  == Manager &#39;sendcron&#39; logged off from 127.0.0.1                                                                                                                       <br>

Jun 16 12:20:07 WARNING[7409]: chan_sip.c:2018 create_addr: No such host: 50{EXTEN                                                                                      <br>Jun 16 12:20:07 NOTICE[7409]: app_dial.c:1076 dial_exec_full: Unable to create channel of type &#39;SIP&#39; (cause 3 - No route to destination)                                <br>

  == Everyone is busy/congested at this time (1:0/0/1)                                                                                                                  <br>    -- Executing Hangup(&quot;Zap/3-1&quot;, &quot;&quot;) in new stack                                                                                                                     <br>

  == Spawn extension (default, 4578924, 5) exited non-zero on &#39;Zap/3-1&#39;                                                                                                 <br>    -- Executing DeadAGI(&quot;Zap/3-1&quot;, &quot;agi://<a href="http://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----3-----CHANUNAVAIL----------">127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----3-----CHANUNAVAIL----------</a>&quot;) in new stack                            <br>

    -- AGI Script agi://<a href="http://127.0.0.1:4577/call_log--HVcauses">127.0.0.1:4577/call_log--HVcauses</a> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<font color="#888888">
<br>
--<br>
AJS<br>
<br>
Answers come *after* questions.<br>
</font><div><div></div><div class="h5"><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>
</div></div></blockquote></div><br>