<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2>[default]</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 1,1,Playback(YouPressedOne)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 1,2,Playback(BecauseYouPressed1IWillCallCarol)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 1,3,Goto(first-ivr,s,1)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 2,1,Playback(YouPressedTwo)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 2,2,Playback(BecauseYouPressed1IWillCallCarol)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 2,3,Goto(second-ivr,s,1)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><SPAN class=543370620-19092005><SPAN
class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><SPAN class=543370620-19092005><SPAN
class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten =>
3,1,Playback(YouPressedTwo)</FONT></SPAN></DIV>
<DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=>
3,2,Playback(BecauseYouPressed3IWillSendYouToVoicemail)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> 3,3,Goto(third-ivr,s,1)</FONT></SPAN></DIV></SPAN></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2>[first-ivr]</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,1,Dial(InsertDialStatementHere)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,2,Playback(Goodbye)</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,3,Hangup</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2>[second-ivr]</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,1,Dial(InsertDialStatementHere)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,2,Playback(Goodbye)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><SPAN class=543370620-19092005><FONT
face=Arial color=#0000ff size=2>exten =>
s,3,Hangup</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><SPAN class=543370620-19092005>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2>[third-ivr]</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005><FONT face=Arial color=#0000ff size=2>exten
=> s,1,VoiceMailMain(default)</FONT></SPAN></DIV>
<DIV><SPAN class=543370620-19092005></SPAN><SPAN class=543370620-19092005><FONT
face=Arial color=#0000ff size=2><SPAN class=543370620-19092005><FONT face=Arial
color=#0000ff size=2>exten =>
s,2,Playback(Goodbye)</FONT></SPAN></DIV></FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><SPAN class=543370620-19092005><FONT
face=Arial color=#0000ff size=2>exten =>
s,3,Hangup</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=543370620-19092005><SPAN
class=543370620-19092005></SPAN></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>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.
</SPAN></DIV>
<DIV><SPAN class=543370620-19092005></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>The first number 'exten =>
<STRONG>1</STRONG>' 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,<STRONG>1'
</STRONG>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. </SPAN></DIV>
<DIV><SPAN class=543370620-19092005></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>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. </SPAN></DIV>
<DIV><SPAN class=543370620-19092005></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>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. </SPAN></DIV>
<DIV><SPAN class=543370620-19092005></SPAN> </DIV>
<DIV><SPAN class=543370620-19092005>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 <STRONG>any other number</STRONG>
and I didn't specify an 's' extension which would have handled a keypress other
than 1 or 2. </SPAN></DIV></FONT></SPAN></DIV></SPAN></DIV></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> John Crowhurst
[mailto:fyremoon@gmail.com]<BR><B>Sent:</B> Monday, September 19, 2005 1:23
PM<BR><B>To:</B> Asterisk-Users@lists.digium.com<BR><B>Subject:</B> Re:
[Asterisk-Users] IAX dialplan problem?<BR><BR></FONT></DIV><BR><BR>
<DIV><SPAN class=gmail_quote>On 9/19/05, <B class=gmail_sendername>Thameem
Ansari</B> <<A
href="mailto:thameem.ansari@gmail.com">thameem.ansari@gmail.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>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?</BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>I don't actually have
dialplan created, as I'm trying to see if I can get it to work.
<BR><BR></DIV>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.<BR><BR>--<BR>John<BR><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">-Thameem<BR><BR>
<DIV>
<DIV><SPAN class=e id=q_1066fc3353c2a3c9_1><SPAN class=gmail_quote>On
9/19/05, <B class=gmail_sendername>John Crowhurst</B> <<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:fyremoon@gmail.com" target=_blank> fyremoon@gmail.com</A>>
wrote:</SPAN></SPAN></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><SPAN class=e id=q_1066fc3353c2a3c9_3>Hello, I'm a newbie to the
asterisk system.<BR><BR>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.<BR><BR>I've tried
various combinations but I can't seem to get it to work properly. Here is
an example:<BR><BR>[default]<BR>exten => s,1,Answer<BR>exten =>
s,2,Ringing<BR><BR>It gives me a dialtone and waits for an input, but if I
do:<BR><BR>[default]<BR>exten => 1,1,Answer<BR>exten =>
1,2,Ringing<BR><BR>And then dial 1 it rings...<BR><BR>Am I doing something
wrong? Any suggestions or pointers gratefully received.<BR><BR>Thanks in
advance,<BR><SPAN><BR>John<BR><BR><BR><BR></SPAN><BR></SPAN></DIV>_______________________________________________<BR>--Bandwidth
and Colocation sponsored by <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://Easynews.com" target=_blank>Easynews.com </A>--
<BR><BR>Asterisk-Users mailing list<BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Asterisk-Users@lists.digium.com"
target=_blank>Asterisk-Users@lists.digium.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://lists.digium.com/mailman/listinfo/asterisk-users"
target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>To
UNSUBSCRIBE or update options visit:<BR> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://lists.digium.com/mailman/listinfo/asterisk-users"
target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>