我使用Android JAIN-SIP应用程序创建一个客户端,我有一个在mobiecent jboass as7上运行的sip servlet。 我已成功将REGISTER发送到服务器并将客户端注册到位置服务。 现在我发送邀请请求,Sip-Servlet响应我100 TRYING但是在设备连接的其他设备上没有请求。
1)Android设备1 Sip Stack在10.0.2.15:5060
创建2)Android device2 Sip Stack在10.0.2.15:5061
创建3)我在localhost JBOSS AS 7中运行服务器
00:46:38,709 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-1) <message
from="127.0.0.1:5060"
to="127.0.0.1:5080"
time="1433101598708"
isSender="false"
transactionId="z9hg4bk-353139-23dd952026f58e7b7fa437a9a829521a"
callId="ea66e330013864d677f61835b193ce05@10.0.2.15"
firstLine="INVITE sip:imran@10.0.2.15 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15 SIP/2.0
Call-ID: ea66e330013864d677f61835b193ce05@10.0.2.15
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=Tzt0ZEP92
To: <sip:imran@10.0.2.15>
Via: SIP/2.0/UDP 10.0.2.15:5060;rport=61459;branch=z9hG4bK-353139-23dd952026f58e7b7fa437a9a829521a;received=127.0.0.1
Max-Forwards: 70
Supported: replaces,outbound
Route: <sip:10.0.2.2:5080;transport=udp;lr>
Contact: <sip:mubeen@10.0.2.15:5060>
My-Header: my header value
Content-Type: application/sdp
My-Other-Header: my new header value
Call-Info: <http://www.antd.nist.gov>
Content-Length: 241
v=0
o=4855 13760799956958020 13760799956958020 IN IP4 10.0.2.15
s=mysession session
p=+46 8 52018010
c=IN IP4 10.0.2.15
t=0 0
m=audio 5061 RTP/AVP 0 4 18
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729A/8000
a=ptime:20
]]>
</message>
00:46:38,728 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Mobicents-SIP-Servlets-UDPMessageChannelThread-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101598727"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:46:38,732 INFO [org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher] (Mobicents-SIP-Servlets-UDPMessageChannelThread-1) Request event dispatched to org.illuxplain.sip.server
00:46:38,916 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="127.0.0.1:61459"
time="1433101598915"
isSender="true"
transactionId="z9hg4bk-353139-23dd952026f58e7b7fa437a9a829521a"
callId="ea66e330013864d677f61835b193ce05@10.0.2.15"
firstLine="SIP/2.0 100 Trying"
>
<![CDATA[SIP/2.0 100 Trying
To: <sip:imran@10.0.2.15>
Via: SIP/2.0/UDP 10.0.2.15:5060;rport=61459;branch=z9hG4bK-353139-23dd952026f58e7b7fa437a9a829521a;received=127.0.0.1
CSeq: 1 INVITE
Call-ID: ea66e330013864d677f61835b193ce05@10.0.2.15
From: <sip:mubeen@10.0.2.15:5060>;tag=Tzt0ZEP92
Server: Mobicents Restcomm 7.2.1.601
Content-Length: 0
]]>
</message>
00:46:39,235 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101599233"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:46:40,233 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101600233"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:46:42,233 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101602233"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:46:46,233 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101606233"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:46:54,234 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101614234"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
00:47:10,235 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (Timer-1) <message
from="127.0.0.1:5080"
to="10.0.2.15:5061"
time="1433101630235"
isSender="true"
transactionId="z9hg4bkce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8"
callId="f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1"
firstLine="INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:imran@10.0.2.15:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: f35cb07ebe1ddc8a5cedc1c1072eaa10@127.0.0.1
CSeq: 1 INVITE
From: <sip:mubeen@10.0.2.15:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:imran@10.0.2.15>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:mubeen@127.0.0.1:5080>
Via: SIP/2.0/UDP activate.adobe.com:5080;branch=z9hG4bKce7f0022-7c26-40b3-b53d-bd976010b3b4_9b2c9cf3_351e96b0-efbf-4055-ad41-0d2449a959e8
Content-Length: 0
]]>
</message>
这是Sip-Servlet doInvite()
方法
Address contactURI = sipFactory.createAddress(stringURI);
SipServletRequest outRequest = sipFactory.createRequest(req.getApplicationSession(), INVITE, req.getFrom().getURI(), req.getTo().getURI());
if(contactURI == null){
req.createResponse(SipServletResponse.SC_NOT_FOUND).send();
return;
}
outRequest.setRequestURI(contactURI.getURI());
if(req.getContent() == null){
outRequest.setContent(req.getContent(), req.getContentType());
}
outRequest.send();
//Create a Session there will be multiple request, Called DIALOG..
sessions.put(req.getSession(), outRequest.getSession());
sessions.put(outRequest.getSession(),req.getSession());
我的DAR文件
REGISTER: ("org.illuxplain.sip.server", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "0")
OPTIONS: ("org.illuxplain.sip.server", "DAR:From", "TERMINATING", "", "NO_ROUTE", "0")
INVITE: ("org.illuxplain.sip.server", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "0")
你可以暗示可能是什么问题。我没有提示和想法。
答案 0 :(得分:1)
你的Via标题是activate.adobe.com,这很奇怪。可能会去外部网络。您应该使用本地IP或名称。