Hello, I'm a newbie to the asterisk system. I'm trying to configure a dialplan so that when I use my IAXy it will prompt me with an IVR and then send me off to different things like dial and voicemail from that. I've tried various combinations but I can't seem to get it to work properly. Here is an example: [default] exten => s,1,Answer exten => s,2,Ringing It gives me a dialtone and waits for an input, but if I do: [default] exten => 1,1,Answer exten => 1,2,Ringing And then dial 1 it rings... Am I doing something wrong? Any suggestions or pointers gratefully received. Thanks in advance, John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050919/481714d0/attachment.htm
You are doing correct. But you have to explain what you want to do? As per your second configuration, if you dial 1 then it will ring....Post exactly what you are trying to accomplish? -Thameem On 9/19/05, John Crowhurst <fyremoon@gmail.com> wrote:> > Hello, I'm a newbie to the asterisk system. > > I'm trying to configure a dialplan so that when I use my IAXy it will > prompt me with an IVR and then send me off to different things like dial and > voicemail from that. > > I've tried various combinations but I can't seem to get it to work > properly. Here is an example: > > [default] > exten => s,1,Answer > exten => s,2,Ringing > > It gives me a dialtone and waits for an input, but if I do: > > [default] > exten => 1,1,Answer > exten => 1,2,Ringing > > And then dial 1 it rings... > > Am I doing something wrong? Any suggestions or pointers gratefully > received. > > Thanks in advance, > > John > > > > > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com <http://Easynews.com>-- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050919/9e234aef/attachment.htm
[default] exten => 1,1,Playback(YouPressedOne) exten => 1,2,Playback(BecauseYouPressed1IWillCallCarol) exten => 1,3,Goto(first-ivr,s,1) exten => 2,1,Playback(YouPressedTwo) exten => 2,2,Playback(BecauseYouPressed1IWillCallCarol) exten => 2,3,Goto(second-ivr,s,1) exten => 3,1,Playback(YouPressedTwo) exten => 3,2,Playback(BecauseYouPressed3IWillSendYouToVoicemail) exten => 3,3,Goto(third-ivr,s,1) [first-ivr] exten => s,1,Dial(InsertDialStatementHere) exten => s,2,Playback(Goodbye) exten => s,3,Hangup [second-ivr] exten => s,1,Dial(InsertDialStatementHere) exten => s,2,Playback(Goodbye) exten => s,3,Hangup [third-ivr] exten => s,1,VoiceMailMain(default) exten => s,2,Playback(Goodbye) exten => s,3,Hangup Get it? In a context (which is the name specified in brackets) , the first number in a statement indicates the extension, which Asterisk interprets through a DTMF tone (you press buttons to dial something) or a DID number for inbound calls (in the case of a PRI) and executes statements according to the priority, which is the next number. The first number 'exten => 1' allows you to group related statements together and bind them to an extension number ( which could be internal / outbound, could be external / inbound) and the second number 'exten => 1,1' specifies the order in which the statements are executed. After a statement is executed, and it could be executed incorrectly or correctly, or it could have executed successfully or unsucessfully, it will then process the next line in the context until it runs out of stuff to do. When you dial out, Asterisk determines the context in which your phone is to be run in, and tries to match what you dialled to an extension specified in the context for your phone. If there is no match, it tries the s extension. If the s extension does not exist or is invalid, Asterisk returns a busy tone and "404 not found" on your phone. When someone dials in, Asterisk tries to match the DID number against an extension in the inbound calls context. If there is no match, it tries the s extension in the inbound calls context. If the s extension does not exist or is invalid, Asterisk rejects the call. The s extension is a special kind of extension. It means, "Execute these statements regardless of the extension specified in the context unless told otherwise, or if there is no match for the extension requested". In the example above, pressing 1 or 2 will do something, but if you press any other digit, Asterisk will hang up the call. Why? Because in the [default] context, I specified something for Asterisk to do if I press 1 or 2, but I didn't specify it for any other number and I didn't specify an 's' extension which would have handled a keypress other than 1 or 2. -----Original Message----- From: John Crowhurst [mailto:fyremoon@gmail.com] Sent: Monday, September 19, 2005 1:23 PM To: Asterisk-Users@lists.digium.com Subject: Re: [Asterisk-Users] IAX dialplan problem? On 9/19/05, Thameem Ansari < thameem.ansari@gmail.com <mailto:thameem.ansari@gmail.com> > wrote: You are doing correct. But you have to explain what you want to do? As per your second configuration, if you dial 1 then it will ring....Post exactly what you are trying to accomplish? I don't actually have dialplan created, as I'm trying to see if I can get it to work. What I would like to do is present me with a menu when I first press the connect button on the phone, give me a set of options like 'press 1 to call Carol', 'press 2 to call Jenny', 'press * for voicemail', etc. -- John -Thameem On 9/19/05, John Crowhurst < <mailto:fyremoon@gmail.com> fyremoon@gmail.com> wrote: Hello, I'm a newbie to the asterisk system. I'm trying to configure a dialplan so that when I use my IAXy it will prompt me with an IVR and then send me off to different things like dial and voicemail from that. I've tried various combinations but I can't seem to get it to work properly. Here is an example: [default] exten => s,1,Answer exten => s,2,Ringing It gives me a dialtone and waits for an input, but if I do: [default] exten => 1,1,Answer exten => 1,2,Ringing And then dial 1 it rings... Am I doing something wrong? Any suggestions or pointers gratefully received. Thanks in advance, John _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com <http://Easynews.com> -- Asterisk-Users mailing list Asterisk-Users@lists.digium.com <mailto:Asterisk-Users@lists.digium.com> http://lists.digium.com/mailman/listinfo/asterisk-users <http://lists.digium.com/mailman/listinfo/asterisk-users> To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users <http://lists.digium.com/mailman/listinfo/asterisk-users> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050919/6c93dbca/attachment.htm
On 9/19/05, Colin Anderson <ColinA@landmarkmasterbuilder.com> wrote:> > [default] > exten => 1,1,Playback(YouPressedOne) > exten => 1,2,Playback(BecauseYouPressed1IWillCallCarol) > exten => 1,3,Goto(first-ivr,s,1) > exten => 2,1,Playback(YouPressedTwo) > exten => 2,2,Playback(BecauseYouPressed1IWillCallCarol) > exten => 2,3,Goto(second-ivr,s,1) > exten => 3,1,Playback(YouPressedTwo) > exten => 3,2,Playback(BecauseYouPressed3IWillSendYouToVoicemail) > exten => 3,3,Goto(third-ivr,s,1) > [first-ivr] > exten => s,1,Dial(InsertDialStatementHere) > exten => s,2,Playback(Goodbye) > exten => s,3,Hangup > [second-ivr] > exten => s,1,Dial(InsertDialStatementHere) > exten => s,2,Playback(Goodbye) > exten => s,3,Hangup > [third-ivr] > exten => s,1,VoiceMailMain(default) > exten => s,2,Playback(Goodbye) > exten => s,3,Hangup > Get it? In a context (which is the name specified in brackets) , the > first number in a statement indicates the extension, which Asterisk > interprets through a DTMF tone (you press buttons to dial something) or a > DID number for inbound calls (in the case of a PRI) and executes statements > according to the priority, which is the next number. >In the above example, you have to press 1,2 or 3 before it will tell you that. I was wanting it to tell me before I pressed those numbers. Can an IAX device be setup so that it appears to be an inbound DID, and if so how can I do that with the IAXy? -- John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050919/b3a2ca82/attachment.htm
> In the above example, you have to press 1,2 or 3 before it will tell youthat. I was wanting it to tell me before I > pressed those numbers. You have to get to a context before you can do any action so you have to dial *something* to get to that context. However, with Zapata interfaces (i.e. you are using a Digium TDM card + a regular POTS phone) you can specify immediate=yes in zapata.conf so as soon as the phone goes off-hook it will be thrown into that extension's 's' priority. However, a VoIP phone or an IAXy would have to be set to auto-dial an extension as soon as it goes off hook, and this is dependent on the model of phone that you have. There are smarter people than me on the list that can comment on how this would work with an IAXy. Can an IAX device be setup so that it appears to be an inbound DID, and if so how can I do that with the IAXy? Sort of. An IAX device has to be defined in IAX.conf with a default context, or Asterisk won't know what context to hand the call off to when the IAX device tries to instantiate a call on your Asterisk box. You can simulate an "inbound" call simply by making the context entry in IAX.conf the same context as what is used for inbound calls. So if your default context for PSTN calls is "from-pstn" you would make the context entry for the IAXy to "from-pstn" and any time the IAXy dials, Asterisk would throw the call into the "from-pstn" context and attempt to match the extension dialled from the IAXy to an entry in the "from-pstn" context. If there was no direct match, Asterisk would try the 's' extension. If the 's' extension would not yield a match, Asterisk would return 404 to the IAXy. hth -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050919/b026b648/attachment.htm