Another Call Out Issue

I’ve had no issues with my PBX server until recently, I’ve been unable to dial out to both extensions and outbound numbers. I verified my account secrets on all my phones and verified iptables/firewall isn’t blocking my office ip. My PBX is hosted on a VM on my server in Texas.

When attempting to dial out/intercom/etc, there will be no audio and after aprox 15 seconds, “No Response” is displayed on the phone. I checked the logs and the only thing I could find is in the requests from the phone to PBX, its showed the local/lan IP of the phone on my office network (192.168.1.151). The phones are all showing registered in PBX so I know they are able to get through the network. So I’m unsure if this is at fault.

I redacted IP’s but for clarity “FreePBXServerIP” is my server in texas that PBX is hosted on, OFFICEIP is the public IP for my office, PHONENUMBER is an external phone number I used to test an outbound call.

Log:

[2025-04-09 23:32:50] VERBOSE[35111] res_pjsip_logger.c: <— Received SIP request (1283 bytes) from UDP:OFFICEIP:50827 —>
25659INVITE sip:PHONENUMBER@FreePBXServerIP SIP/2.0
25660Via: SIP/2.0/UDP 192.168.1.151:50827;branch=z9hG4bK800737136;rport
25661From: “BrettVR” sip:202@FreePBXServerIP;tag=1464689658
25662To: sip:PHONENUMBER@FreePBXServerIP
25663Call-ID: [email protected]
25664CSeq: 220 INVITE
25665Contact: “BrettVR” sip:[email protected]:50827
25666X-Grandstream-PBX: true
25667Max-Forwards: 70
25668User-Agent: Grandstream GRP2616 1.0.13.21
25669Privacy: none
25670P-Preferred-Identity: “BrettVR” sip:202@FreePBXServerIP
25671P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=7A-45-58-86-B9-82
25672P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-7F-C2-90
25673Supported: replaces, path
25674Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
25675Content-Type: application/sdp
25676Accept: application/sdp, application/dtmf-relay
25677Content-Length: 455
25678
25679v=0
25680o=202 8000 8000 IN IP4 192.168.1.151
25681s=SIP Call
25682c=IN IP4 192.168.1.151
25683t=0 0
25684m=audio 30918 RTP/AVP 97 2 123 4 18 9 0 8 101
25685a=sendrecv
25686a=rtpmap:97 iLBC/8000
25687a=fmtp:97 mode=30
25688a=ptime:60
25689a=rtpmap:2 G726-32/8000
25690a=rtpmap:123 opus/48000/2
25691a=rtpmap:4 G723/8000
25692a=fmtp:4 annexa=no
25693a=rtpmap:18 G729/8000
25694a=fmtp:18 annexb=no
25695a=rtpmap:9 G722/8000
25696a=rtpmap:0 PCMU/8000
25697a=rtpmap:8 PCMA/8000
25698a=rtpmap:101 telephone-event/8000
25699a=fmtp:101 0-15
25700
25701[2025-04-09 23:32:50] VERBOSE[69548] res_pjsip_logger.c: <— Transmitting SIP response (501 bytes) to UDP:OFFICEIP:50827 —>
25702SIP/2.0 401 Unauthorized
25703Via: SIP/2.0/UDP 192.168.1.151:50827;rport=50827;received=OFFICEIP;branch=z9hG4bK800737136
25704Call-ID: [email protected]
25705From: “BrettVR” sip:202@FreePBXServerIP;tag=1464689658
25706To: sip:PHONENUMBER@FreePBXServerIP;tag=z9hG4bK800737136
25707CSeq: 220 INVITE
25708WWW-Authenticate: Digest realm=“asterisk”,nonce=“1744259570/d95011aa987b2f37c66cd4c4d456ab76”,opaque=“6a8c89a67c3d78b2”,algorithm=MD5,qop=“auth”
25709Server: FPBX-17.0.19.24(22.2.0)
25710Content-Length: 0
25711
25712
25713[2025-04-09 23:32:50] VERBOSE[35111] res_pjsip_logger.c: <— Received SIP request (305 bytes) from UDP:OFFICEIP:50827 —>
25714ACK sip:PHONENUMBER@FreePBXServerIP SIP/2.0
25715Via: SIP/2.0/UDP 192.168.1.151:50827;branch=z9hG4bK800737136;rport
25716From: “BrettVR” sip:202@FreePBXServerIP;tag=1464689658
25717To: sip:PHONENUMBER@FreePBXServerIP;tag=z9hG4bK800737136
25718Call-ID: [email protected]
25719CSeq: 220 ACK
25720Content-Length: 0
25721
25722
25723[2025-04-09 23:33:08] VERBOSE[35111] res_pjsip_logger.c: <— Received SIP request (867 bytes) from UDP:OFFICEIP:50827 —>
25724REGISTER sip:FreePBXServerIP SIP/2.0
25725Via: SIP/2.0/UDP 192.168.1.151:50827;branch=z9hG4bK273766502;rport
25726From: sip:202@FreePBXServerIP;tag=1157800080
25727To: sip:202@FreePBXServerIP
25728Call-ID: [email protected]
25729CSeq: 2034 REGISTER
25730Contact: sip:[email protected]:50827;reg-id=1;+sip.instance=“urn:uuid:00000000-0000-1000-8000-C074AD7FC290
25731Authorization: Digest username=“202”, realm=“asterisk”, nonce=“1744259064/d1681163fc03b5ae3766907df1896262”, uri=“sip:FreePBXServerIP”, response=“cf4b58634aa94a7c15517c39b54ed68c”, algorithm=MD5, cnonce=“06830200”, opaque=“6a693c531873e091”, qop=auth, nc=00000002
25732X-Grandstream-PBX: true
25733Max-Forwards: 70
25734User-Agent: Grandstream GRP2616 1.0.13.21
25735Supported: path,x-gs-control
25736Expires: 3600
25737Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
25738Content-Length: 0
25739
25740
25741[2025-04-09 23:33:08] VERBOSE[69548] res_pjsip_logger.c: <— Transmitting SIP response (499 bytes) to UDP:OFFICEIP:50827 —>
25742SIP/2.0 401 Unauthorized
25743Via: SIP/2.0/UDP 192.168.1.151:50827;rport=50827;received=OFFICEIP;branch=z9hG4bK273766502
25744Call-ID: [email protected]
25745From: sip:202@FreePBXServerIP;tag=1157800080
25746To: sip:202@FreePBXServerIP;tag=z9hG4bK273766502
25747CSeq: 2034 REGISTER
25748WWW-Authenticate: Digest realm=“asterisk”,nonce=“1744259588/4e12c94ba3ccee31c446e81dbe25e557”,opaque=“14efa0135d2d40da”,stale=true,algorithm=MD5,qop=“auth”
25749Server: FPBX-17.0.19.24(22.2.0)
25750Content-Length: 0
25751
25752
25753[2025-04-09 23:33:08] VERBOSE[35111] res_pjsip_logger.c: <— Received SIP request (868 bytes) from UDP:OFFICEIP:50827 —>
25754REGISTER sip:FreePBXServerIP SIP/2.0
25755Via: SIP/2.0/UDP 192.168.1.151:50827;branch=z9hG4bK1508231714;rport
25756From: sip:202@FreePBXServerIP;tag=1157800080
25757To: sip:202@FreePBXServerIP
25758Call-ID: [email protected]
25759CSeq: 2035 REGISTER
25760Contact: sip:[email protected]:50827;reg-id=1;+sip.instance=“urn:uuid:00000000-0000-1000-8000-C074AD7FC290
25761Authorization: Digest username=“202”, realm=“asterisk”, nonce=“1744259588/4e12c94ba3ccee31c446e81dbe25e557”, uri=“sip:FreePBXServerIP”, response=“bbad2ede0327ecce166184b55f63825d”, algorithm=MD5, cnonce=“00963967”, opaque=“14efa0135d2d40da”, qop=auth, nc=00000001
25762X-Grandstream-PBX: true
25763Max-Forwards: 70
25764User-Agent: Grandstream GRP2616 1.0.13.21
25765Supported: path,x-gs-control
25766Expires: 3600
25767Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
25768Content-Length: 0
25769
25770
25771[2025-04-09 23:33:08] VERBOSE[69548] res_pjsip_logger.c: <— Transmitting SIP response (439 bytes) to UDP:OFFICEIP:50827 —>
25772SIP/2.0 200 OK
25773Via: SIP/2.0/UDP 192.168.1.151:50827;rport=50827;received=OFFICEIP;branch=z9hG4bK1508231714
25774Call-ID: [email protected]
25775From: sip:202@FreePBXServerIP;tag=1157800080
25776To: sip:202@FreePBXServerIP;tag=z9hG4bK1508231714
25777CSeq: 2035 REGISTER
25778Date: Thu, 10 Apr 2025 04:33:08 GMT
25779Contact: sip:[email protected]:50827;expires=3599
25780Expires: 3600
25781Server: FPBX-17.0.19.24(22.2.0)
25782Content-Length: 0
25783
25784
25785[2025-04-09 23:33:14] VERBOSE[69548] res_pjsip_logger.c: <— Transmitting SIP request (431 bytes) to UDP:OFFICEIP:50827 —>
25786OPTIONS sip:202@OFFICEIP:50827 SIP/2.0
25787Via: SIP/2.0/UDP FreePBXServerIP:5060;rport;branch=z9hG4bKPj4c7db0f0-2f11-4699-8375-91498e7dd3db
25788From: sip:202@FreePBXServerIP;tag=e5363f99-e18c-4930-b33e-d067b3c8e3f0
25789To: sip:202@OFFICEIP
25790Contact: sip:202@FreePBXServerIP:5060
25791Call-ID: a6b7b41a-4259-4acc-8a89-f7f5c5199d3d
25792CSeq: 47404 OPTIONS
25793Max-Forwards: 70
25794User-Agent: FPBX-17.0.19.24(22.2.0)
25795Content-Length: 0

Looking for anything that can point me in the right direction. Appreciate any and all help!!!

Shows a successful registration followed by an incomplete qualify attempt (no response, and no retransmission). The log does not show any attempt to dial out. Any dialout would not be attempted, because the remote devices appears to be unreachable.

That’s what I’m trying to figure out what is going on. Inbound calls to the phones work without any issue. I’ve disabled the firewall on my router (Ubiquti UDM) and opened 5060-5061. On one of my phones I connected the phone via a wifi hotspot to try to isolate network issues at the office and still have the same issue.

Note, when I say appears to be unreachable, the ACK to the OK shows it is actually reachable, at that point, but Asterisk assumes it is unreachable, because of the lack of response to OPTIONS.

Would putting the remote phones on a VPN probably help this situation? I really struggling to pinpoint what is exactly causing this concern. Even a fresh install on another VM leads to the same results.

**Disregard, VPN had no effect.

Could the phone have a broken implementation of SIP? Maybe it (incorrectly doesn’t respond to unknown requests, and doesn’t understand OPTIONS, in which case disabling qualify might help. Otherwise you have to trace the packet through the network, and find where things are going astray.

Disabled Qualify, still nothing

Pcap from PBX while attempted to make a call.

The only thing I see when I expand the outgoing call is the LAN ip from the phone is being passed (192.168.1.154) and I believe PBX is expecting the WAN IP.

Please provide logs as plain text, preferably taken from the Asterisk full log file. Please include the whole SIP and SDP packet, not a one line summary. Please ensure that you don’t leave out the first line.

SIP Packet from Phone to PBX

PBX to Phone Packet

Options Packet

Full Log

Looking at the full log, there is a successful registration, a successful inbound OPTIONS test, but no trace of any calls, not even the A leg of a an outbound call.

Cleared the log and made an outbound call and this time it showed the call attempt.

[2025-04-11 10:45:13] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP request (1256 bytes) from UDP:216.73.106.179:11508 —>
INVITE sip:OUTBOUNDPHONENUMBER@85.237.203.230 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.154:11508;branch=z9hG4bK396379076;rport
From: sip:[email protected];tag=161689981
To: sip:**OUTBOUNDPHONENUMBER**@85.237.203.230
Call-ID: [email protected]
CSeq: 22730 INVITE
Contact: sip:[email protected]:11508
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2616 1.0.13.21
Privacy: none
P-Preferred-Identity: sip:[email protected]
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=7A-45-58-86-B9-82
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-7F-C2-90
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 455

v=0
o=202 8000 8000 IN IP4 192.168.1.154
s=SIP Call
c=IN IP4 192.168.1.154
t=0 0
m=audio 32130 RTP/AVP 97 2 123 4 18 9 0 8 101
a=sendrecv
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=ptime:60
a=rtpmap:2 G726-32/8000
a=rtpmap:123 opus/48000/2
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

[2025-04-11 10:45:13] VERBOSE[444583] res_pjsip_logger.c: <— Transmitting SIP response (494 bytes) to UDP:216.73.106.179:11508 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.154:11508;rport=11508;received=216.73.106.179;branch=z9hG4bK396379076
Call-ID: [email protected]
From: sip:[email protected];tag=161689981
To: sip:**OUTBOUNDPHONENUMBER**@85.237.203.230;tag=z9hG4bK396379076
CSeq: 22730 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1744386313/69e857a04eef98d1d963d9dc699ae130”,opaque=“3619af2e1e84ce4e”,algorithm=MD5,qop=“auth”
Server: FPBX-17.0.19.24(22.2.0)
Content-Length: 0

[2025-04-11 10:45:13] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP request (298 bytes) from UDP:216.73.106.179:11508 —>
ACK sip:OUTBOUNDPHONENUMBER@85.237.203.230 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.154:11508;branch=z9hG4bK396379076;rport
From: sip:[email protected];tag=161689981
To: sip:**OUTBOUNDPHONENUMBER**[email protected];tag=z9hG4bK396379076
Call-ID: [email protected]
CSeq: 22730 ACK
Content-Length: 0

[2025-04-11 10:45:14] VERBOSE[466309] res_pjsip_logger.c: <— Transmitting SIP request (430 bytes) to UDP:216.73.106.179:5062 —>
OPTIONS sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 85.237.203.230:5060;rport;branch=z9hG4bKPj2375f615-9a75-45d5-978e-7fd210213634
From: sip:[email protected];tag=915aacfc-b0a6-4f24-b1c3-ccb05f5aefbd
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 74785be6-020c-4495-b5af-37a159627284
CSeq: 51943 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-17.0.19.24(22.2.0)
Content-Length: 0

[2025-04-11 10:45:14] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP response (493 bytes) from UDP:216.73.106.179:5062 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 85.237.203.230:5060;rport=5060;branch=z9hG4bKPj2375f615-9a75-45d5-978e-7fd210213634
From: sip:[email protected];tag=915aacfc-b0a6-4f24-b1c3-ccb05f5aefbd
To: sip:[email protected];tag=1582629357
Call-ID: 74785be6-020c-4495-b5af-37a159627284
CSeq: 51943 OPTIONS
Supported: replaces, path, timer
User-Agent: Grandstream GXP2135 1.0.11.64
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

[2025-04-11 10:45:17] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP request (701 bytes) from UDP:216.73.106.179:60374 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 138.124.60.132:60374;branch=z9hG4bK1125696433
Max-Forwards: 70
From: sip:[email protected];tag=1365867201
To: sip:[email protected]
Call-ID: 1978863615-2076164369-1788306416
CSeq: 1 INVITE
Contact: sip:[email protected]:60374
Content-Type: application/sdp
Content-Length: 208
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE, PUBLISH

v=0
o=7001 16264 18299 IN IP4 192.168.1.83
s=call
c=IN IP4 192.168.1.83
t=0 0
m=audio 25282 RTP/AVP 0 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

[2025-04-11 10:45:17] VERBOSE[575622] res_pjsip_logger.c: <— Transmitting SIP response (497 bytes) to UDP:216.73.106.179:60374 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 138.124.60.132:60374;rport=60374;received=216.73.106.179;branch=z9hG4bK1125696433
Call-ID: 1978863615-2076164369-1788306416
From: sip:[email protected];tag=1365867201
To: sip:[email protected];tag=z9hG4bK1125696433
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1744386317/0adf615a8a955ddaf6ccbba9674a034a”,opaque=“65ee1a192b9eb781”,algorithm=MD5,qop=“auth”
Server: FPBX-17.0.19.24(22.2.0)
Content-Length: 0

[2025-04-11 10:45:18] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP request (509 bytes) from UDP:216.73.106.179:11508 —>
OPTIONS sip:85.237.203.230 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.154:11508;branch=z9hG4bK1876992779;rport
From: sip:[email protected];tag=1370066917
To: sip:85.237.203.230
Call-ID: [email protected]
CSeq: 22740 OPTIONS
Contact: sip:[email protected]:11508
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2616 1.0.13.21
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

[2025-04-11 10:45:18] VERBOSE[466309] res_pjsip_logger.c: <— Transmitting SIP response (487 bytes) to UDP:216.73.106.179:11508 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.154:11508;rport=11508;received=216.73.106.179;branch=z9hG4bK1876992779
Call-ID: [email protected]
From: sip:[email protected];tag=1370066917
To: sip:85.237.203.230;tag=z9hG4bK1876992779
CSeq: 22740 OPTIONS
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1744386318/d6add55d45c488f65e8b95d3ac570af0”,opaque=“07942f930ff2aec3”,algorithm=MD5,qop=“auth”
Server: FPBX-17.0.19.24(22.2.0)
Content-Length: 0

[2025-04-11 10:45:18] VERBOSE[376832] res_pjsip_logger.c: <— Received SIP request (771 bytes) from UDP:216.73.106.179:11508 —>
OPTIONS sip:85.237.203.230 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.154:11508;branch=z9hG4bK79201649;rport
From: sip:[email protected];tag=1370066917
To: sip:85.237.203.230
Call-ID: [email protected]
CSeq: 22741 OPTIONS
Contact: sip:[email protected]:11508
Authorization: Digest username=“202”, realm=“asterisk”, nonce=“1744386318/d6add55d45c488f65e8b95d3ac570af0”, uri=“sip:85.237.203.230”, response=“b1416bf68d8edf638e75a7b617191ad7”, algorithm=MD5, cnonce=“03412071”, opaque=“07942f930ff2aec3”, qop=auth, nc=00000001
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2616 1.0.13.21
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

This is a dump of the phones syslog when attempting an outbound call.

There seem to be two different things, both with this public address, neither of which are responding to requests to provide a password. One is a Grandstream, and the other isn’t identifying itself.

The other is probably the phone in my shop. I’ve disabled it now. The grandstream is the phone I’m using to right now to attempt calls.

The address quoted above is not that from which the successful registration came, so either the IP addresses are very unstable (CGNAT? Mobile network?), or the registration isn’t from the same Grandstream as the INVITE.

The Grandstream log shows it trying to send an authenticated INVITE, but never getting a response. My guess is that it has been pushed over the MTU limit and has been fragmented. Some firewall configuration reject continuations of fragmented UDP messages, because they don’t contain the port number. If that is the problem here, you need to reduce the number of codecs offered by the GrandStream, switch to TCP, or add a firewall rule to let through continuation frames of fragmented UDP messages.

2 Likes

In the Grandstream phone, enable only ulaw (PCMU or G.711u) and alaw codecs.

As @david55 noted, your long list of codecs was causing the packet with the Authorization header to be dropped because of fragmentation.

1 Like

David, Stewart.

THANK YOU!!!

Only have PCMA/PCMU codecs on the phone sorted the problem. Thats so odd as that has never changed.