[Kamailio-Users] AVP variable as a variable in a function

Klaus Darilion klaus.mailinglists at pernau.at
Thu Nov 13 15:21:47 CET 2008



Alex R.S.M schrieb:
> Hi,
> 
> How can I use AVP variable as a variable in a function (eg: 
> append_branch(??)) ?
> 
> 
> append_branch( $avp(i:10) );   // getting error message
> 
> append_branch( "$avp(i:10)" );  // takes "$avp(i:10)" as the function 
> parameter and not its value

No. This is a missing feature reported recently by Juha too.

dirty workaround:

$avp(s:temp) = $ru;
$ru = $avp(i:10);
append_branch();
$ru = $avp(s:temp);

but this may cause problems with send_socket, destination URI and bflags.

regards
klaus




More information about the Users mailing list