[SR-Users] Need an explanation of the contents of the LCR gw_uri_avp for replacement I am making to some of the functionality of the LCR module
will.ferrer at switchsoft.com
Fri May 2 00:52:59 CEST 2014
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.
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
I hope this message finds you well.
All the best.
On Tue, Apr 29, 2014 at 9:06 AM, Juha Heinanen <jh at tutpro.com> wrote:
> Will Ferrer writes:
> > gw_index | scheme | strip | prefix | tag | ip_addr | hostname | port |
> > params | transport | flags
> > Most of these things are clearly retrievable from the DB (just look at
> > lcr_gw table and you will see the values there) but I found 2 things
> > of note:
> > 1) gw_index: this seems that it can be any number that is unique inside
> > avp, when I tried reconstructing this avp I used just 1 and 2 for my test
> > entries and this worked.
> gw_index is index of the gateway in internal table that contains matched
> gws after load_gw() call.
> > 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
> > an ip address in this space worked fine.
> ip_addr string is produced for ipv4 like this:
> string = int2str(ip_addr->u.addr32, &len);
> -- juha
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users