Re: [SR-Users] how to route to new URI on failure

2011-02-27 Thread x-kamailio
On Sun, 27 Feb 2011 13:29:10 -0500, Alex Balashov wrote:

> Try this:
> 
> $ru = ... new URI ...
> append_branch();
> t_relay();

Thanks for the suggestion, but it didn't work!

The new INVITE goes out with the new URI, but kamailio sends the
INVITE to the IP address of the device that failed to answer the
original call.

I'm stumped!

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] how to route to new URI on failure

2011-02-27 Thread Alex Balashov

Try this:

   $ru = ... new URI ...
   append_branch(;
   t_relay();

--
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to route to new URI on failure

2011-02-26 Thread x-kamailio
I'm trying to route failed calls to a voicemail URI. The failure route
couldn't be simpler:

failure_route[FAIL_ONE] {

   if (t_is_canceled()) {
  exit;
   }

   if( t_check_status("486|408") {
  append_branch( "sip:foo@2.2.2.2");
  t_relay();
   }
}


But, it doesn't work. For example, let's say the initial INVITE
resolves to a local device "me@1.1.1.1". This works fine, and the
phone rings. After a timeout, the failure_route executes. The branch
"foo@2.2.2.2" gets appended, and kamailio sends a new INVITE, but
instead of determining the correct proxy for the new address, it sends
the INVITE, with the new URI, to the device that original received the
INVITE, "me@1.1.1.1". Obviously, this doesn't work.

I've been able to force kamailio to route the call correctly by
modifying failure_route[ to use t_relay_to_udp() as follows:

failure_route[FAIL_ONE] {

   if (t_is_canceled()) {
  exit;
   }

   if( t_check_status("486|408") {
  append_branch( "sip:foo@2.2.2.2");
  t_relay_to_udp( "2.2.2.2", "5060");
   }
}

But, it seems like kamailio should figure what where to send the new
INVITE itself. What am I doing wrong?

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users