I have asterisk 18 as a middle server ,
i receive calls from server 1 and send it to server 2
when the caller cancels the call , i get cancel message with
Reason: SIP;cause=487;text=“ORIGINATOR_CANCEL” .
then asterisk is sending the cancel to server 2
but when i see the reason i found it like that :
Reason: Q.850;cause=127
is there a reason for asterisk to not just proxy responses from and to servers .
is there any key i should enable to force proxy these responses ?
Asterisk is not a proxy. It is a back to back user agent. Also it was originally designed for ISDN, not for VoIP, and therefore not for SIP. As a result SIP cause codes are always internally mapped to ISDN ones, and back to SIP, if the client is SIP.
Asterisk doesn’t use the SIP cause in Reason headers; it uses the code from the first line of the response. It does use Q.850 causes from Reason, which it uses as the internal HANGUPCAUSE value, although this is a special case, as it is in the request direction (client to server).
In SIP terms Asterisk is both client and server. Your actual scenario is client 1 calls asterisk acting as server, and asterisk, acting as client, then calls server 2.