Сбой и неожиданный вывод при использовании сервлетов Java sip - PullRequest
0 голосов
/ 26 февраля 2011

Я пробую простую программу на Java, которая отображала бы Полученное приглашение и Полученное Отмена при вызове клиента x-lite SIP SIP сервлет и отменяет вызов соответственно. Мой код Java ниже. Я использую сервлет Tomcat Mobicents SIP -

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);
}
}

Но когда я запускаю сервлет и пытаюсь сделать вызов, а затем отменить, я не вижу ни одного из сообщений println. Но я вижу SIP INVITES, получаемый от моего клиента x-lite. Я должен был думать о том, что может идти не так, но мог прийти к выводу. Вот журналы консоли (также обратите внимание на исключение, возникающее при получении отмены от клиента x-lite). Ценю твою помощь.

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

1 Ответ

0 голосов
/ 27 февраля 2011

Первым шагом было бы убедиться, что вы предоставили контейнеру правильную конфигурацию DAR. Это означает, что ваше SipApplication зарегистрировано для сообщений INVITE и CANCEL.

Вы отправили сообщение INVITE на 1231@mobicents.org, который контейнер разрешает как внешний IP-адрес, поэтому вы можете увидеть: «Отправка события запроса вне контейнера».

Вы видите, что контейнер пытается отправить ваше INVITE на разрешенный IP-адрес Mobicents.org

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

Вот почему вы не видите свои сообщения PRINTLN, этот запрос предназначен не для контейнера, а для внешней стороны. Из предоставленных вами журналов вы также можете видеть, что 180-КОЛЬЦО никогда не отправлялось.

Похоже, что SipSession никогда не устанавливался, и поэтому, когда вы пытаетесь ОТМЕНИТЬ, вы получаете NullPointException.

Вам нужно обработать запросы внутри контейнера.

Проверьте на примере CallBlocking от Mobicents для некоторых подсказок.

Дайте мне знать, если я смогу помочь дальше.

...