Yves A.
2013-Feb-12 10:55 UTC
[asterisk-users] Asterisk Realtime Extension... strange behaviour
Hi, I encountered a strange behaviour using realtime extensions... (on Asterisk 11.2) when I use the following static dialplan, everything works as expected..: [from-sip] exten => 110,1,Dial(DAHDI/g0/${EXTEN}) exten => 112,1,Dial(DAHDI/g0/${EXTEN}) exten => _XXX,1,Dial(SIP/${EXTEN}) exten => _X.,1,Dial(DAHDI/g0/${EXTEN}) will say... if a sip phone calls "110" or "112" the call is routed into PSTN (german emergency call) if a sip phone calls any three digit number, the call should be routet to the corresponding SIP user and if a sip phone calls any other number the call should be routed into PSTN... thats ok and works as expected. when I change to realtime: [from-sip] switch => Realtime and put the diaplan into the database id context exten priority app appdata "1" "from-sip" "110" "1" "Dial" "DAHDI/g0/${EXTEN}" "2" "from-sip" "112" "1" "Dial" "DAHDI/g0/${EXTEN}" "3" "from-sip" "_XXX" "1" "Dial" "SIP/${EXTEN}" "4" "from-sip" "_X." "1" "Dial" "DAHDI/g0/${EXTEN}" only the emergency calls work and any other call goes to DAHDI... I cant reach any other SIP phone. Even when swapping the content of the rows 3 and 4 in the database to id context exten priority app appdata "1" "from-sip" "110" "1" "Dial" "DAHDI/g0/${EXTEN}" "2" "from-sip" "112" "1" "Dial" "DAHDI/g0/${EXTEN}" "3" "from-sip" "_X." "1" "Dial" "DAHDI/g0/${EXTEN}" "4" "from-sip" "_XXX" "1" "Dial" "SIP/${EXTEN}" makes no difference... I thought, using realtime extensions would read the dialplan from top to bottom, ordered by "id"... but it seems to be ignored somehow and the extension "_X." catches the calls before the extensionpattern "_XXX" is reached. I _could_ avoid this be prefixing "external" numbers with a leading 0 for example... but I dont want to... as I said.. using static extension via extensions.conf the dialplan works as expected... Am I missing something? regards, yves
Frank
2013-Feb-12 13:41 UTC
[asterisk-users] Asterisk Realtime Extension... strange behaviour
Remove the line _X. , and try 3 digits other than 110 112 , let us know if it works. On 2/12/13 5:55 AM, Yves A. wrote:> Hi, > > I encountered a strange behaviour using realtime extensions... (on > Asterisk 11.2) > > when I use the following static dialplan, everything works as expected..: > > [from-sip] > exten => 110,1,Dial(DAHDI/g0/${EXTEN}) > exten => 112,1,Dial(DAHDI/g0/${EXTEN}) > exten => _XXX,1,Dial(SIP/${EXTEN}) > exten => _X.,1,Dial(DAHDI/g0/${EXTEN}) > > will say... if a sip phone calls "110" or "112" the call is routed into > PSTN (german emergency call) > if a sip phone calls any three digit number, the call should be routet > to the corresponding SIP user > and if a sip phone calls any other number the call should be routed into > PSTN... thats ok and works as expected. > > when I change to realtime: > [from-sip] > switch => Realtime > > and put the diaplan into the database > id context exten priority app appdata > "1" "from-sip" "110" "1" "Dial" "DAHDI/g0/${EXTEN}" > "2" "from-sip" "112" "1" "Dial" "DAHDI/g0/${EXTEN}" > "3" "from-sip" "_XXX" "1" "Dial" "SIP/${EXTEN}" > "4" "from-sip" "_X." "1" "Dial" "DAHDI/g0/${EXTEN}" > > only the emergency calls work and any other call goes to DAHDI... I cant > reach any other SIP phone. > Even when swapping the content of the rows 3 and 4 in the database to > id context exten priority app appdata > "1" "from-sip" "110" "1" "Dial" "DAHDI/g0/${EXTEN}" > "2" "from-sip" "112" "1" "Dial" "DAHDI/g0/${EXTEN}" > "3" "from-sip" "_X." "1" "Dial" "DAHDI/g0/${EXTEN}" > "4" "from-sip" "_XXX" "1" "Dial" "SIP/${EXTEN}" > > makes no difference... > I thought, using realtime extensions would read the dialplan from top to > bottom, ordered by "id"... but it > seems to be ignored somehow and the extension "_X." catches the calls > before the extensionpattern "_XXX" is reached. > > I _could_ avoid this be prefixing "external" numbers with a leading 0 > for example... but I dont want to... as I said.. using > static extension via extensions.conf the dialplan works as expected... > > Am I missing something? > > regards, > yves > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users