BSNL SIP Trunk - Incoming Works but Outgoing Fails with CHANUNAVAIL

@Stewart1 @jcolp
Logs of chan_sip outbound call

Your router appears to have a SIP ALG (sometimes called SIP Passthrough or similar) enabled.
If there is a setting to disable it, try that. Otherwise, we can look for a workaround after trying some simple measures.

  1. The two cases are presenting a different set of codecs. Try disabling all but alaw and ulaw.
  2. The pjsip case is sending a PAI header, which chan_sip does not. In the trunk, set Send RPID/PAI to No.
  3. Possibly a DNS issue. pjsip was sending the INVITE to 10.187.10.65. Was chan_sip sending to the same address?

If it’s not any of the above and you can’t easily disable the ALG, please describe your network setup: Modem/ONT make/model? Is it configured as a router? Separate router, if any?

@Stewart1 @jcolp

My config:
Theres a modem(TP-LINK Archer XR500V) which receives fiber input. In that we register a vlan with connection type as DynamicIP. Then we bind that connection to a LAN port of modem, where the freepbx server connects.
I disabled SIP ALG.
Only allowed alaw and ulaw(in both extension phone(softphone) and in the freepbx), reloaded everyhting.

Still outbound calls reply with: “All circuits are busy”.

Current log(FreePBX 17):

[2025-10-17 19:41:32] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (1802 bytes) from UDP:192.168.1.101:5060 --->	
3	INVITE sip:[email protected] SIP/2.0	
4	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.ABPdgY9og;rport	
5	From: <sip:[email protected]>;tag=XLpNRKnnq	
6	To: sip:[email protected]	
7	CSeq: 20 INVITE	
8	Call-ID: Khm3rnm7vh	
9	Max-Forwards: 70	
10	Supported: replaces, outbound, gruu, path, record-aware	
11	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
12	Content-Type: application/sdp	
13	Content-Length: 1096	
14	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
15	User-Agent: Linphone-Desktop/5.3.1 (pc-Predator-PH315-53) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
16		
17	v=0	
18	o=5000 1578 2513 IN IP4 192.168.1.101	
19	s=Talk	
20	c=IN IP4 192.168.1.101	
21	t=0 0	
22	a=ice-pwd:13395d8fddf08506eb75d6d6	
23	a=ice-ufrag:77c24a92	
24	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
25	a=group:BUNDLE as	
26	a=record:off	
27	m=audio 45695 RTP/AVPF 0 8	
28	c=IN IP4 117.216.84.179	
29	a=rtcp-mux	
30	a=mid:as	
31	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
32	a=rtcp:45955	
33	a=candidate:1 1 UDP 2130706303 10.10.10.223 45695 typ host	
34	a=candidate:1 2 UDP 2130706302 10.10.10.223 45955 typ host	
35	a=candidate:2 1 UDP 2130706303 192.168.1.101 45695 typ host	
36	a=candidate:2 2 UDP 2130706302 192.168.1.101 45955 typ host	
37	a=candidate:3 1 UDP 2130706303 172.19.0.1 45695 typ host	
38	a=candidate:3 2 UDP 2130706302 172.19.0.1 45955 typ host	
39	a=candidate:4 1 UDP 2130706303 172.17.0.1 45695 typ host	
40	a=candidate:4 2 UDP 2130706302 172.17.0.1 45955 typ host	
41	a=candidate:5 1 UDP 1694498687 117.216.84.179 45695 typ srflx raddr 10.10.10.223 rport 45695	
42	a=candidate:5 2 UDP 1694498686 117.216.84.179 45955 typ srflx raddr 10.10.10.223 rport 45955	
43	a=rtcp-fb:* trr-int 1000	
44	a=rtcp-fb:* ccm tmmbr	
45		
46	[2025-10-17 19:41:32] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (465 bytes) to UDP:192.168.1.101:5060 --->	
47	SIP/2.0 401 Unauthorized	
48	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.ABPdgY9og	
49	Call-ID: Khm3rnm7vh	
50	From: <sip:[email protected]>;tag=XLpNRKnnq	
51	To: <sip:[email protected]>;tag=z9hG4bK.ABPdgY9og	
52	CSeq: 20 INVITE	
53	WWW-Authenticate: Digest realm="asterisk",nonce="1760726492/0adb130a63489750609cfeccfde4434f",opaque="2ad33d5c73aab316",algorithm=MD5,qop="auth"	
54	Server: FPBX-17.0.21.2(22.6.0)	
55	Content-Length: 0	
56		
57		
58	[2025-10-17 19:41:32] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (402 bytes) from UDP:192.168.1.101:5060 --->	
59	ACK sip:[email protected] SIP/2.0	
60	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.ABPdgY9og;rport	
61	Call-ID: Khm3rnm7vh	
62	From: <sip:[email protected]>;tag=XLpNRKnnq	
63	To: <sip:[email protected]>;tag=z9hG4bK.ABPdgY9og	
64	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
65	Max-Forwards: 70	
66	CSeq: 20 ACK	
67		
68		
69	[2025-10-17 19:41:32] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (2087 bytes) from UDP:192.168.1.101:5060 --->	
70	INVITE sip:[email protected] SIP/2.0	
71	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.JAQJ7iijc;rport	
72	From: <sip:[email protected]>;tag=XLpNRKnnq	
73	To: sip:[email protected]	
74	CSeq: 21 INVITE	
75	Call-ID: Khm3rnm7vh	
76	Max-Forwards: 70	
77	Supported: replaces, outbound, gruu, path, record-aware	
78	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
79	Content-Type: application/sdp	
80	Content-Length: 1096	
81	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
82	User-Agent: Linphone-Desktop/5.3.1 (pc-Predator-PH315-53) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
83	Authorization: Digest realm="asterisk", nonce="1760726492/0adb130a63489750609cfeccfde4434f", algorithm=MD5, opaque="2ad33d5c73aab316", username="5000", uri="sip:[email protected]", response="e429b06e6fe55dca2560e287a4e51006", cnonce="WOzFvK4KOrDf1AXd", nc=00000001, qop=auth	
84		
85	v=0	
86	o=5000 1578 2513 IN IP4 192.168.1.101	
87	s=Talk	
88	c=IN IP4 192.168.1.101	
89	t=0 0	
90	a=ice-pwd:13395d8fddf08506eb75d6d6	
91	a=ice-ufrag:77c24a92	
92	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
93	a=group:BUNDLE as	
94	a=record:off	
95	m=audio 45695 RTP/AVPF 0 8	
96	c=IN IP4 117.216.84.179	
97	a=rtcp-mux	
98	a=mid:as	
99	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
100	a=rtcp:45955	
101	a=candidate:1 1 UDP 2130706303 10.10.10.223 45695 typ host	
102	a=candidate:1 2 UDP 2130706302 10.10.10.223 45955 typ host	
103	a=candidate:2 1 UDP 2130706303 192.168.1.101 45695 typ host	
104	a=candidate:2 2 UDP 2130706302 192.168.1.101 45955 typ host	
105	a=candidate:3 1 UDP 2130706303 172.19.0.1 45695 typ host	
106	a=candidate:3 2 UDP 2130706302 172.19.0.1 45955 typ host	
107	a=candidate:4 1 UDP 2130706303 172.17.0.1 45695 typ host	
108	a=candidate:4 2 UDP 2130706302 172.17.0.1 45955 typ host	
109	a=candidate:5 1 UDP 1694498687 117.216.84.179 45695 typ srflx raddr 10.10.10.223 rport 45695	
110	a=candidate:5 2 UDP 1694498686 117.216.84.179 45955 typ srflx raddr 10.10.10.223 rport 45955	
111	a=rtcp-fb:* trr-int 1000	
112	a=rtcp-fb:* ccm tmmbr	
113		
114	[2025-10-17 19:41:32] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (291 bytes) to UDP:192.168.1.101:5060 --->	
115	SIP/2.0 100 Trying	
116	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.JAQJ7iijc	
117	Call-ID: Khm3rnm7vh	
118	From: <sip:[email protected]>;tag=XLpNRKnnq	
119	To: <sip:[email protected]>	
120	CSeq: 21 INVITE	
121	Server: FPBX-17.0.21.2(22.6.0)	
122	Content-Length: 0	
123		
124		
125	[2025-10-17 19:41:32] ERROR[14143] res_pjsip_session.c: 5000: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)	
126	[2025-10-17 19:41:32] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (345 bytes) to UDP:192.168.1.101:5060 --->	
127	SIP/2.0 488 Not Acceptable Here	
128	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.JAQJ7iijc	
129	Call-ID: Khm3rnm7vh	
130	From: <sip:[email protected]>;tag=XLpNRKnnq	
131	To: <sip:[email protected]>;tag=b4b1da2e-7d27-4f68-9023-b00e8183bb66	
132	CSeq: 21 INVITE	
133	Server: FPBX-17.0.21.2(22.6.0)	
134	Content-Length: 0	
135		
136		
137	[2025-10-17 19:41:32] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (421 bytes) from UDP:192.168.1.101:5060 --->	
138	ACK sip:[email protected] SIP/2.0	
139	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.JAQJ7iijc;rport	
140	Call-ID: Khm3rnm7vh	
141	From: <sip:[email protected]>;tag=XLpNRKnnq	
142	To: <sip:[email protected]>;tag=b4b1da2e-7d27-4f68-9023-b00e8183bb66	
143	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
144	Max-Forwards: 70	
145	CSeq: 21 ACK	
146		
147		
148	[2025-10-17 19:41:33] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (1801 bytes) from UDP:192.168.1.101:5060 --->	
149	INVITE sip:[email protected] SIP/2.0	
150	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.a4ppxS-B8;rport	
151	From: <sip:[email protected]>;tag=C0LhQEbIR	
152	To: sip:[email protected]	
153	CSeq: 20 INVITE	
154	Call-ID: suN-q5Ts6e	
155	Max-Forwards: 70	
156	Supported: replaces, outbound, gruu, path, record-aware	
157	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
158	Content-Type: application/sdp	
159	Content-Length: 1095	
160	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
161	User-Agent: Linphone-Desktop/5.3.1 (pc-Predator-PH315-53) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
162		
163	v=0	
164	o=5000 1578 2515 IN IP4 192.168.1.101	
165	s=Talk	
166	c=IN IP4 192.168.1.101	
167	t=0 0	
168	a=ice-pwd:5e360b379de2ecc1b7ecf7b2	
169	a=ice-ufrag:a5c454f6	
170	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
171	a=group:BUNDLE as	
172	a=record:off	
173	m=audio 34269 RTP/AVP 0 8	
174	c=IN IP4 117.216.84.179	
175	a=rtcp-mux	
176	a=mid:as	
177	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
178	a=rtcp:59976	
179	a=candidate:1 1 UDP 2130706303 10.10.10.223 34269 typ host	
180	a=candidate:1 2 UDP 2130706302 10.10.10.223 59976 typ host	
181	a=candidate:2 1 UDP 2130706303 192.168.1.101 34269 typ host	
182	a=candidate:2 2 UDP 2130706302 192.168.1.101 59976 typ host	
183	a=candidate:3 1 UDP 2130706303 172.19.0.1 34269 typ host	
184	a=candidate:3 2 UDP 2130706302 172.19.0.1 59976 typ host	
185	a=candidate:4 1 UDP 2130706303 172.17.0.1 34269 typ host	
186	a=candidate:4 2 UDP 2130706302 172.17.0.1 59976 typ host	
187	a=candidate:5 1 UDP 1694498687 117.216.84.179 34269 typ srflx raddr 10.10.10.223 rport 34269	
188	a=candidate:5 2 UDP 1694498686 117.216.84.179 59976 typ srflx raddr 10.10.10.223 rport 59976	
189	a=rtcp-fb:* trr-int 1000	
190	a=rtcp-fb:* ccm tmmbr	
191		
192	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (465 bytes) to UDP:192.168.1.101:5060 --->	
193	SIP/2.0 401 Unauthorized	
194	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.a4ppxS-B8	
195	Call-ID: suN-q5Ts6e	
196	From: <sip:[email protected]>;tag=C0LhQEbIR	
197	To: <sip:[email protected]>;tag=z9hG4bK.a4ppxS-B8	
198	CSeq: 20 INVITE	
199	WWW-Authenticate: Digest realm="asterisk",nonce="1760726493/5124046b49863321952a69dfd8cb3576",opaque="527d70af1ca4121e",algorithm=MD5,qop="auth"	
200	Server: FPBX-17.0.21.2(22.6.0)	
201	Content-Length: 0	
202		
203		
204	[2025-10-17 19:41:33] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (402 bytes) from UDP:192.168.1.101:5060 --->	
205	ACK sip:[email protected] SIP/2.0	
206	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.a4ppxS-B8;rport	
207	Call-ID: suN-q5Ts6e	
208	From: <sip:[email protected]>;tag=C0LhQEbIR	
209	To: <sip:[email protected]>;tag=z9hG4bK.a4ppxS-B8	
210	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
211	Max-Forwards: 70	
212	CSeq: 20 ACK	
213		
214		
215	[2025-10-17 19:41:33] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (2086 bytes) from UDP:192.168.1.101:5060 --->	
216	INVITE sip:[email protected] SIP/2.0	
217	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.v7SS8gokP;rport	
218	From: <sip:[email protected]>;tag=C0LhQEbIR	
219	To: sip:[email protected]	
220	CSeq: 21 INVITE	
221	Call-ID: suN-q5Ts6e	
222	Max-Forwards: 70	
223	Supported: replaces, outbound, gruu, path, record-aware	
224	Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE	
225	Content-Type: application/sdp	
226	Content-Length: 1095	
227	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
228	User-Agent: Linphone-Desktop/5.3.1 (pc-Predator-PH315-53) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
229	Authorization: Digest realm="asterisk", nonce="1760726493/5124046b49863321952a69dfd8cb3576", algorithm=MD5, opaque="527d70af1ca4121e", username="5000", uri="sip:[email protected]", response="20d822899fa2da0089c5c2cc547c3661", cnonce="-tZC0msCcuGmtlcw", nc=00000001, qop=auth	
230		
231	v=0	
232	o=5000 1578 2515 IN IP4 192.168.1.101	
233	s=Talk	
234	c=IN IP4 192.168.1.101	
235	t=0 0	
236	a=ice-pwd:5e360b379de2ecc1b7ecf7b2	
237	a=ice-ufrag:a5c454f6	
238	a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics	
239	a=group:BUNDLE as	
240	a=record:off	
241	m=audio 34269 RTP/AVP 0 8	
242	c=IN IP4 117.216.84.179	
243	a=rtcp-mux	
244	a=mid:as	
245	a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid	
246	a=rtcp:59976	
247	a=candidate:1 1 UDP 2130706303 10.10.10.223 34269 typ host	
248	a=candidate:1 2 UDP 2130706302 10.10.10.223 59976 typ host	
249	a=candidate:2 1 UDP 2130706303 192.168.1.101 34269 typ host	
250	a=candidate:2 2 UDP 2130706302 192.168.1.101 59976 typ host	
251	a=candidate:3 1 UDP 2130706303 172.19.0.1 34269 typ host	
252	a=candidate:3 2 UDP 2130706302 172.19.0.1 59976 typ host	
253	a=candidate:4 1 UDP 2130706303 172.17.0.1 34269 typ host	
254	a=candidate:4 2 UDP 2130706302 172.17.0.1 59976 typ host	
255	a=candidate:5 1 UDP 1694498687 117.216.84.179 34269 typ srflx raddr 10.10.10.223 rport 34269	
256	a=candidate:5 2 UDP 1694498686 117.216.84.179 59976 typ srflx raddr 10.10.10.223 rport 59976	
257	a=rtcp-fb:* trr-int 1000	
258	a=rtcp-fb:* ccm tmmbr	
259		
260	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (291 bytes) to UDP:192.168.1.101:5060 --->	
261	SIP/2.0 100 Trying	
262	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
263	Call-ID: suN-q5Ts6e	
264	From: <sip:[email protected]>;tag=C0LhQEbIR	
265	To: <sip:[email protected]>	
266	CSeq: 21 INVITE	
267	Server: FPBX-17.0.21.2(22.6.0)	
268	Content-Length: 0	
269		
270		
271	[2025-10-17 19:41:33] ERROR[14143] res_pjsip_header_funcs.c: No headers had been previously added to this session.	
272	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (558 bytes) to UDP:192.168.1.101:5060 --->	
273	SIP/2.0 180 Ringing	
274	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
275	Call-ID: suN-q5Ts6e	
276	From: <sip:[email protected]>;tag=C0LhQEbIR	
277	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
278	CSeq: 21 INVITE	
279	Server: FPBX-17.0.21.2(22.6.0)	
280	Contact: <sip:192.168.1.103:5060>	
281	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
282	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
283	Content-Length: 0	
284		
285		
286	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP request (1154 bytes) to UDP:10.187.10.65:5060 --->	
287	INVITE sip:[email protected]:5060 SIP/2.0	
288	Via: SIP/2.0/UDP 10.152.190.223:5060;rport;branch=z9hG4bKPjd4d3ef16-a413-4e95-b211-7bd07bab679c	
289	From: <sip:[email protected]>;tag=faa38220-886d-40bc-bb7c-698b72a365cf	
290	To: <sip:[email protected]>	
291	Contact: <sip:[email protected]:5060>	
292	Call-ID: 1e66d0e6-36f5-4530-8ea5-faa0beef8940	
293	CSeq: 24734 INVITE	
294	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
295	Supported: 100rel, timer, replaces, norefersub, histinfo	
296	Session-Expires: 1800	
297	Min-SE: 90	
298	P-Asserted-Identity: <sip:[email protected]>	
299	Max-Forwards: 70	
300	User-Agent: FPBX-17.0.21.2(22.6.0)	
301	Content-Type: application/sdp	
302	Content-Length: 373	
303		
304	v=0	
305	o=- 914756638 914756638 IN IP4 10.152.190.223	
306	s=Asterisk	
307	c=IN IP4 10.152.190.223	
308	t=0 0	
309	m=audio 18124 RTP/AVP 8 0 107 3 101 102	
310	a=rtpmap:8 PCMA/8000	
311	a=rtpmap:0 PCMU/8000	
312	a=rtpmap:107 opus/48000/2	
313	a=rtpmap:3 GSM/8000	
314	a=rtpmap:101 telephone-event/8000	
315	a=fmtp:101 0-16	
316	a=rtpmap:102 telephone-event/48000	
317	a=fmtp:102 0-16	
318	a=ptime:20	
319	a=maxptime:60	
320	a=sendrecv	
321		
322	[2025-10-17 19:41:33] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP response (414 bytes) from UDP:10.187.10.65:5060 --->	
323	SIP/2.0 100 trying -- your call is important to us	
324	Via: SIP/2.0/UDP 10.152.190.223:5060;rport=5060;branch=z9hG4bKPjd4d3ef16-a413-4e95-b211-7bd07bab679c;received=10.152.190.223	
325	From: <sip:[email protected]>;tag=faa38220-886d-40bc-bb7c-698b72a365cf	
326	To: <sip:[email protected]>	
327	Call-ID: 1e66d0e6-36f5-4530-8ea5-faa0beef8940	
328	CSeq: 24734 INVITE	
329	Server: BSNL-SMP	
330	Content-Length: 0	
331		
332		
333	[2025-10-17 19:41:33] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP response (531 bytes) from UDP:10.187.10.65:5060 --->	
334	SIP/2.0 403 Forbidden	
335	Record-Route: <sip:10.187.10.65;lr;did=a7a.6486>	
336	Call-ID: 1e66d0e6-36f5-4530-8ea5-faa0beef8940	
337	CSeq: 24734 INVITE	
338	From: <sip:[email protected]>;tag=faa38220-886d-40bc-bb7c-698b72a365cf	
339	To: <sip:[email protected]>;tag=SBC+1+7fc00a8+57fc43c	
340	Via: SIP/2.0/UDP 10.152.190.223:5060;received=10.152.190.223;rport=5060;branch=z9hG4bKPjd4d3ef16-a413-4e95-b211-7bd07bab679c	
341	Server: SIP/2.0	
342	Organization: CDOT	
343	Supported: timer	
344	Content-Length: 0	
345	Contact: <sip:10.187.6.12:5060>	
346		
347		
348	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP request (447 bytes) to UDP:10.187.10.65:5060 --->	
349	ACK sip:[email protected]:5060 SIP/2.0	
350	Via: SIP/2.0/UDP 10.152.190.223:5060;rport;branch=z9hG4bKPjd4d3ef16-a413-4e95-b211-7bd07bab679c	
351	From: <sip:[email protected]>;tag=faa38220-886d-40bc-bb7c-698b72a365cf	
352	To: <sip:[email protected]>;tag=SBC+1+7fc00a8+57fc43c	
353	Call-ID: 1e66d0e6-36f5-4530-8ea5-faa0beef8940	
354	CSeq: 24734 ACK	
355	Max-Forwards: 70	
356	User-Agent: FPBX-17.0.21.2(22.6.0)	
357	Content-Length: 0	
358		
359		
360	[2025-10-17 19:41:33] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (796 bytes) to UDP:192.168.1.101:5060 --->	
361	SIP/2.0 183 Session Progress	
362	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
363	Call-ID: suN-q5Ts6e	
364	From: <sip:[email protected]>;tag=C0LhQEbIR	
365	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
366	CSeq: 21 INVITE	
367	Server: FPBX-17.0.21.2(22.6.0)	
368	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
369	Contact: <sip:192.168.1.103:5060>	
370	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
371	Content-Type: application/sdp	
372	Content-Length: 195	
373		
374	v=0	
375	o=- 1578 2517 IN IP4 192.168.1.103	
376	s=Asterisk	
377	c=IN IP4 192.168.1.103	
378	t=0 0	
379	m=audio 15514 RTP/AVP 8 0	
380	a=rtpmap:8 PCMA/8000	
381	a=rtpmap:0 PCMU/8000	
382	a=ptime:20	
383	a=maxptime:140	
384	a=sendrecv	
385		
386	[2025-10-17 19:41:34] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (367 bytes) from UDP:192.168.1.101:5060 --->	
387	CANCEL sip:[email protected] SIP/2.0	
388	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.v7SS8gokP;rport	
389	Call-ID: suN-q5Ts6e	
390	From: <sip:[email protected]>;tag=C0LhQEbIR	
391	To: sip:[email protected]	
392	Max-Forwards: 70	
393	CSeq: 21 CANCEL	
394	User-Agent: Linphone-Desktop/5.3.1 (pc-Predator-PH315-53) ubuntu/25.04 Qt/5.15.2 LinphoneSDK/5.4.46-2-gbc9e72929	
395		
396		
397	[2025-10-17 19:41:34] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (328 bytes) to UDP:192.168.1.101:5060 --->	
398	SIP/2.0 200 OK	
399	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
400	Call-ID: suN-q5Ts6e	
401	From: <sip:[email protected]>;tag=C0LhQEbIR	
402	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
403	CSeq: 21 CANCEL	
404	Server: FPBX-17.0.21.2(22.6.0)	
405	Content-Length: 0	
406		
407		
408	[2025-10-17 19:41:34] VERBOSE[14143] res_pjsip_logger.c: <--- Transmitting SIP response (534 bytes) to UDP:192.168.1.101:5060 --->	
409	SIP/2.0 487 Request Terminated	
410	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
411	Call-ID: suN-q5Ts6e	
412	From: <sip:[email protected]>;tag=C0LhQEbIR	
413	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
414	CSeq: 21 INVITE	
415	Server: FPBX-17.0.21.2(22.6.0)	
416	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
417	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
418	Content-Length: 0	
419		
420		
421	[2025-10-17 19:41:35] VERBOSE[14142] res_pjsip_logger.c: <--- Transmitting SIP response (534 bytes) to UDP:192.168.1.101:5060 --->	
422	SIP/2.0 487 Request Terminated	
423	Via: SIP/2.0/UDP 192.168.1.101:5060;rport=5060;received=192.168.1.101;branch=z9hG4bK.v7SS8gokP	
424	Call-ID: suN-q5Ts6e	
425	From: <sip:[email protected]>;tag=C0LhQEbIR	
426	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
427	CSeq: 21 INVITE	
428	Server: FPBX-17.0.21.2(22.6.0)	
429	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER	
430	P-Asserted-Identity: "CID:91XXXXXXXXXX" <sip:[email protected]>	
431	Content-Length: 0	
432		
433		
434	[2025-10-17 19:41:36] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (421 bytes) from UDP:192.168.1.101:5060 --->	
435	ACK sip:[email protected] SIP/2.0	
436	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.v7SS8gokP;rport	
437	Call-ID: suN-q5Ts6e	
438	From: <sip:[email protected]>;tag=C0LhQEbIR	
439	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
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 19:41:36] VERBOSE[14142] res_pjsip_logger.c: <--- Received SIP request (421 bytes) from UDP:192.168.1.101:5060 --->	
446	ACK sip:[email protected] SIP/2.0	
447	Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK.v7SS8gokP;rport	
448	Call-ID: suN-q5Ts6e	
449	From: <sip:[email protected]>;tag=C0LhQEbIR	
450	To: <sip:[email protected]>;tag=a0eb3342-fae3-4608-b9a2-fe5a8c55efd2	
451	Contact: <sip:[email protected];transport=udp>;expires=599;+org.linphone.specs="conference/2.0,ephemeral/1.1,groupchat/1.2,lime"	
452	Max-Forwards: 70	
453	CSeq: 21 ACK



ALG is correctly disabled.

Please turn off Opus and GSM codecs for the trunk and also set Send RPID/PAI to No.

After Submit and Apply Config, turn pjsip logger back on and post a new log.

Still being rejected by the provider. Time to reach out and ask them why they kept sending 403 Forbidden’s on your outbound calls.

Sure, but the OP has a working chan_sip example, so I’m pretty sure that if we match that, it will fix the problem.

And if the provider can give a reason as to why it is being rejected we can also use that to figure out what is happening.

There’s nothing like a “provider reply”. They don’t know that much technical stuff, all they do is can give account credentials, change plans, etc.
I can provide any logs for you.

So, you got rid of the extra codecs and the PAI, but still getting a 403? If so, paste a new trace and we’ll try to spot another problem.

Then you should change providers. If your current provider can offer you no real support, you shouldn’t be with them.

The situation here is different, this is a normal sip connection offered(no charges, its free) to customers who have internet connection of BSNL.
I reached to a person who knows freepbx and BSNL, and he replied that BSNL dont work with pjsip.
But pjsip option is not there in freepbx17. What to do(apart from changing providers).

Fact: Here for just 200mbps plan, its costs only about $14, that too with free sip connection.

Not sure how that is possible. SIP is SIP and that is all PJSIP is, a SIP driver. It also is the driver for other SIP projects and applications. BSNL would have no clue it’s chan_pjsip in Asterisk.

So that person is wrong.

1 Like

bro noel i am from telangana, and i am also trying since 25 days to get it working. at last found your post on broadband forum and tried chan sip. wow incoming calls work… but cant make outgoing calls.. can you kindly share your email id etc so that we can chat please.

If I understand correctly, you have a fully functional chan_sip setup, for which you posted a successful outbound trace.

Your last pjsip trace had two obvious differences (codecs and PAI) and I suggested that you correct them. Please post a current trace so we can see the responses and whether any differences remain.

i got pjsip working from your chansip Noel

Can you do outgoing calls with pjsip?

New pjsip logs

Screenshots(Black mask is the username/phone number of sip acc).
Also attached and recent logs during outgoing call.





Your provider is still rejecting the call.

@phanitheja
Can you do outgoing calls with pjsip?

yes finally cracked both incoming and outgoing calls.