[SR-Users] RES: Suggestion dialog module / $dlg_ctx() problem.

Alexandre Abreu alexandre.abreu at redt.com.br
Wed Mar 30 19:05:05 CEST 2011


Hi Timo,

Maybe I wasn't clear but access dialog data in the script it's not the issue
right now. My goal at this moment is to add a variable from the script into
the dialog _and_ make this information available from 'dlg_list_ctx' fifo
command.

I am justing parsing the output of 'dlg_list_ctx' and I am trying to include
the user-agent information in the attributes list. The user-agent
information is available from the script ($ua).

Thanks,
Alexandre

-----Mensagem original-----
De: Timo Reimann [mailto:timo.reimann at 1und1.de] 
Enviada em: quarta-feira, 30 de março de 2011 13:24
Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Alexandre Abreu
Assunto: Re: [SR-Users] Suggestion dialog module / $dlg_ctx() problem.

Hey,


On 30.03.2011 17:55, Alexandre Abreu wrote:
> Using K 3.1.2. Before the setflag() that creates the dialog, I tried to
use:
> 
>  
> $dlg_ctx(flags) = 1;
> 
>  
> 
> Mar 30 12:29:03 devel kamailio: ERROR: dialog [dlg_var.c:165]: unknown 
> PV name flags

I think the problem is that when using the flag to track dialogs, the module
function that's actually responsible for starting the tracking
(dlg_onreq()) kicks in only after the script has finished, which,
unfortunately, is too late.


> Does this suggestion make sense? Using another approach is it possible 
> to execute this today?

Try calling dlg_manage() before you access dialog context data in the
script. I can't tell if it works for context data but it does for dialog
profiles.

If it still fails, an approach I'd suggest is to automatically trigger
dialog creation when the user tries to access dialog data for the first
time.


HTH,

--Timo




More information about the sr-users mailing list