Aisling
2006-Jan-11 03:24 UTC
[Asterisk-Users] Incoming PSTN Calls - Can't interrupt Main Menu
Just another bit of info which might help solve this: Looking at the Asterisk log messages - I notice when I start up Asterisk, I see the error: pbx_config.c: Can't use 'next' priority on the first entry! Could I be right that its something got to do with priorities? I changed the incomingpstn context to the following eliminating the 'n' field and still the same errors were display in the log file on startup and it didn't allow me to interrupt the menu. [incomingpstn] exten => s,1,Wait(1) exten => s,2,Background(MainMenu) ;exten => s,3,WaitExten(10) exten => 1,1,Goto(internalExt,s,1) exten => 2,1,Goto(mainconfmenu,s,1) Many Thanks, Aisling. -----Original Message----- From: Aisling [mailto:ashling.odriscoll@cit.ie] Sent: 11 January 2006 10:14 To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: RE: [Asterisk-Users] Incoming PSTN Calls - Can't interrupt Main Menu Hi Kokmeng, Unfortunately that's wasn't it. WaitExten was executed but then I still get the timeout error - Timeout, but no rule 't' in context 'incomingpstn' I am totally stuck...I have been googling and searching the archives and testing different things for days to no avail. I thought at some stage it might be an issue with the priorities and all different priorities but that didn't work either. I see the Asterisk console play the MainMenu (i.e. the Background rule), I press an option and absolutely nothing appears on the console, the menu carries on regardless. Its only at the end I see this timeout error. Thanks, Aisling. -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of KokMeng Loh Sent: 11 January 2006 01:20 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Incoming PSTN Calls - Can't interrupt Main Menu Hi Aisling, You're missing the 'WaitExten' directive after playing the background sound file. Your lines should be like this: [incomingpstn] exten => s,1,Wait(1) exten => s,n,Background(MainMenu) exten => s,n,WaitExten(10) exten => 1,1,Goto(internalExt,s,1) exten => 2,1,Goto(mainconfmenu,s,1) -kokmeng. Aisling wrote:>Hi, > >Thanks to both Iqbal and Kokmeng for the replies. > >Kokmeng I tried what you suggested however no luck... > >What I have done which is currently working(kind of) is that in my >sip.conf in the [general] section I have set context=incomingpstn. My >register line looks like: > >register => username:password@sip.provider.ie/ > >In my extensions.conf I then have > >[incomingpstn] >exten => s,1,Wait(1) >exten => s,n,Background(MainMenu) >exten => 1,1,Goto(internalExt,s,1) >exten => 2,1,Goto(mainconfmenu,s,1) > >[internalExt] >exten => s,n,Background(InternalExtension) > >[mainconfmenu] >exten => s,n,Background(MainConfMenu) > >I can hear the MainMenu sound file being played. What's strange is that >when I press '1' to interrupt, which in my logic should invoke the >internalExt context, nothing happens. The MainMenu sound file continues >to play and finally I get the error: > >Warning: pbx.c:2405 __ast_pbx_run: Timeout, but no rule 't' in context >'incomingpstn' > >I used the 'Goto' as Iqbal suggested instead of includes... > >Has anyone ever experienced this kind of behaviour before? > >Many thanks, >Aisling. > >-----Original Message----- >From: asterisk-users-bounces@lists.digium.com >[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of KokMeng >Loh >Sent: 09 January 2006 08:53 >To: Asterisk Users Mailing List - Non-Commercial Discussion >Subject: Re: [Asterisk-Users] Incoming PSTN Calls - Stumped > >Hi, > >The hostname that you used in your register directive ('provider.ie') >must have a corresponding section in sip.conf. In your example, youused> >'[provider-in]'. If that is what you actually used, then this might >explain why your incoming goes to the default context because it >couldn't find its own "section". Try renaming '[provider-in]' to >'[provider.ie]'. > >-kokmeng. > >Aisling O'Driscoll wrote: > > > >>Hi, >> >>Yes InternalExtension is the context and 2093 the extension. >> >>Just to explain something odd that's happening (and I'm very stumped >>with this)..I think my contexts are definately the reason that I >>can't 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:password@provider.ie/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/${EXTEN}@provider-out) >>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 didn't 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 can't 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 don't have access to the other features in Asterisk. >>The point is that I'm 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/021123456@provider-out") in >>new stack >>-- Called 021123456@provider-out >>-- 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 >> >>I'm very stuck on this and can't figure it out. >>Any help appreciated. >> >>Many thanks, >>Aisling. >> >>-----Original Message----- >>From: asterisk-users-bounces@lists.digium.com >>[mailto:asterisk-users-bounces@lists.digium.com] 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 < ashling.odriscoll@cit.ie>: >>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:password@sip.blueface.ie/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 seem to refer to the code in my sip.conf.I don't get it. >>Secondly whilst moving this code to the default context means I can >>hear my initial welcome menu, when I press '1' to interrupt the menu >>and move to menu option 1 (another sound file) it won't let me >>interrupt and I eventually get the error "Timeout but no rule 't' in >>context 'default". >> >>Does anyone have any ides where the problem might be? >> >>Many thanks, >>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.