[OpenSIPS-Users] tm module CANCEL reason on timeout

John Quick john.quick at smartvox.co.uk
Thu Oct 25 14:37:04 CEST 2012


Hi Bogdan,

It is interesting that RFC3398 recommends mapping ISUP 19 to SIP 480. I
think this makes sense and so I agree with your logic. It is good to use two
different response values, one for "timeout" (no response) and another for
"ring-no-answer" (where a 180 response has been received) because these are
two completely different conditions.

However, doesn't this mean that there is an inconsistency elsewhere in
OpenSIPS?
If I understand correctly, the timers in the tm module operate as follows:
"timeout" (no response) is linked to fr_timer
"ring-no-answer" is linked to fr_inv_timer.

Yet, the tm module always generates the same SIP response, 408, for both
fr_timer and for fr_inv_timer. Should it not generate 408 for fr_timer and
480 for fr_inv_timer?

Regarding your suggestions for controlling the reason phrase within the tm
module, I would say that both methods look satisfactory. The AVP is probably
the more straightforward for users. However, I have just found the following
information in RFC3326:
"A SIP message MAY contain more than one Reason value (i.e., multiple
   Reason lines), but all of them MUST have different protocol values
   (e.g., one SIP and another Q.850)."

If it were added to the tm module, would the "reason cause" AVP allow the
addition of multiple "Reason" headers?

John

-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org] 
Sent: 25 October 2012 12:41
To: john.quick at smartvox.co.uk; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] tm module CANCEL reason on timeout

Hi John,

The 480 code is on purpose. See the mapping between Q.850 and SIP for
reasons:
         
https://support.net.com/display/VXDOC471/Mapping+Q.850+to+SIP+Responses
    or:
         
wiki.freeswitch.org/index.php?title=Special:PdfPrint&page=Hangup_Causes

So, if you have a TIMEOUT with no reply, you should report a 408, but if
there is timeout with reply, it should be 480. And as in SIP you generate
CANCEL only for timeouts with replies -> it;s 480.

Please correct me if my logic is wrong.

On controlling the Reason phrase in Cancel, this is a bit tricky, as CANCELs
are internally generated (on timer) and you have no script interaction. I
see 2 approaches here:
     - make local_route to be trigerred from local CANCELs too, so you can
do your own headers
     - at INVITE time (per branch) set via an AVP the reason hdr to be used
(if not default) in case of CANCELing that branch.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/22/2012 04:38 PM, John Quick wrote:
> In "modules/tm/timer.c" function "final_response_handler", a #define 
> is used to set the Reason header in the CANCEL when triggered by the
invite timeout.
> The default is cause=480;text="NO_ANSWER", but I think it should be 
> 408 because 408 is timeout and 480 is temporarily unavailable.
>
> I need to be able to control the Reason header when a timeout is 
> triggered in tm. When the call is being sent to our SS7 gateway, we 
> need the reason header to be set as follows:
> Reason: Q.850;cause=19;text="No Answer"
> When the call is going to a SIP device, I want the header to be like 
> the current default:
> Reason: SIP;cause=408;text="NO_ANSWER"
>
> Is it permissible to add 2 reason headers or to somehow append 
> different reasons for different transports to one header?
>
> Could the developers put this on the roadmap please - to add 
> functionality to have more control over the reason header in the tm module
on timeout.
>
> Many thanks.
>
> John Quick
> Smartvox Limited
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>





More information about the Users mailing list