VITI Security

How to Configure TATA PJSIP Trunk in Asterisk/Vicidial

by CyberZestJul 3, 2025

UniWell Laboratories, a contract manufacturing and packaging facility in Texas, is a leader in the development of nutraceuticals…

How to Configure TATA PJSIP Trunk in Asterisk/Vicidial - VITI Security

Integrating a TATA PJSIP trunk into your Asterisk-based dialer, such as Vicidial, FreePBX, or GoAutoDial, ensures efficient call handling and connectivity. This guide walks you through the step-by-step process to set up the TATA PJSIP trunk seamlessly.

📌 Prerequisites

  • Asterisk Version: Ensure you’re running Asterisk 16 or higher, as PJSIP support is robust in these versions.
  • Network Configuration: TATA provides a dedicated network setup. Ensure your server has dual NICs or proper routing to handle both TATA’s network and your internal network.

🛠️ Step-by-Step Configuration

1. PJSIP trunk Configuration

Edit the pjsip.conf file located at /etc/asterisk/pjsip.conf and add the following configurations:


[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
[tata-auth]
type=auth
auth_type=userpass
username=YOUR_USERNAME
password=YOUR_PASSWORD
[tata-aor]
type=aor
contact=sip:YOUR_USERNAME@TATA_SIP_IP
[tata-endpoint]
type=endpoint
transport=transport-udp
context=from-trunk
disallow=all
allow=ulaw
outbound_auth=tata-auth
aors=tata-aor
[tata-identify]
type=identify
endpoint=tata-endpoint
match=TATA_SIP_IP

2. Dialplan Configuration

In your extensions.conf or the appropriate dialplan file, add the following to handle outbound calls:

[from-internal]
exten => _9X.,1,NoOp(Outbound call through TATA PJSIP Trunk)
 same => n,Dial(PJSIP/${EXTEN:1}@tata-endpoint)
 same => n,Hangup()

This configuration strips the leading ‘9’ and routes the call through the TATA PJSIP trunk. 3. Reload Asterisk After saving the configurations, reload Asterisk to apply the changes:

asterisk -rx "module reload"

✅ Verification To verify the trunk registration, use the following command:

asterisk -rx "pjsip show registrations"

Ensure that the TATA trunk shows as “Registered.”