Error 488 Not acceptable here - ssl

Hello I know there are already lot of topics about this error (or perhaps I don't have the same problem) but none of them answered my question, I am in a local network with blink on my PC and my asterisk server is on an external server hosted by ovh (so there is nat to do). I control the server via encrypted ssh session ofc.
As long as the call is not encrypted, everything is fine, I can call any user I want. But when I started to encrypt my traffic everything went wrong and I can't find why.I've generated certficate for both client and server, the traffic is encrypted because I can't see anything in wireshark(I can't see encrypted traffic but I see non-encrypted traffic). Blink is configured correctly with SDES mandatory, .pem file, car.crt , proxy on port 5061 tls, but I think the error is somewhere else.
Myconig for sip.conf is like this:
[general]
udpbindaddr=0.0.0.0
tcpenable=yes ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
tlsenable=yes ; Enable server for incoming TLS (secure) connections (default is no)
tlsbindaddr=0.0.0.0
transport=udp
disallow=all
allow=ulaw ; Allow codecs in order of preference
allow=alaw
dtmfmode = rfc2833
tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
tlscipher=ALL
tlsclientmethod=tlsv1
[201](can't communicate instant 488 error)
type=friend
username=vincent
context=from-sip
host=dynamic
secret=not4usry
callerid=vincent<201>
mailbox=201#default
nat=comedia
transport=tls
encryption=yes
[203](no tls user and can communicate with the ones who don't use tls)
type=friend
username=antoine
context=from-sip
host=dynamic
secret=not4usry
callerid=antoine<203>
mailbox=203#default
nat=comedia
Certificates have been generated using ./ast_tls_cert....
RTP logs
== Using SIP RTP CoS mark 5 [May 11 15:34:33]
WARNING[21893][C-00000d0e]: chan_sip.c:10803 process_sdp: Rejecting
secure audio stream without encryption details: audio 50026 RTP/SAVP
113 9 0 8 101
SIP LOGS
INVITE sip:203#vps466556.ovh.net SIP/2.0
Via: SIP/2.0/TLS
192.168.1.35:53076;rport;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias
Max-Forwards: 70
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To:
Contact:
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4966 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE,
REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Content-Type: application/sdp
Content-Length: 425
v=0
o=- 3735043210 3735043210 IN IP4 192.168.1.35
s=Blink 3.0.0 (Windows)
t=0 0
m=audio 50004 RTP/AVP 113 9 0 8 101
c=IN IP4 192.168.1.35
a=rtcp:50005
a=rtpmap:113 opus/48000/2
a=fmtp:113 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=zrtp-hash:1.10
af10bf32a78e03147ffbf2859f96cc8d401048ee46a1f2cb961c20139b219913
a=sendrecv
-- 2018-05-11 16:00:11.003276 [blink.exe 3320]: RECEIVED: Packet 136, +0:06:21.266013
54.37.8.124:5061 -(SIP over TLS)-> 192.168.1.35:53076 SIP/2.0 401 Unauthorized
Via: SIP/2.0/TLS
192.168.1.35:53076;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias;received=90.112.223.194;rport=53076
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To: ;tag=as50eb1885
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4966 INVITE
Server: Asterisk PBX 13.21.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6650a402"
Content-Length: 0
-- 2018-05-11 16:00:11.004276 [blink.exe 3320]: SENDING: Packet 137, +0:06:21.267013
192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 ACK sip:203#vps466556.ovh.net SIP/2.0
Via: SIP/2.0/TLS
192.168.1.35:53076;rport;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias
Max-Forwards: 70
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To: ;tag=as50eb1885
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4966 ACK
User-Agent: Blink 3.0.0 (Windows)
Content-Length: 0
-- 2018-05-11 16:00:11.005276 [blink.exe 3320]: SENDING: Packet 138, +0:06:21.268013
192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 INVITE sip:203#vps466556.ovh.net SIP/2.0
Via: SIP/2.0/TLS
192.168.1.35:53076;rport;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias
Max-Forwards: 70
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To:
Contact:
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4967 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE,
REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Authorization: Digest username="201", realm="asterisk",
nonce="6650a402", uri="sip:203#vps466556.ovh.net",
response="dcd6fcd9d8b7381f86f07e1326aa9134", algorithm=MD5
Content-Type: application/sdp
Content-Length: 425
v=0
o=- 3735043210 3735043210 IN IP4 192.168.1.35
s=Blink 3.0.0 (Windows)
t=0 0
m=audio 50004 RTP/AVP 113 9 0 8 101
c=IN IP4 192.168.1.35
a=rtcp:50005
a=rtpmap:113 opus/48000/2
a=fmtp:113 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=zrtp-hash:1.10
af10bf32a78e03147ffbf2859f96cc8d401048ee46a1f2cb961c20139b219913
a=sendrecv
-- 2018-05-11 16:00:11.087226 [blink.exe 3320]: RECEIVED: Packet 139, +0:06:21.349963
54.37.8.124:5061 -(SIP over TLS)-> 192.168.1.35:53076 SIP/2.0 488 Not acceptable here
Via: SIP/2.0/TLS
192.168.1.35:53076;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias;received=90.112.223.194;rport=53076
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To: ;tag=as50eb1885
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4967 INVITE
Server: Asterisk PBX 13.21.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
-- 2018-05-11 16:00:11.088227 [blink.exe 3320]: SENDING: Packet 140, +0:06:21.350964
192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 ACK sip:203#vps466556.ovh.net SIP/2.0
Via: SIP/2.0/TLS
192.168.1.35:53076;rport;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias
Max-Forwards: 70
From: "Vincent"
;tag=523fe49e3a8646608481fbac0801b605
To: ;tag=as50eb1885
Call-ID: 0fb841de523e4ff0a74514247bb3445a
CSeq: 4967 ACK
User-Agent: Blink 3.0.0 (Windows)
Content-Length: 0
Thanks for your help, Vince

Your SIP endpoint specifies encryption=yes, but the INVITE from your client specifies RTP/AVP, not RTP/SAVP. iirc, Blink has an option for optimistic or mandatory encryption; you'll need to change it to mandatory.

If you have the same problem as me, reinstall the Srtp library and asterisk, also log sip request because I had a bug where Blink didn't send register request anymore (even when pushing that register button 1000times) so I downloaded PhonerLite and everything worked perfectly

Related

Rescomm Call fails due to: "Media path is lost due to connectivity issues" error

I am using RestComm Connect installed on a cloud VPS.
When making a basic test call to verify setup and connectivity (use default RestComm accounts Bob & Alice; in this case Bob called Alice) the callee side reports the following error:
Media path is lost due to connectivity issues; call has been hung up
and then then call fails after a SIP '480 Temporarily Unavailable' is sent from callee to caller.
The browser console output looks as follows:
WebRTComm.js:4925 2017-10-10 17:06:31.370 WebRTCommCall:onRtcPeerConnectionIceChangeEvent(): Media path is lost due to connectivity issues; call has been hung up
Stack trace:
at commonLog (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:4884:10)
at console.error (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:4957:4)
at WebRTCommCall.onRtcPeerConnectionIceChangeEvent (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:3871:12)
at RTCPeerConnection.peerConnection.oniceconnectionstatechange (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:3047:9)
commonLog # WebRTComm.js:4925
console.error # WebRTComm.js:4957
WebRTCommCall.onRtcPeerConnectionIceChangeEvent # WebRTComm.js:3871
peerConnection.oniceconnectionstatechange # WebRTComm.js:3047
WebRTComm.js:4925 2017-10-10 17:06:31.399 WebRTCommCall:close(), received media stats
[Arguments.<anonymous> (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:2354:13)]
WebRTComm.js:4925 2017-10-10 17:06:31.400 WebRTCommCall:hangup()
[WebRTCommCall.hangup (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:2186:10)]
WebRTComm.js:4925 2017-10-10 17:06:31.401 PrivateJainSipCallConnector:close(): this.sipCallState=INVITED_INITIAL_STATE
[PrivateJainSipCallConnector.close (https://api-test.click2callme.pl/olympus/resources/js/mobicents-libs/WebRTComm.js:484:10)]
WebRTComm.js:4925 2017-10-10 17:06:31.402 SIP message sent: SIP/2.0 480 Temporarily Unavailable
Call-ID: 9b591496fb3bc5aac39075c5ea227d8b#213.32.22.60
CSeq: 1 INVITE
From: <sip:bob#77.255.251.128:57765>;tag=80839608_220982c6_57a5b08a_2ccbc3df
To: <sip:alice#178.43.83.112:63131>;tag=1507647967531
Max-Forwards: 70
Via: SIP/2.0/WSS 213.32.22.60:5083;branch=z9hG4bK2ccbc3df_57a5b08a_b9a9c4de-4268-4b16-a02b-4f8795cb4c2c;rport
Contact: <sip:alice#SpUEEE9qhnZn.invalid;transport=wss>
Content-Length: 0
The excerpt from RestComm's server.log is as follows:
17:04:22,641 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (pool-AffinityJAIN-thread-47) <message
from="178.43.83.112:63131"
to="213.32.22.60:5083"
time="1507647862640"
isSender="false"
transactionId="z9hg4bk2ccbc3df_57a5b08a_b9a9c4de-4268-4b16-a02b-4f8795cb4c2c"
callId="9b591496fb3bc5aac39075c5ea227d8b#213.32.22.60"
firstLine="SIP/2.0 480 Temporarily Unavailable"
>
<![CDATA[SIP/2.0 480 Temporarily Unavailable
Call-ID: 9b591496fb3bc5aac39075c5ea227d8b#213.32.22.60
CSeq: 1 INVITE
From: <sip:bob#77.255.251.128:57765>;tag=80839608_220982c6_57a5b08a_2ccbc3df
To: <sip:alice#178.43.83.112:63131>;tag=1507647967531
Max-Forwards: 70
Via: SIP/2.0/WSS 213.32.22.60:5083;branch=z9hG4bK2ccbc3df_57a5b08a_b9a9c4de-4268-4b16-a02b-4f8795cb4c2c;rport
Contact: <sip:alice#178.43.83.112:63131;transport=wss>
Content-Length: 0
]]>
</message>
This looks like some kind of NAT traversal issue related to ICE/STUN.
I am using a custom STUN server and checked that is works using the below command:
vps404561:/$ stun 213.32.22.60:3478
STUN client version 0.96
Primary: Open
Return value is 0x000001
Any ideas what might be the exact cause of this problem?
I'm also looking for some hints / tips how to further troubleshoot this issue.
Thanks,
Dominik

RestComm SIpServlet - Sip Servlet as Application Server in IMS network

I'm trying to develop an IMS application server using a RestComm SipServlet.
Initially my aim is just to insert the AS in the call flow without doing anything special.
The application Server has just to doStuff and forward initial invite.
The problem is that the sip stack by RestComm does not remove the Route from the Invite addind it to the route header therefor the invite is routed to the AS again generating a loop.
When I try to edit the SipRequest removing Route Header the AS answer with a 500 due to the fact that I can't modify system header.
Here a snippet of the code
#Override
protected final void doInvite(SipServletRequest request)
throws ServletException, IOException {
//DO STUFF
System.out.println("RECEIVED AN INVITE");
// These lines generate a 500
// request.removeHeader("route");
// request.removeHeader("route");
ProxyImpl p = (ProxyImpl) request.getProxy(true);
p.setRecordRoute(false);
p.setSupervised(true);
p.setParallel(true);
p.proxyTo(request.getRequestURI());
p.startProxy();
}
I'm going crazy :/
Hope someone can give me some suggestions...
I am also new to Sip Servlets but when I was reading documentation I encountered on this info:
"A route modifier, which consists of one of the following strings: ROUTE, ROUTE_BACK or NO_ROUTE. The route modifier is used in conjunction with the route information to route a request externally." related to mobicents-dar.properties.
Maybe it helps.
Unlikely I am still struggling with the original problem. I have been inspecting on the hint Bartek gave to me. Unluckly the documentation is very poor and, probably I'm not understanding it completely.
Anyway I will share my results manipulating dar properties file.
Definitions are taken from the SipServlet Specification v1.1
ROUTE modifier indicates that SipApplicationRouterInfo.getRoutes() returns valid routes. It is up to the container to decide whether they are external or if an internal route was returned. All of the routes returned MUST be of the same type, so the container can make the determination by examining the first route only.
2017-10-10 15:55:01,372 ERROR [SipApplicationDispatcherImpl] (pool-AffinityJAIN-thread-1) Unexpected exception while processing request
INVITE sip:test2#mydomain.net SIP/2.0
Via: SIP/2.0/TCP 10.39.117.121:50302;rport=50302;branch=z9hG4bKPj921L-Q-IghWuH.rSX.uNoNMh9T7gZilB;received=10.39.117.121
Via: SIP/2.0/TCP 10.39.117.93:6560;received=10.39.117.93;branch=z9hG4bK+aa78dad05a4a559d9e4635f37906172a1+sip+5+a64ded2b
Route: <sip:moby#moby.dev.mydomain.sys;lr>
Route: <sip:odi_6fWaVvB68v#10.39.117.121:5054;lr;orig>
Record-Route: <sip:sprout.dev.mydomain.sys:5054;transport=TCP;lr;service=scscf;billing-role=charge-orig>
Record-Route: <sip:10.39.117.93:6560;lr>
From: "itsme" <sip:test_1#mydomain.net>;tag=10.39.117.93+5+2cdeefc2+8fc7709c
To: <sip:test2#mydomain.net>
CSeq: 1 INVITE
Expires: 180
Call-Info: <sip:10.39.117.93:6560>;method="NOTIFY;Event=telephone-event;Duration=2000"
P-Charging-Function-Addresses: ccf=pri_ccf_address
Supported: outbound,path,replaces
P-Charging-Vector: icid-value="0be3bd9333dd5089baf80bf17225e3d6";orig-ioi=mydomain.net
Contact: <sip:test_1#195.130.246.72:46973;transport=tcp;rinstance=e637627c20b12d87;ob>;+sip.instance="<urn:uuid:968fdfa1-95d3-59cb-acb3-403d721daeee>"
P-Asserted-Identity: <sip:test_1#mydomain.net>
Max-Forwards: 68
Call-ID: 0gQAAC8WAAACBAAALxYAAOYHyDdZmVO7ntMtj/uEnAYHN75Z51iTlNo7aI6WHcJ6VqorSJqCC0eLxClj9KOJnw--#10.39.117.93
Allow: SUBSCRIBE,NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS
User-Agent: X-Lite release 5.0.1 stamp 86895
P-Visited-Network-ID: perim.dev.ims.ext1.net
Accept: application/sdp,application/dtmf-relay
Session-Expires: 600
P-Served-User: <sip:test_1#mydomain.net>;regstate=reg;sescase=orig
Content-Type: application/sdp
Content-Length: 281
v=0
o=- 14048926850737 14048926850737 IN IP4 10.39.117.93
s=-
c=IN IP4 10.39.117.93
t=0 0
m=audio 45234 RTP/AVP 120 0 101
a=sendrecv
a=rtpmap:120 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=fmtp:101 0-15
org.mobicents.servlet.sip.core.DispatcherException: Impossible to parse the route returned by the application router into a compliant address
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.checkRouteModifier(InitialRequestDispatcher.java:575)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchMessage(InitialRequestDispatcher.java:299)
at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:927)
at gov.nist.javax.sip.EventScanner.deliverRequestEvent(EventScanner.java:250)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:146)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:185)
at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1328)
at gov.nist.javax.sip.stack.SIPServerTransactionImpl.processRequest(SIPServerTransactionImpl.java:851)
at gov.nist.javax.sip.stack.ConnectionOrientedMessageChannel.processMessage(ConnectionOrientedMessageChannel.java:473)
at gov.nist.javax.sip.parser.NioPipelineParser$Dispatch.run(NioPipelineParser.java:132)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at gov.nist.javax.sip.MDCScheduledTHExecutor$MDCFuture.run(MDCScheduledTHExecutor.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.text.ParseException: :Bad address spec
at gov.nist.javax.sip.parser.Parser.createParseException(Parser.java:45)
at gov.nist.javax.sip.parser.AddressParser.address(AddressParser.java:120)
at gov.nist.javax.sip.parser.StringMsgParser.parseAddress(StringMsgParser.java:328)
at gov.nist.javax.sip.address.AddressFactoryImpl.createAddress(AddressFactoryImpl.java:124)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.checkRouteModifier(InitialRequestDispatcher.java:537)
... 17 more
I tryied also using the route field to point to the IMS node in order to forward back the SIP message. It works but I think that in this way the AS is not added in a Record-Route header and it cause a loop.
ROUTE_BACK directs the container to push its own route before pushing the external routes obtained from SipApplicationRouterInfo.getRoutes().
Application Router Behavior
In this case I have the following error and the AS answer with a 500.
2017-10-10 15:52:57,276 ERROR [SipApplicationDispatcherImpl] (pool-AffinityJAIN-thread-14) Unexpected exception while processing request
INVITE sip:test2#mydomain.net SIP/2.0
Via: SIP/2.0/TCP 10.39.117.121:43312;rport=43312;branch=z9hG4bKPj5IBDrImFUbO1J.J1LrwUcUQ-rsT28TRh;received=10.39.117.121
Via: SIP/2.0/TCP 10.39.117.93:6560;received=10.39.117.93;branch=z9hG4bK+84bf75e3c2c4ccae314be5e5849bd4961+sip+3+a64ded21
Route: <sip:moby#moby.dev.mydomain.sys;lr>
Route: <sip:odi_kMFF/TQSEV#10.39.117.121:5054;lr;orig>
Record-Route: <sip:sprout.dev.mydomain.sys:5054;transport=TCP;lr;service=scscf;billing-role=charge-orig>
Record-Route: <sip:10.39.117.93:6560;lr>
From: "Gennaro" <sip:test_1#mydomain.net>;tag=10.39.117.93+3+7334eef2+84ee6a06
To: <sip:test2#mydomain.net>
CSeq: 1 INVITE
Expires: 180
Call-Info: <sip:10.39.117.93:6560>;method="NOTIFY;Event=telephone-event;Duration=2000"
P-Charging-Function-Addresses: ccf=pri_ccf_address
Supported: outbound,path,replaces
P-Charging-Vector: icid-value="4167d34dd3fb232bb1f5fcf458dc1a9e";orig-ioi=mydomain.net
Contact: <sip:test_1#195.130.246.72:46973;transport=tcp;rinstance=e637627c20b12d87;ob>;+sip.instance="<urn:uuid:968fdfa1-95d3-59cb-acb3-403d721daeee>"
P-Asserted-Identity: <sip:test_1#mydomain.net>
Max-Forwards: 68
Call-ID: 0gQAAC8WAAACBAAALxYAAK2OW7qCKhw2LAbw9q+UyCfK2Js5PtCkUUpQsljED2+H/KOnkWSV97W3n9Uqpa3r4w--#10.39.117.93
Allow: SUBSCRIBE,NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS
User-Agent: X-Lite release 5.0.1 stamp 86895
P-Visited-Network-ID: perim.dev.ims.ext1.net
Accept: application/sdp,application/dtmf-relay
Session-Expires: 600
P-Served-User: <sip:test_1#mydomain.net>;regstate=reg;sescase=orig
Content-Type: application/sdp
Content-Length: 281
v=0
o=- 76884298267467 76884298267467 IN IP4 10.39.117.93
s=-
c=IN IP4 10.39.117.93
t=0 0
m=audio 45230 RTP/AVP 120 0 101
a=sendrecv
a=rtpmap:120 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=fmtp:101 0-15
java.lang.IllegalArgumentException: not allowed to set parameter, the URI is not modifiable
at org.mobicents.servlet.sip.address.SipURIImpl.setParameter(SipURIImpl.java:401)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.checkRouteModifier(InitialRequestDispatcher.java:591)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchMessage(InitialRequestDispatcher.java:299)
at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:927)
at gov.nist.javax.sip.EventScanner.deliverRequestEvent(EventScanner.java:250)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:146)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:185)
at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1328)
at gov.nist.javax.sip.stack.SIPServerTransactionImpl.processRequest(SIPServerTransactionImpl.java:851)
at gov.nist.javax.sip.stack.ConnectionOrientedMessageChannel.processMessage(ConnectionOrientedMessageChannel.java:473)
at gov.nist.javax.sip.parser.NioPipelineParser$Dispatch.run(NioPipelineParser.java:132)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at gov.nist.javax.sip.MDCScheduledTHExecutor$MDCFuture.run(MDCScheduledTHExecutor.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
NO_ROUTE indicates that Application Router is not returning any routes and the SipApplicationRouterInfo.getRoutes() value, if any, should be disregarded.
In this case the request seems to stuck in the AS with no way to forward the request to the IMS node.
Hope this explain the situation.
Thanks
The problem is that the application router does not recognize that the route is to itself, so it doesn't remove it. If you turn-on DEBUG level logging, you will see something like:
DEBUG [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (Mobicents-SIP-Servlets-UDPMessageChannelThread-1) the triplet host/port/transport : tas.core.ims1.test/-1/UDP is external : true
Notice that it get resolves to external. Try adding a hostnames attribute to the SIP connector:
<subsystem xmlns="urn:org.mobicents:sip-servlets-as8:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
<connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="2345:470:eb88:150::23" hostnames="tas.core.ims1.test"/>
<connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="2345:470:eb88:150::23" hostnames="tas.core.ims1.test"/>
...
</subsystem>
Another option would be to use the hostname rather than the IP address in the static-server-address attribute:
<subsystem xmlns="urn:org.mobicents:sip-servlets-as8:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
<connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="tas.core.ims1.test"/>
<connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="tas.core.ims1.test"/>
...
</subsystem>
Checking the log again, you will notice that it now resolves to internal:
DEBUG [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (Mobicents-SIP-Servlets-UDPMessageChannelThread-1) the triplet host/port/transport : tas.core.ims1.test/-1/UDP is external : false
It will also now pop-off the route to itself. In my case, if I print-out the popped route by calling SipServletRequest::getPoppedRoute(), I see:
Route: <sip:defaultapp#tas.core.ims1.test;lr>

sipjs and asterisk voice call no audio issue

I am using sipjs 0.7.5 version and asterisk 13.12.1 to established call between 2 sipjs call through webRTC. Both sipjs client and asterisk server are in local network. I am giving asterisk log of both sip messages and rtp packet bellow:
My problem is from log I am seeing that RTP packet is getting sent to both end via ICE. but in client browser no audio is playing. i.e. there is no audio in browser.
<--- SIP read from WS:192.168.40.48:10380 --->
INVITE sip:1063#192.168.40.45:5060 SIP/2.0
Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627
Max-Forwards: 70
To: <sip:1063#192.168.40.45:5060>
From: "1062" <sip:1062#192.168.40.45:5060>;tag=dc2e904hed
Call-ID: iu2sjhg9scpcrir0slju
CSeq: 8911 INVITE
Contact: <sip:haitt3bm#192.0.2.208;transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Content-Type: application/sdp
Supported: outbound
User-Agent: SIP.js/0.7.5
Content-Length: 1220
v=0
o=mozilla...THIS_IS_SDPARTA-49.0.2 2371358821422302787 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 DD:4B:CC:5D:70:15:CE:34:6B:A7:AF:2A:F8:AA:E8:B8:00:C3:28:F6:C8:9C:03:F5:E6:69:04:D6:81:11:3B:85
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 55294 UDP/TLS/RTP/SAVPF 109 9 0 8
c=IN IP4 192.168.35.1
a=candidate:0 1 UDP 2122252543 192.168.35.1 55294 typ host
a=candidate:1 1 UDP 2122187007 192.168.221.1 55295 typ host
a=candidate:2 1 UDP 2122121471 192.168.40.48 55296 typ host
a=candidate:0 2 UDP 2122252542 192.168.35.1 55297 typ host
a=candidate:1 2 UDP 2122187006 192.168.221.1 55298 typ host
a=candidate:2 2 UDP 2122121470 192.168.40.48 55299 typ host
a=sendrecv
a=end-of-candidates
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=fmtp:109 maxplaybackrate=48000;stereo=1
a=ice-pwd:43428b6027fb801be25dae4fdf05981a
a=ice-ufrag:84b4daa9
a=mid:sdparta_0
a=msid:{aaa3da10-5310-4167-b4b7-8328a8e5ba84} {4bee853d-06c4-4bfd-ae69-319a1994c844}
a=rtcp:55297 IN IP4 192.168.35.1
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=setup:actpass
a=ssrc:1072212720 cname:{a978e140-65a4-49e8-bb8b-2273ab1b6026}
<------------->
--- (13 headers 32 lines) ---
Using INVITE request as basis request - iu2sjhg9scpcrir0slju
Found peer '1062' for '1062' from 192.168.40.48:10380
== DTLS ECDH initialized (automatic), faster PFS enabled
== DTLS ECDH initialized (automatic), faster PFS enabled
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
[Nov 2 10:07:30] NOTICE[64407][C-00000008]: chan_sip.c:10315 process_sdp: Received SAVPF profle in audio offer but AVPF is not enabled, enabling: audio 55294 UDP/TLS/RTP/SAVPF 109 9 0 8
Found RTP audio format 109
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found audio description format opus for ID 109
Found audio description format G722 for ID 9
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Capabilities: us - (ulaw|alaw|gsm|h263), peer - audio=(ulaw|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 192.168.35.1:55294
Peer doesn't provide video
Looking for 1063 in default (domain 192.168.40.45)
sip_route_dump: route/path hop: <sip:haitt3bm#192.0.2.208;transport=ws;ob>
<--- Transmitting (no NAT) to 192.168.40.48:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48
From: "1062" <sip:1062#192.168.40.45:5060>;tag=dc2e904hed
To: <sip:1063#192.168.40.45:5060>
Call-ID: iu2sjhg9scpcrir0slju
CSeq: 8911 INVITE
Server: Asterisk PBX 13.12.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1063#192.168.40.45:5060;transport=WS>
Content-Length: 0
<------------>
-- Executing [1063#default:1] Dial("SIP/1062-00000010", "SIP/1063") in new stack
== DTLS ECDH initialized (automatic), faster PFS enabled
== DTLS ECDH initialized (automatic), faster PFS enabled
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
Audio is at 14284
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.40.48:10383:
INVITE sip:thqqcmh6#192.0.2.218;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747
Max-Forwards: 70
From: "1062" <sip:1062#192.168.40.45>;tag=as0cfcb1f6
To: <sip:thqqcmh6#192.0.2.218;transport=ws>
Contact: <sip:1062#192.168.40.45:5060;transport=WS>
Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290#192.168.40.45:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.12.1
Date: Wed, 02 Nov 2016 04:07:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 878
v=0
o=root 1773642892 1773642892 IN IP4 192.168.40.45
s=Asterisk PBX 13.12.1
c=IN IP4 192.168.40.45
t=0 0
m=audio 14284 RTP/SAVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=ice-ufrag:72465290354ec1f13cdfbb24592c36f1
a=ice-pwd:2e3f757f3f18a66e4ce88b32509c65d3
a=candidate:Hc0a8282d 1 UDP 2130706431 192.168.40.45 14284 typ host
a=candidate:Sb6a06f32 1 UDP 1694498815 182.160.111.50 14284 typ srflx raddr 192.168.40.45 rport 14284
a=candidate:Hc0a8282d 2 UDP 2130706430 192.168.40.45 14285 typ host
a=candidate:Sb6a06f32 2 UDP 1694498814 182.160.111.50 14285 typ srflx raddr 192.168.40.45 rport 14285
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 4B:8C:EF:A9:7A:59:B0:3A:73:B2:BF:70:4D:EC:94:B4:03:BD:FA:5C:E0:50:F8:CD:5B:52:CC:21:5E:D2:32:D4
a=sendrecv
---
-- Called SIP/1063
<--- SIP read from WS:192.168.40.48:10383 --->
SIP/2.0 100 Trying
Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747
To: <sip:thqqcmh6#192.0.2.218;transport=ws>
From: "1062" <sip:1062#192.168.40.45>;tag=as0cfcb1f6
Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290#192.168.40.45:5060
CSeq: 102 INVITE
Supported: outbound
User-Agent: SIP.js/0.7.5
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from WS:192.168.40.48:10383 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747
To: <sip:thqqcmh6#192.0.2.218;transport=ws>;tag=iliacjnojs
From: "1062" <sip:1062#192.168.40.45>;tag=as0cfcb1f6
Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290#192.168.40.45:5060
CSeq: 102 INVITE
Contact: <sip:thqqcmh6#192.0.2.218;transport=ws>
Supported: outbound
User-Agent: SIP.js/0.7.5
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
sip_route_dump: route/path hop: <sip:thqqcmh6#192.0.2.218;transport=ws>
-- SIP/1063-00000011 is ringing
<--- Transmitting (no NAT) to 192.168.40.48:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48
From: "1062" <sip:1062#192.168.40.45:5060>;tag=dc2e904hed
To: <sip:1063#192.168.40.45:5060>;tag=as6443d323
Call-ID: iu2sjhg9scpcrir0slju
CSeq: 8911 INVITE
Server: Asterisk PBX 13.12.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1063#192.168.40.45:5060;transport=WS>
Content-Length: 0
<------------>
<--- SIP read from WS:192.168.40.48:10383 --->
SIP/2.0 200 OK
Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747
To: <sip:thqqcmh6#192.0.2.218;transport=ws>;tag=iliacjnojs
From: "1062" <sip:1062#192.168.40.45>;tag=as0cfcb1f6
Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290#192.168.40.45:5060
CSeq: 102 INVITE
Contact: <sip:thqqcmh6#192.0.2.218;transport=ws>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SIP.js/0.7.5
Content-Type: application/sdp
Content-Length: 2050
v=0
o=- 8316228832686210830 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI
m=audio 55300 UDP/TLS/RTP/SAVP 0 8 101
c=IN IP4 192.168.35.1
a=rtcp:55303 IN IP4 192.168.35.1
a=candidate:1468545711 1 udp 2122260223 192.168.35.1 55300 typ host generation 0 network-id 3
a=candidate:4198037383 1 udp 2122194687 192.168.221.1 55301 typ host generation 0 network-id 2
a=candidate:235970510 1 udp 2122129151 192.168.40.48 55302 typ host generation 0 network-id 1 network-cost 10
a=candidate:1468545711 2 udp 2122260222 192.168.35.1 55303 typ host generation 0 network-id 3
a=candidate:4198037383 2 udp 2122194686 192.168.221.1 55304 typ host generation 0 network-id 2
a=candidate:235970510 2 udp 2122129150 192.168.40.48 55305 typ host generation 0 network-id 1 network-cost 10
a=candidate:420202079 1 tcp 1518280447 192.168.35.1 9 typ host tcptype active generation 0 network-id 3
a=candidate:3032157047 1 tcp 1518214911 192.168.221.1 9 typ host tcptype active generation 0 network-id 2
a=candidate:1083401022 1 tcp 1518149375 192.168.40.48 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=candidate:420202079 2 tcp 1518280446 192.168.35.1 9 typ host tcptype active generation 0 network-id 3
a=candidate:3032157047 2 tcp 1518214910 192.168.221.1 9 typ host tcptype active generation 0 network-id 2
a=candidate:1083401022 2 tcp 1518149374 192.168.40.48 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:Y4fJ
a=ice-pwd:v8rrrqGJU+aLsIg34kJbx9KL
a=fingerprint:sha-256 E0:34:1F:A5:DC:CA:56:F1:D1:70:61:DD:7F:F6:7A:34:F0:D7:9D:53:EF:22:0C:AB:09:63:B9:F5:1F:63:E4:E3
a=setup:active
a=mid:audio
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ssrc:4040961807 cname:zubAX2k8KRNEKsTO
a=ssrc:4040961807 msid:Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI b17cfaa5-2826-4bce-9f23-be489c523d03
a=ssrc:4040961807 mslabel:Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI
a=ssrc:4040961807 label:b17cfaa5-2826-4bce-9f23-be489c523d03
<------------->
--- (12 headers 33 lines) ---
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw|gsm|h263), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.35.1:55300
sip_route_dump: route/path hop: <sip:thqqcmh6#192.0.2.218;transport=ws>
set_destination: Parsing <sip:thqqcmh6#192.0.2.218;transport=ws> for address/port to send to
set_destination: URI is for WebSocket, we can't set destination
Transmitting (no NAT) to 192.0.2.218:5060:
ACK sip:thqqcmh6#192.0.2.218;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK52a8c1f1
Max-Forwards: 70
From: "1062" <sip:1062#192.168.40.45>;tag=as0cfcb1f6
To: <sip:thqqcmh6#192.0.2.218;transport=ws>;tag=iliacjnojs
Contact: <sip:1062#192.168.40.45:5060;transport=WS>
Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290#192.168.40.45:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.12.1
Content-Length: 0
---
-- SIP/1063-00000011 answered SIP/1062-00000010
Audio is at 11134
Adding codec ulaw to SDP
Adding codec alaw to SDP
<--- Reliably Transmitting (no NAT) to 192.168.40.48:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48
From: "1062" <sip:1062#192.168.40.45:5060>;tag=dc2e904hed
To: <sip:1063#192.168.40.45:5060>;tag=as6443d323
Call-ID: iu2sjhg9scpcrir0slju
CSeq: 8911 INVITE
Server: Asterisk PBX 13.12.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1063#192.168.40.45:5060;transport=WS>
Content-Type: application/sdp
Content-Length: 797
v=0
o=root 562796326 562796326 IN IP4 192.168.40.45
s=Asterisk PBX 13.12.1
c=IN IP4 192.168.40.45
t=0 0
m=audio 11134 RTP/SAVPF 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=maxptime:150
a=ice-ufrag:58d669ea38ed577755928de05ad017a0
a=ice-pwd:4513e77c0ac114a14e1f9a654764e1e9
a=candidate:Hc0a8282d 1 UDP 2130706431 192.168.40.45 11134 typ host
a=candidate:Sb6a06f32 1 UDP 1694498815 182.160.111.50 11134 typ srflx raddr 192.168.40.45 rport 11134
a=candidate:Hc0a8282d 2 UDP 2130706430 192.168.40.45 11135 typ host
a=candidate:Sb6a06f32 2 UDP 1694498814 182.160.111.50 11135 typ srflx raddr 192.168.40.45 rport 11135
a=connection:new
a=setup:active
a=fingerprint:SHA-256 4B:8C:EF:A9:7A:59:B0:3A:73:B2:BF:70:4D:EC:94:B4:03:BD:FA:5C:E0:50:F8:CD:5B:52:CC:21:5E:D2:32:D4
a=sendrecv
<------------>
-- Channel SIP/1063-00000011 joined 'simple_bridge' basic-bridge <047baea4-91e3-43fa-99ec-5b49d10b595c>
-- Channel SIP/1062-00000010 joined 'simple_bridge' basic-bridge <047baea4-91e3-43fa-99ec-5b49d10b595c>
> 0x7f243407b350 -- Probation passed - setting RTP source address to 192.168.40.48:55302
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012779, ts 909638055, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012780, ts 909638215, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012781, ts 909638375, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012782, ts 909638535, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012783, ts 909638695, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012784, ts 909638855, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012785, ts 909639015, len 000160)
<--- SIP read from WS:192.168.40.48:10380 --->
ACK sip:1063#192.168.40.45:5060;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK6228050
Max-Forwards: 70
To: <sip:1063#192.168.40.45:5060>;tag=as6443d323
From: "1062" <sip:1062#192.168.40.45:5060>;tag=dc2e904hed
Call-ID: iu2sjhg9scpcrir0slju
CSeq: 8911 ACK
Supported: outbound
User-Agent: SIP.js/0.7.5
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012786, ts 909639175, len 000160)
Sent RTP packet to 192.168.35.1:55294 (via ICE) (type 00, seq 006802, ts 909639168, len 000160)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012787, ts 909639335, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006803, ts 909639328, len 000170)
> 0x7f24340788f0 -- Probation passed - setting RTP source address to 192.168.40.48:55296
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029688, ts 3658919058, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024034, ts 3658919056, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012788, ts 909639495, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006804, ts 909639488, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029689, ts 3658919218, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024035, ts 3658919216, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012789, ts 909639655, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006805, ts 909639648, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029690, ts 3658919378, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024036, ts 3658919376, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012790, ts 909639815, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006806, ts 909639808, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029691, ts 3658919538, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024037, ts 3658919536, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012791, ts 909639975, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006807, ts 909639968, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029692, ts 3658919698, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024038, ts 3658919696, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012792, ts 909640135, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006808, ts 909640128, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029693, ts 3658919858, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024039, ts 3658919856, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012793, ts 909640295, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006809, ts 909640288, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029694, ts 3658920018, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024040, ts 3658920016, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012794, ts 909640455, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006810, ts 909640448, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029695, ts 3658920178, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024041, ts 3658920176, len 000170)
Got RTP packet from 192.168.40.48:55302 (type 00, seq 012795, ts 909640615, len 000160)
Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006811, ts 909640608, len 000170)
Got RTP packet from 192.168.40.48:55296 (type 00, seq 029696, ts 3658920338, len 000160)
Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024042, ts 3658920336, len 000170)

Cannot establish WebRTC connection (different codecs and payload type in SDP)

I'm trying to establish webrtc connection between browser and media server. But, in reply to Media server offer, Firefox chooses VP8 codec instead H264. Unfortunately, Media server not compatible with VP8 now and supports only H264. How can I make Firefox to use compatible format with Media Server?
Remote SDP (offer):
v=0
o=Flussonic 1468826141836803755 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256C7:B3:54:AA:EB:53:21:B0:19:81:D6:29:F8:71:71:F3:1C:36:AC:DA:E9:43:8A:4B:96:C2:31:E3:A2:92:3D:95
a=group:BUNDLE video_t1
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 126
c=IN IP4 0.0.0.0
a=bundle-only
a=sendrecv
a=fmtp:126 profile-level-id=64e01f;level-asymmetry-allowed=0;sprop-parameter-sets=Z2QAH6wrUCgC3IAAAAABZ2QAH6wrUCgC3IAAAAABZ2QAH6wrUCgC3IA=,aO48MA==;packetization-mode=1
a=ice-pwd:804089D4B00B2DF987C9B443387755E8
a=ice-ufrag:E39A4B11
a=mid:video_t1
a=msid:{ffe2aa2b-d835-478f-abcb-ab35424e2eb4} {9547d2eb-2fd4-427d-986c-a579646ecd29}
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-mux
a=rtpmap:126 H264/90000
a=setup:actpass
a=ssrc:4070073620 cname:{ef2d113f-c17c-40ab-bf9c-67c9dcb9eb20}
Local SDP (answer):
v=0
o=mozilla...THIS_IS_SDPARTA-47.0.1 2896632948472560668 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 0D:FC:13:73:48:21:B0:16:79:49:62:FC:64:D6:E2:2B:66:EA:FA:92:5A:15:BD:F4:92:ED:29:22:9E:0A:9E:3F
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 0 UDP/TLS/RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=inactive
a=end-of-candidates
a=rtpmap:120 VP8/90000
Firefox version: 47.0.1
OpenH264 version: 1.5.3
I also meet the same problem.
I tried the followings:
(1) Generate an additional H.264 capability including "profile-level-id=42e01f"
(2) Assign the description above at top of video block of SDP
After test it works - answered SDP with H.264 and both side got the media streams each other.
(Firefox version: 55.0.3, OpenH264 version:1.6)
HOWEVER,
At Chrome (60.0.3112.113) I got "488 Not Acceptable Here" from the answerer,
and I tried to changed the position of added H.264 description to the bottom of video capabilities,
it is solved but for case of FireFox it failed.
So far I still have no idea on this...
Firefox is rejecting your offer, the port in the m-line is set to 0.
You probably need an fmtp line describing your h264 profile level id at least (as well as level asymmetry and packetization mode)
You can make Firefox to prioritize H.264.
In the about::config, search for h264
Set media.peerconnection.video.h264_enabled to true.
Set media.navigator.video.preferred_codec to 126 (this is the code for H.264). Create this entry if doesn't exists.

SIP REGISTER failed

I'm attempting to create a small VoIP Client in Visual Studio 2012.
i'm trying to send a REGISTER SIP message from a pc to an AsteriskNOW PBX via UDP. The devices are the following:
IP PBX AsteriskNOW: 192.168.1.37
PC that sends REGISTER message: 192.168.1.104
SIP account username: 117
SIP account password: abcd1234
so, the REGISTER message i'm trying to send is the following:
REGISTER sip:192.168.1.37 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK213760691;rport
From: <sip:117#192.168.1.37>;tag=1270517038
To: <sip:117#192.168.1.37>
Call-ID: 1808066864-5060-1#BJC.BGI.B.D
CSeq: 2001 REGISTER
Contact: <sip:117#192.168.1.104:5060>;reg-id=1;
+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Max-Forwards: 70
User-Agent: Grandstream GXP1165 1.0.6.7
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER,
UPDATE, MESSAGE
Content-Length: 0
of course, at the line
+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
there's the PC,s Network adapter MAC, instead of "AABBCCDDEEFF".
However, when I try to send the message, i get the following response from the server:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
192.168.1.104:5060;rport=5060;received=192.168.1.104;branch=z9hG4bK213760691
Call-ID: 1808066864-5060-1#BJC.BGI.B.D
From: <sip:117#192.168.1.37>;tag=1270517038
To: <sip:117#192.168.1.37>;tag=z9hG4bK2137606914
CSeq: 2001 REGISTER
WWW-Authenticate: Digest
realm="asterisk",nonce="1428402653/99967d603c38695f1c328332db91a43b",
opaque="416e7e1767513798",algorithm=md5,qop="auth"
Server: FPBX-AsteriskNOW-12.0.43(13.0.1)
Content-Length: 0
what can be the problem? Thank you!
I solved by using the ozeki library to manage SIP messages
I found the library here
http://www.voip-sip-sdk.com/p_179-windows-forms-softphone-vb-net-voip.html
Thank you!