[OpenSIPS-Devel] [NEW] exchanging info between dialogs
Richard Revels
rrevels at bandwidth.com
Sun Jun 13 01:30:26 CEST 2010
I'm having a bit of a problem with this functionality and re-invites. The call comes in, a dialog is created, a dialog flag is set, and a couple of values are stored in the dialog. When the called party re-invites I want to look at those values so started trying with checking the dialog flag. That came up empty so I decided that Opensips was thinking of this as a new dialog (hmm). No big deal, I would use get_dialog_info.
The if block around get_dialog_info never triggers and the debug log indicates the dialog is not found.
Jun 12 22:40:38 guinea-pig2 osips-log[14664]: DBG:dialog:get_dlg_by_val: dlg in state 4 to check
Jun 12 22:40:38 guinea-pig2 osips-log[14664]: DBG:dialog:w_get_dlg_info: no dialog found
Since the dialog flag check works just fine in the BYE block, I decided to try the get_dialog_info there as well even though the current dialog would also be the one I was searching for. It worked just fine using the same logic and values I am sending in from the re-invite block.
Jun 12 23:14:13 guinea-pig2 osips-log[15011]: DBG:dialog:fetch_dlg_value: looking for <credit_user>
Jun 12 23:14:13 guinea-pig2 osips-log[15011]: DBG:dialog:fetch_dlg_value: var found-> <9194395395>!
Richard
On Apr 28, 2010, at 11:46 AM, Bogdan-Andrei Iancu wrote:
> Hi,
>
> just added to the dialog module a new function that allow you to
> exchange data between dialogs - mainly to extract data from a different
> ongoing dialog.
>
> Such functionality is vital in complex scenarios (PBX related) like
> attended call transfer - in such cases you may want to route a new call
> based on information of existing dialogs.
>
> Real case example:
>
> OpenSIPS is doing dispatching over a set of Asterisk boxes (which
> act as SIP servers).
> A calls B and the call is established (by dispatching from OpenSIPS)
> via A1 Asterisk server
> A wants to transfer B to a new party C, so A makes a new call to C
> -> this call must end on A1 also, without going via dispatcher in openSIPS.
> So, when A calls C, OpenSIPS will check if A has an already existing
> call and if so, it will send the new call to the same Asterisk box as
> the existing call.
>
> In such a case, for each call, you need to attached to the call (as
> dialog variables) the callee, caller and the Asterisk box . When a new
> call is coming, you check if the new caller is already involved in a
> call and if so, fetch the value of the proxy in order to send to the
> same box.
>
> For more about the technical details of the function, see
> http://www.opensips.org/html/docs/modules/devel/dialog.html#id272137
>
> Regards,
> Bogdan
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
More information about the Devel
mailing list