Is it possible to use a variable as dlg_var key?

Benoit Panizzon via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Organization ImproWare AG
Message-ID <[email protected]>
Hi List

I have this screnario:

$avp(media_type) = "audio";
$avp(media_type) = "video";
$avp(media_type) = "image";

while ($avp(media_type) != $null) {

	[doing some stuff I need to remember for the whole dialog]

	$dlg_var($avp(media_type)) = $var(result);
	pv_unset("$avp(media_type)");
}

xlog("L_INFO","Audio Media Type is $dlg_var(audio) \n");

=> NULL output, therefore $dlg_var(audio) was not set.

PS: I also attempted with quotes: 

$dlg_var("$avp(media_type)") = $var(result);

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.