<html><head></head><body>What are you going to do when this timer fires? <br>
<br>
Internally generated requests do not create TM transactions that are accessible from route script. <br>
<br>
What is your actual goal? To change the timeout for non-response to the OPTIONS keepalives? If so, that should probably be added as a modparam. In that case, fr_timer isn't quite the language in which to speak of it, as that makes it sound like a transaction to which you have access in script (with the implication that its failure can trigger a failure_route callback of your own making). That's not the case here. <br>
<br><br><div class="gmail_quote">On 17 April 2014 15:33:57 GMT+04:00, Vassilis Radis <radisb@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Hello, I would like to try customizing the fr_timer for the OPTIONS keep-alive msgs transactions that the dialog module sends. I tried to call t_set_fr() function from inside the dialog modules's code (in dlg_req_within.c , in dlg_send_ka() function after the call to <span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">d_tmb</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">.</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">t_request_within</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">(</span><span class=""
style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">&</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">uac_r</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">);</span><div>
<div>But it seems that this tm function is not available from inside other module's code.</div><div><br /></div><div>Is the above is the correct place to try and do it, and how can I programmatically ,inside a module's code, adjust fr_timer?</div>
<div><br /></div><div>On a side note, i followed the call flow from dlg_send_ka()<span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span>down to the t_uac_prepare() function of tm module, where the fr_timer is set. In there, there is this comment+code:<br />
</div><div><br /></div><div><pre style="margin-top:0px;margin-bottom:0px"><div class="" id="LC305" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
<span class="" style="color:rgb(153,153,136);font-style:italic">/* init timers hack, new_cell->fr_timer and new_cell->fr_inv_timer</span></div><div class="" id="LC306" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
<span class="" style="color:rgb(153,153,136);font-style:italic">  * must be set, or else the fr will happen immediately</span></div><div class="" id="LC307" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
<span class="" style="color:rgb(153,153,136);font-style:italic">  * we can't call init_new_t() because we don't have a sip msg</span></div><div class="" id="LC308" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
<span class="" style="color:rgb(153,153,136);font-style:italic">  * => we'll ignore t_set_fr() or avp timer value and will use directly the</span></div><div class="" id="LC309" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
<span class="" style="color:rgb(153,153,136);font-style:italic">  * module params fr_inv_timer and fr_timer -- andrei */</span></div><div class="" id="LC310" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px">
 <span class="">new_cell</span><span class="" style="font-weight:bold">-></span><span class="">fr_timeout</span><span class="" style="font-weight:bold">=</span><span class="">cfg_get</span><span class="">(</span><span class="">tm</span><span class="">,</span> <span class="">tm_cfg</span><span class="">,</span> <span class="">fr_timeout</span><span class="">);</span></div>
<div class="" id="LC311" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px"> <span class="">new_cell</span><span class="" style="font-weight:bold">-></span><span class="">fr_inv_timeout</span><span class="" style="font-weight:bold">=</span><span class="">cfg_get</span><span class="">(</span><span class="">tm</span><span class="">,</span> <span class="">tm_cfg</span><span class="">,</span> <span class="">fr_inv_timeout</span><span class="">);</span></div>
<div class="" id="LC312" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px"> <span class="">new_cell</span><span class="" style="font-weight:bold">-></span><span class="">end_of_life</span><span class="" style="font-weight:bold">=</span><span class="">get_ticks_raw</span><span class="">()</span><span class="" style="font-weight:bold">+</span><span class="">lifetime</span><span class="">;</span></div>
<div class="" id="LC312" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px;height:18px"><br /></div></pre></div></div><div><span style="white-space:pre">Does this mean that it cant be done in a straighforward way?</span><span style="white-space:pre"><br />
</span></div><div><span style="white-space:pre">Any advice on how I can achieve the customized fr_timers for those messages?</span><br /></div><div><span style="white-space:pre"><br /></span></div><div>Thanks.<span style="white-space:pre"><br />
</span></div></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br />sr-users@lists.sip-router.org<br /><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br /></pre></blockquote></div><br>
--<br>
Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard. <br>
<br>
Alex Balashov - Principal <br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
United States<br>
Tel: +1-678-954-0671<br>
Web: <a href="http://www.evaristesys.com">http://www.evaristesys.com</a>/, <a href="http://www.alexbalashov.com">http://www.alexbalashov.com</a></body></html>