in k or openser there used to be a local_route block that was executed for locally generated requests, such as those triggered by t_uac_dlg mi command.
the question is, what is the equivalent in sr? when issuing, for example, invite using tm.t_uac_wait, i need to be able to set invite timeout using t_set_fr() call.
there exists onsend_route, but according to wiki, it does not apply:
This route is executed only when forwarding requests - it is not executed for replies, retransmissions, or locally generated messages (e.g. via fifo uac).
-- juha
Hello,
there is an event route for it -- WITH_EVENT_LOCAL_REQUEST must be enabled at compilation:
event_route[tm:local-request] { ... }
Cheers, Daniel
On 23.09.2009 18:06 Uhr, Juha Heinanen wrote:
in k or openser there used to be a local_route block that was executed for locally generated requests, such as those triggered by t_uac_dlg mi command.
the question is, what is the equivalent in sr? when issuing, for example, invite using tm.t_uac_wait, i need to be able to set invite timeout using t_set_fr() call.
there exists onsend_route, but according to wiki, it does not apply:
This route is executed only when forwarding requests - it is not executed for replies, retransmissions, or locally generated messages (e.g. via fifo uac).
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla writes:
there is an event route for it -- WITH_EVENT_LOCAL_REQUEST must be enabled at compilation:
event_route[tm:local-request] { ... }
daniel,
thanks for the hint. i tried it like this:
event_route [tm:local-request] { # Handle locally generated requests
xlog("L_INFO", "Routing locally generated $rm to <$ru>\n");
if (is_method("INVITE")) { t_set_fr(10000); }; }
and got to syslog:
Sep 23 21:12:19 localhost /usr/sbin/sip-proxy[29110]: INFO: Routing locally generated INVITE to sip:jh_test_fi@192.98.101.10:5074;transport=udp
so the route gets executed, but after 10 secs nothing happens, i.e., the phone keeps on ringing.
according to tm readme, it should work:
1.4.13. t_set_fr(fr_inv_timeout [, fr_timeout])
Sets the fr_inv_timeout and optionally fr_timeout for the current transaction or for transactions created during the same script invocation, after calling this function. If the transaction is already created (e.g called after t_relay() or in an onreply_route) all the branches will have their final response timeout updated on-the-fly. If one of the parameters is 0, its value won't be changed.
any idea, why it doesn't?
-- juha
On Sep 23, 2009 at 21:16, Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
there is an event route for it -- WITH_EVENT_LOCAL_REQUEST must be enabled at compilation:
event_route[tm:local-request] { ... }
daniel,
thanks for the hint. i tried it like this:
event_route [tm:local-request] { # Handle locally generated requests
xlog("L_INFO", "Routing locally generated $rm to <$ru>\n");
if (is_method("INVITE")) { t_set_fr(10000); }; }
and got to syslog:
Sep 23 21:12:19 localhost /usr/sbin/sip-proxy[29110]: INFO: Routing locally generated INVITE to sip:jh_test_fi@192.98.101.10:5074;transport=udp
so the route gets executed, but after 10 secs nothing happens, i.e., the phone keeps on ringing.
Could you retry with the latest head?
according to tm readme, it should work:
Most of the function in the README were written way before this local-request route. Some of them might even crash :-)
Andrei