[SR-Users] Typecast

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 16 06:56:46 CEST 2013


Hello,

do you need the ip address as an integer? Then you can use math 
operations together with transformations to build it in the config.

For various time formats, see the pseudovariables $timef(...) and 
$time(...).

Cheers,
Daniel

On 4/15/13 3:11 PM, Victor V. Kustov wrote:
> Hi all.
>
> I've got following construction:
>
> modparam("acc_radius", "radius_extra", " \
>      Calling-Station-Id=$tU; \
>      User-Name=$rU; \
>      Called-Station-Id=$fU; \
>      Framed-IP-Address=$si; \
>      h323-call-origin=$var(ho); \
>      h323-disconnect-cause=$var(hdc); \
>      h323-connect-time=$var(ct); \
>      h323-disconnect-time=$var(dt); \
>      h323-setup-time=$var(st); \
>      Cisco-AVPair=$var(cavp); \
>      Cisco-Call-Type=$var(cct) \
> ")
>
> Framed-IP-Address in dictionary described as "ipaddr". If i send $si
> (as writen above), then radius server get incorrect ip like
> 46.48.44.49. If I try to assign $si any attribute has string type - all
> ok. How can I typecast here?
>
> Simulary problem for attributes "h323-disconnect-time",
> "h323-setup-time" - need timestamp in format "0000-00-00 00:00:00"
>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -




More information about the sr-users mailing list