Я делаю клиент, используя приложение JAIN-SIP для Android, и у меня есть sip-сервлет, запущенный на mobiecent jboass as7. У меня есть успешная передача REGISTER на сервер и регистрация клиента в службе определения местоположения. Теперь я отправляю запрос приглашения, Sip-Servlet отвечает мне 100 TRYING, но на другом устройстве, на котором должно быть подключено устройство, нет запроса.Sip Servlet не отправляет запрос приглашения
1) Android device1 Sip Стек создается на 10.0.2.15:5060
2) Android устройство2 Sip Стек создается на 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="[email protected]"
firstLine="INVITE sip:[email protected] SIP/2.0"
>
<![CDATA[INVITE sip:[email protected] SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=Tzt0ZEP92
To: <sip:[email protected]>
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:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="SIP/2.0 100 Trying"
>
<![CDATA[SIP/2.0 100 Trying
To: <sip:[email protected]>
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: [email protected]
From: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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="[email protected]"
firstLine="INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0"
>
<![CDATA[INVITE sip:[email protected]:5061;transport=udp;registering_acc=10.0.2.2 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]:5060>;tag=19882621_5c8e9ada_9b2c9cf3_ce7f0022-7c26-40b3-b53d-bd976010b3b4
To: <sip:[email protected]>
Max-Forwards: 70
User-Agent: Mobicents Restcomm 7.2.1.601
Contact: <sip:[email protected]: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-сервлетов 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());
My DAR file
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")
Вы можете сделать намек на то, что может быть проблемой. Я из намеков и идей.
Ох .. Да, но почему activ.adobe.com показывает? Я делаю Via заголовок с IP-адресом локального – mubeen
myViaHeader = this.headerFactory.createViaHeader ( \t \t \t \t \t sipProfile.getLocalIp(), sipProfile.getLocalPort(), \t \t \t \t \t sipProfile.getTransport(), нуль) ; \t \t \t myViaHeader.setRPort(); \t \t \t viaHeaders.add (myViaHeader); – mubeen
Что это за класс sipProfile? Просто используйте перечисление сетевого интерфейса, подобное этому http://stackoverflow.com/questions/494465/how-to-enumerate-ip-addresses-of-all-enabled-nic-cards-from-java, и предположите, что IP делает самый смысл. Используйте IP вместо имени хоста, это всегда лучше. –