I am calling the inbound number and after the it was anwer it suddenly drop

Here is the warning message from my logfiles

The incoming call was not recognized as being associated with your trunk, so it was treated as anonymous, causing the default codec list to be used, which somehow included g723, which Asterisk was unable to transcode.

If this trunk uses IP authentication, the Match (Permit) field is not set correctly – see your provider documentation for the list of IP adddresses from which they can send calls. If the trunk uses registration, this is not normally an issue, but unusual firewall behavior (such as source port rewriting) could cause trouble. If you can’t resolve this, post screenshots of both the General and Advanced tabs of the pjsip settings (mask username and secret).

On the Codecs tab for the trunk, you should probably enable only ulaw and alaw (unless your provider offers wideband audio on VoLTE calls).

On the Advanced tab for extension 5001, set Disallowed Codecs to
all
and set Allowed Codecs to
ulaw&alaw

Also, in Asterisk SIP Settings, Audio Codecs section, check only ulaw and alaw.

If you still have trouble, paste the Asterisk log for a failing call at pastebin.com and post the link here. If you are too new to post links, just post the eight last characters of the URL.

Either that, or the carrier requires G.723 and it’s turned off (I believe FreePBX has that turned off by default.)

Settings->Asterisk SIP Settings. Scroll down and make sure that g723 is checked. You’ll probably have to add it to your CODEC list in the trunk as well.

I am seeing a remarkably similar issue. In my case I am using pjsip connections for both the VOIP provider connections and the extension. The incoming call appears great for about 30 seconds, good sound in both directions then it just disconnects. Below is a snippet from the log and it would appear that Asterisk is responding with an unauthorized error causing the call to terminate. I am not clear what to change in the config to allow the call to continue. Any hints would be gratefully received :wink:

[2024-01-19 12:44:29] VERBOSE[20754] res_pjsip_logger.c: <--- Received SIP request (546 bytes) from UDP:192.168.1.240:51057 --->
REGISTER sip:192.168.1.21 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bK12ce79c6
From: <sip:[email protected]>;tag=000628d8a49a0bfc21950c4e-2906f1da
To: <sip:[email protected]>
Call-ID: [email protected]
Max-Forwards: 70
Date: Fri, 19 Jan 2024 12:44:21 GMT
CSeq: 44073 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:[email protected]:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000628d8a49a>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 3600


[2024-01-19 12:44:29] VERBOSE[26402] res_pjsip_logger.c: <--- Transmitting SIP response (522 bytes) to UDP:192.168.1.240:51057 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.240:5060;rport=51057;received=192.168.1.240;branch=z9hG4bK12ce79c6
Call-ID: [email protected]
From: <sip:[email protected]>;tag=000628d8a49a0bfc21950c4e-2906f1da
To: <sip:[email protected]>;tag=z9hG4bK12ce79c6
CSeq: 44073 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1705668269/9b780663a3ed9c6a3d36ab78ff79fe85",opaque="02de08732f17ac07",algorithm=md5,qop="auth"
Server: FPBX-15.0.37.4(16.17.0)
Content-Length:  0


[2024-01-19 12:44:29] VERBOSE[20754] res_pjsip_logger.c: <--- Transmitting SIP request (570 bytes) to UDP:162.213.111.25:5060 --->
BYE sip:208.85.218.147:5071 SIP/2.0
Via: SIP/2.0/UDP 135.23.222.12:5060;rport;branch=z9hG4bKPjcdec2d42-2300-4aaa-8b08-3e29198aea1a
From: <sip:[email protected]>;tag=6c1f0408-5c8c-4f79-b542-0a34837bab38
To: "Mike HHHHHHHH 2" <sip:[email protected]>;tag=darznbj7wkj55gpa.o
Call-ID: [email protected]~1o
CSeq: 20101 BYE
Route: <sip:[email protected];lr>
Route: <sip:208.85.218.148;lr;ep;ipnt=8j0-_t23dm3>
Route: <sip:208.85.218.145;lr;ep;ipnt=8j0nqv23do3>
Max-Forwards: 70
User-Agent: FPBX-15.0.37.4(16.17.0)
Content-Length:  0


[2024-01-19 12:44:29] VERBOSE[20754] res_pjsip_logger.c: <--- Received SIP response (500 bytes) from UDP:162.213.111.25:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.21:5060;rport=5060;branch=z9hG4bKPjcdec2d42-2300-4aaa-8b08-3e29198aea1a
Record-Route: <sip:162.213.111.25;lr=on>
To: "Mike HHHHHHHH 2" <sip:[email protected]>;tag=darznbj7wkj55gpa.o
From: <sip:[email protected]>;tag=6c1f0408-5c8c-4f79-b542-0a34837bab38
Call-ID: [email protected]~1o
CSeq: 20101 BYE
Allow: INVITE, ACK, BYE, CANCEL, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS, UPDATE
Server: PortaSIP
Content-Length: 0


[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] bridge_channel.c: Channel PJSIP/164xxxxxx8-00000005 left 'simple_bridge' basic-bridge <f47df1ee-7942-48ca-a03a-0a9bef5f1b9e>
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] app_macro.c: Spawn extension (macro-dial, s, 28) exited non-zero on 'PJSIP/164xxxxxx8-00000005' in macro 'dial'
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Spawn extension (ext-group, 6210, 18) exited non-zero on 'PJSIP/164xxxxxx8-00000005'
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Executing [h@ext-group:1] Macro("PJSIP/164xxxxxx8-00000005", "hangupcall,") in new stack
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/164xxxxxx8-00000005", "1?theend") in new stack
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/164xxxxxx8-00000005", "0?Set(CDR(recordingfile)=)") in new stack
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Executing [s@macro-hangupcall:4] Hangup("PJSIP/164xxxxxx8-00000005", "") in new stack
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/164xxxxxx8-00000005' in macro 'hangupcall'
[2024-01-19 12:44:29] VERBOSE[31430][C-00000004] pbx.c: Spawn extension (ext-group, h, 1) exited non-zero on 'PJSIP/164xxxxxx8-00000005'
[2024-01-19 12:44:29] VERBOSE[31461][C-00000004] bridge_channel.c: Channel PJSIP/3211-00000006 left 'simple_bridge' basic-bridge <f47df1ee-7942-48ca-a03a-0a9bef5f1b9e>
[2024-01-19 12:44:29] VERBOSE[27174] res_pjsip_logger.c: <--- Transmitting SIP request (443 bytes) to UDP:192.168.1.246:5060 --->
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.21:5060;rport;branch=z9hG4bKPjff672613-24ad-4223-b199-d98210291462
From: "Mike_Work" <sip:[email protected]>;tag=0cac822a-1b7e-4ee1-8672-d2894544daf2
To: <sip:[email protected]>;tag=467da593f1fa4d95i3
Call-ID: cf98ae91-7f0a-45b8-a6ed-3d02ea89b124
CSeq: 5214 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: FPBX-15.0.37.4(16.17.0)
Content-Length:  0

30 seconds then disconnect is almost always a network/NAT issue. Turn on PJSIP Debugging and
Support Services : Providing Great Debug (sangoma.com)

And it is not similar to aborting at zero seconds.

Yup, I figured out that the 401 was from another phone that has yet to be configured on the new install. I’m getting a new trace without that phone and I’ll start a separate thread. Thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.