[Serusers] issues with bindings

Klaus Darilion klaus.mailinglists at pernau.at
Wed Mar 24 09:13:46 CET 2004


just a guess: if ser was shut down for some time and then started again, 
ser reads all the contacts from the database. Meanwhile all this 
bindings have expired and will be removed.

Klaus

goddess hekate wrote:
> Hi,
> 
> I understand what you are saying, but I have had two specific events 
> with all of the bindings expiring at once, and ser doesn't seem to be 
> processing new register requests from 20 different devices.  Then the 
> phones become useless.  This has only happened two times but it has not 
> happened in the past week.
> 
> Mar 16 12:30:41 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'bshamah','sip:bshamah at 10.10.10.118:5060;transport=udp' has expired
> Mar 16 12:30:42 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'nmistry','sip:nmistry at 10.10.10.95:5060;transport=udp' has expired
> Mar 16 12:30:43 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'gnoah','sip:gnoah at 10.10.10.95:5060;transport=udp' has expired
> Mar 16 12:30:44 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'benm','sip:Benm at 10.10.10.181:11793' has expired
> Mar 16 12:30:44 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'conference1','sip:conference1 at 10.10.10.199:5060;transport=udp' has expired
> Mar 16 12:30:45 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'conference2','sip:conference2 at 10.10.10.199:5060;transport=udp' has expired
> Mar 16 12:30:45 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'jwagner','sip:jwagner at 10.10.10.118:5060;transport=udp' has expired
> Mar 16 12:31:48 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'mdeguzman','sip:mdeguzman at 10.10.10.183:5060;transport=udp' has expired
> Mar 16 12:31:49 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'erollins','sip:erollins at 10.10.10.130:5060;transport=udp' has expired
> Mar 16 12:31:49 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'sgaudio','sip:sgaudio at 10.10.10.130:5060;transport=udp' has expired
> Mar 16 12:31:50 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'benm','sip:benm at 10.10.10.183:5060;transport=udp' has expired
> Mar 16 12:31:51 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'rhollowell','sip:rhollowell at 10.10.10.176:5060' has expired
> Mar 16 12:32:54 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'rsandler','sip:rsandler at 10.10.10.182:5060' has expired
> Mar 16 12:32:55 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'ewest','sip:ewest at 10.10.10.154:5060' has expired
> Mar 16 12:33:58 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'fax1','sip:fax1 at 10.10.10.108:5060;transport=udp' has expired
> Mar 16 12:33:58 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'fax2','sip:fax2 at 10.10.10.108:5060;transport=udp' has expired
> Mar 16 12:33:59 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'pkong','sip:pkong at 10.10.10.184:5060' has expired
> Mar 16 12:36:05 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'm1','sip:m1 at 10.10.10.252:5060;transport=udp' has expired
> Mar 16 12:36:05 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'm2','sip:m2 at 10.10.10.252:5060;transport=udp' has expired
> Mar 16 12:36:06 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'bkern','sip:10.10.10.195:9245' has expired
> Mar 16 12:37:09 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'gnoah','sip:gnoah at 10.10.10.95:5060;transport=udp' has expired
> Mar 16 12:37:09 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'jnorwood','sip:jnorwood at 10.10.10.102:5060' has expired
> Mar 16 12:37:10 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'jlin','sip:jlin at 223.1.1.128:5060' has expired
> Mar 16 12:38:13 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'info','sip:info at 10.10.10.137:5060' has expired
> Mar 16 12:38:14 jiffypop /usr/local/sbin/ser[5255]: Binding 
> 'nmistry','sip:nmistry at 10.10.10.95:5060;transport=udp' has expired
> 
> 
> 
> 
> 
> 
> 
>> From: Jiri Kuthan <jiri at iptel.org>
>> To: "goddess hekate" <goddess_hekate at hotmail.com>, serusers at lists.iptel.org
>> Subject: Re: [Serusers] issues with bindings
>> Date: Tue, 23 Mar 2004 00:55:04 +0100
>>
>> At 12:47 AM 3/23/2004, goddess hekate wrote:
>> >Hello,
>> >
>> >Two times in the past week I have had some issues with the bindings 
>> of the sip mapping expiring:
>> >
>> >Binding 'user','sip:user at x.x.x.x:5060' has expired
>> >
>> >Does anyone know what this is and why it happens?
>>
>> Because it is not refreshed. Bindings are sof-state -- if not 
>> refreshed by
>> new REGISTERs they will go.
>>
>> -jiri
>>
>> >  I appreciate any input you may have.
>> >
>> >Thanks,
>> >
>> >Hekate
>> >
>> >_________________________________________________________________
>> >All the action. All the drama. Get NCAA hoops coverage at MSN Sports 
>> by ESPN. http://msn.espn.go.com/index.html?partnersite=espn
>> >
>> >_______________________________________________
>> >Serusers mailing list
>> >serusers at lists.iptel.org
>> >http://lists.iptel.org/mailman/listinfo/serusers
>>
>> -- 
>> Jiri Kuthan            http://iptel.org/~jiri/
>>
> 
> _________________________________________________________________
> Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
> http://toolbar.msn.com/go/onm00200414ave/direct/01/
> #
> # $Id: ser.cfg,v 1.20 2003/05/31 21:12:19 jiri Exp $
> #
> # config script with voicemail, PSTN dial-out functionality
> #
> 
> # ----------- global configuration parameters ------------------------
> 
> debug=4         # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no    # (cmd line: -E)
> 
> # Uncomment these lines to enter debugging mode
> /*
> debug=3
> fork=no
> log_stderror=yes
> */
> 
> check_via=no    # (cmd. line: -v)
> dns=no           # (cmd. line: -r)
> rev_dns=no      # (cmd. line: -R)
> port=5060
> children=5
> fifo="/tmp/ser_fifo"
> #sip_warning=no
> group="serfifo"
> fifo_mode=0660
> 
> #
> # ------------------ module loading ----------------------------------
> #
> # Uncomment this if you want to use SQL database
> loadmodule "/usr/local/lib/ser/modules/mysql.so"
> #
> loadmodule "/usr/local/lib/ser/modules/sl.so"
> loadmodule "/usr/local/lib/ser/modules/tm.so"
> loadmodule "/usr/local/lib/ser/modules/rr.so"
> loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> loadmodule "/usr/local/lib/ser/modules/registrar.so"
> loadmodule "/usr/local/lib/ser/modules/vm.so"
> loadmodule "/usr/local/lib/ser/modules/pa.so"
> loadmodule "/usr/local/lib/ser/modules/msilo.so"
> loadmodule "/usr/local/lib/ser/modules/acc.so"
> loadmodule "/usr/local/lib/ser/modules/textops.so"
> loadmodule "/usr/local/lib/ser/modules/uri.so"
> loadmodule "/usr/local/lib/ser/modules/group.so"
> #
> loadmodule "/usr/local/lib/ser/modules/nathelper.so"
> # Uncomment this if you want digest authentication
> # mysql.so must be loaded !
> loadmodule "/usr/local/lib/ser/modules/auth.so"
> loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> #
> # ----------------- setting module-specific parameters ---------------
> #
> # -- usrloc params --
> #
> #modparam("usrloc", "db_mode",   0)
> #
> # Uncomment this if you want to use SQL database
> # for persistent storage and comment the previous line
> modparam("usrloc", "db_mode", 1)
> #
> # -- auth params --
> # Uncomment if you are using auth module
> 
> modparam("auth", "rpid_prefix", "650846")
> # Uncomment and change the following line to change the rpid suffix 
> -20040126; gnoah
> #modparam("auth", "rpid_suffix", 
> ";party=calling;id-type=subscriber;screen=yes") #these are the default 
> values
> #
> # -- auth_db params --
> #
> modparam("auth_db","db_url","sql://ser:heslo@localhost/ser")
> modparam("auth_db", "use_rpid", 1)
> modparam("auth_db","rpid_column", "phone") #rpid is the default column; 
> make sure it exists in subscriber table
> modparam("auth_db", "calculate_ha1", yes)
> #
> # If you set "calculate_ha1" parameter to yes (which true in this config),
> # uncomment also the following parameter)
> #
> modparam("auth_db", "password_column", "password")
> #
> modparam("rr", "enable_full_lr", 1)
> #
> # -- accouting params --
> #
> modparam("acc", "log_level", 1)
> modparam("acc", "log_flag", 1)
> modparam("acc", "log_missed_flag", 1)
> modparam("acc", "log_fmt", "fimos")
> # f - from; i - inbound request uri; m - method; o - outbound request 
> uri; s - status;
> #
> modparam("acc", "db_url", "sql://ser:heslo@localhost/ser")
> modparam("acc", "db_flag", 1)
> modparam("acc", "db_missed_flag", 1)
> #
> modparam("tm", "fr_inv_timer", 25)  #INVITE timeout
> modparam("tm", "fr_timer", 10)  #negative INVITE reply or no
>                 #final reply for a request for ACK
> #
> modparam("voicemail", "db_url", "sql://ser:heslo@localhost/ser")
> #
> # -------------------------  request routing logic -------------------
> #
> # main routing logic
> #
> #alias=10.10.10.49        #sip server IP address
> alias=jiffypop            #sip server name
> alias=domain.com        #sip domain/realm
> 
> #
> 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");
>         break;
>     };
>     if (msg:len > max_len) {
> #    if (len_gt( max_len )) {
>         sl_send_reply("513", "Message too big");
>         break;
>     };
> 
>     #prevent private ip space from being used
>     if(search("^(Contact|m): .*@192\.168\.")){
>         if(method=="REGISTER"){
>             log(1, "Someone trying to register from private IP\n");
>             sl_send_reply("479", "Please don't use private IP addresses");
>             break;
>         };
>     };
> 
>     # we record-route all messages -- to make sure that
>     # subsequent messages will go through our proxy; that's
>     # particularly good if upstream and downstream entities
>     # use different transport protocol
>     #if (!method=="REGISTER") record_route();
>     record_route();
>     # loose-route processing
>     if (loose_route()) {
>         t_relay();
>         break;
>     };
> 
>     # if the request is for other domain use UsrLoc
>     # (in case it does not work, use the following command
>     # with proper names and addresses in it)
> 
>     # deal with requests that are not destined for an internal account
> #    if(!(uri==myself)){
> #        route(2);
> #        break;
> #    };
> 
>     if (uri==myself) {
>         if (method=="REGISTER") {
>             # digest authentication
> #            log(1,"request for registration");
> #            if (!www_authorize("domain.com", "subscriber")) {
> #                www_challenge("domain.com", "0");
> #                break;
> #            };
>             log(1,"REGISTER request processed");
>             if(!save("location")){
>                 log(1,"Unable to save location");
>                 sl_reply_error();
>             };
>             break;
>         };
>         setflag(1);
> /* ********** Dial out to PSTN logic ************* */
> 
>         #forward 411[information] and 911[emergency] requests to gateway
>         if(uri=~"^sip:(4|9)11@(domain\.com|10\.10\.10\.49)"){
>             log(1,"411/911 expression match");
>             route(3);
>             break;
>         };
>         #forward numerical 7 digit requests to gateway
>         if(uri=~"^sip:[0-9]{7}@(domain\.com|10\.10\.10\.49)"){
>             log(1,"7 digit expression match");
>             route(3);
>             break;
>         };
>         # strip 650 and forward to GW if user dials 650 before local num
>         if(uri=~"^sip:650[0-9]{7}@(domain\.com|10\.10\.10\.49)"){
>             strip(3);
>             log(1,"650 area code dialed, 650 stripped");
>             route(3);
>             break;
>         };
>         # strip 1650 and forward to GW if user dials 1650 before local num
>         if(uri=~"^sip:1650[0-9]{7}@(domain\.com|10\.10\.10\.49)"){
>             strip(4);
>             log(1,"1650 dialed before local number,1650 stripped");
>             route(3);
>             break;
>         };
>         #forward numerical 10 digit requests to gateway, append a 1 first
>         if(uri=~"^sip:[0-9]{10}@(domain\.com|10\.10\.10\.49)"){
>             prefix("1");
>             log(1,"10 digit expression match, prefix 1");
>             route(3);
>             break;
>         };
>         #forward numerical 11 digit requests that start with a 1 to GW
>         if(uri=~"^sip:1[0-9]{10}@(domain\.com|10\.10\.10\.49)"){
>             log(1,"10 digit exp match w/leading 1");
>             route(3);
>             break;
>         };
>         #forward international N digit requests to gateway
>         if(uri=~"^sip:011[0-9]+@(domain\.com|10\.10\.10\.49)"){
>             log(1,"international expression match");
>             route(3);
>             break;
>         };
> 
> /* ********** VOICEMAIL logic ************* */
>         if (uri=~"^sip:voicemail at .*" || uri=~"^sip:announce at .*" || 
> uri=~"^sip:echo at .*"){
>             log(1,"sip:voicemail/announce/echo uri match");
>             rewritehostport("10.10.10.49:5090");
>             t_relay();
>             break;
>         };
> 
> /*  ****** Find Aliases and Locations of users ********* */
> 
>         #lookup "aliases" before looking up "location"
>         lookup("aliases");
> 
> # ******     New logic as of 3/11/2004 --gnoah
> #        if domain is not local after looking up aliases, forward the 
> request
> #        to the correct domain
> #        if (!(uri="^sip:(.+@)?(10\.10\..)){
> #            route(5);
> #            break;
> #        };
> 
>         if(is_user_in("Request-URI", "voicemail")){
>             log(1,"User is in Voicemail Group");
>             t_on_failure("4");
>             setflag(4);
>         };
> 
>                # native SIP destinations are handled using our USRLOC DB
> 
>                if (!lookup("location")) {
>             if(isflagset(4)){
>                 route(6);
>             }else{
>                 log(1,"No location for user - going to route[4]");
>                 route(4);
>                 log(1,"returning from route[4]");
>             };
>             log(1,"no location, not in vm group");
>             break;
>         };
> 
>     };
> 
>     # forward to current uri now; use stateful forwarding; that
>     # works reliably even if we forward from TCP to UDP
> 
>     log(1,"relaying from main route block");
>     if (!t_relay()) {
>         log(1,"main route: t_relay failed");
>         sl_reply_error();
>     };
> #    log(1,"route[]:eof");
> }
> 
> # ----------- Internet bound requests ------------
> 
> route[2]{
>     log(1, "Route[2] entered");
>     # outbound request are allowed only for registered V11 users
>     if(!(src_ip==10.10.10.49) & !(proxy_authorize("domain.com", 
> "subscriber"))){
>         if(method=="ACK" | method=="BYE"){
>             log(1, "failed internet bound authentication for ACK 
> granted\n");
>         }else if(method=="CANCEL"){
>             log(1, "failed internet bound authentication for CANCEL 
> granted\n");
>         }else{
>             proxy_challenge("domain.com","0");
>             break;
>         };
>     };
>     #verify that From field in INVITE is equal to registered user
>     if(!src_ip==10.10.10.49 & method=="INVITE" & !check_from()){
>         log(1,"Spoofed From attempt\n");
>         sl_send_reply("403","Use Frome = ID next time");
>         break;
>     }:
> 
>     append_hf("P-hint: OUTBOUND ON INTERNET\r\n");
>     log(1,"relaying from route[2]");
>     if(!t_relay()){
>         sl_reply_error();
>         break;
>     };
> }
> 
> #---------- PSTN Bound requests -------------
> 
> route[3]{
>     log(1,"route[3]:SIP-to-PSTN call routed");
>     append_rpid_hf();
>     rewritehostport("10.10.10.5:5060");
> 
>     forward(10.10.10.5, 5060);
> 
> #    setflag(1);     #set flag for accounting
> #    if(!t_relay()){
> #        log(1,"route[2]: t_relay failed");
> #        sl_reply_error();
> #    };
> }
> 
> #---------- Deal with offline users
> 
> route[4]{
>     log(1,"route[4]: offline users or no user exists ");
>     if(!t_newtran()){
>         log(1,"Unable to create new txn");
>         sl_reply_error();
>     };
>     if(!t_reply("404", "User Not Found")){
>         sl_reply_error();
>     };
>     break;
> }
> 
> route[5]{
>     log(1,"Entered route[5]");
>     append_hf("P-hint: ALIASED-OUTBOUND\r\n");
>     if(!t_relay()){
>     sl_reply_error();
>     break;
>     };
> }
> 
> route[6]{
>     log(1,"route[6]:no user location: foward to voicemail");
>     revert_uri();
>     lookup("aliases");
>     rewritehostport("10.10.10.49:5095");
>     t_relay();
> }
> 
> failure_route[4]{
>     log(1,"failure_route[4]");
>     revert_uri();
>     lookup("aliases");
>     rewritehostport("10.10.10.49:5095");
>     append_branch();
>     append_urihf("CC-Diversion: ", "\r\n");
>     append_hf("P-hint: OFFLINE-VOICEMAIL\r\n");
>     log(1, "relaying from failure_route[4]");
>     t_relay();
> }
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list