开发者

Crash and unexpected output when using Java sip servlets

开发者 https://www.devze.com 2023-02-14 01:36 出处:网络
I am trying a simple program in Java which would display Received Invite and Received Cancel when x-lite SIP client calls the SIP servlet and cancels the call respectively. My Java code is below. I am

I am trying a simple program in Java which would display Received Invite and Received Cancel when x-lite SIP client calls the SIP servlet and cancels the call respectively. My Java code is below. I am using Tomcat Mobicents SIP servlet -

package org.example.servlet.sip;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.sip.SipServlet;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.SipServletResponse;

public class SimpleServlet extends SipServlet {

public void doInvite(SipServletRequest request) {

System.out.println("*** Received INVITE ***");

try {
request.createResponse(SipServletResponse.SC_RINGING).send();
//request.createResponse(SipServletResponse.SC_OK).send();
} catch (IOException e) {
e.printStackTrace();
} 

}

public void doCancel(SipServletRequest request) {

System.out.println("*** Received CANCEL ***");

try {
request.createResponse(SipServletResponse.SC_REQUEST_TERMINATED).send();
} catch (IOException e) {
e.printStackTrace();
}

}


@Override
public void init(ServletConfig servletConfig) throws ServletException {
System.out.println("****** the simple sip servlet has been started ********* ");
super.init(servletConfig);
}
}

But when I run the servlet and attempt to make the call and then cancel, I dont see any of the println messages. But I do see SIP INVITES being received from my x-lite client. I have been to think about what might be going wrong but could get to a conclusion. Here are the console logs (Also observe the exception thrown when a cancel is received from the x-lite client). Appreciate your help.

2011-02-25 18:39:09,574 INFO  [SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-12) <message
from="127.0.0.1:4264" 
to="127.0.0.1:5080" 
time="1298677149492"
isSender="false" 
transactionId="z9hg4bk-d8754z-2c7c09d1c301b688-1---d8754z-" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 70
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:09,576 INFO  [InitialRequestDispatcher] (Mobicents-SIP-Servlets-UDPMessageChannelThread-12) Dispatching the request event outside the container
2011-02-25 18:39:09,581 INFO  [RequestDispatcher] (Mobicents-SIP-Servlets-UDPMessageChannelThread-12) Sending the request through a new client transaction INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host

2011-02-25 18:39:09,638 INFO  [SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-12) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677149582"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:09,850 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="127.0.0.1:4264" 
time="1298677149779"
isSender="true" 
transactionId="z9hg4bk-d8754z-2c7c09d1c301b688-1---d8754z-" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="SIP/2.0 100 Trying" 
>
<![CDATA[SIP/2.0 100 Trying
To: <sip:1231@mobicents.org>
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
CSeq: 1 INVITE
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Content-Length: 0

]]>
</message>

2011-02-25 18:39:10,322 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677150144"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:11,270 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677151144"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:13,218 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677153144"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:15,224 INFO  [SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-16) <message
from="127.0.0.1:4264" 
to="127.0.0.1:5080" 
time="1298677155168"
isSender="false" 
transactionId="z9hg4bk-d8754z-2c7c09d1c301b688-1---d8754z-:cancel" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="CANCEL sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[CANCEL sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 70
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 CANCEL
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0

]]>
</message>

2011-02-25 18:39:15,226 INFO  [CancelRequestDispatcher] (Mobicents-SIP-Servlets-UDPMessageChannelThread-16) Routing of Cancel Request CANCEL sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 70
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 CANCEL
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0


2011-02-25 18:39:15,274 INFO  [SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-16) <message
from="127.0.0.1:5080" 
to="127.0.0.1:4264" 
time="1298677155227"
isSender="true" 
transactionId="z9hg4bk-d8754z-2c7c09d1c301b688-1---d8754z-:cancel" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="SIP/2.0 200 Canceling" 
>
<![CDATA[SIP/2.0 200 Canceling
To: <sip:1231@mobicents.org>;tag=644661
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
CSeq: 1 CANCEL
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Content-Length: 0

]]>
</message>

2011-02-25 18:39:15,276 ERROR [DispatchTask] (pool-2-thread-3) Unexpected exception while processing message CANCEL sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 70
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 CANCEL
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0


java.lang.NullPointerException
    at org.mobicents.servlet.sip.core.dispatchers.CancelRequestDispatcher$CancelDispatchTask.dispatch(CancelRequestDispatcher.java:213)
    at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:55)
    at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.run(DispatchTask.java:50)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
2011-02-25 18:39:17,238 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677157171"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:25,264 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677165187"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 1开发者_JAVA百科27.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>

2011-02-25 18:39:41,296 INFO  [SIPTransactionStack] (Timer-2) <message
from="127.0.0.1:5080" 
to="209.132.182.24:5060" 
time="1298677181225"
isSender="true" 
transactionId="z9hg4bk-383639-090e4cdcebba9bbc22601535d7b38077" 
callId="OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ." 
firstLine="INVITE sip:1231@mobicents.org SIP/2.0" 
>
<![CDATA[INVITE sip:1231@mobicents.org SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-383639-090e4cdcebba9bbc22601535d7b38077
Via: SIP/2.0/UDP 127.0.0.1:4264;branch=z9hG4bK-d8754z-2c7c09d1c301b688-1---d8754z-;rport=4264;received=127.0.0.1
Max-Forwards: 69
Contact: <sip:mobicents@127.0.0.1:4264>
To: <sip:1231@mobicents.org>
From: "mobicents" <sip:mobicents@mobicents.org>;tag=4ca712e5
Call-ID: OGU2ODE5ZWU1OGI0N2JiZDI4ZDU3MzdkNzBiYTA2NWQ.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410

v=0
o=- 12943150749439640 1 IN IP4 169.254.35.59
s=CounterPath X-Lite 4.0
c=IN IP4 169.254.35.59
t=0 0
a=ice-ufrag:adc74c
a=ice-pwd:324381c4c4ba56ec976fdfe2fe44d5de
m=audio 63472 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 169.254.35.59 63472 typ host
a=candidate:1 2 UDP 659134 169.254.35.59 63473 typ host
]]>
</message>


First step would be to make sure that you have provided the container the correct DAR configuration. That means that your SipApplication is registered for INVITE and CANCEL messages.

You sent an INVITE to 1231@mobicents.org, which the container resolves as external ip address that is why you can see : "Dispatching the request event outside the container".

You can see that the container is trying to send your INVITE to the resolved ip address of Mobicents.org

from="127.0.0.1:5080" 
to="209.132.182.24:5060" 

That is why you don't see your PRINTLN messages, this request is not meant to be for the container but for outside. From the logs you provided you can see also that the 180 RINGING never sent.

Seems that the SipSession never established and that is why when you try to CANCEL you get NullPointException.

What you need is to handle the requests inside the container.

Check on the CallBlocking example from Mobicents for some hints.

Let me know if i can help further.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号