[Users] WeSIP setup problem

ventilo35 at free.fr ventilo35 at free.fr
Thu Apr 26 12:55:41 CEST 2007

Hi Gines, thanks for your support

> Your servlet named "neo" is being executed and looks like it is
> proxying but what from what I see in the packet it is proxying to
> itself. Could you try to proxy to another address and see if this
> still happens ? Aside, could you send me your configuration files and
> your servlet code ?

The serlvet code is the following

protected void doInvite(SipServletRequest callerInvite) throws ServletException,
IOException {

      //Get a proxy for this request
      Proxy callerProxy = callerInvite.getProxy();

	System.out.println("doInvite within neos servlet: requestURI is " +
callerInvite.getRequestURI() );



This code causes the "no route" exception. The println above gives :

doInvite within neos servlet: requestURI is sip:5002 at

where 5002 is the called SIP phone and is the address of my OpenSER
+ WeSIP box (i.e. the managed SIP domain)

Following your advice I have tried to change the proxyTo to a different address:

	SipURI dest = sipFactory.createSipURI("5002","");

It that case, the called phone (5002, IP address gets the INVITE
correctly. However, something puzzles me here: the serlvet is not supposed to
know the IP address of the called phone. In my understanding, the AS processes
the INVITE, then it must send it back to the proxy server which is supposed to
forward it to the next hop, is that right ?

Could you please give me an example of a doInvite which basically does nothing
and which lets the INVITE be forwarded to the called party ?

Finally here are my config files:

<<<<<<<<< Server.xml >>>>>>>>>

<Server port="5005" shutdown="SHUTDOWN" debug="1">
	<Service name="NEOS-Standalone">
     		<Connector className="org.apache.catalina.connector.http.HttpConnector"
	 		port="7080" minProcessors="5" maxProcessors="5"
	 		enableLookups="true" acceptCount="10" debug="0" />

		<Connector className="com.voztele.sipservlet.connector.SipConnector"
	 		minProcessors="5" maxProcessors="5"
	 		enableLookups="true" acceptCount="10" debug="1"
	 		addresses="" pathName="com.voztele" protocol="udp" >
			 		<Property key="com.voztele.javax.sip.SER_ADDRESS" value="" />
			 		<Property key="com.voztele.javax.sip.SER_PORT" value="5080" />
			 		<Property key="com.voztele.STATISTICS" value="false" />
					<Property key="javax.sip.STACK_NAME" value="neos_as" />
					<Property key="javax.sip.THREAD_POOL_SIZE" value="10" />
					<Property key="com.voztele.javax.sip.THREAD_POOL_SIZE" value="10" />
					<Property key="com.voztele.javax.sip.SPIRAL_HDR" value="true" />
					<Property key="com.voztele.javax.sip.REENTRANT_LISTENER" value="true" />
					<Property key="javax.sip.AUTOMATIC_DIALOG_SUPPORT" value="false" />
					<Property key="com.voztele.javax.sip.TRACE_LEVEL" value="3" />

     	<Engine name="Standalone" defaultHost="localhost" debug="1"

			<Mapper className="org.apache.catalina.core.StandardEngineMapper"
			<Mapper className="org.apache.catalina.core.StandardEngineMapper"
	 		<Mapper className="com.voztele.sipservlet.core.EngineSipMapper"
			<Logger className="org.apache.catalina.logger.FileLogger" timestamp="true"/>
			<Realm className="org.apache.catalina.realm.MemoryRealm" />

			<Host name="localhost" nameSip="" debug="1" 
appBase="wesipapps" className="com.voztele.sipservlet.core.ConvergedHost">

				<Logger className="org.apache.catalina.logger.FileLogger" timestamp="true"/>
				<Mapper className="com.voztele.sipservlet.core.SipHostMapper"
				<Mapper className="org.apache.catalina.core.HttpHostMapper"
				<Mapper className="org.apache.catalina.core.HttpHostMapper"

# $Id: openser.cfg 1827 2007-03-12 15:22:53Z bogdan_iancu $
# simple quick-start config script
# Please refer to the Core CookBook at http://www.openser.org/dokuwiki/doku.php
# for a explanation of possible statements, functions and parameters.

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

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

# Uncomment these lines to enter debugging mode

listen = tcp:
listen = udp:

# ------------------ module loading ----------------------------------

#set module path

# Uncomment this if you want to use SQL database
#loadmodule "mysql.so"

loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"

# added for WeSIP
loadmodule "seas.so"
# end added for WeSIP

# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "auth.so"
#loadmodule "auth_db.so"

# ----------------- setting module-specific parameters ---------------

# -- mi_fifo params --

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")

# -- 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


	# 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");

	if (msg:len >=  2048 ) {
		sl_send_reply("513", "Message too big");

	# 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();	# ftoutain essai de supprimer ça ? ne change rien

	# 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");

	if (!uri==myself) {
		# mark routing logic in request
		append_hf("P-hint: outbound\r\n");


	# 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("openser.org", "subscriber")) {
			#	www_challenge("openser.org", "0");
			#	exit;


		if (!uri==myself) {
			append_hf("P-hint: outbound alias\r\n");

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


route[1] {

	if (is_present_hf("X-WeSIP-SPIRAL")) {
		if (!t_relay()) {

	if (! as_relay_t("neos_as") ){
		t_reply("500", "NEOS service not found");


More information about the Users mailing list