<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">That means some other script function created
the dialog in advance. you can find which one by adding something
like this on top of your request route:<br>
script_trace( 1, "$rm from $si, dlg is $DLG_status", "dbg");<br>
<br>
And see where the print changes from NULL to 1 ;)<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 17.12.2024 17:58, M S wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEZrhoP8c4BP2hxeRunbZVBfsGSDp=a8X3G9X4vhR91WVvvbEw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">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).
<div>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)</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Tue, Dec 17, 2024 at
4:39 PM Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org" moz-do-not-send="true"
class="moz-txt-link-freetext">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Yes, the dlg_val assignment fails if there is no current
dialog. Maybe <br>
the dialog is created (internally) by some other script
function you are <br>
using. Try prinitng the $DLG_status before the assignment,
just to see <br>
if there is a dialog or not<br>
<br>
Regards,<br>
<br>
Bogdan-Andrei Iancu<br>
<br>
OpenSIPS Founder and Developer<br>
<a href="https://www.opensips-solutions.com"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.opensips-solutions.com</a><br>
<a href="https://www.siphub.com" rel="noreferrer"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.siphub.com</a><br>
<br>
On 17.12.2024 14:08, M S wrote:<br>
> Hi list,<br>
> I have a script like this:<br>
><br>
> ..... some processing<br>
> if (is_method("INVITE") && !has_totag()) {<br>
> $dlg_val(x)="y";<br>
> }<br>
> .... some processing<br>
> if (is_method("INVITE") && !has_totag()) {<br>
> create_dialog("pPB")<br>
> }<br>
><br>
> My first question is, why does this work?! documents say
$dlg_val <br>
> cannot be used before dialog is created, and
create_dialog is called <br>
> after dlg_val here.<br>
> I have verified that indeed dialog is created using
create_dialog, and <br>
> indeed $dlg_val(x) stores the value (it is available
later in the dialog).<br>
><br>
> Second question, once or two times a day (after thousands
of calls) I <br>
> see a do_assign setting PV failed error message on the
$dlg_val(x)="y" <br>
> line. Since this shouldn't have worked to begin with, I
don't know how <br>
> to debug this. Any suggestions?<br>
><br>
> Thank you!<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
> <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>