[OpenSIPS-Users] CANCEL Reason is not propagated

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


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.

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

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
From: "test-queue" <sip:1252@<asterisk IP>>;tag=as5af2f2e9
To: <sip:202@<OpenSIPS
Call-ID: 1f3ba1405303ad3269d21ee46775dee5@<asterisk IP>
CSeq: 102 CANCEL
Server: SIP Proxy
Content-Length: 0

2018/08/16 06:19:17.951884 <OpenSIPS IP>:5060 ->
CANCEL sip:202 at;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 - 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

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