Hello, all.
I am new with asterisk and have one problem.
I have a quadBRI PCI ISDN card with one ISDN line (4example 1599)
and two SIP phones with numbers 100 and 101. I want forward calls from external line to one of SIP phones, 4example with 1599100 to Phone1 and 1599101 to Phone2. But when I dial 1599100 I have only 1599 in ${EXTEN} variable, but I need also second part of number (101):
*CLI>
– Accepting voice call from ‘9242960323’ to ‘1599’ on channel 0/1, span 1
– Executing NoOp(“Zap/1-1”, “1599”) in new stack
– Executing Hangup(“Zap/1-1”, “”) in new stack
== Spawn extension (isdn-incoming, 1599, 2) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
I cannot find any solution for this problem, so I’ll be thankfull for any answer.
my cfg files:
zapata.conf
[channels]
switchtype = euroisdn
; p2mp TE mode (for connecting ISDN lines in point-to-multipoint mode)
signalling = bri_cpe_ptmp
pridialplan = dynamic
prilocaldialplan = local
nationalprefix = 0
internationalprefix = 00
usecallingpres=yes
echocancel = yes
echocancelwhenbridged = yes
echotraining = 100
context=isdn-incoming
group = 1
; S/T port 1-4
channel => 1-2
channel => 4-5
channel => 7-8
channel => 10-11
sip.conf
[general]
context=default
port=5060
bindaddr=0.0.0.0
[100]
type=friend
context=sip-phones
secret=123
host=dynamic
qualify=yes
canreinvite=no
callerid=“User1” <100>
[101]
type=friend
context=sip-phones
secret=123
host=dynamic
qualify=yes
canreinvite=no
callerid=“User2” <101>
extensions.conf
; incoming ISDN BRI calls arrive in this context
; we need an extension for every DID/MSN or a pattern that will match all
[isdn-incoming]
exten => _X.,1,NoOp(${EXTEN})
exten => _X.,2,Hangup
; in sip.conf you put context=sip-phones so the phones can dial out
; using zaptel group 1 (which includes all BRI ports, see zapata.conf)
[sip-phones]
exten => 100,1,Dial(SIP/100)
exten => 101,1,Dial(SIP/101)
exten => _X.,1,Dial(ZAP/g1/${EXTEN},60)
exten => _X.,2,Hangup
; if the called party is busy
exten => _X.,102,Playtones(busy)
exten => _X.,103,Wait(10)
exten => _X.,104,Hangup
; if all zaptel channels in that group are in use
; or the D channels are down
exten => _X.,202,Playtones(congestion)
exten => _X.,203,Wait(10)
exten => _X.,204,Hangup