[SR-Users] LCR next_gw() - certain GW, source from other IP address
Graham Wooden
graham at g-rock.net
Sat Jan 29 18:32:37 CET 2011
Well, ran into another wall .... I can’t seem to do the force_send_socket at
the point of when next_gw() is called in the failure route.
Is there anyway to clear and/or re-assign the data that is making it where I
can’t re-write the transaction to come from another IP addy?
On 1/29/11 11:01 AM, "Graham Wooden" <graham at g-rock.net> wrote:
> Stagg,
>
> While the Ips are the same, the suggestion to use “rd” along with an entry in
> the “hostname” column appears to be what I want.
>
> I assigned in my DNS some testing hostnames to the single IP in question.
> When debugging, I see that rd contains the hostname, not the IP. I believe
> with that, I can differentiate between the two... And when I see hostname of
> blah.blah.tld, then go ahead and do the force_send_socket.
>
> This definitely solves the issue for the time being. However, I am wondering
> if/when call volume increases if the call-setup time be delayed because of
> these look ups. Everything that I have read so far is that the gw_name is
> just information, the module doesn’t actually have access to it. Boo.
>
> -graham
>
>
> On 1/29/11 8:36 AM, "GP Wooden" <graham at g-rock.net> wrote:
>
>> Same destination IP for both rate decks, so I need to go by something else,
>> like the gw_name.
>>
>> ----- Reply message -----
>> From: "Stagg Shelton" <stagg at vocalcloud.com>
>> Date: Sat, Jan 29, 2011 8:27 am
>> Subject: [SR-Users] LCR next_gw() - certain GW, source from other IP address
>> To: <sr-users at lists.sip-router.org>
>>
>> Do the provider gateways have the same IP address for the different rate
>> plans? If the gateways are different then the following may be relevant.
>>
>> if (next_gw()) {
>> # prepare for lcr failover
>> t_on_failure("2");
>> if($rd=="aaa.aaa.aaa.aaa")
>> {
>> xlog ("L_INFO", "This is a request for Some Rate Plan");
>> force_send_socket(udp:xxx.xxx.xxx.xxx:5060);
>> }
>> else
>> {
>> xlog ("L_INFO", "This is a request for another rate
>> plan");
>> force_send_socket(udp:yyy.yyy.yyy.yyy:5060);
>> };
>> route(2);
>> } else {
>> xlog("No gateways found!");
>>
>>
>> Stagg
>>
>> On 1/29/11 9:10 AM, Graham Wooden wrote:
>>> > Hi there,
>>> >
>>> > I have a requirement now that for one of my GW¹s in my LCR, needs to be
>>> > sourced from another IP address (two different rate-decks with the
>>> carrier).
>>> > This ratedeck will always be at least 2nd inline ...
>>> >
>>> > I was thinking something along the sorts ... Some pseudo code:
>>> >
>>> > failure_route [2] {
>>> > .
>>> > .
>>> > if (next_gw()) {
>>> > if ( name = 'gw_name') {
>>> > force_send_socket(udp:ip.address.of.certain.ip:5060);
>>> > } else {
>>> > # just dummy, as we will send out our default IP for everyone
>>> > else.
>>> > }
>>> > t_on_failure("2");
>>> > route(19);
>>> > }
>>> > .
>>> > .
>>> > .
>>> > }
>>> >
>>> > What variable will have the value that's in the gw_name column? I can't go
>>> > by the IP address in $ru because the destination IP is the same between
>>> the
>>> > two ratedecks.
>>> >
>>> > Overall, Is that the best way to handle this requirement?
>>> >
>>> > Thanks all,
>>> >
>>> > -graham
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> > sr-users at lists.sip-router.org
>>> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110129/a93e0a39/attachment.htm>
More information about the sr-users
mailing list