[OpenSIPS-Users] CANCEL Reason is not propagated

vasilevalex alexei.vasilyev at gmail.com
Thu Aug 16 03:19:59 EDT 2018


Hello.

OpenSIPS 2.4.2, OpenSIPS 2.4.1

If OpenSIPS receives CANCEL it is better to send original Reason to the
endpoint. For example somebody answered queue call and all the others will
get "Call completed elsewhere" and will have no missed call on the phone.

And there is even an article about this.
https://blog.opensips.org/2016/11/15/cancel-request-and-reason-header/

So in my config there is: 
# CANCEL processing
  if (is_method("CANCEL")) {
    if (t_check_trans()) {
      rtpengine_delete();
      # flag 0x08 preserve the received Reason header
      t_relay("0x08");
    }
    exit;
 }

But finally on phone I've got "Originator cancel":

2018/08/16 06:19:17.949614 <asterisk IP>:5060 -> <OpenSIPS IP>:5060
CANCEL sip:202@<OpenSIPS IP>:5060 SIP/2.0
Via: SIP/2.0/UDP <asterisk IP>:5060;branch=z9hG4bK1d026f40
Max-Forwards: 70
From: "test-queue" <sip:1252@<asterisk IP>>;tag=as5af2f2e9
To: <sip:202@<OpenSIPS IP>:5060>
Call-ID: 1f3ba1405303ad3269d21ee46775dee5@<asterisk IP>
CSeq: 102 CANCEL
User-Agent: asterisk
Reason: SIP;cause=200;text="Call completed elsewhere"
Content-Length: 0

2018/08/16 06:19:17.951722 <OpenSIPS IP>:5060 -> <asterisk IP>:5060
SIP/2.0 200 canceling
Via: SIP/2.0/UDP <asterisk IP>:5060;received=<asterisk
IP>;rport=5060;branch=z9hG4bK1d026f40
From: "test-queue" <sip:1252@<asterisk IP>>;tag=as5af2f2e9
To: <sip:202@<OpenSIPS
IP>:5060>;tag=acf96d526e7e753a171e4824376d2012-8491
Call-ID: 1f3ba1405303ad3269d21ee46775dee5@<asterisk IP>
CSeq: 102 CANCEL
Server: SIP Proxy
Content-Length: 0

2018/08/16 06:19:17.951884 <OpenSIPS IP>:5060 -> 192.168.11.59:50153
CANCEL sip:202 at 192.168.11.59:5073;transport=tcp SIP/2.0
Via: SIP/2.0/TCP <OpenSIPS IP>:5060;branch=z9hG4bKbe6e.f5a7989.0
From: "test-queue" <sip:1252 at siptest.local>;tag=as5af2f2e9
Call-ID: 1f3ba1405303ad3269d21ee46775dee5@<asterisk IP>
To: <sip:202 at siptest.local>
CSeq: 102 CANCEL
Max-Forwards: 70
Reason: SIP;cause=487;text="ORIGINATOR_CANCEL"
User-Agent: SIP Proxy
Content-Length: 0

192.168.11.59 - phone IP.

I tried t_relay("8"); - the same results. And of course, t_relay() without
parameters also uses default "Originator cancel"

But if OpenSIPS makes fork call for several devices with one account and
somebody answers, Cancel Reason is generated correctly - "Call completed
elsewhere".

So the problem only when I want to propagate Reason header.




--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html



More information about the Users mailing list