<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I have the force send socket in the branch route too. So assume the
first attempt fails and the call makes it to the failure route that
I setup. Once it gets to the branch route then it executes the
following where you can perform your logic again.<br>
<br>
branch_route[2] {<br>
xlog("new branch at $ru\n");<br>
if($rd=="aaa.aaa.aaa.aaa")<br>
{<br>
xlog ("L_INFO", "This is a request for A Plan");<br>
force_send_socket(<a class="moz-txt-link-freetext" href="udp:xxx.xxx.xxx.xxx:5060">udp:xxx.xxx.xxx.xxx:5060</a>);<br>
}<br>
else<br>
{<br>
xlog ("L_INFO", "This is a request for another plan");<br>
force_send_socket(<a class="moz-txt-link-freetext" href="udp:yyy.yyy.yyy.yyy:5060">udp:yyy.yyy.yyy.yyy:5060</a>);<br>
};<br>
}<br>
<br>
<br>
Stagg<br>
<br>
<br>
On 1/29/11 12:32 PM, Graham Wooden wrote:
<blockquote cite="mid:C969AB55.2B2C4%25graham@g-rock.net"
type="cite">
<title>Re: [SR-Users] LCR next_gw() - certain GW, source from
other IP address</title>
<font face="Calibri, Verdana, Helvetica, Arial"><span
style="font-size: 11pt;">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. <br>
<br>
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?<br>
<br>
<br>
On 1/29/11 11:01 AM, "Graham Wooden" <<a
moz-do-not-send="true" href="graham@g-rock.net">graham@g-rock.net</a>>
wrote:<br>
<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span
style="font-size: 11pt;">Stagg, <br>
<br>
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. <br>
<br>
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.<br>
<br>
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.<br>
<br>
-graham<br>
<br>
<br>
On 1/29/11 8:36 AM, "GP Wooden" <<a
moz-do-not-send="true" href="graham@g-rock.net">graham@g-rock.net</a>>
wrote:<br>
<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span
style="font-size: 11pt;">Same destination IP for both rate
decks, so I need to go by something else, like the
gw_name. <br>
<br>
----- Reply message -----<br>
From: "Stagg Shelton" <<a moz-do-not-send="true"
href="stagg@vocalcloud.com">stagg@vocalcloud.com</a>><br>
Date: Sat, Jan 29, 2011 8:27 am<br>
Subject: [SR-Users] LCR next_gw() - certain GW, source
from other IP address<br>
To: <<a moz-do-not-send="true"
href="sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
<br>
Do the provider gateways have the same IP address for the
different rate <br>
plans? If the gateways are different then the following
may be relevant.<br>
<br>
if (next_gw()) {<br>
# prepare for lcr failover<br>
t_on_failure("2");<br>
if($rd=="aaa.aaa.aaa.aaa")<br>
{<br>
xlog ("L_INFO", "This is a request for
Some Rate Plan");<br>
force_send_socket(<a class="moz-txt-link-freetext" href="udp:xxx.xxx.xxx.xxx:5060">udp:xxx.xxx.xxx.xxx:5060</a>);<br>
}<br>
else<br>
{<br>
xlog ("L_INFO", "This is a request for
another rate <br>
plan");<br>
force_send_socket(<a class="moz-txt-link-freetext" href="udp:yyy.yyy.yyy.yyy:5060">udp:yyy.yyy.yyy.yyy:5060</a>);<br>
};<br>
route(2);<br>
} else {<br>
xlog("No gateways found!");<br>
<br>
<br>
Stagg<br>
<br>
On 1/29/11 9:10 AM, Graham Wooden wrote:<br>
> Hi there,<br>
><br>
> I have a requirement now that for one of my GW©ös in
my LCR, needs to be<br>
> sourced from another IP address (two different
rate-decks with the carrier).<br>
> This ratedeck will always be at least 2nd inline ...<br>
><br>
> I was thinking something along the sorts ... Some
pseudo code:<br>
><br>
> failure_route [2] {<br>
> .<br>
> .<br>
> if (next_gw()) {<br>
> if ( name = 'gw_name') {<br>
>
force_send_socket(<a class="moz-txt-link-freetext" href="udp:ip.address.of.certain.ip:5060">udp:ip.address.of.certain.ip:5060</a>);<br>
> } else {<br>
> # just dummy, as we will send out our
default IP for everyone<br>
> else.<br>
> }<br>
> t_on_failure("2");<br>
> route(19);<br>
> }<br>
> .<br>
> .<br>
> .<br>
> }<br>
><br>
> What variable will have the value that's in the
gw_name column? I can't go<br>
> by the IP address in $ru because the destination IP
is the same between the<br>
> two ratedecks.<br>
><br>
> Overall, Is that the best way to handle this
requirement?<br>
><br>
> Thanks all,<br>
><br>
> -graham<br>
><br>
><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
> <a moz-do-not-send="true"
href="sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true"
href="sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
<br>
<hr align="CENTER" size="3" width="95%"></span></font><font
size="2"><font face="Consolas, Courier New, Courier"><span
style="font-size: 10pt;">_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
<a moz-do-not-send="true"
href="sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</span></font></font></blockquote>
<font face="Calibri, Verdana, Helvetica, Arial"><span
style="font-size: 11pt;"><br>
</span></font></blockquote>
</blockquote>
</body>
</html>