简体   繁体   中英

Sip Servlet not sending Invite request

I make a client using android JAIN-SIP application and I have a sip servlet running on mobiecent jboass as7. I have successful send REGISTER to server and register the client to location service. Now I send the invite request,Sip-Servlet response me 100 TRYING but there is no request on the other device on which the device is to be connected.

1) Android device1 Sip Stack is created on 10.0.2.15:5060

2) Android device2 Sip Stack is created on 10.0.2.15:5061

3) I am running server in 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>

This is Sip-Servlet doInvite() method

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")

You can make hint of probably what can be the issue. I am out of hints and ideas.

Your Via header is activate.adobe.com which is pretty weird. Probably going to an outside network. You should use local IP or name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM