[SR-Users] Dialog order of operations
Alex Balashov
abalashov at evaristesys.com
Mon Mar 2 16:45:50 CET 2015
Daniel,
Thanks for that insight. Where exactly is the association between an initial invite and a dialog profile kept, if no dialog structure has yet been malloc'd? Is it in shared or package memory? How exactly is such an association destroyed? Is it garbage-collected, or explicitly deleted if, for example, script processing of an initial invite is aborted with 'exit'?
--
Sent from my BlackBerry. Please excuse errors and brevity.
Original Message
From: Daniel-Constantin Mierla
Sent: Monday, March 2, 2015 2:53 AM
To: Kamailio (SER) - Users Mailing List
Reply To: miconda at gmail.com
Subject: Re: [SR-Users] Dialog order of operations
Hello,
it should be ok to set a profile or a dlg variable before creating the
dialog. They are kept in the context of the process and destroyed if the
dialog is no longer created for the current sip message.
Cheers,
Daniel
On 26/02/15 20:49, Alex Balashov wrote:
> Hi,
>
> The dialog module documentation remains unclear about the order of
> operations with regard to when to call dlg_manage() or set the
> transaction flag.
>
> My impression is that dlg_manage() only registered TM callbacks, so it
> doesn't matter when you call it, as long as it's before t_relay().
> However, the documentation neither confirms nor denies this.
>
> So, this raises the questions:
>
> 1) Is this okay?
>
> set_dlg_profile("caller", "$fU");
> dlg_manage();
> ...
> t_relay();
>
> Or do I need to do this?
>
> dlg_manage();
> set_dlg_profile("caller", "$fU");
> ...
> t_relay();
>
> 2) What about setting dialog-persistent variables? Is this okay?
>
> $dlg_var(account_id) = 49555;
> dlg_manage();
>
> If so, where does the variable go if I never call dlg_manage() because
> the call is aborted beforehand, e.g.
>
> $dlg_var(account_id) = 49555;
>
> sl_send_reply("403", "Forbidden");
> exit;
>
> dlg_manage();
>
> ...
>
> t_relay();
>
> 3) Any other gotchas or caveats in relation to the order of operations?
>
> I suppose my preference would be to set the dialog profiles in various
> places throughout call processing and call dlg_manage() at the very
> end, right before t_relay(). Is this acceptable?
>
> Thanks,
>
> -- Alex
>
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
More information about the sr-users
mailing list