[Devel] new features: script variables and pseudo-variables in
script
Daniel-Constantin Mierla
daniel at voice-system.ro
Sat Feb 3 20:49:50 CET 2007
Hello,
it is not possible to return a string from a function exported by a
module now. The usual way is to use avps for that.
The exec module on devel is already extended with such feature you are
looking for -- see exec_avp():
http://www.openser.org/docs/modules/1.2.x/exec.html#AEN134
Cheers,
Daniel
On 02/03/07 00:35, vallimamod abdullah wrote:
> Hello Daniel,
>
> On 1/29/07, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>>
>> [...]
>>
>> Assignments of script variables, AVPs, R-URI parts (username, domain,
>> and URI) and dst URI can be done as well in script.
>> $avp(i:11) = 1; - sets the value of $avp(i:11) to integer '1'
>> $avp(i:11) = "1"; - sets the value of $avp(i:11) to string '1'
>> $ru = "sip:"+$var(user)+"@"+$fd; - sets the R-URI to string composed
>> from value of variable $var(user) and From URI domain
>>
>
> I have a question related to this feature: Is it possible to have a
> module function that returns a string and assign it to a script
> variable ?
>
> I am thinking of extending the exec module to execute a system command
> and return its output to the script. That would be a great feature
> for me but I have no idea on how to return a string from a C function
> to the script.
>
More information about the Devel
mailing list