Courtney Couch
2005-Apr-02 23:47 UTC
[Asterisk-Users] How does asterisk know the did called on?
If I were to buy 20 did's how do I know within asterisk which number was dialed? (like say I want a few of the did's to ring specific extensions if they are dialed and others to go through the menu) Is there any ${var} that has the number dialed in on? (that would be optimum). -Courtney.
Damian Funnell
2005-Apr-03 00:12 UTC
[Asterisk-Users] How does asterisk know the did called on?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000066"> <font size="-1"><font face="Verdana">Hi Courtney,<br> <br> This really depends on the type of channel you are using. We use CAPI with one of our customers and they have ten DID's (DDI's in NZ) and use four BRI lines. Here is a snippet from their extensions.conf that shows how it dials certain extensions based on the number dialled. The three digit number in the dialling rules are presented by the ISDN channel/CAPI and will probably be slightly different based on your telephony provider. We had to dial one of the DDI's and see Asterisk reported it as being on the console to figure out how long the DDI number was.<br> <br> (Note that you would be much better off using macros rather than the numerous entries that we have in extensions.conf, but we have structured it like this upon customer request).<br> <br> ;[incoming]<br> exten => s,1,Answer<br> exten => s,2,Dial(SIP/9295,20,t,)<br> ; No answer or busy, so dial other extension(s) - can add others to this list if required<br> exten => s,3,Dial(SIP/9295&SIP/9287,,t,) <br> ;Queue not set up, do not use the following unless configuring it first.<br> ;exten => s,3,Queue(receptionqueue)<br> ;DDI's follow<br> ;Manager (290)<br> exten => 290,1,Answer<br> exten => 290,2,Dial(SIP/9290,,t,)<br> exten => 290,3,Voicemail(9290)<br> exten => 290,4,Congestion<br> ;Supervisor 1 (291)<br> exten => 291,1,Answer<br> exten => 291,2,Dial(SIP/9291,,t,)<br> exten => 291,3,Voicemail(9291)<br> exten => 291,4,Congestion<br> <br> Hope this helps.<br> Damian.<br> <br> </font></font> <pre class="moz-signature" cols="72">FFF Managed Technology Ltd 60 Cook St P.O. 6368 Wellesley St Auckland t +64 9 356 2911 f +64 9 358 9070 m +64 21 415 297 w <a class="moz-txt-link-abbreviated" href="http://www.fff.co.nz">www.fff.co.nz</a></pre> <br> <br> Courtney Couch wrote: <blockquote cite="mid424F9195.4090708@gmail.com" type="cite">If I were to buy 20 did's how do I know within asterisk which number was dialed? (like say I want a few of the did's to ring specific extensions if they are dialed and others to go through the menu) <br> <br> Is there any ${var} that has the number dialed in on? (that would be optimum). <br> <br> -Courtney. <br> _______________________________________________ <br> Asterisk-Users mailing list <br> <a class="moz-txt-link-abbreviated" href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</a> <br> <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a> <br> To UNSUBSCRIBE or update options visit: <br> <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a> <br> <br> <br> <br> </blockquote> </body> </html>
Rich Adamson
2005-Apr-03 06:08 UTC
[Asterisk-Users] How does asterisk know the did called on?
> If I were to buy 20 did's how do I know within asterisk which number was > dialed? (like say I want a few of the did's to ring specific extensions > if they are dialed and others to go through the menu) > > Is there any ${var} that has the number dialed in on? (that would be > optimum).It varies as to how each provider handles this, but the majority of those I've tested with send the DID number as the extension dialed. As an example, when livevoip sends an incoming 800 call (did is the same) to my * box, they send the call to extn 8001234567 and I handle it in the extensions.conf like this: [livevoip800] exten=>8001234567,1,Dial(SIP/3000,10) A customer uses a PRI with about 30 did's. Each incoming DID call includes the dialed number, and the above approach is used to map those incoming calls to specific extensions. A variation of the above is to use a GoTo statement (instead of the Dial statement) to send the call to an existing context/registration.
Noah Miller
2005-Apr-03 06:52 UTC
[Asterisk-Users] Re: How does asterisk know the did called on?
Hi Courtney -> If I were to buy 20 did's how do I know within asterisk which number > was > dialed? (like say I want a few of the did's to ring specific extensions > if they are dialed and others to go through the menu) > > Is there any ${var} that has the number dialed in on? (that would be > optimum).Your provider will "outpulse" a certain number of the DID digits for you. You may have a choice as to how many digits you want outpulsed. You can then use these outpulsed digits just as an extension. E.G. if you have (555) 555-2000 through (555) 555-2019, and you have four outpulsed digits, you could make them go to your various extensions/contexts like this: exten => 2000,1,Goto(IVRMenu,s,1) exten => 2001,1,Goto(SIPExtensions,101,1) - Noah
Eric Wieling aka ManxPower
2005-Apr-03 18:36 UTC
[Asterisk-Users] How does asterisk know the did called on?
Courtney Couch wrote:> If I were to buy 20 did's how do I know within asterisk which number was > dialed? (like say I want a few of the did's to ring specific extensions > if they are dialed and others to go through the menu) > > Is there any ${var} that has the number dialed in on? (that would be > optimum).Your carrier can tell you how many digits they will send to you. Asterisk sees these digits and will match exten => 1234,1,Blah if the carrier sends you 4 digits. Remember Asterisk does not really support DID on analog ports, only T-1/E-1 (including PRI) ports , BRI ports, and VoIP ports.