I am having Asterisk 20.10 running on Ubuntu. Below is the case scenario:
Softphone <—> Asterisk <—> B-side
Call from my softphone dialer rings on the B-side and unanswered. The signaling from B-side to the Asterisk server says “SIP 487 Request terminated” as the return code.
The signaling between Asterisk and my client says “SIP 603 Decline” as the return code.
IS this normal to have 603 shown on my softphone when the actual return code is 487? Can i change this 603 to say SIP 503 on my asterisk to send to the softphone?
The use of 487 is because a CANCEL was sent to cancel the attempt. We sent a CANCEL SIP request, they actually terminate it using a 487.
Asterisk is also not a proxy, so there is no guarantee that response codes are forwarded. If you want control then you can use PJSIPHangup[1] to send back an explicit response code.
Asterisk is an ISDN PABX with SIP added on. To a first approximation, received SIP codes are translated according to RFC 3398, unless a ISDN reason code is included in a Reason header, in which case that is used. On the other side RFC 3398 is used to translate the ISDN type HANGUPCAUSE code into a SIP status. This process is not one, and I think there are some exceptions.
As it has no end to end meaning 487 has no defined translation, and one would expect the cause code to reflect the underlying reason for the cancel being issued. Relaying 487 would be wrong.
Looks like normal behavior but is it normal to see a 487 from the B-side not seen as a 487 as is ? Instead seeing a 603 decline (Cause code=16) - normal call clearing.
But one more observation is that we recently upgraded our asterisk from version 16 to version 20 and also moved from chan_sip to pjsip. With the previous version, we never had complaints about this issue.
But, only now we are getting complaints about seeing a 603 and they want a 487 as is. Could this be due to the newer Asterisk version as well ?
Thank you. I’ve removed that 30s timeout from the dialplan and let the B-side unanswered (that is myself as well) ; So i see
: SIP 480 received from B-side to the asterisk
: SIP 500 ServerInternal Error with Q.850 Cause=127 received from the Asterisk to my softphone.
Why do i see a SIP 500 ?
Q.850 cause code 127, “Interworking, unspecified,” indicates a call disconnect due to an unspecified problem during interworking with a network that doesn’t provide specific cause information.