<div>Thanks Steve, your solution works but I am looking for is something more general. The example I posted is a simplified one and on the real one I am using extensions on the 5XXX scenario so I can have 5000 to 5999 range. You answer for just 10 extension is great but for a 1000 and when not all extensions on the 5XXX are set up then it is not optimal to define each extension manually or add exceptions manually and I was looking to see if there a command or state that I could use like DIALSTATUS, etc to see if the dialled extension doesn't exist and then jump to the invalid prompt.<br><br>Regards<br>Richard<br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">----- Original Message -----<br>
From: "Steve Edwards" <asterisk.org@sedwards.com><br>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com><br>
Subject: Re: [asterisk-users] Calls to sip extensions not defined<br>
Date: Fri, 21 Mar 2008 15:12:43 -0700 (PDT)<br>
<br>
<br>
On Fri, 21 Mar 2008, Ricardo B. wrote:<br>
<br>
&gt; On my example I have sip extensions 10, 11, 12, and 13<br>
&gt; on sip.conf. On a basic extension.conf I set up a pattern starting with<br>
&gt; "1" and a second digit should dial the sip extension entered by the user<br>
&gt; and if the user don't pick up or is unavailable  the call goes to the<br>
&gt; user voicemail and then hangup. This basic setup can be seen next:<br>
&gt;<br>
&gt; [default]<br>
&gt; exten =&gt; _1X,1,Dial(SIP/${EXTEN},10)<br>
&gt; exten =&gt; _1X,2,VoiceMail(${EXTEN}@default,u)<br>
&gt; exten =&gt; _1X,3,HangUp()<br>
&gt;<br>
&gt; Now, what happens if the user dials 15? Then the pattern is applied and<br>
&gt; the asterisk tries to dial that sip extension that doesn't exist, the<br>
&gt; next step that is the voicemail also fails as 15 is not defined on<br>
&gt; voicemail.conf and finally reaches the last step where it hang ups.<br>
&gt;<br>
&gt; What I am looking for is to play Playback(pbx-invalid) if a user enters a<br>
&gt; sip extension not created.<br>
<br>
While I didn't take the time to test it, the following should be close:<br>
<br>
[default]<br>
          exten =        _1[1-3],1,        dial(sip/${EXTEN},10)<br>
          exten = _1[1-3],n,        voicemail(${EXTEN}@default,u)<br>
          exten = _1[1-3],n,        hangup<br>
          exten = i,1,                playback(pbx-invalid)<br>
          exten = i,n,                hangup<br>
<br>
Thanks in advance,<br>
------------------------------------------------------------------------<br>
Steve Edwards      sedwards@sedwards.com      Voice: +1-760-468-3867 PST<br>
Newline                                             Fax: +1-760-731-3000<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
    http://lists.digium.com/mailman/listinfo/asterisk-users<br>
</asterisk-users@lists.digium.com></asterisk.org@sedwards.com></blockquote>
</div>
<BR>

-- 
<div> Want an e-mail address like mine? </b><br>
Get a <b>free e-mail </b>account today at <a href="http://www.mail.com/Product.aspx" target="_blank">www.mail.com</a>!</div>