Resolved BRI : Incoming isdn line to various sip exten

I cannot get the incoming isdn lines to go to the extensions they are assigned to

Provider : Fastweb (Italy)
Type: BRI isdn (with range of XX2220 - XX2249 external numbers )


(extensons.conf)

[misdn]
exten => _X.2220,1,Dial(SIP/4225)
exten => _X.2229,1,Dial(SIP/4229)
exten => _X.2224,1,Dial(SIP/4224)
exten => _X.2225,1,Dial(SIP/4225)

(misdn.conf)

[default]
context=misdn
language=en
musicclass=default
senddtmf=yes
far_alerting=no
allowed_bearers=all
nationalprefix=0
internationalprefix=00
rxgain=0
txgain=0
te_choose_channel=no
pmp_l1_check=no
reject_cause=16
need_more_infos=no
nttimeout=no
method=standard
overlapdial=yes
dialplan=0
localdialplan=0
cpndialplan=0
incoming_early_audio=no
early_bconnect=yes
;always_immediate=no
nodialtone=no
;immediate=no
;hold_allowed=yes
;callgroup=1
;pickupgroup=1
presentation=-1
screen=-1
;echocancel=no
;echotraining= no
jitterbuffer=4000
jitterbuffer_upper_threshold=0
hdlc=no
max_incoming=-1
max_outgoing=-1


[intern]
ports=1,2,3,4
context=misdn
msns=*

(misdn-init.conf)

card=1,0x4
nt_ptp=1,2,3,4
poll=128
dsp_poll=128
dsp_options=0
dtmfthreshold=100
debug=0

Am i missing something in the configs ??

Thanks for your help

[solution]

Some ISP need 4 characters some more , it also depends on “how” many wildcards you are using the represent the entire number.

The called number number is 023664123439 so one of the following has to work:


exten=>_XXXXXX1234,1,Dial(SIP/4239) ; X match a single digit, we ignore the 6 digits before 2239 

Code:

exten=>0236641234,1,Dial(SIP/4239) ; no pattern, we look for the entire called number 


Cheers. 

Marco Bruni

Thanks again to Marco Bruni

Please post the messages of the Asterisk CLI when you try an inbound call.

Cheers.

Marco Bruni

Her you go , as you can see i dial 2229 but it goes to ext. 4225

P[ 4] I IND :NEW_CHANNEL oad:35318984900 dad:236642229 pid:7 state:none
P[ 4] Chan not existing at the moment bc->l3id:420000 bc:0xb7d49e4c event:NEW_CHANNEL port:4 channel:1
P[ 4] NO USERUESRINFO
P[ 4] I IND :SETUP oad:35318984900 dad:236642229 pid:7 state:none
P[ 4] read_config: Getting Config
P[ 4] I SEND:PROCEEDING oad:035318984900 dad:0236642229 pid:7
– Executing [0236642229@misdn:1] Dial(“mISDN/7-u17”, “SIP/4225”) in new stack
– Called 4225
Extension Changed 4225 new state Ringing for Notify User 4224
– SIP/4225-09ca14a0 is ringing
P[ 4] * IND :LI>ringing pid:7
P[ 4] I SEND:ALERTING oad:035318984900 dad:0236642229 pid:7
P[ 4] misdn_write: state (ALERTING) prodded.
P[ 4] I IND :smiley:ISCONNECT oad:035318984900 dad:0236642229 pid:7 state:ALERTING
P[ 4] I SEND:RELEASE oad:035318984900 dad:0236642229 pid:7
== Spawn extension (misdn, 0236642229, 1) exited non-zero on 'mISDN/7-u17’
P[ 4] * IND : HANGUP pid:7 ctx:misdn dad:0236642229 oad:035318984900 State:ALERTING
Extension Changed 4225 new state Idle for Notify User 4224
P[ 4] I IND :RELEASE_COMPLETE oad: dad: pid:7 state:CLEANING
P[ 4] Cannot hangup chan, no ast

did you try to use the full did number?

exten =>236642229,1,Dial(SIP/4229)

This is the reason why 4225 gets called, so check your dialplan.

Cheers.

Marco Bruni

I know ,

But there is nothing in the dialplan that is linking it to 4225.

P[ 2] I IND :NEW_CHANNEL oad:35318984900 dad:236642229 pid:6 state:none
P[ 2] Chan not existing at the moment bc->l3id:510000 bc:0x93974dc event:NEW_CHANNEL port:2 channel:1
P[ 2] NO USERUESRINFO
P[ 2] I IND :SETUP oad:35318984900 dad:236642229 pid:6 state:none
P[ 2] read_config: Getting Config
P[ 2] I SEND:PROCEEDING oad:035318984900 dad:0236642229 pid:6
– Executing [0236642229@misdn:1] Dial(“mISDN/3-u10”, “SIP/4225”) in new stack
– Called 4225
Extension Changed 4225 new state Ringing for Notify User 4224
– SIP/4225-0949ef40 is ringing
P[ 2] * IND :LI>ringing pid:6
P[ 2] I SEND:ALERTING oad:035318984900 dad:0236642229 pid:6
P[ 2] misdn_write: state (ALERTING) prodded.
P[ 2] I IND :smiley:ISCONNECT oad:035318984900 dad:0236642229 pid:6 state:ALERTING
P[ 2] I SEND:RELEASE oad:035318984900 dad:0236642229 pid:6
== Spawn extension (misdn, 0236642229, 1) exited non-zero on 'mISDN/3-u10’
P[ 2] * IND : HANGUP pid:6 ctx:misdn dad:0236642229 oad:035318984900 State:ALERTING
Extension Changed 4225 new state Idle for Notify User 4224
P[ 2] I IND :RELEASE_COMPLETE oad: dad: pid:6 state:CLEANING
P[ 2] Cannot hangup chan, no ast

It is like its stuck in the channel

Ok i see now what the problem is but i dont know how to fix it.

It turns out it will dial the first “entry” in my [misdn] context of my dialplan so if below is my entry

[misdn]
exten => _X.2229,1,Dial(SIP/4229)
exten => _X.2220,1,Dial(SIP/4225)
exten => _X.2221,1,Dial(SIP/4221)

And i dial the external 2220 extension then it will go to the 4229 sip.

Any help ?

[quote=“sander4000”]did you try to use the full did number?

exten =>236642229,1,Dial(SIP/4229)[/quote]

Hi sander , i did :

[Mar 18 21:24:04] WARNING[20806]: chan_misdn.c:4328 cb_events: Extension can never match, so disconnecting on port(1).maybe you want to add an ‘i’ extension to catch this case.
P[ 1] I SEND:RELEASE_COMPLETE oad:000353851610136 dad:0236642232 pid:8
P[ 1] * IND : HANGUP pid:8 ctx:misdn dad:0236642232 oad:000353851610136 State:EXTCANTMATCH
P[ 3] I IND :NEW_CHANNEL oad:00353851610136 dad:236642232 pid:9 state:none
P[ 3] Chan not existing at the moment bc->l3id:70000 bc:0x99ad2c4 event:NEW_CHANNEL port:3 channel:1
P[ 3] NO USERUESRINFO
P[ 3] I IND :SETUP oad:00353851610136 dad:236642232 pid:9 state:none
P[ 3] read_config: Getting Config
[Mar 18 21:24:04] WARNING[20806]: chan_misdn.c:4328 cb_events: Extension can never match, so disconnecting on port(3).maybe you want to add an ‘i’ extension to catch this case.
P[ 3] I SEND:RELEASE_COMPLETE oad:000353851610136 dad:0236642232 pid:9
P[ 3] * IND : HANGUP pid:9 ctx:misdn dad:0236642232 oad:000353851610136 State:EXTCANTMATCH
P[ 2] I IND :NEW_CHANNEL oad:00353851610136 dad:236642232 pid:10 state:none
P[ 2] Chan not existing at the moment bc->l3id:80000 bc:0x99a16dc event:NEW_CHANNEL port:2 channel:1
P[ 2] NO USERUESRINFO
P[ 2] I IND :SETUP oad:00353851610136 dad:236642232 pid:10 state:none
P[ 2] read_config: Getting Config
[Mar 18 21:24:04] WARNING[20806]: chan_misdn.c:4328 cb_events: Extension can never match, so disconnecting on port(2).maybe you want to add an ‘i’ extension to catch this case.
P[ 2] I SEND:RELEASE_COMPLETE oad:000353851610136 dad:0236642232 pid:10
P[ 2] * IND : HANGUP pid:10 ctx:misdn dad:0236642232 oad:000353851610136 State:EXTCANTMATCH

Ok, now I understand, I think you have to specify better your extension pattern, so please try:

[misdn]
exten => _XXXXXX2229,1,Dial(SIP/4229)
exten => _XXXXXX2220,1,Dial(SIP/4225)
exten => _XXXXXX2221,1,Dial(SIP/4221) 

Cheers.

Marco Bruni

[quote=“mbruni”][quote]
And i dial the external 2220 extension then it will go to the 4229 sip
[/quote]
Ok, now I understand, I think you have to specify better your extension pattern, so please try:

[misdn]
exten => _XXXXXX2229,1,Dial(SIP/4229)
exten => _XXXXXX2220,1,Dial(SIP/4225)
exten => _XXXXXX2221,1,Dial(SIP/4221) 

Cheers.

Marco Bruni[/quote]

Hi Marco ,

I tried this but i still have the same problem :

[Mar 19 11:17:11] WARNING[11628]: chan_misdn.c:4336 cb_events: Extension can never match, So jumping to 'i' extension. port(2)
P[ 2] I SEND:SETUP_ACKNOWLEDGE oad:000353851610136 dad:0236642239 pid:32

Dialplan entry

[misdn]
exten => _XXXXX2239,1,Dial(SIP/4239)

The called number number is 0236642239 so one of the following has to work:

exten=>_XXXXXX2239,1,Dial(SIP/4239) ; X match a single digit, we ignore the 6 digits before 2239
exten=>0236642239,1,Dial(SIP/4239) ; no pattern, we look for the entire called number

Cheers.

Marco Bruni

[quote=“mbruni”]The called number number is 0236642239 so one of the following has to work:

exten=>_XXXXXX2239,1,Dial(SIP/4239) ; X match a single digit, we ignore the 6 digits before 2239
exten=>0236642239,1,Dial(SIP/4239) ; no pattern, we look for the entire called number

Cheers.

Marco Bruni[/quote]

Buddy this is brilliant ! :smile: it works now…

I did 5(Xes) instead of 6…