BSNL SIP Trunk - Incoming Works but Outgoing Fails with CHANUNAVAIL

  • Thread starter Thread starter noelk2025
  • Start date Start date
  • Replies Replies 5
  • Views Views 88
Messages
12
Location
Kerala
ISP
BSNL
Hello, I need help with my BSNL SIP trunk configuration. Incoming calls work perfectly, but all outgoing calls fail immediately with CHANUNAVAIL status. The trunk shows as ‘Registered’ when I run ‘pjsip show registrations’, but every outgoing call attempt results in ‘Everyone is busy/congested at this time (1:0/0/1)’ in the logs with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21. I’ve tried dialing various number formats including 0XXXXXXXXXX, 91XXXXXXXXXX, but all fail the same way.

Here in Kerala, when I configured the same BSNL SIP credentials directly in Linphone, both incoming and outgoing calls worked perfectly

I can give you any logs. Its been days i have been stranded with this problem, my mind is tangled up and I can’t rest without solving these.
 
My issue as solved my using chan_sip instead of pjsip, now all are working good.


My config:


Using raspbx (FreePBX 15.0.38), running on Pi 4, 8GB RAM.
My trunk settings:

GENERAL Tab

Trunk Name :bsnlout(any name)
Hide CallerID: No
Outbound CallerID: 91XXXXXXXXXX, where X's are your landline number given by BSNL without 0.
CID Options: Allow Any CID
Maximum Channels: NIL
Asterisk Trunk Dial Options NIL, System
Continue if Busy: No
Disable Trunk: No
Monitor Trunk Failures: No

sip Setting Tab:
Outgoing:
Trunk Name: bsnlout(for reference in setting outbound)
PEER Details:
host=kl.ftthvoip.bsnl.in(Registrar Address given by BSNL, varies by circle)
username=91XXXXXXXXXX, where X's are your landline number given by BSNL without 0.
secret= password for sip(telephone/VoIP) given by BSNL
type=peer
qualify=yes
canreinvite=no
insecure=port,invite
session-timers=refuse
session-expires=600
session-minse=90

Incoming:
User Context: bsnlin(for reference in setting inbound)
USER Details:
host=kl.ftthvoip.bsnl.in(Registrar Address given by BSNL, varies by circle)
username=91XXXXXXXXXX, where X's are your landline number given by BSNL without 0.
secret=password for sip(telephone/VoIP) given by BSNL
type=peer&user
qualify=yes
canreinvite=no
insecure=port,invite
context=from-trunk

Register String: 91XXXXXXXXXX:[email protected]/91XXXXXXXXXX
 
Hi @noelk2025, First off—congrats on getting it working! That’s no small feat, and I can imagine how much time and effort it must’ve taken.

I’ve been trying to get this going on FreePBX for the past 20 days myself. I managed to get incoming calls working using chan_sip, but I’m still stuck on the outgoing side.

Would you be kind enough to share the dialplan or any specific settings you used? It would really mean a lot and help me move forward.

Appreciate any guidance you can offer—thanks in advance!
 
Back