<div dir="ltr"><div><div>Hi Juha<br><br>Thanks much for the assistance. I have refactored our LCR to work based on my own mysql query, where I am setting the gw_index as the id of the gateway, and the ip address I am putting in as a raw ip.<br>
<br></div>It is all working as far as I can tell but more testing will be in order for us. If I find any issues or gotcha I will post here just to let every one know.<br><br></div>I hope this message finds you well.<br><br>
All the best.<br><br>Will Ferrer<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 9:06 AM, Juha Heinanen <span dir="ltr"><<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Will Ferrer writes:<br>
<br>
> gw_index | scheme | strip | prefix | tag | ip_addr | hostname | port |<br>
> params | transport | flags<br>
><br>
> Most of these things are clearly retrievable from the DB (just look at the<br>
> lcr_gw table and you will see the values there) but I found 2 things worthy<br>
> of note:<br>
><br>
> 1) gw_index: this seems that it can be any number that is unique inside the<br>
> avp, when I tried reconstructing this avp I used just 1 and 2 for my test<br>
> entries and this worked.<br>
<br>
</div>gw_index is index of the gateway in internal table that contains matched<br>
gws after load_gw() call.<br>
<div class=""><br>
> 2) ip_addr: There is some interesting munging that happens with in the c<br>
> code to encode this value, however I found that when I over wrote the<br>
> values of the avp manually I didn't need to do the munging -- just putting<br>
> an ip address in this space worked fine.<br>
<br>
</div>ip_addr string is produced for ipv4 like this:<br>
<br>
string = int2str(ip_addr->u.addr32[0], &len);<br>
<div class="HOEnZb"><div class="h5"><br>
-- juha<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>