<font face="arial" size="2">I'm a bit confused on how you get your calls to Asterisk, what I mean is: are you phoning into asterisk via a sip user? in this <br />case, which one?, if not is it iax or though a zap channel?<br /><br />anyway, here some tips:<br /><br />For your first problem it seems it has to do with what I pointed above, check that the user which is dialing into asterisk has <br />the correct context (context=create-menu) with at least type= peer<br /><br />also don't have to retype the allow=codec, disallow=codec, dtmfmode=x for every user, just set it in the general context in <br />sip.conf<br /><br />your second problem think it has to do once again with the firts thing above, and regarding the retyping, I'm afaid I don't know <br />any other way than writing those lines again and again for everyuser. Maybe someone else out there&nbsp;knows someting else that can help.<br /><br />Don't set many "outgoing" context for every user in sip.conf!!!!! just set one and point all users to that one. If you need your <br />user to have acces to other contexts&nbsp;just add <br />include =&gt; your_context<br />at the end of whatever context you want (btw can add more than one&nbsp;inlcude's&nbsp;)<br /><br /><br />Alyed </font><br />-------------------------------------------<br />Hi,<br /><br />Hope someone can help me-Asterisk isn&#146;t behaving as I would expect<br />and I think it&#146;s down to my contexts.<br /><br />There are two things I can&#146;t fathom.<br /><br />Firstly I want to record an IVR and so have created a user 20005 and<br />a context called createmenu. I am using SER in front of asterisk so I<br />changed the ser.cfg so that if the user dialled this number it<br />forwards to asterisk. This works fine. The problem is when the invite<br />reaches my asterisk box, asterisk uses the wrong context. It appears<br />to call the &#147;outgoing&#148; context which is the context used to route<br />calls to my pstn gateway provider. It then trys to execute a &#147;Dial&#148;<br />command for 20005 which isn&#146;t supposed to happen.<br /><br />Secondly SER uses Asterisk for voicemail if a phone doesn&#146;t answer<br />after a certain period of time or is busy. This works fine but I have<br />to create an entry for every user in extensions.conf under the<br />[default] context. Can I create a generic entry which would also work<br />to shorten the config file?...Also if I change this and out all the<br />entries under a context &#147;voicemail&#148; it doesn&#146;t work&#133;.I have to keep<br />it in default&#133;This must obviously be something got to do with<br />Asterisk finding the contexts.<br /><br />I am confused as to how you apply multiple contexts to one user. At<br />the moment nearly each user (besides 20005 and 1234) has a context of<br />&#145;outgoing&#146; in sip.conf. This is so that they can make outgoing pstn<br />calls&#133;But what if I needed them to use another context in other<br />situations?...I&#146;m just confused as to what context should be applied.<br /><br />I have included the relevant parts of my sip.conf and extensions.conf<br />below. I would appreciate any advice as to why these issues are<br />occurring.<br /><br />Many thanks,<br />Aisling.<br /><br />;sip.conf<br />[general]<br /><br />bindport=5064<br />bindaddr=0.0.0.0<br />disallow=all<br />allow=ulaw<br />allow=alaw<br />allow=gsm<br />srvlookup=yes<br />canreinvite=no;<br />autocreatepeer=yes<br />nat=yes<br />dtmfmode=info<br />insecure=very<br />registerattempts=0<br /><br />register =&gt; username:password@sip.blueface.ie/1234<br /><br />;To receive incoming calls specify this and replace<br />"yourcontext-pstn" for your dial plan<br /><br />[blueface-in]<br />type=peer<br />host=sip.blueface.ie<br />context=pstn<br /><br />[1234]<br />type=friend<br />username=1234<br />canreinvite=no<br />context=pstn<br />insecure=very<br />;callerid= "Ais" &lt;1234&gt;<br />host=dynamic<br />nat=yes<br />dtmfmode=INFO<br />mailbox=1234<br />disallow=all<br />allow=alaw<br />allow=ulaw<br />allow=g723.1<br />allow=g729<br /><br />;added below line(s) for BLUEFACE conf<br />;To make outgoing calls specify this block<br /><br />[blueface-out]<br />type=peer<br />host=sip.blueface.ie<br />username=username<br />secret=password<br /><br />[20005]<br />type=friend<br />username=20005<br />canreinvite=no<br />context=createmenu<br />insecure=very<br />;callerid= "Ais" &lt;20005&gt;<br />host=dynamic<br />nat=yes<br />dtmfmode=INFO<br />mailbox=20005<br />disallow=all<br />allow=alaw<br />allow=ulaw<br />allow=g723.1<br />allow=g729<br /><br />[300]<br />type=friend<br />username=300<br />canreinvite=no<br />context=outgoing<br />insecure=very<br />;callerid= "voicemail user 1" &lt;300&gt;<br />host=dynamic<br />nat=yes<br />dtmfmode=INFO<br />mailbox=300<br />disallow=all<br />allow=alaw<br />allow=ulaw<br />allow=g723.1<br />allow=g729<br /><br />extensions.conf<br />[general]<br />static=yes<br />writeprotect = yes<br /><br />[createmenu]<br />exten =&gt; 20005,1,Wait(2)<br />exten =&gt; 20005,2,Record(/tmp/asterisk-recording:gsm)<br />exten =&gt; 20005,3,Wait(2)<br />exten =&gt; 20005,4,Playback(/tmp/asterisk-recording)<br />exten =&gt; 20005,5,wait92)<br />exten =&gt; 20005,6,Hangup<br /><br />;specify context for receiving incoming calls<br />[pstn]<br />;Note this is just an example there are infinite different ways to<br />handle the incoming call.<br />;exten =&gt; 1234, 1,Wait(1)<br />;exten =&gt; 1234, 2,Playback(beep)<br />;exten =&gt; 1234, 3,Hangup<br />exten =&gt; 1234, 1, Dial<br /><br />(SIP/2092@seraddress) ; 1234 is the contact extension, default<br />contact extension is "s"<br /><br />;exten =&gt; 2092,1,Answer()<br />;exten =&gt; 2092,2,Playback(welcome)<br />;exten =&gt; 2092,3,Background(menu)<br />;exten =&gt; 1,1,Dial($316)<br />;exten =&gt; 2,1,Dial($314)<br /><br />[outgoing]<br />; Dial the Blue Face Speaking Clock<br />exten =&gt; 300,1,Dial(SIP/300@blueface-out)<br />exten =&gt; 300,2,Hangup<br /><br />;Send PSTN calls to Blue Face<br />exten =&gt; _X.,1,Dial(SIP/${EXTEN}@blueface-out)<br />exten =&gt; _X.,2,Hangup<br /><br />[default]<br /><br />exten =&gt; 300, 1,Dial(SIP/300,20)<br />exten =&gt; 300, 2,Voicemail(u300)<br />exten =&gt; 300, 102,Voicemail(b300)<br />exten =&gt; 300, 103,Hangup<br /><br />exten =&gt; 301, 1,Dial(SIP/301,20)<br />exten =&gt; 301, 2,Voicemail(u301)<br />exten =&gt; 301, 102,Voicemail(b301)<br />exten =&gt; 301, 103,Hangup <br /><br />etc etc<br /><br /><br /><br />-------------------Legal Disclaimer---------------------------------------<br /><br />The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.<br /><br />_______________________________________________<br />--Bandwidth and Colocation provided by Easynews.com --<br /><br />Asterisk-Users mailing list<br />To UNSUBSCRIBE or update options visit:<br />http://lists.digium.com/mailman/listinfo/asterisk-users<br /><br />