<div dir="ltr">Thank you - which versions the fix is pushed to? <div>This change may break some configurations (anybody like me using dlg_val before dialog creation) so it might be worth mentioning something about this in release notes...</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jan 8, 2025 at 5:58 PM Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@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">I've just pushed a fix, thanks for helping us identify this issue.<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer / SIPhub CTO<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a> / <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
<br>
On 1/8/25 6:49 PM, Bogdan-Andrei Iancu wrote:<br>
> Hi,<br>
> <br>
> Thanks for the info, Razvan identified the issue - indeed, the <br>
> rtpproxy_offer() forces the dialog creation, without actually of any <br>
> need of it. He will push a fix on this within the next days.<br>
> <br>
> Best regards,<br>
> <br>
> Bogdan-Andrei Iancu<br>
> <br>
> OpenSIPS Founder and Developer<br>
> <a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
> <br>
> On 17.12.2024 19:27, M S wrote:<br>
>> So I did that, and it is very strange:<br>
>><br>
>> if (is_method("INVITE") && !has_totag()) xlog("L_WARN", "$ci| <br>
>> route|$Ts:$Tsm|DLG_status3 $DLG_status");<br>
>> if(!rtpproxy_offer("froc")) xlog("L_WARN", "$ci|route|$Ts: <br>
>> $Tsm|rtpproxy_offer failed for: $mb\n");<br>
>> if (is_method("INVITE") && !has_totag()) xlog("L_WARN", "$ci| <br>
>> route|$Ts:$Tsm|DLG_status4 $DLG_status");<br>
>><br>
>> 32ac0d41383090087a573dd766679bcc@10.201.54.109:5060|route| <br>
>> 1734456172:140520|DLG_status3 <null><br>
>> 32ac0d41383090087a573dd766679bcc@10.201.54.109:5060|route| <br>
>> 1734456172:140879|DLG_status4 1<br>
>><br>
>> But what does rtpproxy_offer has to do with dialog?<br>
>><br>
>> On Tue, Dec 17, 2024 at 5:06 PM Bogdan-Andrei Iancu <br>
>> <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br>
>><br>
>> That means some other script function created the dialog in<br>
>> advance. you can find which one by adding something like this on<br>
>> 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>
>><br>
>> Bogdan-Andrei Iancu<br>
>><br>
>> OpenSIPS Founder and Developer<br>
>> <a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
>> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
>><br>
>> On 17.12.2024 17:58, M S wrote:<br>
>>> Thank you for your answer. I tried that and it shows DLG_status<br>
>>> 1, which means the dialog is created but I definitely didn't<br>
>>> create a dialog before that line. Also, the dialog is created<br>
>>> further down with create_dialog("pPB") command because I see<br>
>>> OPTIONS being sent to both caller and callee (pP working).<br>
>>> Why would DLG_status print 1? I will try to print it at different<br>
>>> lines of script to see where it changes... I have a t_newtran and<br>
>>> some $acc_extra lines befores (other than some standard processing)<br>
>>><br>
>>> On Tue, Dec 17, 2024 at 4:39 PM Bogdan-Andrei Iancu<br>
>>> <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> Yes, the dlg_val assignment fails if there is no current<br>
>>> dialog. Maybe<br>
>>> the dialog is created (internally) by some other script<br>
>>> function you are<br>
>>> using. Try prinitng the $DLG_status before the assignment,<br>
>>> 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">https://www.opensips-solutions.com</a><br>
>>> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">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<br>
>>> $dlg_val<br>
>>> > cannot be used before dialog is created, and create_dialog<br>
>>> is called<br>
>>> > after dlg_val here.<br>
>>> > I have verified that indeed dialog is created using<br>
>>> create_dialog, and<br>
>>> > indeed $dlg_val(x) stores the value (it is available later<br>
>>> in the dialog).<br>
>>> ><br>
>>> > Second question, once or two times a day (after thousands<br>
>>> of calls) I<br>
>>> > see a do_assign setting PV failed error message on the<br>
>>> $dlg_val(x)="y"<br>
>>> > line. Since this shouldn't have worked to begin with, I<br>
>>> 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">Users@lists.opensips.org</a><br>
>>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>>><br>
>><br>
> <br>
> Hi,<br>
> <br>
> Thanks for the info, Razvan identified the issue - indeed, the <br>
> rtpproxy_offer() forces the dialog creation, without actually of any <br>
> need of it. He will push a fix on this within the next days.<br>
> <br>
> Best regards,<br>
> <br>
> Bogdan-Andrei Iancu<br>
> <br>
> OpenSIPS Founder and Developer<br>
> <a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
> <br>
> On 17.12.2024 19:27, M S wrote:<br>
>> So I did that, and it is very strange:<br>
>><br>
>> if (is_method("INVITE") && !has_totag()) xlog("L_WARN", "$ci| <br>
>> route|$Ts:$Tsm|DLG_status3 $DLG_status");<br>
>> if(!rtpproxy_offer("froc")) xlog("L_WARN", "$ci|route|$Ts: <br>
>> $Tsm|rtpproxy_offer failed for: $mb\n");<br>
>> if (is_method("INVITE") && !has_totag()) xlog("L_WARN", "$ci| <br>
>> route|$Ts:$Tsm|DLG_status4 $DLG_status");<br>
>><br>
>> 32ac0d41383090087a573dd766679bcc@10.201.54.109:5060|route| <br>
>> 1734456172:140520|DLG_status3 <null><br>
>> 32ac0d41383090087a573dd766679bcc@10.201.54.109:5060|route| <br>
>> 1734456172:140879|DLG_status4 1<br>
>><br>
>> But what does rtpproxy_offer has to do with dialog?<br>
>><br>
>> On Tue, Dec 17, 2024 at 5:06 PM Bogdan-Andrei Iancu <br>
>> <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br>
>><br>
>> That means some other script function created the dialog in<br>
>> advance. you can find which one by adding something like this on<br>
>> 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>
>><br>
>> Bogdan-Andrei Iancu<br>
>><br>
>> OpenSIPS Founder and Developer<br>
>> <a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
>> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
>><br>
>> On 17.12.2024 17:58, M S wrote:<br>
>>> Thank you for your answer. I tried that and it shows DLG_status<br>
>>> 1, which means the dialog is created but I definitely didn't<br>
>>> create a dialog before that line. Also, the dialog is created<br>
>>> further down with create_dialog("pPB") command because I see<br>
>>> OPTIONS being sent to both caller and callee (pP working).<br>
>>> Why would DLG_status print 1? I will try to print it at different<br>
>>> lines of script to see where it changes... I have a t_newtran and<br>
>>> some $acc_extra lines befores (other than some standard processing)<br>
>>><br>
>>> On Tue, Dec 17, 2024 at 4:39 PM Bogdan-Andrei Iancu<br>
>>> <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> Yes, the dlg_val assignment fails if there is no current<br>
>>> dialog. Maybe<br>
>>> the dialog is created (internally) by some other script<br>
>>> function you are<br>
>>> using. Try prinitng the $DLG_status before the assignment,<br>
>>> 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">https://www.opensips-solutions.com</a><br>
>>> <a href="https://www.siphub.com" rel="noreferrer" target="_blank">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<br>
>>> $dlg_val<br>
>>> > cannot be used before dialog is created, and create_dialog<br>
>>> is called<br>
>>> > after dlg_val here.<br>
>>> > I have verified that indeed dialog is created using<br>
>>> create_dialog, and<br>
>>> > indeed $dlg_val(x) stores the value (it is available later<br>
>>> in the dialog).<br>
>>> ><br>
>>> > Second question, once or two times a day (after thousands<br>
>>> of calls) I<br>
>>> > see a do_assign setting PV failed error message on the<br>
>>> $dlg_val(x)="y"<br>
>>> > line. Since this shouldn't have worked to begin with, I<br>
>>> 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">Users@lists.opensips.org</a><br>
>>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>>><br>
>><br>
> <br>
<br>
</blockquote></div>