<div dir="ltr">Hi Juha<div><br></div><div>I just wanted to update every body on what I found looking at the c code. The values in between the pipes are as follows:</div><div><br></div><div>gw_index | scheme | strip | prefix | tag | ip_addr | hostname | port | params | transport | flags <br>
</div><div><br></div><div><br></div><div>Most of these things are clearly retrievable from the DB (just look at the lcr_gw table and you will see the values there) but I found 2 things worthy of note:</div><div><br></div>
<div>1) gw_index: this seems that it can be any number that is unique inside the avp, when I tried reconstructing this avp I used just 1 and 2 for my test entries and this worked.</div><div>2) ip_addr: There is some interesting munging that happens with in the c code to encode this value, however I found that when I over wrote the values of the avp manually I didn't need to do the munging -- just putting an ip address in this space worked fine.</div>
<div><br></div><div><br></div><div>From my basic testing here it looks like overwriting the contents of this avp to substitute in ones own lcr destinations should be pretty straight forward.</div><div><br></div><div>All the best.</div>
<div><br></div><div>Will Ferrer</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 6:22 PM, Will Ferrer <span dir="ltr"><<a href="mailto:will.ferrer@switchsoft.com" target="_blank">will.ferrer@switchsoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Juha<div><br></div><div>Thank you very much for pointing me in the right direction. I am looking the c code now and I will update the list if I figure it out sufficiently.</div>
<div><br></div><div>All the best.</div><span class="HOEnZb"><font color="#888888">
<div><br></div><div>Will Ferrer</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 26, 2014 at 10:51 PM, 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>Will Ferrer writes:<br>
<br>
> I have found you can overwrite the contents of the gw_uri_avp (default:<br>
> $avp(i:709)) substitute this function call. However I am a bit unclear<br>
> about what goes in this avp. I was wondering if any one knew of a place I<br>
> could find this information.<br>
<br>
</div>gw_uri_avp is internal avp and is not intended for manipulation.<br>
<div><br>
> The contents of the avp is an list whose entries look something like this<br>
> :"2|1|0|||258722358||5060||1|1". The values separated by the | are likely<br>
> values from the database, and some of them are obvious (like the port and<br>
> the prefix), but others are not. In particular the longer number baffles<br>
> me, it's not the ip of the gateway from the lcr_gw table, unless it is but<br>
> has been altered in some way.<br>
<br>
</div>if you want to play with it, you need to check from source code what the<br>
various fields mean.  the relevant functions are encode_avp_value and<br>
decode_avp_value.  there are comments about the fields.<br>
<br>
be aware that contents gw_uri_avp may change from version to version<br>
without warning.<br>
<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" target="_blank">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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>