[OpenSIPS-Users] tm module CANCEL reason on timeout

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Oct 25 13:40:32 CEST 2012


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