Hi, When accessing the dialog context for a sequential request (like ACK, BYE), be sure you do it after loose_route() function - this function is the one matching the request to the internal dialog and exposing the dialog context.
Regards, Bogdan liuf wrote: > I have the same problem as the topic " > http://n2.nabble.com/storing-and-accessing-dialog-module-flags-and-vals-td3562938.html > storing and accessing dialog module flags and vals ", I can't access any of > the dialog vals that I set on previous messages. Am I missing something? > > I've check out the newest source (20100202), and add the following based on > the default opensips.cfg. > > opensips.cfg > ============================================================== > ...... > > loadmodule "dialog.so" > > ...... > > route{ > > if (!mf_process_maxfwd_header("10")) { > sl_send_reply("483","Too Many Hops"); > exit; > } > > if (is_method("INVITE")) { > create_dialog(); > store_dlg_value("test_src_ip","192.168.3.60"); > fetch_dlg_value("test_src_ip","$var(test_src_ip_0)"); > xlog("### test_src_ip_0 = $var(test_src_ip_0) ###"); # output > 192.168.3.60 > } > > if (is_method("BYE")) { > fetch_dlg_value("test_src_ip","$var(test_src_ip_1)"); > xlog("### test_src_ip_1 = $var(test_src_ip_1) ###"); # output 0 > } > > if (has_totag()) { > # sequential request withing a dialog should > # take the path determined by record-routing > if (loose_route()) { > > ...... > > ============================================================== > -- Bogdan-Andrei Iancu www.voice-system.ro _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
