[OpenSIPS-Users] Testing for dialog values

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Aug 18 16:51:11 CEST 2010


Hi Pete,

Could you try the attached patch to see if it solves the problem ?

IF ok, I will upload it on SVN

Regards,
Bogdan

Pete Kelly wrote:
> Hi
>
> I am currently storing some dialog values in opensips 1.6.3, using the
> following format:
>
> $dlg_val(name) = "value";
>
> I then retrieve the value in the same way:
>
> if($dlg_val(name) == "value") { // do some stuff }
>
> However, if the dialog no longer exists on a subsequent request (BYE
> for example), the read part produces some errors in the opensips log
> like this:
>
> CRITICAL:core:comp_scriptvar: cannot get left var value
> WARNING:core:do_action: error in expression (l=542)
>
> Does anyone know how I can test for the existence of the variable
> before trying to access it? I have tried
>
> if($dlg_val(name) != NULL && $dlg_val(name) == "value") { // do some stuff }
>
> but this produces the same effect.
>
> Thanks
> Pete
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dialog.patch
Type: text/x-diff
Size: 683 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20100818/e067c69f/attachment-0001.patch 


More information about the Users mailing list