> Hello,
> 
> I am trying to set up basic SER configuration ("Hello World" Reference Design 
> from SER-GettingStarted.pdf) but got in trouble at the UA connection.
> 
> My teststbench consist of:
> 
> SER server
> IP address: 192.168.2.33
> Hostname: centoshost
> OS: CentOS 5.3
> 
> Workstation with Linphone softphone
> IP address: 192.168.2.5
> Hostname: susel
> OS: openSUSE 11.2
> 
> ATA + regular phone
> IP address: 192.168.2.191
>  
> Network switch + cabling
> 
> 
> I had no problems with SER installation. It also runs correctly (I suppose).
> 
> When SER started with updated ser.cfg according to manual, I couldn't even 
> make basic registrations without any authentication.
> 
> In the next step I added SQL support, hoping to register UA with 
> authentication, but this didn't worked out either.
> 
> So I have looked at ports at server and secured their openess - gave no 
> improvement.
> 
> 
> I will be glad to receive some hint where to make changes in my system.
> 
> 
> Below are some commands (with results) I have tried on a server and 
> workstaton.
> I use SSH to connect to the server and issue commands there.
> 
> As an attachement I provide ser.cfg file for inspection.
> 
> 
> 
> Kind Regards,
> 
> Slawomir
> 
> 
> 
> ********************************************
> 
> [root@centoshost sbin]# cat /etc/*release
> CentOS release 5.3 (Final)
> 
> 
> [root@centoshost ~]# /etc/init.d/mysqld start
> Starting MySQL:                                            [  OK  ]
> [root@centoshost ~]# /etc/init.d/mysqld status
> mysqld (pid 2640) is running...
> 
> [root@centoshost ~]# export SIP_DOMAIN="centoshost"
> 
> [root@centoshost sbin]# serctl start
> 
> Starting SER : started pid(2709)
> 
> 
> [root@centoshost sbin]# serctl moni
> 
> Server: Sip EXpress router (0.9.6 (i386/linux)) ,2xx: 0      
> Now: Sun Oct 11 04:56:03 2009 2009 local)       ,2xx: 0      
> Up Since: Sun Oct 11 04:00:30 2009 local)       ,2xx: 0      
> Up time: 3333 [sec]ics 0, 5xx: 0, 4xx: 0, 3xx: 0,2xx: 0      
> Transaction Statistics Total: 0 (0 local)       ,2xx: 0      
> Transaction Statistics Total: 0 (0 local)        4xx: 0      
> Current: 0 (0 waiting) Total: 0 (0 local)       ,2xx: 0      
> Replied localy: 0      0, 5xx: 0, 4xx: 0, 3xx: 0,2xx: 0      
> Completion status 6xx: 0, 5xx: 0, 4xx: 0, 3xx: 0,2xx: 0      
> Stateless Server Statistics 407: 0 408: 0 483: 0 4xx: 0      
> Stateless Server Statistics      
> 200: 0 202: 0 2xx: 0      0      0 408: 0 483: 0 4xx: 0      
> 300: 0 301: 0 302: 0 3xx: 0      0 408: 0 483: 0 4xx: 0      
> 400: 0 401: 0 403: 0 404: 0 407: 0 408: 0 483: 0 4xx: 0      
> 500: 0 5xx: 0      xpired
> 6xx: 0            Expired
> xxx: 0            Expired
> failures: 0      
> UsrLoc Statstered Expired
> UsrLoc Statstered Expired
> Domain Registered Expired
> 'aliases' 0 00
> 'location' 0 0
> 
> [root@centoshost sbin]# serctl ps
> 0     2709    attendant
> 1     2714    fifo server
> 2     2717    receiver child=0 sock= 192.168.2.33:5060
> 3     2719    receiver child=1 sock= 192.168.2.33:5060
> 4     2721    receiver child=2 sock= 192.168.2.33:5060
> 5     2724    receiver child=3 sock= 192.168.2.33:5060
> 6     2727    timer
> 7     2730    tcp receiver
> 8     2733    tcp receiver
> 9     2735    tcp receiver
> 10    2739    tcp receiver
> 11    2742    tcp main process
> 
> [root@centoshost sbin]# serctl ping 1001@192.168.2.191
> 400
> 
> [root@centoshost sbin]# ping 192.168.2.191
> PING 192.168.2.191 (192.168.2.191) 56(84) bytes of data.
> 64 bytes from 192.168.2.191: icmp_seq=1 ttl=250 time=2.77 ms
> 64 bytes from 192.168.2.191: icmp_seq=2 ttl=250 time=2.70 ms
> 64 bytes from 192.168.2.191: icmp_seq=3 ttl=250 time=1.51 ms
> 
> --- 192.168.2.191 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
> rtt min/avg/max/mdev = 1.510/2.330/2.778/0.582 ms
> 
> [root@centoshost sbin]# netstat -an
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address               Foreign Address         State 
>      
> tcp        0      0 192.168.2.33:5060           0.0.0.0:*                   
> LISTEN      
> tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   
> LISTEN      
> tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   
> LISTEN      
> tcp        0      0 0.0.0.0:757                 0.0.0.0:*                   
> LISTEN      
> tcp        0      0 127.0.0.1:631               0.0.0.0:*                   
> LISTEN      
> tcp        0      0 127.0.0.1:25                0.0.0.0:*                   
> LISTEN      
> tcp        0      0 :::22                       :::*                        
> LISTEN      
> tcp        0      0 ::ffff:192.168.2.33:22      ::ffff:192.168.2.5:56321    
> ESTABLISHED 
> udp        0    300 192.168.2.33:38530          192.168.12.254:53           
> ESTABLISHED 
> udp        0      0 192.168.2.33:44954          192.168.2.1:53              
> ESTABLISHED 
> udp        0      0 192.168.2.33:5060           0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:41417               0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:5353                0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:751                 0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:111                 0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:754                 0.0.0.0:*                     
>           
> udp        0      0 0.0.0.0:631                 0.0.0.0:*                     
>           
> udp        0      0 :::41038                    :::*                          
>           
> udp        0      0 :::5353                     :::*   
> 
> mysql> select username, password, domain from subscriber;
> +----------+----------+------------+
> | username | password | domain     |
> +----------+----------+------------+
> | admin    | heslo    | centoshost | 
> | 1001     | abc      | centoshost | 
> | 1000     | abc      | centoshost | 
> +----------+----------+------------+
> 
> 
> 
> 
> ****************************
> 
> susel:/usr/local # cat /etc/*release
> LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-ia32:core-3.2-ia32:core-4.0-ia32"
> openSUSE 11.2 (i586)
> VERSION = 11.2
> 
> susel:/usr/local # ping 192.168.2.33
> PING 192.168.2.33 (192.168.2.33) 56(84) bytes of data.
> 64 bytes from 192.168.2.33: icmp_seq=1 ttl=64 time=0.421 ms
> 64 bytes from 192.168.2.33: icmp_seq=2 ttl=64 time=0.400 ms
> 64 bytes from 192.168.2.33: icmp_seq=3 ttl=64 time=0.425 ms
> ^C
> --- 192.168.2.33 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 1999ms
> rtt min/avg/max/mdev = 0.400/0.415/0.425/0.019 ms
> 
> susel:/usr/local # nmap -sS -p1-65535 192.168.2.33
> 
> Starting Nmap 5.00 ( http://nmap.org ) at 2011-03-21 20:32 CET
> Interesting ports on 192.168.2.33:
> Not shown: 65530 filtered ports
> PORT     STATE  SERVICE
> 22/tcp   open   ssh
> 80/tcp   closed http
> 443/tcp  closed https
> 631/tcp  closed ipp
> 5060/tcp open   sip
> MAC Address: 08:00:06:0E:E1:FC (Siemens AG)
> 
> Nmap done: 1 IP address (1 host up) scanned in 152.32 seconds
> 
> 
> 
> susel:/usr/local # sipsak -vv -s sip:1001@192.168.2.33
> 
> received ICMP message (type: 3, code: 10): from 192.168.2.33
> 
> susel:/usr/local # sipsak -vv -s sip:1000@192.168.2.33
> 
> received ICMP message (type: 3, code: 10): from 192.168.2.33
> 
> susel:/usr/local # sipsak -T -s sip:1000@192.168.2.33
> warning: IP extract from warning activated to be more informational
>  (type: 3, code: 10): from 192.168.2.33
> 
> susel:/usr/local # sipsak -T -s sip:1001@192.168.2.33
> warning: IP extract from warning activated to be more informational
>  (type: 3, code: 10): from 192.168.2.33
> 
> susel:/usr/local # sipsak -a --password abc -s sip:1001@192.168.2.33
>  (type: 3, code: 10): from 192.168.2.33
> 
> susel:/usr/local # sipsak -a --password abc -s sip:1000@192.168.2.33
>  (type: 3, code: 10): from 192.168.2.33
> 


-------------------------------------------------
Sily koalicji atakuja rezim. Skomplikowana sytuacja w Libii.
Raport » http://linkint.pl/f295a
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

#debug=3         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no	# (cmd line: -E)

/* Uncomment these lines to enter debugging mode 
fork=no
log_stderror=yes
*/

check_via=no	# (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
listen=192.168.2.33
port=5060
children=4
fifo="/tmp/ser_fifo"

# ------------------ 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/textops.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", 2)

# -- auth params --
# Uncomment if you are using auth module
#
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")

# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

# -------------------------  request routing logic -------------------

# main routing logic

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 >=  2048 ) {
		sl_send_reply("513", "Message too big");
		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();	

	# subsequent messages withing a dialog should take the
	# path determined by record-routing
	if (loose_route()) {
		# mark routing logic in request
		append_hf("P-hint: rr-enforced\r\n"); 
		route(1);
		break;
	};

	if (!uri==myself) {
		# mark routing logic in request
		append_hf("P-hint: outbound\r\n"); 
		route(1);
		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)
	if (uri==myself) {

		if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
			if (!www_authorize("centoshost", "subscriber")) {
				www_challenge("centoshost", "0");
				break;
			};

			save("location");
			break;
		};

		lookup("aliases");
		if (!uri==myself) {
			append_hf("P-hint: outbound alias\r\n"); 
			route(1);
			break;
		};

		# native SIP destinations are handled using our USRLOC DB
		if (!lookup("location")) {
			sl_send_reply("404", "Not Found");
			break;
		};
	};
	append_hf("P-hint: usrloc applied\r\n"); 
	route(1);
}

route[1] 
{
	# send it out now; use stateful forwarding as it works reliably
	# even for UDP2TCP
	if (!t_relay()) {
		sl_reply_error();
	};
}


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to