[OpenSIPS-Users] OpenSER Dispatcher Failures

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Aug 12 17:27:02 CEST 2009


Hi Alec,

The script looks ok - what are the values for fr_timer and fr_inv_timer 
in TM module ?

Regards,
Bogdan

Alec Fett wrote:
> When I was testing my dispatcher setup with sipp, I noticed after a 
> number of calls go through, failure_route will get called, even though
> I have a generous timeout value and the gateways are under no 
> significant load.
>
> In my manual, (with phone) tests, the dispatcher never encountered the 
> problem (until I had a live number on, and many calls went through), so 
> perhaps it is more related to the speed of calls coming in...
>
> I had the failure_route mark the gateway inactive so I would no as soon 
> as it occurred... a good number of calls went through before the problem 
> was encountered.
>
> ####### Global Parameters #########
>
> debug=6
> log_stderror=no
> log_facility=LOG_LOCAL0
>
> fork=yes
> children=4
>
> /* uncomment the next line to disable TCP (default on) */
> disable_tcp=yes
>
> /* uncomment the next line to enable the auto temporary blacklisting of
>    not available destinations (default disabled) */
> #disable_dns_blacklist=no
>
> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>    lookup failures (default disabled) */
> #dns_try_ipv6=yes
>
> /* uncomment the next line to disable the auto discovery of local aliases
>    based on revers DNS on IPs (default on) */
> #auto_aliases=no
>
> port=5060
> listen=udp:XXX.XXX.XXX.XXX:5060
>
>
> ####### Modules Section ########
>
> #set module path
> mpath="/usr/lib/openser/modules/"
>
>
> #basic modules for load balancing
>
> loadmodule "maxfwd.so"
> loadmodule "sl.so"
> loadmodule "dispatcher.so"
> loadmodule "tm.so"
>
>
> /* additional modules loaded */
> loadmodule "mysql.so"
> loadmodule "textops.so"
> loadmodule "mi_fifo.so"
> loadmodule "xlog.so"
> loadmodule "exec.so"
>
>
> # ----------------- setting module-specific parameters ---------------
>
> #TM params
>
> modparam("tm", "fr_timer", 3)
> modparam("tm", "fr_inv_timer", 5)
>
>
> # ----- mi_fifo params -----
> modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
> modparam("mi_fifo", "fifo_mode", 0666)
>
> #-----dispatcher params------
> # modparam("dispatcher", "force_dst", 1)
> modparam("dispatcher", "flags", 2)
>
> modparam("dispatcher", "dst_avp", "$avp(i:271)")
> modparam("dispatcher", "grp_avp", "$avp(i:272)")
> modparam("dispatcher", "cnt_avp", "$avp(i:273)")
>
>
> #modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list") 
> #text file config
> modparam("dispatcher", "db_url", 
> "mysql://openser:openser@localhost/openser")
>
>
> modparam("dispatcher", "ds_ping_method", "OPTIONS")   #OPTIONS OR INFO
> modparam("dispatcher", "ds_ping_from", "sip:openser at siprouter.private")
> modparam("dispatcher", "ds_ping_interval", 5)
> modparam("dispatcher", "ds_probing_threshhold", 2)
>
>
>
>
>
> ####### Routing Logic ########
>
>
> # main request routing logic
>
> route{
> xlog("L_INFO","Route Called :)\n");
>
>     if( src_ip== 10.1.10.0/24){
>         route(1);
>     }
>     else{
>         sl_send_reply("403","Forbidden");
>         xlog("L_INFO", "Unauthorized IP address $si TO $ou Sent 403\n");
>         exit;
>     }
>  
> }
>
> route[1]{
>     if(ds_select_dst("1","0")){
>         t_on_reply("1");
>         t_on_failure("1");
>         t_relay();
>     }
>     else{
>         if(is_method("INVITE")){
>             sl_send_reply("600","Busy everywhere.");
>             xlog("L_INFO","ALL DESTINATIONS FAILED!\n");
>             #exec_msg("/usr/bin/nohup /usr/scripts/sip-failed.php 
> all_destinations_down_1 '$si' '$rU' '$fu'");
>             exit;
>         }
>     }
> }
>
>
> failure_route[1]{
>     xlog("L_INFO","Called failure_route!\n");
>     ds_mark_dst("0");
>    
>     if(ds_next_dst()){
>         xlog("L_INFO","Failure route, trying again\n");
>         t_on_reply("1");
>         t_on_failure("1");
>         t_relay();
>     }
>     else{
>         if(is_method("INVITE")){
>             t_reply("503","Service Unavailable.");
>             xlog("L_INFO","ALL DESTINATIONS FAILED!\n");
>            #exec_msg("/usr/bin/nohup /usr/scripts/sip-failed.php 
> all_destinations_down_2 '$si' '$rU' '$fu'");
>         }
>     }
> ###############End of Config################################
>
>
>
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:core:parse_to: end 
> of header reached, state=10
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:core:parse_to: 
> display={sut}, ruri={sip:service at XXXXXXXXXXX16:5060}
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:core:get_hdr_field: <To> [39]; uri=[sip:service at XXXXXXXXXXX16:5060]
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:core:get_hdr_field: to body [sut 
> <sip:service at XXXXXXXXXXX16:5060>#015#012]
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:core:get_hdr_field: cseq <CSeq>: <1> <INVITE>
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:core:parse_headers: flags=8
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:tm:t_reply_matching: hash 500 label 764062811 branch 0
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:tm:t_reply_matching: REF_UNSAFE: after is 1
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:tm:t_reply_matching: reply matched (T=0x7f0bec0c1198)!
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:tm:t_check: 
> end=0x7f0bec0c1198
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:tm:reply_received: 
> org. status uas=100, uac[0]=0 local=0 is_invite=1)
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> WARNING:core:run_actions: null action list (rec_level=1)
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:tm:t_should_relay_response: T_code=100, new_code=100
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:tm:relay_reply: 
> branch=0, save=0, relay=-1
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:tm:set_timer: 
> relative timeout is 5
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:tm:insert_timer_unsafe: [1]: 0x7f0bec0c13e8 (46)
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:tm:t_unref: 
> UNREF_UNSAFE: after is 0
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: 
> DBG:core:destroy_avp_list: destroying list (nil)
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28587]: DBG:core:receive_msg: 
> cleaning up
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: DBG:tm:utimer_routine: 
> timer routine:4,tl=0x7f0bec0b6258 next=(nil), timeout=42000000
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: DBG:tm:timer_routine: 
> timer routine:1,tl=0x7f0bec047570 next=0x7f0bec043e48, timeout=42
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: 
> DBG:tm:final_response_handler: stop retr. and send CANCEL (0x7f0bec047320)
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: 
> DBG:tm:t_should_relay_response: T_code=100, new_code=408
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: DBG:tm:t_pick_branch: 
> picked branch 0, code 408
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: 
> DBG:tm:is_3263_failure: dns-failover test: branch=0, last_recv=408, flags=2
> Aug  7 10:49:33 phonev2 /usr/sbin/openser[28592]: Called failure_route!
>
> ^^That was the first time failure_route was called...
>
> I even commented out my alert script, in case it was screwing up 
> openSER... no difference.
> Is there something wrong with my routing script?
>
> Regards,
>
> Alec
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list