No hangup cause given when call to external line

Hi

I have developed an IVR using Node JS and the ARI client.

The system originates a call to a field officer depending which options the caller chooses via the IVR.

To test the IVR i am using two soft phones (one for the caller) and one for the field officer.

What i noticed is that if I use an external number (ie my mobile) for the field officer , when I hang up (from mobile) i get the hangup request cause as “undefined” , ie there is no cause in the event passed back to the Node js code. However if i use another soft phone instead i get a cause code

Is this something to do with my Trunk settings or the provider ? Or something else

Thanks for any help

Can you post full SIP debugs of each hang-up scenario – one from soft phone, one from provider ?

Hi sorry for the late reply i figured no one was going to answer and I forgot to check back

I am using PJSIP extensions. I will get you the debug however for the provider nothing is shown at all. (this is using asterisk -rvvv )

Also for PJSIP which is the best way to get the full debug. I know for sip you can use ‘sip set debug on’ not sure thats the same for PJSIP

*CLI> pjsip set logger on

or

*CLI> pjsip set history on

Thanks

I hope the below is what you need i tried to grab as much as I could from the initial BYE request .

Looking at the provider one it does give a Reason for ending the call , but in the NodeJS code it shows up as nothing.

Provider one is below :


<--- Received SIP request (556 bytes) from UDP:XXXXXXXXX:5060 --->
BYE sip:asterisk@XXXXXXXX:5060 SIP/2.0
Via: SIP/2.0/UDP xxxxxxxxx:5060;branch=z9hG4bKdc01a254a6f68c5cb7dc3651899b8943
Via: SIP/2.0/UDP XXXXXXXXX:5080;branch=z9hG4bKe7d835349241e4f7718bf99a99ae9156
Max-Forwards: 69
From: <sip:XXXXXXXXX@talk.yay.com>;tag=63479c39212e5c4b73a4bbdc89ec6c14
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=1ecca4af-4dc3-4327-b2e4-c8f3a912f2f3
Call-ID: edf7ad29-328b-4dd3-a2ce-e99ea35c8307
CSeq: 32513 BYE
Reason: Q.850;cause=16;text="Normal call clearing"
Content-Length: 0
X-IP: XXXXXXXXX


<--- Transmitting SIP response (504 bytes) to UDP:XXXXXXXXXXX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXXXXXXXXX:5060;rport=5060;received=XXXXXXXXXXX;branch=z9hG4bKdc01a254a6f68c5cb7dc3651899b8943
Via: SIP/2.0/UDP XXXXXXXXXX:5080;branch=z9hG4bKe7d835349241e4f7718bf99a99ae9156
Call-ID: edf7ad29-328b-4dd3-a2ce-e99ea35c8307
From: <sip:XXXXXXXX@talk.yay.com>;tag=63479c39212e5c4b73a4bbdc89ec6c14
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=1ecca4af-4dc3-4327-b2e4-c8f3a912f2f3
CSeq: 32513 BYE
Server: FPBX-14.0.13.12(16.4.1)
Content-Length:  0


    -- Channel PJSIP/yay-pjsip-00000040 left 'simple_bridge' stasis-bridge <8769>
<--- Received SIP request (348 bytes) from UDP:XXXXXXX:5060 --->
OPTIONS sip:s@XXXXXXX:5060;line=sgdmyod SIP/2.0
Via: SIP/2.0/UDP XXXXXXX:5060;branch=z9hG4bK494cdf8e7688bd7139e4bb4338be6031
From: <sip:XXXXXXXXX>;tag=28c204e60597a3d860e4d511e5a2bf32
To: <sip:s@XXXXXXXXX:5060;line=sgdmyod>
CSeq: 1 OPTIONS
Call-ID: 972bf119a3004c1a73103440c6ffdbfc@XXXXXXXX
Content-Length: 0


<--- Transmitting SIP response (903 bytes) to UDP:XXXXXXX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXXXXXXXXXX:5060;rport=5060;received=XXXXXXXXX;branch=z9hG4bK494cdf8e7688bd7139e4bb4338be6031
Call-ID: 972bf119a3004c1a73103440c6ffdbfc@XXXXXXXXXX
From: <sip:XXXXXXX>;tag=28c204e60597a3d860e4d511e5a2bf32
To: <sip:s@XXXXX;line=sgdmyod>;tag=z9hG4bK494cdf8e7688bd7139e4bb4338be6031
CSeq: 1 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: FPBX-14.0.13.12(16.4.1)
Content-Length:  0


<--- Transmitting SIP request (446 bytes) to UDP:XXXXXXXXX:5060 --->
OPTIONS sip:XXXXXX@talk.yay.com:5060 SIP/2.0
Via: SIP/2.0/UDP XXXXXX:5060;rport;branch=z9hG4bKPj71096a73-2bf1-461d-85ff-f429379c7f03
From: <sip:yay-pjsip@XXXXXXXX>;tag=68eefd04-263d-4617-8ec0-74bc2fdb6796
To: <sip:XXXXXXXX1@talk.yay.com>
Contact: <sip:yay-pjsip@XXXXXXX:5060>
Call-ID: b3b75200-74aa-4046-be61-cf627887e02b
CSeq: 32456 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-14.0.13.12(16.4.1)
Content-Length:  0


<--- Received SIP response (329 bytes) from UDP:XXXXXXXXXX:5060 --->
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP XXXXXXXXXX:5060;rport;branch=z9hG4bKPj71096a73-2bf1-461d-85ff-f429379c7f03
To: <sip:XXXXXXXX@talk.yay.com>
From: <sip:yay-pjsip@XXXXXXXXXXXX>;tag=68eefd04-263d-4617-8ec0-74bc2fdb6796
Call-ID: b3b75200-74aa-4046-be61-cf627887e02b
CSeq: 32456 OPTIONS
Content-Length: 0





Soft Phone is

<--- Received SIP request (480 bytes) from UDP:xxxxxxxx:65290 --->
BYE sip:asterisk@XXXXXXXX:5060 SIP/2.0
Via: SIP/2.0/UDP XXXXXXXXX:65290;branch=z9hG4bK-524287-1---53cc7b3ab6586f32;rport
Max-Forwards: 70
Contact: <sip:122@XXXXXXXXXX:65290>
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=5ec16193-985d-4eb0-8721-78e877cac961
From: <sip:122@XXXXXXXXXX;rinstance=c024413b7cf2c382>;tag=5c266136
Call-ID: 7c4d0581-5f08-4681-95cb-a39007bbc650
CSeq: 2 BYE
User-Agent: X-Lite release 5.8.1 stamp 102009
Content-Length: 0


<--- Transmitting SIP response (409 bytes) to UDP:XXXXXXXXXXX:65290 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXXXXXX:65290;rport=65290;received=XXXXXXXXX;branch=z9hG4bK-524287-1---53cc7b3ab6586f32
Call-ID: 7c4d0581-5f08-4681-95cb-a39007bbc650
From: <sip:122@XXXXXXXXX;rinstance=c024413b7cf2c382>;tag=5c266136
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=5ec16193-985d-4eb0-8721-78e877cac961
CSeq: 2 BYE
Server: FPBX-14.0.13.12(16.4.1)
Content-Length:  0


    -- Channel PJSIP/122-00000042 left 'simple_bridge' stasis-bridge <8586>
<--- Received SIP request (348 bytes) from UDP:XXXXXXXXXXXX:5060 --->
OPTIONS sip:s@XXXXXXXX:5060;line=sgdmyod SIP/2.0
Via: SIP/2.0/UDP XXXXXXX:5060;branch=z9hG4bK4364012ae4635b0d64ed333f3b51e434
From: <sip:XXXXXXXX>;tag=36d949f77f6dd8d2e080cb58e384ce11
To: <sip:s@XXXXXXXXXXX:5060;line=sgdmyod>
CSeq: 1 OPTIONS
Call-ID: 195e40d1c224af189c7495b4ddeafc89@XXXXXXXXX
Content-Length: 0


<--- Transmitting SIP response (903 bytes) to UDP:XXXXXXXXXXXX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXXXXXXXXX:5060;rport=5060;received=XXXXXXXXXX;branch=z9hG4bK4364012ae4635b0d64ed333f3b51e434
Call-ID: 195e40d1c224af189c7495b4ddeafc89@XXXXXXXXX
From: <sip:XXXXXXXXX>;tag=36d949f77f6dd8d2e080cb58e384ce11
To: <sip:s@XXXXXXXXXX;line=sgdmyod>;tag=z9hG4bK4364012ae4635b0d64ed333f3b51e434
CSeq: 1 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: FPBX-14.0.13.12(16.4.1)
Content-Length:  0


<--- Received SIP request (348 bytes) from UDP:XXXXXXXXX5060 --->
OPTIONS sip:s@XXXXXXXX5060;line=sgdmyod SIP/2.0
Via: SIP/2.0/UDP XXXXXXXX:5060;branch=z9hG4bK76b90efb01abdb89375edf4cbca9efdf
From: <sip:XXXXXXXX>;tag=00799739e28a7ab65ad1993e8ddc6f51
To: <sip:s@XXXXXXXXXX:5060;line=sgdmyod>
CSeq: 1 OPTIONS
Call-ID: 42df110fd5c1d2a3d412aa70f31009c0@XXXXXXXXXXXX
Content-Length: 0


<--- Transmitting SIP response (903 bytes) to UDP:XXXXXXXX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXXXXXXXX:5060;rport=5060;received=XXXXXXXXXXXXbranch=z9hG4bK76b90efb01abdb89375edf4cbca9efdf
Call-ID: 42df110fd5c1d2a3d412aa70f31009c0@XXXXXXXXXXXXXX
From: <sip:XXXXXX>;tag=00799739e28a7ab65ad1993e8ddc6f51
To: <sip:s@XXXXXXXXXX;line=sgdmyod>;tag=z9hG4bK76b90efb01abdb89375edf4cbca9efdf
CSeq: 1 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: FPBX-14.0.13.12(16.4.1)
Content-Length:  0

I agree, seems like NodeJS is ignoring the “Reason” header. What library is this ?

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