Hi,

Yes, the dlg_val assignment fails if there is no current dialog. Maybe the dialog is created (internally) by some other script function you are using. Try prinitng the $DLG_status before the assignment, just to see if there is a dialog or not

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 17.12.2024 14:08, M S wrote:
Hi list,
I have a script like this:

..... some processing
if (is_method("INVITE") && !has_totag()) {
  $dlg_val(x)="y";
}
.... some processing
if (is_method("INVITE") && !has_totag()) {
    create_dialog("pPB")
}

My first question is, why does this work?! documents say $dlg_val cannot be used before dialog is created, and create_dialog is called after dlg_val here. I have verified that indeed dialog is created using create_dialog, and indeed $dlg_val(x) stores the value (it is available later in the dialog).

Second question, once or two times a day (after thousands of calls) I see a do_assign setting PV failed error message on the $dlg_val(x)="y" line. Since this shouldn't have worked to begin with, I don't know how to debug this. Any suggestions?

Thank you!

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to