Hello list, Im writing my dial plan, in witch every SIP phone begins with 74 and has more 3 numbers (like 74XXX). So, I want to route all 74XXX calls to my sip channel. For this I wrote this line: exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) but this way all calls go to 74118@193.136.252.5 ..... Then I tried: exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) but this way, the system tries to dial <sip:s@193.136.252.5> and not 74XXX@193.136.252.5 like I wanted... can someone help me with theese? I believe the problem is solved using the correct parameters in the "Dial" command, but I couldnt find it until now... Thanks Joao Pereira
Joao Pereira schrieb:> Im writing my dial plan, in witch every SIP phone begins with 74 and has > more 3 numbers (like 74XXX). > So, I want to route all 74XXX calls to my sip channel. For this I wrote > this line: > exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) > > but this way all calls go to 74118@193.136.252.5 ..... > > Then I tried: > exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) > > but this way, the system tries to dial <sip:s@193.136.252.5> and not > 74XXX@193.136.252.5 like I wanted...You were on the right way my friend. Why not try exten => _74XXX,1,Dial(SIP/$(EXTEN)@193.136.252.5,30,r) Hope that helps Christian
the problem is that you are using the 's' extension. If you want to match, as you said, the numbers like 74XX, then you should put something like this: [sipextens] exten => _74XX,1,Dial(SIP/${EXTEN@193.136.252,30,r) in this way, all the numbers starting with 74 followed by 2 more numbers, will be catched by this line, and asterisk it will dial to a SIP channel with the desired number. best regards On 7/28/05, Joao Pereira <joao.pereira@fccn.pt> wrote:> Hello list, > Im writing my dial plan, in witch every SIP phone begins with 74 and has > more 3 numbers (like 74XXX). > So, I want to route all 74XXX calls to my sip channel. For this I wrote > this line: > exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) > > but this way all calls go to 74118@193.136.252.5 ..... > > Then I tried: > exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) > > but this way, the system tries to dial <sip:s@193.136.252.5> and not > 74XXX@193.136.252.5 like I wanted... > > can someone help me with theese? I believe the problem is solved using > the correct parameters in the "Dial" command, but I couldnt find it > until now... > > Thanks > Joao Pereira > > > > > > > _______________________________________________ > 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 >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
On Thu, 28 Jul 2005 10:30:15 +0100 Joao Pereira <joao.pereira@fccn.pt> wrote: <snip>> Then I tried: > exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r)I like to do this: ** extensions.conf ** [globals] MYSIP=SIP/mysipphone [mycontext] exten => _74XXX,1,Dial(${MYSIP}/${EXTEN}) ;exten => _74XXX,1,Dial(${MYSIP}/${EXTEN:2}) ; dials only XXX ** sip.conf ** [mysipphone] type=friend etc... David
but everytime I dont put the "s", when I try to call 74XXX, Asterisk answers : pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid extension 's' in context 'default', but no invalid handler I think it must be something like that: exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) ... but it always answers: pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid extension 's' in context 'default', but no invalid handler It must be a way to do it... Thanks Jo?o Moises Silva wrote:>Please read this docs: >http://www.voip-info.org/tiki-index.php?page=Asterisk+config+extensions.conf > >you need to understand what the 's' extension does. If you use it, no >matter what number they have dialed, it will start at the s extensi?n. >If i understand your goal, YOU DONT NEED the 'exten => s,1,Answer' . > >You have: > > >>;exten => s,1,Answer >>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >> >> > >please replace it for: >exten => _74XXX,1,Answer() >exten => _74XXX,2,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) > >best regards > >On 7/29/05, Joao Pereira <joao.pereira@fccn.pt> wrote: > > >>Ok, now ill explain my dialplan problem >> >>Goal: When Asterisk receives a 74XXX number, should send it to its peer >>in 193.136.252.5:5060 (SERs IP), someting like: >> sip:74XXX@193.136.252.5 >>Here is my extensions.conf and sip.conf >> >>------------------- EXTENSIONS.CONF >>[general] >>static=yes >>writeprotect=no >> >>[globals] >>CONSOLE=Console/dsp >> >>TRUNK=CAPI >> >>[default] >> >>; this way he works... but always dials sip:74118@193.136.252.5 ... not >>yet what I want >>;exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) >> >>; this way, he dials "sip:s@193.136.252.5" ... >>;exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) >> >>;this way it works... but I have to dial: >>; 74XXX then he gives me dialtone, and then I must dial 74XXX again... >>; not yet what I want... the idea is just dial 74XXX once, withou >>dialtones in between >>;exten => s,1,Answer >>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >> >>; what must I put here to dial sip:74XXX@193.136.252.5 ??? >> >>-------------------SIP.CONF >>[general] >>context=default >> >>port=1720 >>bindaddr=193.136.252.5 >> >>insecure=very >> >>realm=fccn.pt >> >>;defenition of SER as a peer >>[193.136.252.5] >>type=peer >>username=193.136.252.5:5060 >>host=193.136.252.5 >>context=from-sip >>canreinvite=no >>insecure=very >> >> >> >>Thanks >>Joao Pereira >>----------------------------------------------------------------------------- >> >> >> >>Moises Silva wrote: >> >> >> >>>the problem is how are you getting there? i mean, what do you have in >>>sip.conf and please post all the relevant text in extensions.conf, not >>>just the 'exten => blah' part, we need to know context names to see if >>>its matching the sip.conf configuration >>> >>>regards >>> >>>On 7/28/05, Joao Pereira <joao.pereira@fccn.pt> wrote: >>> >>> >>> >>> >>>>I had tried that also, but it didnt work. In that case, if I dial 74118 >>>>(for example) Asterisk answers this: >>>> >>>>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/0' sent into invalid >>>>extension 's' in context 'default', but no invalid handler >>>> >>>>I think it needs the "s"... but how do I put the "s" and route the call >>>>to 74XXX@193.136.252.5 ???? >>>>Thanks >>>>Joao >>>> >>>> >>>>Christian Victor wrote: >>>> >>>> >>>> >>>> >>>> >>>>>Joao Pereira schrieb: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>Im writing my dial plan, in witch every SIP phone begins with 74 and >>>>>>has more 3 numbers (like 74XXX). >>>>>>So, I want to route all 74XXX calls to my sip channel. For this I >>>>>>wrote this line: >>>>>>exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) >>>>>> >>>>>>but this way all calls go to 74118@193.136.252.5 ..... >>>>>> >>>>>>Then I tried: >>>>>>exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) >>>>>> >>>>>>but this way, the system tries to dial <sip:s@193.136.252.5> and not >>>>>>74XXX@193.136.252.5 like I wanted... >>>>>> >>>>>> >>>>>> >>>>>> >>>>>You were on the right way my friend. Why not try >>>>> >>>>>exten => _74XXX,1,Dial(SIP/$(EXTEN)@193.136.252.5,30,r) >>>>> >>>>>Hope that helps >>>>>Christian >>>>>_______________________________________________ >>>>>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 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 >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> > > > >
Joao Pereira wrote:> Hello list, > Im writing my dial plan, in witch every SIP phone begins with 74 and has > more 3 numbers (like 74XXX). > So, I want to route all 74XXX calls to my sip channel. For this I wrote > this line: > exten => s,1,Dial(SIP/74118@193.136.252.5,30,r)What is happening is that capi is sending it to s. You will need to either set up an IVR, asking which number to send it to. So, you would do the following: exten => s,1,Answer() exten => s,2,Background(pls-entr-extn) exten => _74XXX,1,Dial(SIP/${EXTEN}) exten => _74XXX,2,Goto(s|1) exten => _74XXX,102,Goto(s|1) You will obviously need to record the pls-entr-extn sound. You can do this by making an exten like this: exten => 678,1,Record(pls-entr-extn) -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
Ok, but thats static routing. My architecture is this: [pbx extensions] --- [SIEMENS PBX] ---- [ASTERISK] --- [SER] --- [sip clients] I can't put in Asterisks sip.conf the hundreds of pbx extensions (and they are always changing), I must do a dinamic forward for all 74XXX calls. I think this is realy close: exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) because it seems that is everything right... but It always answer: pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid extension 's' in context 'default', but no invalid handler Joao Pereira Moises Silva wrote:>its kind of weird may be the problem is the default context, i have >never used the default context, i always use a specific context for >each extension. Lets say you have a registered sip number 21, then you >can do in sip.conf > >[21] >someparameter=blah... >etc... >context=sipcontext > >the important thing is the parameter called 'context' it has as value >'sipcontext'. When the extension 21 calls, then the dialed number (any >number the extension 21 dials) will arrive to the specified context >'sipcontext'. in sipcontext you write > >[sipcontext] >exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) > >that should work. let us know if you still have problems. > >On 7/29/05, Joao Pereira <joao.pereira@fccn.pt> wrote: > > >>but everytime I dont put the "s", when I try to call 74XXX, Asterisk >>answers : >> >>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid >>extension 's' in context 'default', but no invalid handler >> >>I think it must be something like that: >> >>exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >>... but it always answers: >>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid >>extension 's' in context 'default', but no invalid handler >> >> >> >>It must be a way to do it... >>Thanks >>Jo?o >> >>Moises Silva wrote: >> >> >> >>>Please read this docs: >>>http://www.voip-info.org/tiki-index.php?page=Asterisk+config+extensions.conf >>> >>>you need to understand what the 's' extension does. If you use it, no >>>matter what number they have dialed, it will start at the s extensi?n. >>>If i understand your goal, YOU DONT NEED the 'exten => s,1,Answer' . >>> >>>You have: >>> >>> >>> >>> >>>>;exten => s,1,Answer >>>>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >>>> >>>> >>>> >>>> >>>please replace it for: >>>exten => _74XXX,1,Answer() >>>exten => _74XXX,2,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >>> >>>best regards >>> >>>On 7/29/05, Joao Pereira <joao.pereira@fccn.pt> wrote: >>> >>> >>> >>> >>>>Ok, now ill explain my dialplan problem >>>> >>>>Goal: When Asterisk receives a 74XXX number, should send it to its peer >>>>in 193.136.252.5:5060 (SERs IP), someting like: >>>>sip:74XXX@193.136.252.5 >>>>Here is my extensions.conf and sip.conf >>>> >>>>------------------- EXTENSIONS.CONF >>>>[general] >>>>static=yes >>>>writeprotect=no >>>> >>>>[globals] >>>>CONSOLE=Console/dsp >>>> >>>>TRUNK=CAPI >>>> >>>>[default] >>>> >>>>; this way he works... but always dials sip:74118@193.136.252.5 ... not >>>>yet what I want >>>>;exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) >>>> >>>>; this way, he dials "sip:s@193.136.252.5" ... >>>>;exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) >>>> >>>>;this way it works... but I have to dial: >>>>; 74XXX then he gives me dialtone, and then I must dial 74XXX again... >>>>; not yet what I want... the idea is just dial 74XXX once, withou >>>>dialtones in between >>>>;exten => s,1,Answer >>>>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >>>> >>>>; what must I put here to dial sip:74XXX@193.136.252.5 ??? >>>> >>>>-------------------SIP.CONF >>>>[general] >>>>context=default >>>> >>>>port=1720 >>>>bindaddr=193.136.252.5 >>>> >>>>insecure=very >>>> >>>>realm=fccn.pt >>>> >>>>;defenition of SER as a peer >>>>[193.136.252.5] >>>>type=peer >>>>username=193.136.252.5:5060 >>>>host=193.136.252.5 >>>>context=from-sip >>>>canreinvite=no >>>>insecure=very >>>> >>>> >>>> >>>>Thanks >>>>Joao Pereira >>>>----------------------------------------------------------------------------- >>>> >>>> >>>> >>>>Moises Silva wrote: >>>> >>>> >>>> >>>> >>>> >>>>>the problem is how are you getting there? i mean, what do you have in >>>>>sip.conf and please post all the relevant text in extensions.conf, not >>>>>just the 'exten => blah' part, we need to know context names to see if >>>>>its matching the sip.conf configuration >>>>> >>>>>regards >>>>> >>>>>On 7/28/05, Joao Pereira <joao.pereira@fccn.pt> wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>I had tried that also, but it didnt work. In that case, if I dial 74118 >>>>>>(for example) Asterisk answers this: >>>>>> >>>>>>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/0' sent into invalid >>>>>>extension 's' in context 'default', but no invalid handler >>>>>> >>>>>>I think it needs the "s"... but how do I put the "s" and route the call >>>>>>to 74XXX@193.136.252.5 ???? >>>>>>Thanks >>>>>>Joao >>>>>> >>>>>> >>>>>>Christian Victor wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>Joao Pereira schrieb: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>Im writing my dial plan, in witch every SIP phone begins with 74 and >>>>>>>>has more 3 numbers (like 74XXX). >>>>>>>>So, I want to route all 74XXX calls to my sip channel. For this I >>>>>>>>wrote this line: >>>>>>>>exten => s,1,Dial(SIP/74118@193.136.252.5,30,r) >>>>>>>> >>>>>>>>but this way all calls go to 74118@193.136.252.5 ..... >>>>>>>> >>>>>>>>Then I tried: >>>>>>>>exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r) >>>>>>>> >>>>>>>>but this way, the system tries to dial <sip:s@193.136.252.5> and not >>>>>>>>74XXX@193.136.252.5 like I wanted... >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>You were on the right way my friend. Why not try >>>>>>> >>>>>>>exten => _74XXX,1,Dial(SIP/$(EXTEN)@193.136.252.5,30,r) >>>>>>> >>>>>>>Hope that helps >>>>>>>Christian >>>>>>>_______________________________________________ >>>>>>>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 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>> > > > >
On Wed, 2005-08-10 at 15:51 +0100, Joao Pereira wrote:> exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)Just an observation that you have an invalid address there; you have 1193 instead of 193 I believe. Fix this and I see no reason for your problem to remain. -- -Bryce bryce@rhinoequipment.com NOTICE: The views expressed in this e-mail do not neccesarily reflect those of my employer, this company, or its employees. This is a personal e-mail and as such, the opinions expressed are my own.
yes, I know, in my extensions.conf is writen correctly. Thanks Joao Bryce Chidester wrote:>On Wed, 2005-08-10 at 15:51 +0100, Joao Pereira wrote: > > > >>exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r) >> >> > >Just an observation that you have an invalid address there; you have >1193 instead of 193 I believe. Fix this and I see no reason for your >problem to remain. > > >