Outgoing calls drop after 30 seconds while using PJSip extension

Asterisk 18.16.0. When using Sip extension no call drop happens. Extension 700 calls to 667. here’s a log:
[2023-11-20 12:57:12] WARNING[1733]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 667
[2023-11-20 12:57:12] WARNING[1733]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 667
[2023-11-20 12:57:13] WARNING[1733]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 667
[2023-11-20 12:57:13] WARNING[1733]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 667
[2023-11-20 12:57:41] WARNING[1733]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 702
[2023-11-20 12:57:41] WARNING[1733]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 702
– Channel PJSIP/700-00000000 left ‘simple_bridge’ basic-bridge <2bb198cf-1bbc-4e9f-a7bc-524bc0b4358e>
== Spawn extension (macro-dial-one, s, 58) exited non-zero on ‘PJSIP/700-00000000’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 34) exited non-zero on ‘PJSIP/700-00000000’ in macro ‘exten-vm’
== Spawn extension (ext-local, 667, 3) exited non-zero on ‘PJSIP/700-00000000’
– Executing [h@ext-local:1] Macro(“PJSIP/700-00000000”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] Set(“PJSIP/700-00000000”, “__MCVMSTATUS=”) in new stack
– Executing [s@macro-hangupcall:2] Gosub(“PJSIP/700-00000000”, “app-missedcall-hangup,s,1()”) in new stack
– Executing [s@app-missedcall-hangup:1] NoOp(“PJSIP/700-00000000”, “Dialed: s”) in new stack
– Executing [s@app-missedcall-hangup:2] NoOp(“PJSIP/700-00000000”, “Caller: 700”) in new stack
– Executing [s@app-missedcall-hangup:3] GotoIf(“PJSIP/700-00000000”, “0?exit”) in new stack
– Executing [s@app-missedcall-hangup:4] Set(“PJSIP/700-00000000”, “EXTENNUM=s”) in new stack
– Executing [s@app-missedcall-hangup:5] Set(“PJSIP/700-00000000”, “FEXTENNUM=s”) in new stack
– Executing [s@app-missedcall-hangup:6] GotoIf(“PJSIP/700-00000000”, “0?exit”) in new stack
– Executing [s@app-missedcall-hangup:7] AGI(“PJSIP/700-00000000”, “agi://127.0.0.1/missedcallnotify.php,s,s,0,PJSIP/700-00000000,ANSWER,”) in new stack
– Channel PJSIP/667-00000001 left ‘simple_bridge’ basic-bridge <2bb198cf-1bbc-4e9f-a7bc-524bc0b4358e>
– PJSIP/667-00000001 Internal Gosub(app-missedcall-hangup,667,1) start
– Executing [667@app-missedcall-hangup:1] NoOp(“PJSIP/667-00000001”, “Dialed: 667”) in new stack
– Executing [667@app-missedcall-hangup:2] NoOp(“PJSIP/667-00000001”, “Caller: 700”) in new stack
– Executing [667@app-missedcall-hangup:3] GotoIf(“PJSIP/667-00000001”, “0?exit”) in new stack
– Executing [667@app-missedcall-hangup:4] Set(“PJSIP/667-00000001”, “EXTENNUM=667”) in new stack
– Executing [667@app-missedcall-hangup:5] Set(“PJSIP/667-00000001”, “FEXTENNUM=667”) in new stack
– Executing [667@app-missedcall-hangup:6] GotoIf(“PJSIP/667-00000001”, “0?exit”) in new stack
– Executing [667@app-missedcall-hangup:7] AGI(“PJSIP/667-00000001”, “agi://127.0.0.1/missedcallnotify.php,667,667,0,PJSIP/667-00000001,”) in new stack
– <PJSIP/667-00000001>AGI Script agi://127.0.0.1/missedcallnotify.php completed, returning 0
– Executing [667@app-missedcall-hangup:8] Return(“PJSIP/667-00000001”, “”) in new stack
== Spawn extension (app-missedcall-hangup, 667, 8) exited non-zero on ‘PJSIP/667-00000001’
– PJSIP/667-00000001 Internal Gosub(app-missedcall-hangup,667,1) complete GOSUB_RETVAL=
– <PJSIP/700-00000000>AGI Script agi://127.0.0.1/missedcallnotify.php completed, returning 0
– Executing [s@app-missedcall-hangup:8] Return(“PJSIP/700-00000000”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“PJSIP/700-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,5)
– Executing [s@macro-hangupcall:5] ExecIf(“PJSIP/700-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:6] Hangup(“PJSIP/700-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/700-00000000’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/700-00000000’
[2023-11-20 12:57:45] WARNING[1733]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 667
[2023-11-20 12:57:45] WARNING[1733]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 667

This looks like a FreePBX dialplan and Asterisk would use the terms chan_sip peer, and chan_pjsip endpoint.

No reason has been logged for ending the call, so the end looks to be normal. You should invoke “pjsip set logger on” to see what was received from the other side.

Call-ID: 7c0A_sci5bzy-m98lX0VqQ…
CSeq: 2 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
User-Agent: Z 3.15.40006 rv2.8.20
Authorization: Digest username=“667”,realm=“asterisk”,nonce=“1700488601/b0306d8abc53435c208faf2f1a814b7f”,uri=“sip:667@fpbx16;transport=UDP”,response=“32018f45f119a0b0998c324483309410”,cnonce=“bc08853f61d1e1a726545ae46d266306”,nc=00000001,qop=auth,algorithm=MD5,opaque=“2c97af730c92efcc”
Event: presence.winfo
Allow-Events: presence, kpml, talk
Content-Length: 0

[2023-11-20 13:56:41] WARNING[1733]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 667
<— Transmitting SIP response (388 bytes) to UDP:199.203.140.34:46525 —>
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 172.20.70.114:46525;rport=46525;received=199.203.140.34;branch=z9hG4bK-524287-1—a86b3d7fa50e08d5
Call-ID: 7c0A_sci5bzy-m98lX0VqQ…
From: “667” sip:667@fpbx16;tag=2d6e6d28
To: “667” sip:667@fpbx16;tag=z9hG4bK-524287-1—a86b3d7fa50e08d5
CSeq: 2 SUBSCRIBE
Server: FPBX-16.0.40.7(18.16.0)
Content-Length: 0

That is unrelated to calls. The “pjsip set logger on” has to be done before a call is started.

I’ve set “pjsip set logger on” before the call. I can’t publish whole log or attached file because I’m a new user.

I have raised your user level so you should be able to attach, or provide a link. Don’t copy/paste the entire log in as posts.

1 Like

700-667.txt (7.1 KB)

This only shows that the call was terminated. You need to collect a log for the entirety of the call.

Here’s a log from the entire call. Thanks for your assist!
700-667.txt (34.2 KB)

Asterisk is sending a 200 OK response, expecting an ACK from the remote side. It never gets the ACK and the call is terminated once this times out. In the 200 OK it is giving the IP address of 192.248.164.147 and port 51620 for contacting Asterisk. If this is incorrect, then the ACK would never be received as seen in the log.

I’ve set port listen to 5060 instead of 51620 and it fixed the issue . Thanks for your help!

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