Query Regarding Call Hangup Codes

Hey everyone,

I have a question regarding call hangup codes in Asterisk. When I hang up a call from Linphone, I receive a “603 Decline” code, whereas from Zoiper, I get a “486 Busy Here” code. Are these codes fixed by the applications, or asterisk. can they be modified?
Additionally, I receive a “603 Decline” code from Linphone and then asterisk server send a “403 Forbidden” code to another Linphone. Similarly, if I receive a “486 Busy Here” code and then asterisk server send a “486 Busy Here” code, how do I determine what codes we send out? Can we change the received “486” or “603” to another code or Can we change the sended “403” or “486” to another one.?
note: I’ve created two extensions on a single server without involving any external operators or servers.

Any insights or guidance on this would be greatly appreciated!
thanks.

An endpoints sends what the endpoint sends - be it 603 or 486. It’s up to it. You can query the hangup causes[1] which includes the SIP response code. The Hangup dialplan application[2] accepts an ISDN cause code which is mapped[3] for terminating a call, and if you were using PJSIP you can hang up using a specific SIP response code[4] instead.

[1] Hangup Cause - Asterisk Documentation
[2] Hangup - Asterisk Documentation
[3] Hangup Cause Mappings - Asterisk Documentation
[4] PJSIPHangup - Asterisk Documentation

In addition to Joshua’s reply, some endpoints provide a header containing the intended ISDN cause code and Asterisk will use this, in preference to translating the SIP cause code, as the value of HANGUPCAUSE. This is true of, at least, chan_pjsip. I’m not sure if it was added to chan_sip.

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