RE: [Asterisk-Users] Incoming PSTN Calls - Stumped
Hi, Yes InternalExtension is the context and 2093 the extension. Just to explain something odd thats happening (and Im very stumped with this) .I think my contexts are definately the reason that I cant interrupt the menu for incoming pstn calls to choose a submenu: My users register with my sip proxy (SER). Therefore when I create an entry for them in sip.conf I set only one context. Also to allow for incoming calls from my provider it seems I must direct the calls firstly to a dummy extension. sip.conf register = username:[EMAIL PROTECTED]/2093 [provider-in] type=peer host=sip.provider.ie context=onecontext [2092] type=peer other stuff context=onecontext So the dummy extension here is 2093 and 2092 is a phone who registers with SER and when SER redirects to Asterisk uses the onecontext context. Now in my extensions.conf onecontext includes other contexts. This is how I get access to conference calls, creating IVR menus etc. Also the main purpose of onecontext is to allow outgoing access to the PSTN. [onecontext] include = createmenu //creating an IVR menu include = createconf //creating a conf call etc include = default //used for voicemail [createmenu] ;does something [createconf] ;does something ;outgoing calls main purpose of onecontext exten = _X.,1,Dial(SIP/[EMAIL PROTECTED]) exten = _X.,2,Hangup [default] ;mailbox for 2092 and other users Now this is where the problems start! For incoming calls I tried to do include = incomingpstn in onecontext which I thought would call a new context called incomingpstn which would have an entry for the dummy user. i.e. [incomingpstn] exten = 2093,1,Wait(1) exten = 2093,n,Background(MainMenu) exten = 1,1,Goto(InternalExtension,2093,1)//directs to another context called Internal Extension I also changed the [provider-in] for context=incomingpstn in my sip.conf. However this didnt work and I kept getting directed to the voicemail of my pstn provider. The ONLY way I could get the incoming calls working was to add the contents of the incomingpstn context to the default context i.e. [default] exten = 2093,1,Wait(1) exten = 2093,n,Background(MainMenu) exten = 1,1,Goto(InternalExtension,2093,1)//directs to another context called Internal Extension With this I can hear the MainMenu when I dial my DDI but I cant seem to interrupt to divert to another submenu. In the testing that I have done the user that is making the call is 2092 registered with SER. If I change the context of 2092 directly in sip.conf to incomingpstn, then I can hear the menu and interrupt to go to the submenu. But obviously then I dont have access to the other features in Asterisk. The point is that Im stumped as to why it only works in the default context and if this is the case how do I get it to call the submenu. This is what comes up on my asterisk console: -- Executing Dial (SIP/2092-2829, SIP/[EMAIL PROTECTED]) in new stack -- Called [EMAIL PROTECTED] -- Playing MainMenu (language en) -- other messages (not relevant I think) == Spawn extension (outgoing, 021123456, 1) exited non-zero on SIP/2092-5837 == Spawn extension (default, 2093, 2) exited non zero etc etc Im very stuck on this and cant figure it out. Any help appreciated. Many thanks, Aisling. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giovanni Miano Sent: 05 January 2006 21:09 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Incoming PSTN Calls Is Exist InternalExtension context ? and 2093 exten ? 2006/1/5, Aisling [EMAIL PROTECTED]: Hi all, I am having difficulty getting incoming PSTN calls working. I have set up an account with a third party provider. In my system, the user register with SER and use Asterisk for PSTN access, voicemail etc My provider told me to change my sip.conf as follows register = username:[EMAIL PROTECTED]/2093 ; To receive incoming calls specify this block and replace yourcontext for your dial plan. [blueface-in] type=peer host=sip.blueface.ie context=incomingpstn And then in my extensions.conf to have something similar to the following (or however I wanted to handle my incoming calls) [incomingpstn] exten = 2093,1,Wait(1) exten = 2093,n,Background(MainMenu) exten = 1,1,Goto(InternalExtension,2093,1) //press 1 for internal extensions. This didn't work and I kept getting a 404 not found error saying the user didn't exist. I tried creating the user in sip.conf and pointing it to the appropriate context but that didn't work either. The only way I can get it to work is to copy the code I had in the 'incomingpstn' context of my extension.conf to the 'default' context. i.e. [default] exten = 2093,1,Wait(1) exten = 2093,n,Background(MainMenu) exten = 1,1,Goto(InternalExtension,2093,1) Then the file would play. First of all I don't get why this is It doesn't even
[Asterisk-Users] confusion about contexts
Hi, Hope someone can help me-Asterisk isnt behaving as I would expect and I think its down to my contexts. There are two things I cant fathom. Firstly I want to record an IVR and so have created a user 20005 and a context called createmenu. I am using SER in front of asterisk so I changed the ser.cfg so that if the user dialled this number it forwards to asterisk. This works fine. The problem is when the invite reaches my asterisk box, asterisk uses the wrong context. It appears to call the outgoing context which is the context used to route calls to my pstn gateway provider. It then trys to execute a Dial command for 20005 which isnt supposed to happen. Secondly SER uses Asterisk for voicemail if a phone doesnt answer after a certain period of time or is busy. This works fine but I have to create an entry for every user in extensions.conf under the [default] context. Can I create a generic entry which would also work to shorten the config file?...Also if I change this and out all the entries under a context voicemail it doesnt work .I have to keep it in default This must obviously be something got to do with Asterisk finding the contexts. I am confused as to how you apply multiple contexts to one user. At the moment nearly each user (besides 20005 and 1234) has a context of outgoing in sip.conf. This is so that they can make outgoing pstn calls But what if I needed them to use another context in other situations?...Im just confused as to what context should be applied. I have included the relevant parts of my sip.conf and extensions.conf below. I would appreciate any advice as to why these issues are occurring. Many thanks, Aisling. ;sip.conf [general] bindport=5064 bindaddr=0.0.0.0 disallow=all allow=ulaw allow=alaw allow=gsm srvlookup=yes canreinvite=no; autocreatepeer=yes nat=yes dtmfmode=info insecure=very registerattempts=0 register = username:[EMAIL PROTECTED]/1234 ;To receive incoming calls specify this and replace yourcontext-pstn for your dial plan [blueface-in] type=peer host=sip.blueface.ie context=pstn [1234] type=friend username=1234 canreinvite=no context=pstn insecure=very ;callerid= Ais 1234 host=dynamic nat=yes dtmfmode=INFO mailbox=1234 disallow=all allow=alaw allow=ulaw allow=g723.1 allow=g729 ;added below line(s) for BLUEFACE conf ;To make outgoing calls specify this block [blueface-out] type=peer host=sip.blueface.ie username=username secret=password [20005] type=friend username=20005 canreinvite=no context=createmenu insecure=very ;callerid= Ais 20005 host=dynamic nat=yes dtmfmode=INFO mailbox=20005 disallow=all allow=alaw allow=ulaw allow=g723.1 allow=g729 [300] type=friend username=300 canreinvite=no context=outgoing insecure=very ;callerid= voicemail user 1 300 host=dynamic nat=yes dtmfmode=INFO mailbox=300 disallow=all allow=alaw allow=ulaw allow=g723.1 allow=g729 extensions.conf [general] static=yes writeprotect = yes [createmenu] exten = 20005,1,Wait(2) exten = 20005,2,Record(/tmp/asterisk-recording:gsm) exten = 20005,3,Wait(2) exten = 20005,4,Playback(/tmp/asterisk-recording) exten = 20005,5,wait92) exten = 20005,6,Hangup ;specify context for receiving incoming calls [pstn] ;Note this is just an example there are infinite different ways to handle the incoming call. ;exten = 1234, 1,Wait(1) ;exten = 1234, 2,Playback(beep) ;exten = 1234, 3,Hangup exten = 1234, 1, Dial (SIP/[EMAIL PROTECTED]) ; 1234 is the contact extension, default contact extension is s ;exten = 2092,1,Answer() ;exten = 2092,2,Playback(welcome) ;exten = 2092,3,Background(menu) ;exten = 1,1,Dial($316) ;exten = 2,1,Dial($314) [outgoing] ; Dial the Blue Face Speaking Clock exten = 300,1,Dial(SIP/[EMAIL PROTECTED]) exten = 300,2,Hangup ;Send PSTN calls to Blue Face exten = _X.,1,Dial(SIP/[EMAIL PROTECTED]) exten = _X.,2,Hangup [default] exten = 300, 1,Dial(SIP/300,20) exten = 300, 2,Voicemail(u300) exten = 300, 102,Voicemail(b300) exten = 300, 103,Hangup exten = 301, 1,Dial(SIP/301,20) exten = 301, 2,Voicemail(u301) exten = 301, 102,Voicemail(b301) exten = 301, 103,Hangup etc etc ---Legal Disclaimer--- 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. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit:
[Asterisk-Users] FW: SER Asterisk Voicemail
Any more ideas on my below mail? If a user is registered with SER and leaves a voicemail message with asterisk (by using rewritehostport etc in ser.cfg), then how is the user supposed to listen to the message afterwards? Is there any other way other than the MWI method?? Thnaksm Aisling. Original Message From: [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Subject: FW: SER Asterisk Voicemail Date: Thu, 10 Feb 2005 16:45:53 - Hi all, I have SER and Asterisk set up together with ser handling user registrations and asterisk providing voicemail services. When I ring a phone and it doesnt answer after a designated amount of time, the request is forwarded to asterisk, and I can leave a message. Now, this may seem a ridiculous question but how can I listen to my message afterwards? I have read about a solution by Java Rockx using sipsak for sending mwi sip notify messages to the phone but is there a simpler way which I am blindly ignoring?? Thank you in advance, Aisling. ---Legal Disclaimer--- 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. ___ 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
[Asterisk-Users] SER Asterisk Voicemail
Hi all, I have SER and Asterisk set up together with ser handling user registrations and asterisk providing voicemail services. When I ring a phone and it doesnt answer after a designated amount of time, the request is forwarded to asterisk, and I can leave a message. Now, this may seem a ridiculous question but how can I listen to my message afterwards? I have read about a solution by Java Rockx using sipsak for sending mwi sip notify messages to the phone but is there a simpler way which I am blindly ignoring?? Thank you in advance, Aisling. ---Legal Disclaimer--- 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. ___ 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