How to set up inbound calls in asterisk with DDI ?
Posted: Mon Apr 08, 2013 11:20 am
Hi,
I have an issue I am struggling with longer time.
I need to set up inbound calls for DDI and relate to the internal number.
I have the following configuration in extensions.conf
[ipfon]
exten => _X.,1,SIPAddHeader(X-Fid: ${SIPCALLID})
exten => _X.,2,Dial(sip/${EXTEN}@ipfon)
exten => przychodzace,3,Set(TOHDR=${SIP_HEADER(To)})
exten => przychodzace,4,Gotoif($["${REGEX("XXXXXXXX" ${TOHDR})}" = "1"]?wewnetrzne,200,1)
exten => t,5,Hangup
exten => h,1,Hangup
[tel1]
include => wewnetrzne
exten => _X.,1,Set(CALLERID(num)=XXXXXXXX)
exten => _X.,2,Dial(SIP/${EXTEN}@ipfon)
exten => t,3,Hangup
exten => h,4,Hangup
[wewnetrzne]
exten => 200,1,Dial(SIP/user1,45,Tf)
sip.conf is the following:
register => user:passwd@sip.voip.pl/przychodzace
[ipfon]
type=peer
username=user
secret=passwd
outboundproxy=sip.voip.pl
outboundproxyport=5060
fromdomain=sip.voip.pl
fromuser=user
context=ipfon
host=sip.voip.pl
port=5060
isecure=port,invite
sendrpid=yes
allowguest=no
disallow=all
allow=alaw
allow=ulaw
allow=g729
insecure=no
nat=no
[user1]
context=tel1
type=friend
username=user1
secret=1234
callerid="200" <200>
host=dynamic
nat=no
accountcode=Jacek
disallow=all
allow=alaw
I would really appreciate your help what may be wrong that I still can hear only music when calling inbound ???
Thank you in advance, Jacek
I have an issue I am struggling with longer time.
I need to set up inbound calls for DDI and relate to the internal number.
I have the following configuration in extensions.conf
[ipfon]
exten => _X.,1,SIPAddHeader(X-Fid: ${SIPCALLID})
exten => _X.,2,Dial(sip/${EXTEN}@ipfon)
exten => przychodzace,3,Set(TOHDR=${SIP_HEADER(To)})
exten => przychodzace,4,Gotoif($["${REGEX("XXXXXXXX" ${TOHDR})}" = "1"]?wewnetrzne,200,1)
exten => t,5,Hangup
exten => h,1,Hangup
[tel1]
include => wewnetrzne
exten => _X.,1,Set(CALLERID(num)=XXXXXXXX)
exten => _X.,2,Dial(SIP/${EXTEN}@ipfon)
exten => t,3,Hangup
exten => h,4,Hangup
[wewnetrzne]
exten => 200,1,Dial(SIP/user1,45,Tf)
sip.conf is the following:
register => user:passwd@sip.voip.pl/przychodzace
[ipfon]
type=peer
username=user
secret=passwd
outboundproxy=sip.voip.pl
outboundproxyport=5060
fromdomain=sip.voip.pl
fromuser=user
context=ipfon
host=sip.voip.pl
port=5060
isecure=port,invite
sendrpid=yes
allowguest=no
disallow=all
allow=alaw
allow=ulaw
allow=g729
insecure=no
nat=no
[user1]
context=tel1
type=friend
username=user1
secret=1234
callerid="200" <200>
host=dynamic
nat=no
accountcode=Jacek
disallow=all
allow=alaw
I would really appreciate your help what may be wrong that I still can hear only music when calling inbound ???
Thank you in advance, Jacek