[OpenSER-Users] Dialog module... again!
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Jun 10 14:30:48 CEST 2008
Hi David,
yes, the dialogs are written into DB only when they are established
(after 200 OK). Early dialogs are not dumped.
Regards,
Bogdan
David Villasmil wrote:
> Hello all,
>
> 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.
>
> Here's my script...
>
> #
> # $Id: openser.cfg 1827 2007-03-12 15:22:53Z bogdan_iancu $
> #
> # simple quick-start config script
> # Please refer to the Core CookBook at
> http://www.openser.org/dokuwiki/doku.php
> # for a explanation of possible statements, functions and parameters.
> #
>
> # ----------- global configuration parameters ------------------------
> debug=3 # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no # (cmd line: -E)
> children=4
> check_via=no
> dns=no
> rev_dns=no
> listen=A.B.C.D
> disable_dns_blacklist=true
> port=5060
>
> #set module path
> mpath="/lib/openser/modules/"
>
> # ------------------ module loading ----------------------------------
> loadmodule "mysql.so"
> loadmodule "maxfwd.so"
> loadmodule "sl.so"
> loadmodule "dispatcher.so"
> loadmodule "tm.so"
> loadmodule "mi_fifo.so"
> loadmodule "textops.so"
> loadmodule "xlog.so"
> loadmodule "rr.so"
> loadmodule "avpops.so"
> loadmodule "dialog.so"
>
> modparam("mi_fifo","fifo_name", "/tmp/openser_fifo")
> #Timer which hits if no final reply for a request
> #or ACK for a negative INVITE reply arrives
> modparam("tm", "fr_timer", 5)
>
> modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")
> modparam("dispatcher", "flags", 2)
> modparam("dispatcher", "force_dst", 1)
> modparam("dispatcher", "dst_avp", "$avp(i:271)")
> modparam("dispatcher", "grp_avp", "$avp(i:272)")
> modparam("dispatcher", "cnt_avp", "$avp(i:273)")
>
> modparam("avpops","avp_url","mysql://user:pass@localhost/openser")
> modparam("avpops", "avp_table", "dialog")
>
> modparam("rr","enable_full_lr", 1)
>
> modparam("dialog", "dlg_flag", 4)
> modparam("dialog", "db_mode", 1)
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "db_url", "mysql://user:pass@localhost/openser")
>
> route{
> # initial sanity checks -- messages with
> # max_forwards==0, or excessively long requests
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483","Too Many Hops");
> exit;
> };
>
> if (msg:len >= 2048 ) {
> sl_send_reply("513", "Message too big");
> exit;
> };
>
> if(loose_route()) {
> append_hf("P-hint: rr-enforced\r\n");
> route(1);
> };
>
> if (!method=="REGISTER")
> record_route();
>
> if (method=="INVITE") {
> setflag(4);
> xlog("L_ERR","OPENSER: NEW INVITE $ru -> $ci \n");
> };
>
> if (method=="BYE"||method=="CANCEL") {
> setflag(4);
> xlog("L_ERR","OPENSER: DISCONNECT $ru -> $ci \n");
> };
>
> if ( method=="INVITE" || method=="ACK" || method=="BYE" ||
> method=="OPTIONS" || method=="CANCEL" ) {
> ds_select_dst("1","2");
> t_on_reply("1");
> t_on_failure("1");
> t_relay();
> exit;
> };
>
> }
>
> route[1] {
>
> # Forward Statefully
> t_on_reply("1");
> t_on_failure("1");
> if(!t_relay()){
> sl_reply_error();
> };
> exit;
> }
>
> failure_route[1] {
>
> if (t_check_status("408")) {
> xlog("L_INFO","Marking GW as failed...\n");
> ds_mark_dst("p");
> ds_next_dst();
> t_on_failure("1");
> t_relay();
> } else{
> t_reply("501","Not Implemented");
> xlog("L_ERR","OPENSER: FAILED $ru -> $ci \n");
> }
> }
>
>
>
>
> thanks to all
>
>
> David
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list