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

Iñaki Baz Castillo ibc at aliax.net
Tue Feb 9 22:37:02 CET 2010


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 <ibc at aliax.net>



More information about the Users mailing list