Hello all,<br><br> Got a question for those well versed on the Dialog Module. I have it working great against a db, but it seems to me that -although there's nothing on the module's documentations to indicate it- Dialogs are inserted on the table once the initial transaction is finished, i.e. 200 OK.<br>
<br>Here's my script...<br><br>#<br># $Id: openser.cfg 1827 2007-03-12 15:22:53Z bogdan_iancu $<br>#<br># simple quick-start config script<br># Please refer to the Core CookBook at <a href="http://www.openser.org/dokuwiki/doku.php">http://www.openser.org/dokuwiki/doku.php</a><br>
# for a explanation of possible statements, functions and parameters.<br>#<br><br># ----------- global configuration parameters ------------------------<br>debug=3 # debug level (cmd line: -dddddddddd)<br>fork=yes<br>
log_stderror=no # (cmd line: -E)<br>children=4<br>check_via=no<br>dns=no<br>rev_dns=no<br>listen=A.B.C.D<br>disable_dns_blacklist=true<br>port=5060<br><br>#set module path<br>mpath="/lib/openser/modules/"<br><br>
# ------------------ module loading ----------------------------------<br>loadmodule "mysql.so"<br>loadmodule "maxfwd.so"<br>loadmodule "sl.so"<br>loadmodule "dispatcher.so"<br>loadmodule "tm.so"<br>
loadmodule "mi_fifo.so"<br>loadmodule "textops.so"<br>loadmodule "xlog.so"<br>loadmodule "rr.so"<br>loadmodule "avpops.so"<br>loadmodule "dialog.so"<br><br>modparam("mi_fifo","fifo_name", "/tmp/openser_fifo")<br>
#Timer which hits if no final reply for a request<br>#or ACK for a negative INVITE reply arrives<br>modparam("tm", "fr_timer", 5)<br><br>modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")<br>
modparam("dispatcher", "flags", 2)<br>modparam("dispatcher", "force_dst", 1)<br>modparam("dispatcher", "dst_avp", "$avp(i:271)")<br>modparam("dispatcher", "grp_avp", "$avp(i:272)")<br>
modparam("dispatcher", "cnt_avp", "$avp(i:273)")<br><br>modparam("avpops","avp_url","mysql://user:pass@localhost/openser")<br>modparam("avpops", "avp_table", "dialog")<br>
<br>modparam("rr","enable_full_lr", 1)<br><br>modparam("dialog", "dlg_flag", 4)<br>modparam("dialog", "db_mode", 1)<br>modparam("dialog", "dlg_match_mode", 1)<br>
modparam("dialog", "db_url", "mysql://user:pass@localhost/openser")<br><br>route{<br> # initial sanity checks -- messages with<br> # max_forwards==0, or excessively long requests<br> if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br> exit;<br> };<br><br> if (msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> exit;<br>
};<br><br> if(loose_route()) {<br> append_hf("P-hint: rr-enforced\r\n");<br> route(1);<br> };<br> <br> if (!method=="REGISTER")<br> record_route();<br><br>
if (method=="INVITE") { <br> setflag(4);<br> xlog("L_ERR","OPENSER: NEW INVITE $ru -> $ci \n");<br> };<br><br> if (method=="BYE"||method=="CANCEL") {<br>
setflag(4);<br> xlog("L_ERR","OPENSER: DISCONNECT $ru -> $ci \n");<br> };<br><br> if ( method=="INVITE" || method=="ACK" || method=="BYE" || method=="OPTIONS" || method=="CANCEL" ) {<br>
ds_select_dst("1","2");<br> t_on_reply("1");<br> t_on_failure("1");<br> t_relay();<br> exit;<br> };<br> <br>}<br><br>route[1] {<br>
<br> # Forward Statefully<br> t_on_reply("1");<br> t_on_failure("1");<br> if(!t_relay()){<br> sl_reply_error();<br> };<br> exit;<br>}<br><br>failure_route[1] {<br><br>
if (t_check_status("408")) {<br> xlog("L_INFO","Marking GW as failed...\n");<br> ds_mark_dst("p");<br> ds_next_dst();<br> t_on_failure("1");<br>
t_relay();<br> } else{<br> t_reply("501","Not Implemented");<br> xlog("L_ERR","OPENSER: FAILED $ru -> $ci \n");<br> }<br>
}<br><br><br><br><br>thanks to all<br><br><br>David<br>