[SR-Users] Kamailio-Redirect based LCR routing

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 12 16:15:19 CEST 2012


Hello,

I am not very familiar with the code of the lcr module to see if you get 
access to the destination addresses via some variables, but probably you 
can try to do a loop on next_gw():

while(next_gw()) {
     km_append_branch();
}
sl_send_reply("302","Moved Temporary");
exit;

Cheers,
Daniel


On 9/12/12 2:57 PM, Fatima Chahrour~Vanrise Support wrote:
>
> Hello,
>
> Any help?
>
> Cheers,
>
> F Chahrour
>
> *From:*sr-users-bounces at lists.sip-router.org 
> [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of *Fatima 
> Chahrour~Vanrise Support
> *Sent:* Tuesday, September 11, 2012 11:37 AM
> *To:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
> Users Mailing List'; miconda at gmail.com
> *Subject:* Re: [SR-Users] Kamailio-Redirect based LCR routing
>
> Hi,
>
> Sorry!!! You already mentioned to me that I should use 
> km_append_branch("uri") in order to send multiple contacts.
>
> I tried it now as follow:
>
> Km_append_branch($ru) or Km_append_branch()
>
> sl_send_reply("302","Moved Temporary")
>
> Am getting in the contacts the first lcr_gw twice;
>
> Contact: sip:961377888 at 192.168.111.195, sip:961377888 at 192.168.111.195.
>
> What variable should I use to list all contacts of lcr_gw?
>
> Kind regards,
>
> F Chahrour
>
> *From:*sr-users-bounces at lists.sip-router.org 
> [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of *Fatima 
> Chahrour~Vanrise Support
> *Sent:* Monday, September 10, 2012 11:50 PM
> *To:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
> Users Mailing List'; miconda at gmail.com
> *Subject:* [SR-Users] Kamailio-Redirect based LCR routing
>
> Dear Daniel\List,
>
> Following up to a previous post where I was able in my testing lab to 
> redirect call with 1^st destination of lcr_gw table to another 
> Kamailio(acting as any SBC) with Daniels assist, I need a hand in 
> redirecting the call with multiple contacts , basically based on the 
> lcr routing rule configured in kamailio LCR module for the rerouted call.
>
> Is this possible using code 300 with multiple choices message? Or you 
> advise me with another method?
>
> If 300 redirect message works, what should be the variable set as $ru 
> to get all lcr_gw destinations?
>
> Example for clarification:
>
> My current redirect script used after lcr functions is :
>
> ....
>
> $ru= $ru;
>
> sl_send_reply("302","Moved Temporary");
>
> ....
>
> This script is successfully sending the 302 message with Contact: 
> sip:1119613454646 at 192.168.111.195. (1119613454646 is the dialed number 
> with prefix, 192.168.111.195 is first lcr_gw ip). Now if the call to 
> 192.168.111.195 is failed and I need to redirect the second 
> destination, second lcr_gw ip, how can I achieve this?
>
> Thank you for your usual response.
>
> Kind Regards,
>
> F Chahrour
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120912/e9cac3f2/attachment.htm>


More information about the sr-users mailing list