Call Hangup Detect

I use asterisk Version : 18.23.1

[hdlr_Hangup]
exten => s,1,NoOp(hdlr_Hangup context is load…)
same => n, hangup()

[ivr-parkgolf]
include => hdlr_Hangup

exten => s,1,Wait(1)
same => n, Answer()
same => n, Set(CHANNEL(hangup_handler_push)=hdlr_Hangup,s,1)
same=> n, playback(h1)

When I make a call with a softphone and hang up, a hangup event occurs immediately.
When I received an IP phone number from the telecommunications company and connected,
After the call, even if I hang up, the hangup event does not occur and the flow continues.
I need help figuring out where to check.

I’ve just started using Asterisk, so I don’t know where to set it up.
I searched and found that it might be correct, but
it says to set chan_dahdi.conf’s
busydetect=yes, but even after setting it,
there is no response.
Since I only received the phone number from the telecommunications company’s IP-PBX (it is not physically installed as hardware), is it correct to edit the dahdi?

p.s: I tested it and it seems like I get user disconnected 30 seconds after I hang up the phone.

DAHDI is only for physical telephony cards. If using SIP to connect upstream, then you would receive a BYE upon hangup. If you aren’t receiving that for a period of time, then the problem is upstream.

Hang up the phone and wait 30 seconds
-User disconnected

It seems like my calls are disconnected after 30 seconds of hanging up. How can I make this time go faster?

-- User disconnected
-- Executing [h@ivr-parkgolf:1] NoOp("PJSIP/sjtelcom-00000007", "h extension .......") in new stack
-- PJSIP/sjtelcom-00000007 Internal Gosub(hdlr_Hangup,s,1) start

Provide the output of “pjsip set logger on” from start to finish for a call.

<— Received SIP request (1069 bytes) from UDP:203.203.100.40:5060 —>
INVITE sip:07012341234@170.100.100.100:5060;transport=UDP;user=phone SIP/2.0
f: sip:010234523345@203.203.100.40:5060;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
t: sip:07012341234@170.100.100.100:5060;user=phone
i: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
CSeq: 1 INVITE
User-agent: CS2000_NGSS/9.0
X-Nortel-Profile: DEFAULT
Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK,UPDATE
v: SIP/2.0/UDP 203.203.100.40:5060;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
P-Asserted-Identity: sip:010234523345@203.203.100.40;user=phone
Max-Forwards: 140
m: sip:203.203.100.40:5060;transport=UDP
k: 100rel,resource-priority
c: application/sdp
l: 360

v=0
o=genband 269012992 1722934812 IN IP4 203.240.134.38
s=-
c=IN IP4 203.240.134.38
t=0 0
m=audio 43040 RTP/AVP 8 18 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=silenceSupp:off - - - -
a=ptime:20
a=maxptime:30
a=sqn: 0
a=cdsc:1 image udptl t38

<— Transmitting SIP response (419 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Content-Length: 0

-- Executing [07012341234@ivr-parkgolf:1] Goto("PJSIP/sjtelcom-00000009", "ivr-parkgolf,s,1") in new stack
-- Goto (ivr-parkgolf,s,1)
-- Executing [s@ivr-parkgolf:1] Wait("PJSIP/sjtelcom-00000009", "1") in new stack
-- Executing [s@ivr-parkgolf:2] Answer("PJSIP/sjtelcom-00000009", "") in new stack
   > 0x7f286c01ff10 -- Strict RTP learning after remote address set to: 203.240.134.38:43040

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

-- Executing [s@ivr-parkgolf:5] AGI("PJSIP/sjtelcom-00000009", "/usr/src/cprog/func_getdatetime") in new stack
-- Launched AGI Script /usr/src/cprog/func_getdatetime
-- <PJSIP/sjtelcom-00000009>AGI Script /usr/src/cprog/func_getdatetime completed, returning 0
-- Executing [s@ivr-parkgolf:6] Set("PJSIP/sjtelcom-00000009", "g_stime=2024-08-06 18:00:12") in new stack
-- Executing [s@ivr-parkgolf:7] Set("PJSIP/sjtelcom-00000009", "CHANNEL(hangup_handler_push)=hdlr_Hangup,s,1") in new stack
-- Executing [s@ivr-parkgolf:11] AGI("PJSIP/sjtelcom-00000009", "/usr/src/cprog/func_init,010234523345") in new stack
-- Launched AGI Script /usr/src/cprog/func_init
-- <PJSIP/sjtelcom-00000009>AGI Script /usr/src/cprog/func_init completed, returning 0
-- Executing [s@ivr-parkgolf:13] GotoIf("PJSIP/sjtelcom-00000009", "0 ?db_hangup,han,1") in new stack
-- Executing [s@ivr-parkgolf:14] GotoIf("PJSIP/sjtelcom-00000009", "0 ?init10") in new stack
-- Executing [s@ivr-parkgolf:15] GotoIf("PJSIP/sjtelcom-00000009", "0 ?init20") in new stack
-- Executing [s@ivr-parkgolf:16] GotoIf("PJSIP/sjtelcom-00000009", "0 ?init30") in new stack
-- Executing [s@ivr-parkgolf:17] GotoIf("PJSIP/sjtelcom-00000009", "0 ?init40") in new stack
-- Executing [s@ivr-parkgolf:18] GotoIf("PJSIP/sjtelcom-00000009", "1 ?init50") in new stack
-- Goto (ivr-parkgolf,s,29)
-- Executing [s@ivr-parkgolf:29] Read("PJSIP/sjtelcom-00000009", "dig,/etc/asterisk/sounds/1_인사말2,1,,1,1") in new stack
-- Accepting a maximum of 1 digits.
-- <PJSIP/sjtelcom-00000009> Playing '/etc/asterisk/sounds/1_인사말2.slin' (language 'en')

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP response (946 bytes) to UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.203.100.40:5060;rport=5060;received=203.203.100.40;branch=z9hG4bK-35b0cd3-1baa18d6-65f2c8a5-7fffa57cd660
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
From: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
To: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
CSeq: 1 INVITE
Server: Asterisk PBX 18.23.1
Contact: sip:172.30.1.22:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 258

v=0
o=- 269012992 1722934814 IN IP4 172.30.1.22
s=Asterisk
c=IN IP4 172.30.1.22
t=0 0
m=audio 17612 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Transmitting SIP request (482 bytes) to UDP:203.203.100.40:5060 —>
BYE sip:203.203.100.40:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.30.1.22:5060;rport;branch=z9hG4bKPj1481da0d-7c7a-4440-9887-72c1ab8286f0
From: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
To: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
CSeq: 11520 BYE
Max-Forwards: 70
User-Agent: Asterisk PBX 18.23.1
Content-Length: 0

<— Received SIP response (556 bytes) from UDP:203.203.100.40:5060 —>
SIP/2.0 200 OK
From: sip:07012341234@170.100.100.100;user=phone;tag=44de60d4-ef34-424c-aa07-c466facea4fd
t: sip:010234523345@203.203.100.40;user=phone;tag=-65014-35b0cd3-692b5ebf-35b0cd3
Call-ID: 9d833008486f0cb13c435b0cd31baa18d638fa891e6ea82480-0007-8638
CSeq: 11520 BYE
Server: CS2000_NGSS/9.0
k: 100rel,resource-priority
Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK,UPDATE
Via: SIP/2.0/UDP 172.30.1.22:5060;received=170.100.100.100;rport=5060;branch=z9hG4bKPj1481da0d-7c7a-4440-9887-72c1ab8286f0
Content-Length: 0

-- User disconnected
-- Executing [h@ivr-parkgolf:1] NoOp("PJSIP/sjtelcom-00000009", "h extension .......") in new stack
-- PJSIP/sjtelcom-00000009 Internal Gosub(hdlr_Hangup,s,1) start
-- Executing [s@hdlr_Hangup:1] NoOp("PJSIP/sjtelcom-00000009", "hdlr_Hangup context is load...") in new stack
-- Executing [s@hdlr_Hangup:2] Set("PJSIP/sjtelcom-00000009", "chan_use=0") in new stack
-- Executing [s@hdlr_Hangup:3] AGI("PJSIP/sjtelcom-00000009", "/usr/src/cprog/func_getdatetime") in new stack
-- Launched AGI Script /usr/src/cprog/func_getdatetime
-- <PJSIP/sjtelcom-00000009>AGI Script /usr/src/cprog/func_getdatetime completed, returning 0
-- Executing [s@hdlr_Hangup:4] Set("PJSIP/sjtelcom-00000009", "g_etime=2024-08-06 18:00:44") in new stack
-- Executing [s@hdlr_Hangup:5] Set("PJSIP/sjtelcom-00000009", "g_sql=insert into calllog (att,phone,sdate,edate) value(1,'010234523345','2024-08-06 18:00:12','2024-08-06 18:00:44')") in new stack
-- Executing [s@hdlr_Hangup:6] AGI("PJSIP/sjtelcom-00000009", "/usr/src/cprog/func_docmd") in new stack
-- Launched AGI Script /usr/src/cprog/func_docmd
-- <PJSIP/sjtelcom-00000009>AGI Script /usr/src/cprog/func_docmd completed, returning 0
-- Executing [s@hdlr_Hangup:7] NoOp("PJSIP/sjtelcom-00000009", "g_b_preman is 0") in new stack
-- Executing [s@hdlr_Hangup:8] GotoIf("PJSIP/sjtelcom-00000009", " 1 ?hh") in new stack
-- Goto (hdlr_Hangup,s,12)
-- Executing [s@hdlr_Hangup:12] Hangup("PJSIP/sjtelcom-00000009", "") in new stack

== Spawn extension (hdlr_Hangup, s, 12) exited non-zero on ‘PJSIP/sjtelcom-00000009’
[Aug 6 18:00:44] WARNING[91915][C-0000000a]: app_stack.c:1079 gosub_run: PJSIP/sjtelcom-00000009 Abnormal ‘Gosub(hdlr_Hangup,s,1)’ exit. Popping routine return locations.

Your problem is actually because you are behind a NAT, and you haven’t configured Asterisk to know it is behind NAT. The “external_media_address”, “external_signaling_address”, and “local_net” options need to be set on the transport in pjsip.conf[1].

[1] Configuring res_pjsip to work through NAT - Asterisk Documentation

Solved.

Thank you very much.

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