storing and accessing dialog module flags and vals

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

storing and accessing dialog module flags and vals

Brent Thomson
I've got the dialog module loaded and the dlg_flag configured:

        modparam("dialog",     "dlg_flag", 4)


In my routing logic, I set flag 4 and call create_dialog(). I then use
store_dlg_value("foo", "bar") to set a dialog value and
set_dlg_flag("10") to set a dialog flag. On subsequent messages within
the same dialog, I try calling create_dialog() again which returns
false, as expected. I can't, however, access any of the dialog vals or
flags that I set on previous messages. Am I missing something?


INVITE
        setflag(4)
        create_dialog() # returns true
        store_dlg_value("foo", "bar")
        set_dlg_flag("10")


CANCEL
        create_dialog() # returns false
        fetch_dlg_value("foo", "$avp(i:2)") # returns empty
        is_dlg_flag_set("10") # returns false

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: storing and accessing dialog module flags and vals

Bogdan-Andrei Iancu
Hi Brett,



Brent Thomson wrote:
> I've got the dialog module loaded and the dlg_flag configured:
>
> modparam("dialog",     "dlg_flag", 4)
>
>
> In my routing logic, I set flag 4 and call create_dialog().
Setting the flag OR calling create_dialog() is enough for having the
dialog created - no need to them both.


>   I then use
> store_dlg_value("foo", "bar") to set a dialog value and
> set_dlg_flag("10") to set a dialog flag. On subsequent messages within
> the same dialog, I try calling create_dialog() again which returns
> false, as expected.
dialog creation works only for initial requests, not for sequential one.

>  I can't, however, access any of the dialog vals or
> flags that I set on previous messages. Am I missing something?
>
>
> INVITE
> setflag(4)
> create_dialog() # returns true
> store_dlg_value("foo", "bar")
> set_dlg_flag("10")
>
>
> CANCEL
> create_dialog() # returns false
> fetch_dlg_value("foo", "$avp(i:2)") # returns empty
> is_dlg_flag_set("10") # returns false
>  

hmm... I see your point. actually the CANCEL is not matched against the
dialog at all at this point, this is why you do not get the dialog info
there.

But I think it should be there, so please open a bug report on the
tracker and I will take care of it.

Regards,
Bogdan

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: storing and accessing dialog module flags and vals

Brent Thomson
Bogdan-Andrei Iancu wrote:

>>
>> INVITE
>> setflag(4)
>> create_dialog() # returns true
>> store_dlg_value("foo", "bar")
>> set_dlg_flag("10")
>>
>>
>> CANCEL
>> create_dialog() # returns false
>> fetch_dlg_value("foo", "$avp(i:2)") # returns empty
>> is_dlg_flag_set("10") # returns false
>>  
>
> hmm... I see your point. actually the CANCEL is not matched against the
> dialog at all at this point, this is why you do not get the dialog info
> there.
>
> But I think it should be there, so please open a bug report on the
> tracker and I will take care of it.
>

Cool. I've submitted the issue in the tracker. Thanks for your help.

-Brent

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: storing and accessing dialog module flags and vals

Bogdan-Andrei Iancu
Brent Thomson wrote:

> Bogdan-Andrei Iancu wrote:
>  
>>> INVITE
>>> setflag(4)
>>> create_dialog() # returns true
>>> store_dlg_value("foo", "bar")
>>> set_dlg_flag("10")
>>>
>>>
>>> CANCEL
>>> create_dialog() # returns false
>>> fetch_dlg_value("foo", "$avp(i:2)") # returns empty
>>> is_dlg_flag_set("10") # returns false
>>>  
>>>      
>> hmm... I see your point. actually the CANCEL is not matched against the
>> dialog at all at this point, this is why you do not get the dialog info
>> there.
>>
>> But I think it should be there, so please open a bug report on the
>> tracker and I will take care of it.
>>
>>    
>
> Cool. I've submitted the issue in the tracker. Thanks for your help.
>  

Thanks - Got it and assigned it me; I will work it out for 1.6

Regards,
Bogdan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: storing and accessing dialog module flags and vals

Brent Thomson
Thanks. I'll watch the tracker and patch my build once you've got a  
fix. Let me know if there's anything I can do to help.

-Brent

On Sep 4, 2009, at 6:48 AM, Bogdan-Andrei Iancu <bogdan@voice-
system.ro> wrote:

> Brent Thomson wrote:
>> Bogdan-Andrei Iancu wrote:
>>
>>>> INVITE
>>>>    setflag(4)
>>>>    create_dialog() # returns true
>>>>    store_dlg_value("foo", "bar")
>>>>    set_dlg_flag("10")
>>>>
>>>>
>>>> CANCEL
>>>>    create_dialog() # returns false
>>>>    fetch_dlg_value("foo", "$avp(i:2)") # returns empty
>>>>    is_dlg_flag_set("10") # returns false
>>>>
>>>>
>>> hmm... I see your point. actually the CANCEL is not matched  
>>> against the
>>> dialog at all at this point, this is why you do not get the dialog  
>>> info
>>> there.
>>>
>>> But I think it should be there, so please open a bug report on the
>>> tracker and I will take care of it.
>>>
>>>
>>
>> Cool. I've submitted the issue in the tracker. Thanks for your help.
>>
>
> Thanks - Got it and assigned it me; I will work it out for 1.6
>
> Regards,
> Bogdan
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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