How to configure tata sip trunk in asterisk vicidial
TATA SIP Trunk in Asterisk
Topic: How to configure tata sip trunk in asterisk vicidialAbout: Tata Tele Business Services
TATA SIP trunk Network Settings:
Tata SIP trunk is provided with a dedicated network from tata tele service, that is you will be provided with a router with dedicated subnet, either you need to have two ethernet interface in your dialer to connect to tata network and also connect to your existing network, or you need to have a router which can support two networks with proper routing.
Below is sample architecture of dialer setup with two ethernet interface, eth-0 connected to existing network and eth-1 connected to TATA network.
TATA SIP trunk Details:
Once you have purchased the TATA SIP trunk, you will be provided with the below details,
DID Range and Pilot Number
Username and password
TATA network subnet range
SIP gateway and Media IP
TATA network Static route If you are connecting TATA network to your existing networks as pre the picture shown, then you might need a static route to reach the JIO SIP Proxy also media ip.
Check your OS network settings to
set static route to jio network.
Linux command to set a static route to SIP
proxy ip and media ip
command to set route is linux systems
ip route add 10.0.70.2 via 10.0.70.71 dev eth1Command to check the routes
ip route add 10.0.70.0/24 via 10.0.70.71 dev eth1
ip route show
or
route -n
TATA SIP Carrier Settings
For vici dial based dialers you can use the admin portal to create the sip trunk or you can use the sip.conf file to create the sip trunk settings.
SIP Registration settingsregister => 66810000:1234:66810000@10.0.70.2/66810000
SIP Peer Settings
[tatasip]
type=friend
disallow=all
allow=alaw
allow=ulaw
allow=g729
host=10.0.70.2 ;this is tata SBC ip
dtmfmode=rfc2833
nat=no
canreinvite=no
context=tataincomming
insecure=invite,port
Additional SIP settings for TATA SIP
edit the sip.conf file and add the below lines.
vi /etc/asterisk/sip.conf
defaultexpiry=600
progressinband=yes
TATA SIP trunk Asterisk Dialplan
Outbound Dialplan
For vicidial / goautodial you can use the ADMIN-Carrier- Dialplan entry and for asterisk users you need to enter in extensions.conf under default context
exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)For asterisk/Freepbx Dialers dialplan
exten => _9X.,n,SipAddHeader(P-Preferred-Identity: <sip:66810000@10.0.70.18>)
exten => _9X.,n,Progress()
exten => _9X.,n,Dial(SIP/0${EXTEN:1}@tatasip,Tto)
exten => _9X.,n,Hangup()
exten => _9X.,1,SipAddHeader(P-Preferred-Identity: <sip:66810000@10.0.70.18>)Note:
exten => _9X.,n,Progress()
exten => _9X.,n,Dial(SIP/0${EXTEN:1}@tatasip)
exten => _9X.,n,Hangup()
_9X., where 9 is the Dial Prefix.
once above entry done, do a asterisk reload by typing asterisk -rx "reload"
Inbound Dialplan
[tataincomming]
exten => _X.,1,Goto(s,1)
exten => s,1,Noop(Let us look deeper into the soul of the invite)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(trunkinbound,${pseudodid},1)
Then in Vicidial GUI create DID's under INBOUND tab with your respective Tata DID no
for me its 66810000
For those using Freepbx/elastix/ or plain asterisk which uses from-pstn as inbound context use the below dialplan in extensions.conf
[tataincomming]
exten => _X.,1,Goto(s,1)
exten => s,1,Noop(Let us look deeper into the soul of the invite)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(from-pstn,${pseudodid},1)
Tata Sip Trunk status:
To check the SIP trunk status in asterisk run the below in asterisk cli.
command
to goto asterisk cli
asterisk -vvvvr
Command to check SIP registration status
sip show registrationthe output should show registered
command to check SIP peer status
sip show peersthe output should show OK for Tata sip.
Conclusion
Hope the tutorial is helpful, if you like the blog share and subscribe, for any professional support reach me on my skype: striker24x7
Ładnie to wygląda.
Hi there i configured freepbx with above config everything is working fine, however i am not able to dial out with DID, only my pilot number is going as outbound CID.
please help resolving the issue
YOU NEED TO SET PROPER CALLERID IN EACH SIP EXTENSIONS.
IF STILL FACING ISSUE, REACH MY ON MY SKYPE: striker24x7
Hi Striker,
I'm facing issue related to Got SIP response 482 “Loop Detected”
On asterisk. We are using TATA SIP trunk and on same server we are using inbound/outbound calling.
Please can you please guide or give me any solution for this issues.
what about sip trunk outbound proxy
what if need to configure with outbound proxy
Tata
configured same on elastix pbx but outgoing is not working always 403 forbidden error
Hi striker,
previous i got a connection with 6809 series and exactly with your setup it was perfect.
now i got a new sip delivered by tata and the pilot starts with 6902 and its not working anymore, after several go through and by talking to them, they told me user will be 14 digit like 009133-then the number as user name, and they mixup 5060 and 5061 to register .. so after adding 5061 in registry string it got registered and incoming working but still peers is unreachable and cant make outbound calls... pls help
sip registered but voice not receive