Table of Contents
It is a very good idea to start SER with a basic Hello World ser.cfg to ensure that the SIP server is working.
What this ser.cfg will do:
Establish a SIP server on your internal LAN
Allow you to connect IP phones on your internal LAN to SER
Make calls between the IP phones on the LAN
What this ser.cfg will NOT do:
There is no authentication for the IP telephones nor any database support. These will be added later.
there is no support for PSTN, the phones connected to the LAN can only communicate between themselves.
Listed below is the Hello Word configuration to support the simple configuration above. You can download a version of this file from www.ONsip.org. A detailed analysis of this ser.cfg follows the example.
debug=3fork=no
log_stderror=yes
listen=192.0.2.13
# INSERT YOUR IP ADDRESS HERE 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" modparam("usrloc", "db_mode", 0)
modparam("rr", "enable_full_lr", 1)(11) (12)route { # ------------------------------------------------------------------------ # Sanity Check Section # ------------------------------------------------------------------------ if (!mf_process_maxfwd_header("10")) { (13) sl_send_reply("483", "Too Many Hops");(14) break;(15) }; if (msg:len > max_len) { (16) sl_send_reply("513", "Message Overflow"); break; }; # ------------------------------------------------------------------------ # Record Route Section # ------------------------------------------------------------------------ if (method!="REGISTER") { (17) record_route();(18) }; # ------------------------------------------------------------------------ # Loose Route Section # ------------------------------------------------------------------------ if (loose_route()) { (19) route(1);(20) break;(21) }; # ------------------------------------------------------------------------ # Call Type Processing Section # ------------------------------------------------------------------------ if (uri!=myself) { (22) route(1);(23) break;(24) }; if (method=="ACK") {(25) route(1);(26) break;(27) } if (method=="REGISTER") { (28) route(2);(29) break;(30) }; lookup("aliases");(31) (32)if (uri!=myself) { route(1); break; }; if (!lookup("location")) { (33) sl_send_reply("404", "User Not Found");(34) break;(35) }; route(1);(36) } (37)route[1] { # ------------------------------------------------------------------------ # Default Message Handler # ------------------------------------------------------------------------ if (!t_relay()) {(38) sl_reply_error();(39) }; } (40)route[2] { # ------------------------------------------------------------------------ # REGISTER Message Handler # ------------------------------------------------------------------------ if (!save("location")) { (41) sl_reply_error();(42) }; }