[Users] failure_route problem
raviprakash sunkara
sunkara.raviprakash.feb14 at gmail.com
Thu May 24 15:39:20 CEST 2007
On 5/24/07, Yago Bargalló <yago.bargallo at quarea.com> wrote:
>
> Hello,
>
> First of all thaks to Kraus for his quick reply on my last question.
> However I can't do openser work fine.
>
> I'm trying to use failure_route as follows, can anybody tell me which
> could be the problem??
>
>
>
> (…)
>
> modparam("tm", "fr_inv_timer" , 10)
>
>
>
> # timer for response to a request
>
> modparam("tm","fr_timer", 4)
>
>
>
>
>
> # ------------------------- request routing logic -------------------
>
>
>
> # main routing logic
>
>
>
> route{
>
> (…)
>
> if (uri==myself) {
>
> (…)
>
> # Redirecciono cap a l'asterisk si marquen
> una extensió que comença per 3
>
>
>
> if(uri=~"sip:2[0-9]+@" && method=="INVITE")
> {
>
> t_on_failure("1");
>
> }
>
> (…)
>
> route(1);
>
> }
>
>
>
>
>
> route[1] {
>
> # send it out now; use stateful forwarding as it works
> reliably
>
> # even for UDP2TCP
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> };
>
> exit;
>
> }
>
>
>
> failure_route[1]{
>
> rewritehostport("172.16.51.160"); #asterisk
>
interChange the rewritehostport and rewriteuser
rewriteuser("2002");
>
> append_branch();
>
> t_relay();
>
> exit;
>
> }
>
>
>
>
>
> With this openser.cfg the call is cancelled after fr_inv_timer and
> failure_route[1] doesn't work but, however, if I do this:
>
>
>
> route{
>
> (…)
>
> if (uri==myself) {
>
> (…)
>
> # Redirecciono cap a l'asterisk si marquen
> una extensió que comença per 3
>
>
>
> if(uri=~"sip:2[0-9]+@" && method=="INVITE")
> {
>
> à
> rewritehostport("172.16.51.160"); #asterisk
>
> à rewriteuser("2002");
>
> t_relay();
>
> exit;
>
> }
>
> (…)
>
> route(1);
>
> }
>
>
>
> If I use this the call is redirected to my asterisk but using the
> failure_route as my first openser.cfg it does't work.
>
>
>
> Which is my problem??
>
>
>
> Thanks….
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
--
Thanks &Regards
Ravi Prakash Sunkara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070524/9b9cf40a/attachment.htm>
More information about the sr-users
mailing list