BSNL SIP Trunk - Incoming Works but Outgoing Fails with CHANUNAVAIL

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.

Cause 21 is call rejected. Your service provider might not be accepting your credentials, or you may be sending phone numbers in a format that they don’t understand.

In your trunk settings, try setting From User to the same value you have in Username, and From Domain to the same value as you have in SIP Server.

If that doesn’t help, turn on pjsip logger, make a failing outbound call and post the outgoing INVITE and associated replies.

My issue as solved my using chan_sip instead of pjsip, now all are working good.

chan_sip is dead and if you move Asterisk beyond v20 you won’t have it. You really should make this work in the supported driver.

1 Like

Please post your working chan_sip trunk settings. Mask personal data such as username, password, phone numbers, etc., but make it clear what each value represents.

We can then give you the corresponding pjsip settings. Whether or not they work, this will help other BSNL users to set up their FreePBX system.

1 Like

Thats a sweet reply and very thoughtful for others.

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

In practice your incoming section may never get used (and a pure outgoing section would have no use for the insecure settings). I don’t think username will be used, either. I’ve never seen user&peer before, and user just makes your system a little less secure; it will never do anything useful with that configuration.

The late chan_sip only recognizes a single word for type, so this l line will be, silently, ignored:

can anyone give me exact settings to use chan_pjsip for trunk

The answer is probably no, as there are only probably single figure numbers of people who regularly read and respond in this forum, and I’m not aware of any of them being in India, so there is probably no-one with experience of actually using BSNL (There are as some in India who often ask, but I’m not aware of anyone often providing answers.). All we can do is give something that seems to match the settings you already have, making some allowances for the fact that some need to be ignored, as they are wrong.

There is nothing that I can obviously see which would make this a case where the straightforward, outgoing authorisation and registration, configuration, wasn’t a reasonable starting point, but we would need to see detailed logs of a failure, to understand what is wrong with it.

A common mistake that people make with chan_pjsip is using the wrong format for the outbound proxy, but I can see no reason here to configure an outbound proxy, at all, given your chan_sip configuration.

As they are rejecting the call, you should really ask BSNL why they are doing that.

Hi there

I’m very puzzled, because none of the common causes of outbound call failure (when incoming is working) seem applicable to your situation:

  1. Incorrect Outbound Proxy settings. The BSNL trunk doesn’t require Outbound Proxy, and you didn’t mention it, but please confirm that Outbound Proxy for your pjsip trunk is left blank.
  2. Incorrect From address. I’m pretty sure that it should be 91XXXXXXXXXX, but I suggested setting From User, which I assume didn’t help, since you gave up and switched to chan_sip.
  3. Incorrect destination number format. Neither pjsip not chan_sip modify this; it’s done by the Dialed Number Manipulation Rules section of the trunk settings. They should be left blank, but if set problematically, I’d expect them to cause the same trouble with chan_sip.

So, the best way forward from here is to see what is actually going wrong. Please post the pjsip logger output for a failing call. Or, post screenshots of your trunk settings and maybe we can spot something.




@Stewart1

[2025-10-17 17:58:22] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP response (431 bytes) from UDP:10.187.10.65:5060 --->	
16	SIP/2.0 200 Keepalive	
17	Via: SIP/2.0/UDP 192.168.1.103:5060;rport=5060;branch=z9hG4bKPj10b4d604-ba51-4789-91d4-ba3ca4fca3ec;received=192.168.1.103	
18	From: <sip:[email protected]>;tag=b26999b3-9282-4a7f-91ed-0e13d55aca36	
19	To: <sip:[email protected]>;tag=961e340e2c1fab158a5a91516c535816.3782cc52	
20	Call-ID: ecb41b25-bc4b-4df1-acb6-04d844dffdac	
21	CSeq: 35402 OPTIONS	
22	Server: BSNL-SMP	
23	Content-Length: 0	
24		
25		
26	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (1821 bytes) from UDP:192.168.1.101:5060 --->	
27	INVITE sip:[email protected] SIP/2.0	
28	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.VzQxg379H;rport	
29	From: <sip:[email protected]>;tag=olYCB9Lbh	
30	To: sip:[email protected]	
31	CSeq: 20 INVITE	
32	Call-ID: ZnE~XHIZjT	
33	Max-Forwards: 70	
34	Supported: replaces, outbound, gruu, path, record-aware	
35	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
36	Content-Type: application/sdp	
37	Content-Length: 1116	
38	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
39	User-Agent: Linphone-Desktop/5.3.1 (pc-pc) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
40		
41	v=0	
42	o=5000 2343 1734 IN IP4 10.10.10.223	
43	s=Talk	
44	c=IN IP4 10.10.10.223	
45	t=0 0	
46	a=ice-pwd:fea0b67325fa7c37b4f05c21	
47	a=ice-ufrag:fc30a810	
48	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
49	a=group:BUNDLE as	
50	a=record:off	
51	m=audio 49857 RTP/AVPF 0 8 18	
52	c=IN IP4 qqq.qq.qqq.qq	
53	a=fmtp:18 annexb=yes	
54	a=rtcp-mux	
55	a=mid:as	
56	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
57	a=rtcp:33853	
58	a=candidate:1 1 UDP 2130706303 10.10.10.223 49857 typ host	
59	a=candidate:1 2 UDP 2130706302 10.10.10.223 33853 typ host	
60	a=candidate:2 1 UDP 2130706303 192.168.1.101 49857 typ host	
61	a=candidate:2 2 UDP 2130706302 192.168.1.101 33853 typ host	
62	a=candidate:3 1 UDP 2130706303 172.19.0.1 49857 typ host	
63	a=candidate:3 2 UDP 2130706302 172.19.0.1 33853 typ host	
64	a=candidate:4 1 UDP 2130706303 172.17.0.1 49857 typ host	
65	a=candidate:4 2 UDP 2130706302 172.17.0.1 33853 typ host	
66	a=candidate:5 1 UDP 1694498687 qqq.qq.qqq.qq 49857 typ srflx raddr 10.10.10.223 rport 49857	
67	a=candidate:5 2 UDP 1694498686 qqq.qq.qqq.qq 33853 typ srflx raddr 10.10.10.223 rport 33853	
68	a=rtcp-fb:* trr-int 1000	
69	a=rtcp-fb:* ccm tmmbr	
70		
71	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (464 bytes) to UDP:192.168.1.101:5060 --->	
72	SIP/2.0 401 Unauthorized	
73	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.VzQxg379H	
74	Call-ID: ZnE~XHIZjT	
75	From: <sip:[email protected]>;tag=olYCB9Lbh	
76	To: <sip:[email protected]>;tag=z9hG4bK.VzQxg379H	
77	CSeq: 20 INVITE	
78	WWW-Authenticate: Digest realm="asterisk",nonce="1760720312/85e0dd5b5f280db45f849b5aa9e091aa",opaque="631c56066cb94668",algorithm=MD5,qop="auth"	
79	Server: FPBX-17.0.21.2(22.6.0)	
80	Content-Length: 0	
81		
82		
83	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (401 bytes) from UDP:192.168.1.101:5060 --->	
84	ACK sip:[email protected] SIP/2.0	
85	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.VzQxg379H;rport	
86	Call-ID: ZnE~XHIZjT	
87	From: <sip:[email protected]>;tag=olYCB9Lbh	
88	To: <sip:[email protected]>;tag=z9hG4bK.VzQxg379H	
89	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
90	Max-Forwards: 70	
91	CSeq: 20 ACK	
92		
93		
94	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (2106 bytes) from UDP:192.168.1.101:5060 --->	
95	INVITE sip:[email protected] SIP/2.0	
96	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.pqOruN-yP;rport	
97	From: <sip:[email protected]>;tag=olYCB9Lbh	
98	To: sip:[email protected]	
99	CSeq: 21 INVITE	
100	Call-ID: ZnE~XHIZjT	
101	Max-Forwards: 70	
102	Supported: replaces, outbound, gruu, path, record-aware	
103	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
104	Content-Type: application/sdp	
105	Content-Length: 1116	
106	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
107	User-Agent: Linphone-Desktop/5.3.1 (pc-pc) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
108	Authorization: Digest realm="asterisk", nonce="1760720312/85e0dd5b5f280db45f849b5aa9e091aa", algorithm=MD5, opaque="631c56066cb94668", username="5000", uri="sip:[email protected]", response="16ddb8f4addc18a7561193d58f9f651e", cnonce="CUuYTYIUkx93lAGf", nc=00000001, qop=auth	
109		
110	v=0	
111	o=5000 2343 1734 IN IP4 10.10.10.223	
112	s=Talk	
113	c=IN IP4 10.10.10.223	
114	t=0 0	
115	a=ice-pwd:fea0b67325fa7c37b4f05c21	
116	a=ice-ufrag:fc30a810	
117	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
118	a=group:BUNDLE as	
119	a=record:off	
120	m=audio 49857 RTP/AVPF 0 8 18	
121	c=IN IP4 qqq.qq.qqq.qq	
122	a=fmtp:18 annexb=yes	
123	a=rtcp-mux	
124	a=mid:as	
125	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
126	a=rtcp:33853	
127	a=candidate:1 1 UDP 2130706303 10.10.10.223 49857 typ host	
128	a=candidate:1 2 UDP 2130706302 10.10.10.223 33853 typ host	
129	a=candidate:2 1 UDP 2130706303 192.168.1.101 49857 typ host	
130	a=candidate:2 2 UDP 2130706302 192.168.1.101 33853 typ host	
131	a=candidate:3 1 UDP 2130706303 172.19.0.1 49857 typ host	
132	a=candidate:3 2 UDP 2130706302 172.19.0.1 33853 typ host	
133	a=candidate:4 1 UDP 2130706303 172.17.0.1 49857 typ host	
134	a=candidate:4 2 UDP 2130706302 172.17.0.1 33853 typ host	
135	a=candidate:5 1 UDP 1694498687 qqq.qq.qqq.qq 49857 typ srflx raddr 10.10.10.223 rport 49857	
136	a=candidate:5 2 UDP 1694498686 qqq.qq.qqq.qq 33853 typ srflx raddr 10.10.10.223 rport 33853	
137	a=rtcp-fb:* trr-int 1000	
138	a=rtcp-fb:* ccm tmmbr	
139		
140	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (290 bytes) to UDP:192.168.1.101:5060 --->	
141	SIP/2.0 100 Trying	
142	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.pqOruN-yP	
143	Call-ID: ZnE~XHIZjT	
144	From: <sip:[email protected]>;tag=olYCB9Lbh	
145	To: <sip:[email protected]>	
146	CSeq: 21 INVITE	
147	Server: FPBX-17.0.21.2(22.6.0)	
148	Content-Length: 0	
149		
150		
151	[2025-10-17 17:58:32] ERROR[147697] res_pjsip_session.c: 5000: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)	
152	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (344 bytes) to UDP:192.168.1.101:5060 --->	
153	SIP/2.0 488 Not Acceptable Here	
154	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.pqOruN-yP	
155	Call-ID: ZnE~XHIZjT	
156	From: <sip:[email protected]>;tag=olYCB9Lbh	
157	To: <sip:[email protected]>;tag=92718b80-2444-41dc-ab84-3d48f89ebd13	
158	CSeq: 21 INVITE	
159	Server: FPBX-17.0.21.2(22.6.0)	
160	Content-Length: 0	
161		
162		
163	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (420 bytes) from UDP:192.168.1.101:5060 --->	
164	ACK sip:[email protected] SIP/2.0	
165	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.pqOruN-yP;rport	
166	Call-ID: ZnE~XHIZjT	
167	From: <sip:[email protected]>;tag=olYCB9Lbh	
168	To: <sip:[email protected]>;tag=92718b80-2444-41dc-ab84-3d48f89ebd13	
169	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
170	Max-Forwards: 70	
171	CSeq: 21 ACK	
172		
173		
174	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (1820 bytes) from UDP:192.168.1.101:5060 --->	
175	INVITE sip:[email protected] SIP/2.0	
176	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.7W59MmamE;rport	
177	From: <sip:[email protected]>;tag=B5GpVw49Q	
178	To: sip:[email protected]	
179	CSeq: 20 INVITE	
180	Call-ID: YkrzKiR1pd	
181	Max-Forwards: 70	
182	Supported: replaces, outbound, gruu, path, record-aware	
183	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
184	Content-Type: application/sdp	
185	Content-Length: 1115	
186	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
187	User-Agent: Linphone-Desktop/5.3.1 (pc-pc) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
188		
189	v=0	
190	o=5000 2343 1736 IN IP4 10.10.10.223	
191	s=Talk	
192	c=IN IP4 10.10.10.223	
193	t=0 0	
194	a=ice-pwd:d155f10ffa04ec225fc91f91	
195	a=ice-ufrag:9cfef9e8	
196	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
197	a=group:BUNDLE as	
198	a=record:off	
199	m=audio 39251 RTP/AVP 0 8 18	
200	c=IN IP4 qqq.qq.qqq.qq	
201	a=fmtp:18 annexb=yes	
202	a=rtcp-mux	
203	a=mid:as	
204	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
205	a=rtcp:41709	
206	a=candidate:1 1 UDP 2130706303 10.10.10.223 39251 typ host	
207	a=candidate:1 2 UDP 2130706302 10.10.10.223 41709 typ host	
208	a=candidate:2 1 UDP 2130706303 192.168.1.101 39251 typ host	
209	a=candidate:2 2 UDP 2130706302 192.168.1.101 41709 typ host	
210	a=candidate:3 1 UDP 2130706303 172.19.0.1 39251 typ host	
211	a=candidate:3 2 UDP 2130706302 172.19.0.1 41709 typ host	
212	a=candidate:4 1 UDP 2130706303 172.17.0.1 39251 typ host	
213	a=candidate:4 2 UDP 2130706302 172.17.0.1 41709 typ host	
214	a=candidate:5 1 UDP 1694498687 qqq.qq.qqq.qq 39251 typ srflx raddr 10.10.10.223 rport 39251	
215	a=candidate:5 2 UDP 1694498686 qqq.qq.qqq.qq 41709 typ srflx raddr 10.10.10.223 rport 41709	
216	a=rtcp-fb:* trr-int 1000	
217	a=rtcp-fb:* ccm tmmbr	
218		
219	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (464 bytes) to UDP:192.168.1.101:5060 --->	
220	SIP/2.0 401 Unauthorized	
221	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.7W59MmamE	
222	Call-ID: YkrzKiR1pd	
223	From: <sip:[email protected]>;tag=B5GpVw49Q	
224	To: <sip:[email protected]>;tag=z9hG4bK.7W59MmamE	
225	CSeq: 20 INVITE	
226	WWW-Authenticate: Digest realm="asterisk",nonce="1760720312/85e0dd5b5f280db45f849b5aa9e091aa",opaque="4865247b3251cec3",algorithm=MD5,qop="auth"	
227	Server: FPBX-17.0.21.2(22.6.0)	
228	Content-Length: 0	
229		
230		
231	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (401 bytes) from UDP:192.168.1.101:5060 --->	
232	ACK sip:[email protected] SIP/2.0	
233	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.7W59MmamE;rport	
234	Call-ID: YkrzKiR1pd	
235	From: <sip:[email protected]>;tag=B5GpVw49Q	
236	To: <sip:[email protected]>;tag=z9hG4bK.7W59MmamE	
237	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
238	Max-Forwards: 70	
239	CSeq: 20 ACK	
240		
241		
242	[2025-10-17 17:58:32] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (2105 bytes) from UDP:192.168.1.101:5060 --->	
243	INVITE sip:[email protected] SIP/2.0	
244	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.bifwwK~BC;rport	
245	From: <sip:[email protected]>;tag=B5GpVw49Q	
246	To: sip:[email protected]	
247	CSeq: 21 INVITE	
248	Call-ID: YkrzKiR1pd	
249	Max-Forwards: 70	
250	Supported: replaces, outbound, gruu, path, record-aware	
251	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
252	Content-Type: application/sdp	
253	Content-Length: 1115	
254	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
255	User-Agent: Linphone-Desktop/5.3.1 (pc-pc) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
256	Authorization: Digest realm="asterisk", nonce="1760720312/85e0dd5b5f280db45f849b5aa9e091aa", algorithm=MD5, opaque="4865247b3251cec3", username="5000", uri="sip:[email protected]", response="9cc70926322e1135310eb75192460582", cnonce="NDPCmj1SMiKtA2Pw", nc=00000001, qop=auth	
257		
258	v=0	
259	o=5000 2343 1736 IN IP4 10.10.10.223	
260	s=Talk	
261	c=IN IP4 10.10.10.223	
262	t=0 0	
263	a=ice-pwd:d155f10ffa04ec225fc91f91	
264	a=ice-ufrag:9cfef9e8	
265	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
266	a=group:BUNDLE as	
267	a=record:off	
268	m=audio 39251 RTP/AVP 0 8 18	
269	c=IN IP4 qqq.qq.qqq.qq	
270	a=fmtp:18 annexb=yes	
271	a=rtcp-mux	
272	a=mid:as	
273	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
274	a=rtcp:41709	
275	a=candidate:1 1 UDP 2130706303 10.10.10.223 39251 typ host	
276	a=candidate:1 2 UDP 2130706302 10.10.10.223 41709 typ host	
277	a=candidate:2 1 UDP 2130706303 192.168.1.101 39251 typ host	
278	a=candidate:2 2 UDP 2130706302 192.168.1.101 41709 typ host	
279	a=candidate:3 1 UDP 2130706303 172.19.0.1 39251 typ host	
280	a=candidate:3 2 UDP 2130706302 172.19.0.1 41709 typ host	
281	a=candidate:4 1 UDP 2130706303 172.17.0.1 39251 typ host	
282	a=candidate:4 2 UDP 2130706302 172.17.0.1 41709 typ host	
283	a=candidate:5 1 UDP 1694498687 qqq.qq.qqq.qq 39251 typ srflx raddr 10.10.10.223 rport 39251	
284	a=candidate:5 2 UDP 1694498686 qqq.qq.qqq.qq 41709 typ srflx raddr 10.10.10.223 rport 41709	
285	a=rtcp-fb:* trr-int 1000	
286	a=rtcp-fb:* ccm tmmbr	
287		
288	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (290 bytes) to UDP:192.168.1.101:5060 --->	
289	SIP/2.0 100 Trying	
290	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.bifwwK~BC	
291	Call-ID: YkrzKiR1pd	
292	From: <sip:[email protected]>;tag=B5GpVw49Q	
293	To: <sip:[email protected]>	
294	CSeq: 21 INVITE	
295	Server: FPBX-17.0.21.2(22.6.0)	
296	Content-Length: 0	
297		
298		
299	[2025-10-17 17:58:32] VERBOSE[147697] netsock2.c: Using SIP RTP Audio TOS bits 184	
300	[2025-10-17 17:58:32] VERBOSE[147697] netsock2.c: Using SIP RTP Audio CoS mark 5	
301	[2025-10-17 17:58:32] ERROR[147697] res_pjsip_header_funcs.c: No headers had been previously added to this session.	
302	[2025-10-17 17:58:32] VERBOSE[184812][C-00000005] app_stack.c: Spawn extension (from-pstn, 09983595359, 1) exited non-zero on 'PJSIP/bsnl-00000009'	
303	[2025-10-17 17:58:32] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (557 bytes) to UDP:192.168.1.101:5060 --->	
304	SIP/2.0 180 Ringing	
305	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.bifwwK~BC	
306	Call-ID: YkrzKiR1pd	
307	From: <sip:[email protected]>;tag=B5GpVw49Q	
308	To: <sip:[email protected]>;tag=a547eee6-fbd6-4ee7-b294-c980e01ee6c5	
309	CSeq: 21 INVITE	
310	Server: FPBX-17.0.21.2(22.6.0)	
311	Contact: <sip:192.168.1.103:5060>	
312	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
313	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
314	Content-Length: 0	
315		
316		
317	[2025-10-17 17:58:33] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP request (1156 bytes) to UDP:10.187.10.65:5060 --->	
318	INVITE sip:[email protected]:5060 SIP/2.0	
319	Via: SIP/2.0/UDP yy.yyy.yyy.yyy:5060;rport;branch=z9hG4bKPjffb00009-a226-40eb-be68-66693a7d2682	
320	From: <sip:[email protected]>;tag=cb7fdc01-9867-4ab0-a8f5-f3f268eb99d6	
321	To: <sip:[email protected]>	
322	Contact: <sip:[email protected]:5060>	
323	Call-ID: 41eded9c-5fe4-4024-a6b7-36362985cfb8	
324	CSeq: 15387 INVITE	
325	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
326	Supported: 100rel, timer, replaces, norefersub, histinfo	
327	Session-Expires: 1800	
328	Min-SE: 90	
329	P-Asserted-Identity: <sip:[email protected]>	
330	Max-Forwards: 70	
331	User-Agent: FPBX-17.0.21.2(22.6.0)	
332	Content-Type: application/sdp	
333	Content-Length: 375	
334		
335	v=0	
336	o=- 2073867518 2073867518 IN IP4 yy.yyy.yyy.yyy	
337	s=Asterisk	
338	c=IN IP4 yy.yyy.yyy.yyy	
339	t=0 0	
340	m=audio 13766 RTP/AVP 0 8 107 3 101 102	
341	a=rtpmap:0 PCMU/8000	
342	a=rtpmap:8 PCMA/8000	
343	a=rtpmap:107 opus/48000/2	
344	a=rtpmap:3 GSM/8000	
345	a=rtpmap:101 telephone-event/8000	
346	a=fmtp:101 0-16	
347	a=rtpmap:102 telephone-event/48000	
348	a=fmtp:102 0-16	
349	a=ptime:20	
350	a=maxptime:60	
351	a=sendrecv	
352		
353	[2025-10-17 17:58:33] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP response (412 bytes) from UDP:10.187.10.65:5060 --->	
354	SIP/2.0 100 trying -- your call is important to us	
355	Via: SIP/2.0/UDP 192.168.1.103:5060;rport=5060;branch=z9hG4bKPjffb00009-a226-40eb-be68-66693a7d2682;received=192.168.1.103	
356	From: <sip:[email protected]>;tag=cb7fdc01-9867-4ab0-a8f5-f3f268eb99d6	
357	To: <sip:[email protected]>	
358	Call-ID: 41eded9c-5fe4-4024-a6b7-36362985cfb8	
359	CSeq: 15387 INVITE	
360	Server: BSNL-SMP	
361	Content-Length: 0	
362		
363		
364	[2025-10-17 17:58:33] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP response (531 bytes) from UDP:10.187.10.65:5060 --->	
365	SIP/2.0 403 Forbidden	
366	Record-Route: <sip:10.187.10.65;lr;did=a18.8137>	
367	Call-ID: 41eded9c-5fe4-4024-a6b7-36362985cfb8	
368	CSeq: 15387 INVITE	
369	From: <sip:[email protected]>;tag=cb7fdc01-9867-4ab0-a8f5-f3f268eb99d6	
370	To: <sip:[email protected]>;tag=SBC+1+1ef5009c+d01fc181	
371	Via: SIP/2.0/UDP 192.168.1.103:5060;received=192.168.1.103;rport=5060;branch=z9hG4bKPjffb00009-a226-40eb-be68-66693a7d2682	
372	Server: SIP/2.0	
373	Organization: CDOT	
374	Supported: timer	
375	Content-Length: 0	
376	Contact: <sip:10.187.6.12:5060>	
377		
378		
379	[2025-10-17 17:58:33] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP request (449 bytes) to UDP:10.187.10.65:5060 --->	
380	ACK sip:[email protected]:5060 SIP/2.0	
381	Via: SIP/2.0/UDP yy.yyy.yyy.yyy:5060;rport;branch=z9hG4bKPjffb00009-a226-40eb-be68-66693a7d2682	
382	From: <sip:[email protected]>;tag=cb7fdc01-9867-4ab0-a8f5-f3f268eb99d6	
383	To: <sip:[email protected]>;tag=SBC+1+1ef5009c+d01fc181	
384	Call-ID: 41eded9c-5fe4-4024-a6b7-36362985cfb8	
385	CSeq: 15387 ACK	
386	Max-Forwards: 70	
387	User-Agent: FPBX-17.0.21.2(22.6.0)	
388	Content-Length: 0	
389		
390		
391	[2025-10-17 17:58:33] VERBOSE[184812][C-00000005] app_stack.c: Spawn extension (from-pstn, 09983595359, 1) exited non-zero on 'PJSIP/bsnl-00000009'	
392	[2025-10-17 17:58:33] VERBOSE[184812][C-00000005] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)	
393	[2025-10-17 17:58:33] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (795 bytes) to UDP:192.168.1.101:5060 --->	
394	SIP/2.0 183 Session Progress	
395	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.bifwwK~BC	
396	Call-ID: YkrzKiR1pd	
397	From: <sip:[email protected]>;tag=B5GpVw49Q	
398	To: <sip:[email protected]>;tag=a547eee6-fbd6-4ee7-b294-c980e01ee6c5	
399	CSeq: 21 INVITE	
400	Server: FPBX-17.0.21.2(22.6.0)	
401	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
402	Contact: <sip:192.168.1.103:5060>	
403	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
404	Content-Type: application/sdp	
405	Content-Length: 195	
406		
407	v=0	
408	o=- 2343 1738 IN IP4 192.168.1.103	
409	s=Asterisk	
410	c=IN IP4 192.168.1.103	
411	t=0 0	
412	m=audio 13246 RTP/AVP 0 8	
413	a=rtpmap:0 PCMU/8000	
414	a=rtpmap:8 PCMA/8000	
415	a=ptime:20	
416	a=maxptime:140	
417	a=sendrecv	
418		
419	[2025-10-17 17:58:37] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP response (558 bytes) to UDP:192.168.1.101:5060 --->	
420	SIP/2.0 503 Service Unavailable	
421	Via: SIP/2.0/UDP 10.10.10.223:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.bifwwK~BC	
422	Call-ID: YkrzKiR1pd	
423	From: <sip:[email protected]>;tag=B5GpVw49Q	
424	To: <sip:[email protected]>;tag=a547eee6-fbd6-4ee7-b294-c980e01ee6c5	
425	CSeq: 21 INVITE	
426	Server: FPBX-17.0.21.2(22.6.0)	
427	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
428	Reason: Q.850;cause=34	
429	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
430	Content-Length: 0	
431		
432		
433	[2025-10-17 17:58:37] VERBOSE[184812][C-00000005] pbx.c: Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'PJSIP/5000-00000008'	
434	[2025-10-17 17:58:37] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP request (420 bytes) from UDP:192.168.1.101:5060 --->	
435	ACK sip:[email protected] SIP/2.0	
436	Via: SIP/2.0/UDP 10.10.10.223:5060;branch=z9hG4bK.bifwwK~BC;rport	
437	Call-ID: YkrzKiR1pd	
438	From: <sip:[email protected]>;tag=B5GpVw49Q	
439	To: <sip:[email protected]>;tag=a547eee6-fbd6-4ee7-b294-c980e01ee6c5	
440	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
441	Max-Forwards: 70	
442	CSeq: 21 ACK	
443		
444		
445	[2025-10-17 17:58:43] VERBOSE[147697] res_pjsip_logger.c: <--- Transmitting SIP request (428 bytes) to UDP:192.168.1.101:5060 --->	
446	OPTIONS sip:[email protected]:5060 SIP/2.0	
447	Via: SIP/2.0/UDP 192.168.1.103:5060;rport;branch=z9hG4bKPj921f315a-521c-4271-8ac6-6af6e677bb59	
448	From: <sip:[email protected]>;tag=e3eab935-cbd1-4917-b7c7-196fa5c4b2e5	
449	To: <sip:[email protected]>	
450	Contact: <sip:[email protected]:5060>	
451	Call-ID: fd471ea5-c53c-45c8-9437-f9f16437132a	
452	CSeq: 55860 OPTIONS	
453	Max-Forwards: 70	
454	User-Agent: FPBX-17.0.21.2(22.6.0)	
455	Content-Length: 0	
456		
457		
458	[2025-10-17 17:58:43] VERBOSE[41313] res_pjsip_logger.c: <--- Received SIP response (295 bytes) from UDP:192.168.1.101:5060 --->	
459	SIP/2.0 200 Ok	
460	Via: SIP/2.0/UDP 192.168.1.103:5060;rport;branch=z9hG4bKPj921f315a-521c-4271-8ac6-6af6e677bb59	
461	From: <sip:[email protected]>;tag=e3eab935-cbd1-4917-b7c7-196fa5c4b2e5	
462	To: <sip:[email protected]>;tag=A0Ti5	
463	Call-ID: fd471ea5-c53c-45c8-9437-f9f16437132a	
464	CSeq: 55860 OPTIONS```

Your provider is rejecting the call.

I noticed that, there maybe 2 reasons I presume, one being my provider not supporting pjsip and 2nd being any error in my config.
Earlier with chan_sip it was working. Now I fresh installed FreePBX v17 which is not having legacy chan_sip.

You should also provide a trace of it working with chan_sip, so that it can be compared.

Logs using chan_sip here

Unfortunately, the log for the chan_sip case is missing the SIP trace for the trunk.
You need to issue
sip set debug on
as well as
pjsip set logger on
to get the trace on both ends.