[OpenSIPS-Users] variable info in dlg_list_ctx

Satish Patel satish.txt at gmail.com
Thu Mar 5 18:24:43 CET 2015


After i added create_dialog();   on top of the file then it allowed me to
set variable,

Just wondering what it does?  is it going to harm if i am using it? because
i never use before and everything seems working so what is the advantage of
having create_dialog();

On Thu, Mar 5, 2015 at 12:22 PM, Satish Patel <satish.txt at gmail.com> wrote:

> ignore last email, it was my variable issue. I got it work now :)
>
> Thanks you very much!
>
> On Thu, Mar 5, 2015 at 12:15 PM, Satish Patel <satish.txt at gmail.com>
> wrote:
>
>> I am not seeing my custom variable in MI output also i got this error in
>> logs
>>
>> ERROR:core:do_assign: setting PV failed
>>
>> On Thu, Mar 5, 2015 at 12:04 PM, Liviu Chircu <liviu at opensips.org> wrote:
>>
>>>  Yes. You should see that value in the dlg_list_ctx MI command.
>>>
>>>
>>> On 05.03.2015 18:56, Satish Patel wrote:
>>>
>>> You means say i just need to add following in in top of config?
>>>
>>>  route {
>>>
>>>            ...
>>>           ...
>>>           create_dialog();
>>>           $dlg_val(customer_name) = $var(name);
>>>
>>>
>>> On Thu, Mar 5, 2015 at 11:46 AM, Liviu Chircu <liviu at opensips.org>
>>> wrote:
>>>
>>>>  The dialog must be created, otherwise setting your $dlg_val will fail
>>>> (check for "ERROR:core:do_assign: setting PV failed")
>>>>
>>>> The code you posted is for sequential request handling. Normally, the
>>>> dialog should have been created by the time this block is reached.
>>>>
>>>>
>>>> On 05.03.2015 18:39, Satish Patel wrote:
>>>>
>>>> Thanks Liviu,
>>>>
>>>>  Where should i put this variable in script? I have following code,
>>>> should i before it create dialog?
>>>>
>>>>
>>>>   if (has_totag()) {
>>>>                 # sequential request withing a dialog should
>>>>                 # take the path determined by record-routing
>>>>                 if (loose_route() || match_dialog())  {
>>>>                         if ($DLG_status!=NULL && !validate_dialog() ) {
>>>>                                 #xlog(" in-dialog bogus request \n");
>>>>                                 fix_route_dialog();
>>>>                          } else {
>>>>                                  #xlog(" in-dialog valid request -
>>>> $DLG_dir !\n");
>>>>                                  fix_route_dialog();
>>>>                         }
>>>>
>>>>
>>>> On Thu, Mar 5, 2015 at 11:32 AM, Liviu Chircu <liviu at opensips.org>
>>>> wrote:
>>>>
>>>>>  Hello Satish,
>>>>>
>>>>> You can use dialog-persistent variables [1]. For example,
>>>>> $dlg_var(customer_name) = $var(name);
>>>>>
>>>>> [1] :
>>>>> http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id297182
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Liviu Chircu
>>>>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>>>>
>>>>>  On 05.03.2015 18:27, Satish Patel wrote:
>>>>>
>>>>>  Hello,
>>>>>
>>>>>  How do i add customer info in opensipsctl fifo dlg_list_ctx output?
>>>>>
>>>>>  I want to add custom field ( customer name) in dlg_list_ctx output
>>>>>
>>>>>
>>>>>  _______________________________________________
>>>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> 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/20150305/082b0351/attachment-0001.htm>


More information about the Users mailing list