[OpenSIPS-Users] dlg_val before create_dialog
M S
medeanwz at gmail.com
Tue Dec 17 17:27:28 UTC 2024
So I did that, and it is very strange:
if (is_method("INVITE") && !has_totag()) xlog("L_WARN",
"$ci|route|$Ts:$Tsm|DLG_status3 $DLG_status");
if(!rtpproxy_offer("froc")) xlog("L_WARN",
"$ci|route|$Ts:$Tsm|rtpproxy_offer failed for: $mb\n");
if (is_method("INVITE") && !has_totag()) xlog("L_WARN",
"$ci|route|$Ts:$Tsm|DLG_status4 $DLG_status");
32ac0d41383090087a573dd766679bcc at 10.201.54.109:5060|route|1734456172:140520|DLG_status3
<null>
32ac0d41383090087a573dd766679bcc at 10.201.54.109:5060|route|1734456172:140879|DLG_status4
1
But what does rtpproxy_offer has to do with dialog?
On Tue, Dec 17, 2024 at 5:06 PM Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:
> 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:
> script_trace( 1, "$rm from $si, dlg is $DLG_status", "dbg");
>
> And see where the print changes from NULL to 1 ;)
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> https://www.siphub.com
>
> On 17.12.2024 17:58, M S wrote:
>
> 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/7da7cd97/attachment.html>
More information about the Users
mailing list