I have 2x101p card’s, sip config went fine, outgoing is working for me really good, but a cant attach for incoming call specific phones, i need when ZAP/1 is calling >>sip 200 is ringing and when ZAP/2 is calling Sip 201 is rigning, really simple, for a moment i have only 1 extension which is rigning for ZAP1 and ZAP2 interfaces. I have tryed to devide the to 2 different context’s(office2 and office) nothing changes, seems to me that firs line From [office] takes all priority.
Help me please.
Extension.conf
[office]
exten => s,1,Dial(Sip/200)
exten => 201,1,Dial(Sip/201)
exten => 200,1,Dial(Sip/200)
exten => _0ZXXXXX.,1,Macro(dialout,${EXTEN})
exten => _0ZXXXXX.,2,HangUp()
exten => _X.,1,Macro(intern,${EXTEN})
exter => _X.,2,HangUp()
[macro-intern]
exten => s,1,Set(${ARG1}=${EXTEN})
exten => s,2,Dial(Zap/1/${ARG1})
[macro-dialout]
exten => s,1,Set(${ARG1}=${EXTEN})
exten => s,2,Dial(Zap/1/0${ARG1})
[macro-dialout2]
exten => s,1,Set(${ARG1}=${EXTEN})
exten => s,2,Dial(Zap/2/0${ARG1})
[office2]
exten => s,1,Dial(Sip/201)
exten => 201,1,Dial(Sip/201)
exten => 200,1,Dial(Sip/200)
exten => _0ZXXXXX.,1,Macro(dialout2,${EXTEN})
exten => _0ZXXXXX.,2,Hangup()
exten => _X.,1,Macro(intern,${EXTEN})
exten => _X.,2,HangUp()
Sip.conf
[200]
type=friend
secret=
username=200
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=gsm
nat=no
context=office
callerid=vendor <200>
callgroup=1
pickupgroup=1
[201]
type=friend
secret=
username=201
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=gsm
nat=no
context=office2
callerid=user1
callgroup=2
pickupgroup=2
Zapata.conf
[channels]
context=office
signalling=fxs_ls
group=1
callgroup=1
pickupgroup=1
busydetect=yes
busycount=5
channel=1
callerid=asreceived
usecallerid=yes
echocancel=yes
txgain=0.0
rxgain=0.0
signalling=fxs_ls
channel=2
callgroup=2
pickupgroup=2
txgain=0.0
rxgain=0.0
echocancel=yes
context=office2
group=2