我正在尝试通过 SIP-servlet 初始化一些类。为此,我将 sip.xml 用于我的 mss-2.0.0.FINAL-jboss-as-7.1.2 服务器。
sip.xml:
<?xml version="1.0" encoding="UTF-8"?>
<sip-app xmlns="http://www.jcp.org/xml/ns/sipservlet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jcp.org/xml/ns/sipservlet" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1">
<app-name>service.ngsi.multimediaconference</app-name>
<servlet-selection>
<servlet-mapping>
<servlet-name>multimedia-conference</servlet-name>
<pattern>
<equal>
<var>request.method</var>
<value>INVITE</value>
</equal>
</pattern>
</servlet-mapping>
</servlet-selection>
<servlet>
<servlet-name>multimedia-conference</servlet-name>
<servlet-class>com.abc.multimediaconference.ServletSipMultimediaConference</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</sip-app>
我的日志:
16:11:03,896 INFO [org.jboss.modules] JBoss Modules version 1.1.2.GA
16:11:04,903 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:11:04,989 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.2.Final "Steropes" starting
16:11:09,072 INFO [org.jboss.as.server.deployment.scanner] JBAS01 5003: Found Conference.war in deployment directory. To trigger deployment create a file called Conference.war.dodeploy
16:11:09,073 INFO [org.jboss.as.server.deployment.scanner] JBAS015003: Found my-sipapp.war in deployment directory. To trigger deployment create a file called my-sipapp.war.dodeploy
16:11:09,134 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
16:11:09,157 INFO [org.xnio] XNIO Version 3.0.3.GA
16:11:09,198 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
16:11:09,207 INFO [org.jboss.remoting] JBoss Remoting version 3.2.7.GA
16:11:09,263 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
16:11:09,270 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 27) JBAS016200: Activating ConfigAdmin Subsystem
16:11:09,283 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Activating Naming Subsystem
16:11:09,294 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 40) JBAS011906: Activating OSGi Subsystem
16:11:09,305 INFO [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013101: Activating Security Subsystem
16:11:09,361 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.
16:11:09,388 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 50) JBAS015537: Activating WebServices Extension
16:11:09,472 INFO [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.11.Final)
16:11:09,615 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013100: Current PicketBox version=4.0.9.Final
16:11:10,532 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 16:11:10,567 INFO [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
16:11:10,571 INFO [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:11:11,137 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on `http-localhost/127.0.0.1:8080`
16:11:11,217 INFO [org.mobicents.servlet.sip.catalina.SipStandardService] (MSC service thread 1-7) Pretty encoding of headers enabled ? true
16:11:11,218 INFO [org.mobicents.servlet.sip.catalina.SipStandardService] (MSC service thread 1-7) Sip Stack path name : gov.nist
16:11:11,397 INFO [org.mobicents.servlet.sip.catalina.SipStandardService] (MSC service thread 1-7) Mobicents Sip Servlets sip stack properties :
{gov.nist.javax.sip.DEBUG_LOG=/opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/tmp/logs/mss-jsip-debuglog.txt,
gov.nist.javax.sip.PASS_INVITE_NON_2XX_ACK_TO_LISTENER=true,
gov.nist.javax.sip.MAX_LISTENER_RESPONSE_TIME=120,
gov.nist.javax.sip.LOG4J_LOGGER_NAME=gov.nist,
javax.sip.AUTOMATIC_DIALOG_SUPPORT=off,
gov.nist.javax.sip.SERVER_LOG=/opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/tmp/logs/mss-jsip-messages.xml,
gov.nist.javax.sip.REENTRANT_LISTENER=true,
gov.nist.javax.sip.MAX_FORK_TIME_SECONDS=0,
org.mobicents.ha.javax.sip.REPLICATE_APPLICATION_DATA=false,
gov.nist.javax.sip.RECEIVE_UDP_BUFFER_SIZE=65536,
javax.sip.STACK_NAME=Mobicents-SIP-Servlets,
gov.nist.javax.sip.TCP_POST_PARSING_THREAD_POOL_SIZE=30,
gov.nist.javax.sip.LOOSE_DIALOG_VALIDATION=true,
org.mobicents.ha.javax.sip.REPLICATION_STRATEGY=ConfirmedDialog,
gov.nist.javax.sip.AGGRESSIVE_CLEANUP=true,
gov.nist.javax.sip.TRACE_LEVEL=LOG4J,
gov.nist.javax.sip.MAX_MESSAGE_SIZE=10000,
gov.nist.javax.sip.AUTOMATIC_DIALOG_ERROR_HANDLING=false,
gov.nist.javax.sip.SEND_UDP_BUFFER_SIZE=65536,
gov.nist.javax.sip.LOG_MESSAGE_CONTENT=true,
gov.nist.javax.sip.THREAD_POOL_SIZE=64,
gov.nist.javax.sip.DELIVER_UNSOLICITED_NOTIFY=true,
javax.sip.ROUTER_PATH=org.mobicents.ext.javax.sip.dns.DNSAwareRouter}
16:11:11,576 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (MSC service thread 1-7) value -1000 will be used for reliableConnectionKeepAliveTimeout stack property
16:11:11,576 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (MSC service thread 1-7) Setting Stack Thread priority to 10
16:11:11,579 WARN [gov.nist.javax.sip.SipStackImpl] (MSC service thread 1-7) using default tls security policy
16:11:11,641 INFO [gov.nist.javax.sip.stack.timers.DefaultSipTimer] (MSC service thread 1-7) the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been started
16:11:11,642 INFO [org.mobicents.servlet.sip.catalina.SipStandardService] (MSC service thread 1-7) no AddressResolver will be used since none has been specified.
16:11:11,642 INFO [org.mobicents.servlet.sip.catalina.SipStandardService] (MSC service thread 1-7) SIP stack initialized
16:11:11,643 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) SIP Base Timer Interval set to 500ms
16:11:11,643 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) SIP Timer T2 Interval set to 4000ms
16:11:11,643 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) SIP Timer T4 Interval set to 5000ms
16:11:11,643 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) SIP Timer D Interval set to 32000ms
16:11:11,643 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Memory threshold set to 85%
16:11:11,644 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Back To Normal Memory threshold set to 75%
16:11:11,644 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Congestion Control policy set to ErrorResponse
16:11:11,644 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Queue Size set to 1500
16:11:11,644 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Back To Normal Queue Size set to 1300
16:11:11,644 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Gathering Statistics set to true
16:11:11,645 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Container wide Concurrency Control set to SipApplicationSession
16:11:11,645 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Bypass Request Executor enabled ?true
16:11:11,645 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Bypass Response Executor enabled ?true
16:11:11,645 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Using the Service Provider Framework to load the application router provider
16:11:11,652 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:11:11,654 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl@4da19f89 Using the following Application Router instance: org.mobicents.servlet.sip.router.DefaultApplicationRouter@2df10330
16:11:11,697 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) Sip Application dispatcher registered under following name jboss.sip:type=SipApplicationDispatcher
16:11:11,697 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) bypassRequestExecutor ? true
16:11:11,698 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) bypassResponseExecutor ? true
16:11:11,707 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) AsynchronousThreadPoolExecutor size is 15
16:11:11,709 INFO [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (MSC service thread 1-7) No Congestion control background task started since the checking interval is equals to -1 milliseconds.
16:11:11,710 INFO [org.mobicents.servlet.sip.core.Version] (MSC service thread 1-7) Release ID: (Mobicents) Sip Servlets 2.0.0.FINAL (build: Git Hash=r031dc15b05f0bbe5d5e3a9af6a2fb0e2560d9426 date=201210011610)
16:11:11,711 INFO [org.mobicents.servlet.sip.core.Version] (MSC service thread 1-7) Mobicents Sip Servlets 2.0.0.FINAL (build: Git Hash=r031dc15b05f0bbe5d5e3a9af6a2fb0e2560d9426 date=201210011610) Started.
16:11:11,711 INFO [org.mobicents.servlet.sip.core.Version] (MSC service thread 1-7) Thank you for running Mobicents Community code. For Commercial Grade Support, please purchase a Telscale subscription from http://www.telestax.com
16:11:11,969 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA
16:11:12,162 INFO [org.mobicents.servlet.sip.catalina.SipProtocolHandler] (MSC service thread 1-4) Sip Connector started on ip address: localhost, port 5081, transport tls, useStun false, stunAddress null, stunPort : -1, useStaticAddress: false, staticServerAddress null, staticServerPort -1
16:11:12,162 INFO [org.mobicents.servlet.sip.catalina.SipProtocolHandler] (MSC service thread 1-6) Sip Connector started on ip address: localhost, port 5080, transport tcp, useStun false, stunAddress null, stunPort : -1, useStaticAddress: false, staticServerAddress null, staticServerPort -1
16:11:12,514 INFO [org.mobicents.servlet.sip.catalina.SipProtocolHandler] (MSC service thread 1-8) Sip Connector started on ip address: localhost, port 5080, transport udp, useStun false, stunAddress null, stunPort : -1, useStaticAddress: false, staticServerAddress null, staticServerPort -1
16:11:12,523 INFO [org.mobicents.servlet.sip.catalina.SipProtocolHandler] (MSC service thread 1-7) Sip Connector started on ip address: localhost, port 5082, transport ws, useStun false, stunAddress null, stunPort : -1, useStaticAddress: false, staticServerAddress null, staticServerPort -1
16:11:12,614 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory /opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/deployments
16:11:12,630 INFO [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on `127.0.0.1:9999`
16:11:12,657 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on `127.0.0.1:4447`
16:11:12,753 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "Conference.war"
16:11:14,165 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015960: Class Path entry xercesImpl.jar in /opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/deployments/Conference.war/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
16:11:14,166 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015960: Class Path entry xml-apis.jar in /opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/deployments/Conference.war/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
16:11:14,167 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015960: Class Path entry serializer.jar in /opt/mss-2.0.0.FINAL-jboss-as-7.1.2.Final/standalone/deployments/Conference.war/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
16:11:14,934 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
16:11:14,976 INFO [org.jboss.as.osgi] (MSC service thread 1-2) JBAS011907: Register module: Module "deployment.Conference.war:main" from Service Module Loader
16:11:15,113 INFO [org.jboss.web] (MSC service thread 1-7) JBAS018210: Registering web context: /Conference
16:11:15,128 INFO [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "Conference.war"
16:11:15,329 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on `http://127.0.0.1:9990`
16:11:15,330 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.2.Final "Steropes" started in 12503ms - Started 182 of 270 services (87 services are passive or on-demand)
之后,我的模块可以使用并且 REST 通信也可以工作,但是所有应该在启动时通过 servlet 初始化的变量/对象都是空的。
有人出主意吗?