Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Zahid Mehmood
Hi,  
   Wondering what was the end result of this.  

 Was this put in as a feature request? or  is it implemented already?

Thanks.

--
Zahid



On Jan 21, 2008, at 11:26 AM, Bogdan-Andrei Iancu wrote:

> Hi Iñaki,
>
> Right now this RFC is not supported, but it is very doable - you just
> need somebody to do it :).
>
> Just go for a feature request.
>
> Regards,
> Bogdan
>
> Iñaki Baz Castillo wrote:
>> Hi, according to RFC 3326 [1] (Reason Header):
>>
>> 3.1 Call Completed Elsewhere
>>
>>   A proxy forks an INVITE request and one of the branches returns a 200
>>   (OK).  The forking proxy includes this status code in a Reason header
>>   field in the CANCEL request that it sends to the rest of the
>>   branches.
>>
>>   Reason: SIP ;cause=200 ;text="Call completed elsewhere"
>>
>>
>> With this behaviour, if an AoR is registered in two phones and one of them
>> answers a call, that call will not appear as MISSED in the other phone (if
>> the phone supports "Reason" headers).
>>
>>
>> Is it possible OpenSer to add this header when cancelling the rest of ringing
>> branches?
>> If not, do you think it could be a feature request?
>>
>>
>>
>>
>>
>> [1] http://www.faqs.org/rfcs/rfc3326.html
>>
>>
>>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.openser.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Bogdan-Andrei Iancu
Hi Zahid,

It is implemented in 1.6.

Regards,
Bogdan

Zahid Mehmood wrote:
> Hi,  
>    Wondering what was the end result of this.  
>
>  Was this put in as a feature request? or  is it implemented already?
>
> Thanks.
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Saúl Ibarra Corretgé
In reply to this post by Zahid Mehmood
El 09/02/10 16:01, Zahid Mehmood escribió:
> Hi,
>     Wondering what was the end result of this.
>
>   Was this put in as a feature request? or  is it implemented already?
>
> Thanks.
>

It was implemented in OpenSIPS version 1.6:
http://www.opensips.org/Main/Ver160#toc34


Regards,

--
Saúl Ibarra Corretgé
AG Projects

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Zahid Mehmood
Awsome!!  

Thanks.  

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Saúl Ibarra Corretgé
Sent: Tuesday, February 09, 2010 10:53 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

El 09/02/10 16:01, Zahid Mehmood escribió:
> Hi,
>     Wondering what was the end result of this.
>
>   Was this put in as a feature request? or  is it implemented already?
>
> Thanks.
>

It was implemented in OpenSIPS version 1.6:
http://www.opensips.org/Main/Ver160#toc34


Regards,

--
Saúl Ibarra Corretgé
AG Projects

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Iñaki Baz Castillo
In reply to this post by Bogdan-Andrei Iancu
El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
> Hi Zahid,
>
> It is implemented in 1.6.

I suppose it's implemented in CANCEL generated by OpenSIPS itself, this is
useful when doing parallel forking.

But what about if a PBX / application server sends an INVITE to two different
users (thorugh the same or different proxy) and wants to send a CANCEL to user
B after user A answered?
In this case the PBX would generate a CANCEL with "Reason" header and send it
to OpenSIPS. However AFAIK OpenSIPS wouldn't "replicate" such Reason header in
the CANCEL it would generate, right?

--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Bogdan-Andrei Iancu
Hi Iñaki,

uh...you are totally right :D...
propagating a received Reason hdr is still missing....

I will take care of it - thanks for pointing it out .

Regards,
Bogdan

Iñaki Baz Castillo wrote:

> El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
>  
>> Hi Zahid,
>>
>> It is implemented in 1.6.
>>    
>
> I suppose it's implemented in CANCEL generated by OpenSIPS itself, this is
> useful when doing parallel forking.
>
> But what about if a PBX / application server sends an INVITE to two different
> users (thorugh the same or different proxy) and wants to send a CANCEL to user
> B after user A answered?
> In this case the PBX would generate a CANCEL with "Reason" header and send it
> to OpenSIPS. However AFAIK OpenSIPS wouldn't "replicate" such Reason header in
> the CANCEL it would generate, right?
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Iñaki Baz Castillo
El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
> Hi Iñaki,
>
> uh...you are totally right :D...
> propagating a received Reason hdr is still missing....
>
> I will take care of it - thanks for pointing it out .

It would be a really interesting feature (i.e. Asterisk does include such
Reason header when cancels a call answered elsewhere).

However there should be possible to allow or deny that received "Reason"
header before propagating it in the CANCEL generated by OpenSIPS (IMHO).

Regards.

--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Bogdan-Andrei Iancu
Iñaki Baz Castillo wrote:

> El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
>  
>> Hi Iñaki,
>>
>> uh...you are totally right :D...
>> propagating a received Reason hdr is still missing....
>>
>> I will take care of it - thanks for pointing it out .
>>    
>
> It would be a really interesting feature (i.e. Asterisk does include such
> Reason header when cancels a call answered elsewhere).
>
> However there should be possible to allow or deny that received "Reason"
> header before propagating it in the CANCEL generated by OpenSIPS (IMHO).
>  
And do you see this as a global or per CANCEL setting ??

Regards,
Bogdan

--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Iñaki Baz Castillo
El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:

> Iñaki Baz Castillo wrote:
> > El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
> >> Hi Iñaki,
> >>
> >> uh...you are totally right :D...
> >> propagating a received Reason hdr is still missing....
> >>
> >> I will take care of it - thanks for pointing it out .
> >
> > It would be a really interesting feature (i.e. Asterisk does include such
> > Reason header when cancels a call answered elsewhere).
> >
> > However there should be possible to allow or deny that received "Reason"
> > header before propagating it in the CANCEL generated by OpenSIPS (IMHO).
>
> And do you see this as a global or per CANCEL setting ??

I could imagine accepting such header just for CANCEL coming from a known
source (i.e. my application server or PBX).

Just as suggestion, perhaps a flag in t_relay() would be used for this, a flag
that only makes sense for CANCEL rather than INVITE, so:

  if (is_method("CANCEL")) {
    if ($si == MY_APPLICATION_SERVER_IP)
      # Allow propagating "Reason" header.
      t_relay(0x12);
    else
      t_relay();
  }

or a explicit flag:

  if (is_method("CANCEL")) {
    if ($si == MY_APPLICATION_SERVER_IP)
      setflag(FLAG_ALLOW_CANCEL_REASON);
    t_relay();
  }

       


--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Iñaki Baz Castillo
El Martes, 9 de Febrero de 2010, Iñaki Baz Castillo escribió:

> I could imagine accepting such header just for CANCEL coming from a known
> source (i.e. my application server or PBX).
>
> Just as suggestion, perhaps a flag in t_relay() would be used for this, a
>  flag  that only makes sense for CANCEL rather than INVITE, so:
>
>   if (is_method("CANCEL")) {
>     if ($si == MY_APPLICATION_SERVER_IP)
>       # Allow propagating "Reason" header.
>       t_relay(0x12);
>     else
>       t_relay();
>   }
>
> or a explicit flag:
>
>   if (is_method("CANCEL")) {
>     if ($si == MY_APPLICATION_SERVER_IP)
>       setflag(FLAG_ALLOW_CANCEL_REASON);
>     t_relay();
>   }


Also take into account the case in which a trusted PBX/AS sends a CANCEL with
Reason header to the proxy, and the proxy forked this INVITE (destination user
registered in more than one location). So the proxy should decide if it adds
its own Reason header or the Reason header arriving in the CANCEL from the
PBX.

--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Bogdan-Andrei Iancu
In reply to this post by Iñaki Baz Castillo
Hi Iñaki,

Iñaki Baz Castillo wrote:

> El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
>  
>> Iñaki Baz Castillo wrote:
>>    
>>> El Martes, 9 de Febrero de 2010, Bogdan-Andrei Iancu escribió:
>>>      
>>>> Hi Iñaki,
>>>>
>>>> uh...you are totally right :D...
>>>> propagating a received Reason hdr is still missing....
>>>>
>>>> I will take care of it - thanks for pointing it out .
>>>>        
>>> It would be a really interesting feature (i.e. Asterisk does include such
>>> Reason header when cancels a call answered elsewhere).
>>>
>>> However there should be possible to allow or deny that received "Reason"
>>> header before propagating it in the CANCEL generated by OpenSIPS (IMHO).
>>>      
>> And do you see this as a global or per CANCEL setting ??
>>    
>
> I could imagine accepting such header just for CANCEL coming from a known
> source (i.e. my application server or PBX).
>
> Just as suggestion, perhaps a flag in t_relay() would be used for this, a flag
> that only makes sense for CANCEL rather than INVITE, so:
>
>   if (is_method("CANCEL")) {
>     if ($si == MY_APPLICATION_SERVER_IP)
>       # Allow propagating "Reason" header.
>       t_relay(0x12);
>     else
>       t_relay();
>   }
>  
I just added flag "0x08" for Reason hdr propagation - both in trunk and
1.6 branch. It will part of the 1.6.2 release.

Thanks and regards,
Bogdan

--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSER-Users] Adding "Reason: SIP ; cause=200" header when CANCEL in forking scenarios

Iñaki Baz Castillo
2010/3/10 Bogdan-Andrei Iancu <[hidden email]>:
> I just added flag "0x08" for Reason hdr propagation - both in trunk and
> 1.6 branch. It will part of the 1.6.2 release.

Already shown the commit, great ;)

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users