[OpenSIPS-Users] dlg_val before create_dialog

M S medeanwz at gmail.com
Tue Dec 17 15:58:00 UTC 2024


Thank you for your answer. I tried that and it shows DLG_status 1, which
means the dialog is created but I definitely didn't create a dialog before
that line. Also, the dialog is created further down with
create_dialog("pPB") command because I see OPTIONS being sent to both
caller and callee (pP working).
Why would DLG_status print 1? I will try to print it at different lines of
script to see where it changes... I have a t_newtran and some $acc_extra
lines befores (other than some standard processing)

On Tue, Dec 17, 2024 at 4:39 PM Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> 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
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20241217/e2ed86f8/attachment.html>


More information about the Users mailing list