[OpenSIPS-Users] Persistent variables within B2B dialog

Duane Larson duane.larson at gmail.com
Sat Apr 21 00:22:32 CEST 2012


Is it possible to keep a persistent variable throughout a dialog when using
the B2B module?  I tried the Dialog modules (set_dlg_flag() and
is_dlg_flag_set()) and $dlg_val variable but none worked.  Not sure why.

route[b2b_request] {

        if (search_body("a=sendonly") && method == "INVITE"){
                xlog("SEARCHING: rm [$rm]  BING BING FOUND IT\n");

                create_dialog();

                $dlg_val("IsHolding") = "1";

#               set_dlg_flag("3");
        };

$var(IsHolding) = $dlg_val("IsHolding");
xlog("************************************************* var is
[$var(IsHolding)] and call is rm [$rm]\n");
        #if (is_dlg_flag_set("3") && method == "ACK"){
        if ($var(IsHolding) == "1" && method == "ACK"){
                xlog("***********SEARCHING***********: rm [$rm]  WE HAVE AN
ACK and VarISHolding equals one\n");
        };

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120420/1e20d1f6/attachment.htm>


More information about the Users mailing list