Hello,

Stephanie Vigil wrote:
Errors in ser:
*Error: Bad config file (2 errors)*
you should set debug level a little higher, so that it tells you where exactly the error is.

see inline...

We are in root and the path we are using to run ser: ser -f /usr/local/etc/ser/serv3.cfg.

This is our SER code:
# $Id: hello-world.cfg 46 2006-01-25 04:21:30Z /CN=Paul 
Hazlett/[email protected] $
debug=3
e.g. debug=5
fork=
missing value here:
fork=yes

log_stderror=yes

#listen=164.11.38.171           # put your server IP address here
listen=172.16.100.193
port=5060
children=4

dns=no
rev_dns=no
#fifo="/tmp/ser_fifo"

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/textops.so"
modparam("usrloc", "db_mode",   0)
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_inv_timer", 15000)               # time we will wait for an 
invite to be replied (non-provisional response is received)
modparam("tm", "fr_timer", 10000)           # provisional response received

route {

        # 
------------------------------------------------------------------------
        # Sanity Check Section
        # 
------------------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
            sl_send_reply("483", "Too Many Hops");
            break;
         };

if (msg:len > max_len) {
           sl_send_reply("513", "Message Overflow");
           break;
        };

        # 
------------------------------------------------------------------------
        # Record Route Section
        # 
------------------------------------------------------------------------
if (method!="REGISTER") {
           record_route();
        };

        # 
------------------------------------------------------------------------
        # Loose Route Section
        # 
------------------------------------------------------------------------
        if (loose_route())
        {
           route(1);
           break;
        };
        
        # 
------------------------------------------------------------------------
        # Call Type Processing Section
        # 
------------------------------------------------------------------------

        if (method=="REGISTER")
            {
              save("location");
              break;
            };

        if (method=="INVITE")
better do:
        if ((method=="INVITE")||(method=="CANCEL"))
         {
if (lookup("location")) {
if (lookup("location")) is successful, that means that you found the callee user in the location table (where he registered, above: save("location")). in that case you want to send it to the user's registered phone, normally.

so you would do

if (uri=~"^sip:[1].*") {
   # numbers starting with 1
   append_hf("P-App-Name: conference\r\n");
   t_relay_to_udp("127.0.0.1","5080");
   break;
} else {
   # no special numbers, look up in location db
   if (lookup("location"))            {
     if (t_relay()) {
       sl_reply_error();
     }
     break;
   } else {
   # not found
     sl_send_reply("404", "not found");
     break;
   }
}

note also that if your SER runs on 5060, and your SEMS on 5080, you want to redirect it to port 5080.

hth
Stefan

                        if (uri=~"^sip:[0][0-9][0-9][0-9]")
                       # if (uri=~"^sip:172.16.100.72")
                        #if (uri=~"^sip:172.16.100.75")

                        {
                             #t_on_failure(1);
                             #route(1);
                             t_relay();
                        }
                        else
                        {
                                if (uri=~"^sip:[1]")
                                {
                                append_hf("P-App-Name: conf_auth\r\n");
                                 #append_hf("P-App-Name: conference\r\n");
                                 t_relay_to_udp("127.0.0.1","5060");
                                  break;
                                }
else # uri starts with [3-9][0][*] {
                                        sl_send_reply("404", "User Not Found: sorry 
LA");
                                }
                        }
                   }
                   else
                   {
                        sl_send_reply("404", "User Not Found: sorry L");
                   };

                break;
        };

}

route[1] {
        # 
------------------------------------------------------------------------
# Default Message Handler # ------------------------------------------------------------------------ if (!t_relay()) {
            sl_reply_error();
        };
}
failure_route[1]
{
        # 
------------------------------------------------------------------------
        # Fowarding failed --try again at another destination
        # 
------------------------------------------------------------------------
        append_branch("sip:[email protected]"); # 0002
        log (1, "first redirection\n");
        t_on_failure (2);
        t_relay();

}
failure_route[2]
{
        # 
------------------------------------------------------------------------
        # Fowarding failed --try again at another destination
        # 
------------------------------------------------------------------------
        append_branch("sip:[email protected]"); # 0003
        log (2, "second redirection\n");
        t_relay();

}



STEPHANIE VIGIL



------------------------------------------------------------------------
Hotmail: Trusted email with powerful SPAM protection. Sign up now. <http://clk.atdmt.com/GBL/go/201469227/direct/01/>


------------------------------------------------------------------------

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev


--
Stefan Sayer
VoIP Services Consulting and Development

Warschauer Str. 24
10243 Berlin

tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]


_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to