[SR-Dev] [Kamailio-Devel] source ip address as int

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 30 01:47:10 CEST 2009



On 04/29/2009 07:01 PM, Juha Heinanen wrote:
> in radius dictionary SIP-Source-IP-Address is of type ipaddr, which is a
> four byte integer.
>
> in order to get source address accounted, $si cannot be used because it
> is a string and i haven't found a transformation from ip address string
> to int.
>   

You can use s.select transformation to get the bytes, then convert them 
to int with s.int and multiply plus add to get the integer.

Cheers,
Daniel

> is there a solution that i have missed?  if not, what would be the best
> way to solve this:  add a new transformation or a new int valued pv for
> source ip address?
>
> -- juha
>
> _______________________________________________
> Kamailio (OpenSER) - Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the sr-dev mailing list