[OpenSIPS-Users] get_dialog_info Issues
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Sep 1 11:50:54 CEST 2010
Hi Ross,
To use get_dialog_info() and dlg_val's you must create the dialog before
(see create_dialog() function in dialog module) - otherwise all dialog
ops are invalid.
Regards,
Bogdan
Ross Beer wrote:
> Hi,
>
> I am using the following piece of code to set dlg_val and then using
> get_dialog_info to check to see if a user already has a call and if so
> pass the new call to the same gateway for attended transfer.
>
> The code works perfectly if in the same dialog, i.e. when an invite is
> sent and then requires authentication however it does not appear to
> match any results across different dialogs. Also I can not see any
> values in the 'vars' column in the dialog database.
>
> Am I using the feature correctly?
>
> # IS PART OF EXISTING CALL
> if (get_dialog_info("server","$var(x)","user","$fU"))
> {
> xlog("************Log: Seen Before Call *************\n");
> xlog("Log: Belonds to server: $var(x)\n");
> $du=$var(x);
> ## ADD VARIABLE TO ROUTE GATEWAY
> $dlg_val("server") = $var(x);
> $dlg_val("user") = $fU;
> route(1);
> exit;
> }
> else
> {
> xlog("************Log: New INVITE *************\n");
> ds_select_dst("1", "4");
> xlog("LB Sent To $avp(i:271)\n");
>
> store_dlg_value("server","$avp(i:271)");
> store_dlg_value("user","$fU");
> #$dlg_val(server) = $avp(i:271);
> #$dlg_val(user) = $fU;
> route(1);
> exit;
> }
>
> Kind regards,
>
> Ross
>
> PS - Sorry this is a duplicate but my gmail account doesn't seam to
> post messages to the mailing list
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list