[SR-Users] Accessing #!define "variables" from within lua

Asgaroth 00asgaroth00 at gmail.com
Fri Mar 23 13:05:58 CET 2012


Hi All,

I am looking at writing a lua function that would really benefit from 
accessing "variables" that I would have defined by using the #!define 
statement. Is this at all possible? I've tried looking at the 
documentation surrounding lua and kamailio, but I cannot see how I would 
access it. I thought I'd ask the list to see if anyone else may have 
attempted this.

for example, I may have

#!define INTERNAL_ADDRESS 1.2.3.4

Which I subsequently use through the the routing script to refer to the 
internal address I am listening on. Now I would like to try and access 
this "variable" from a lua script. Any pointers/tips/workarounds would 
be greatly appreciated.

Thanks



More information about the sr-users mailing list