488 Not Acceptable Here, with pjsip in android

Hi, I am using asterisk + webrtc for make a voice call, every thing is good and work properly in browser in chroom with jssip library. I wanted to do it in android so i decided to use pjsip library in android : Build Instructions β€” PJSIP Project 2.13-dev documentation
there is a sample app in that document i clone it and run it, signaling is good and work i registered in my sip server, but after i create call, i got :
488 Not Acceptable Here
why this happened?

here is my log after start call :

14:23:29.719  I  INVITE sip:johnNumber@voip.myserver.com SIP/2.0
14:23:29.719  I  Via: SIP/2.0/TCP 192.168.66.109:49141;rport;branch=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746;alias
14:23:29.719  I  Max-Forwards: 70
14:23:29.719  I  From: sip:david@voip.myserver.com;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.719  I  To: sip:johnNumber@voip.myserver.com
14:23:29.719  I  Contact: <sip:david@192.168.66.109:6000;ob>
14:23:29.719  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.719  I  CSeq: 14634 INVITE
14:23:29.720  I  Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
14:23:29.720  I  Supported: replaces, 100rel, timer, norefersub
14:23:29.720  I  Session-Expires: 1800
14:23:29.720  I  Min-SE: 90
14:23:29.720  I  User-Agent: Pjsua2 Android 2.13-dev
14:23:29.720  I  Content-Type: application/sdp
14:23:29.720  I  Content-Length:  1076
14:23:29.720  I  
14:23:29.720  I  v=0
14:23:29.720  I  o=- 3900221609 3900221609 IN IP4 192.168.66.109
14:23:29.720  I  s=pjmedia
14:23:29.720  I  b=AS:84
14:23:29.720  I  t=0 0
14:23:29.720  I  a=X-nat:0
14:23:29.720  I  m=audio 4011 RTP/AVP 96 97 98 99 100 101 3 0 8 9 120 121 122
14:23:29.720  I  c=IN IP4 192.168.66.109
14:23:29.720  I  b=TIAS:64000
14:23:29.720  I  a=rtcp:4010 IN IP4 192.168.66.109
14:23:29.720  I  a=sendrecv
14:23:29.720  I  a=rtpmap:96 speex/16000
14:23:29.720  I  a=rtpmap:97 speex/8000
14:23:29.720  I  a=rtpmap:98 speex/32000
14:23:29.720  I  a=rtpmap:99 AMR/8000
14:23:29.720  I  a=fmtp:99 octet-align=1
14:23:29.720  I  a=rtpmap:100 AMR-WB/16000
14:23:29.720  I  a=fmtp:100 octet-align=1
14:23:29.721  I  a=rtpmap:101 iLBC/8000
14:23:29.721  I  a=fmtp:101 mode=30
14:23:29.721  I  a=rtpmap:3 GSM/8000
14:23:29.721  I  a=rtpmap:0 PCMU/8000
14:23:29.721  I  a=rtpmap:8 PCMA/8000
14:23:29.721  I  a=rtpmap:9 G722/8000
14:23:29.721  I  a=rtpmap:120 telephone-event/16000
14:23:29.721  I  a=fmtp:120 0-16
14:23:29.721  I  a=rtpmap:121 telephone-event/8000
14:23:29.721  I  a=fmtp:121 0-16
14:23:29.721  I  a=rtpmap:122 telephone-event/32000
14:23:29.721  I  a=fmtp:122 0-16
14:23:29.721  I  a=ssrc:758325129 cname:0b0551f62bfa6faf
14:23:29.721  I  a=ice-ufrag:32779952
14:23:29.721  I  a=ice-pwd:6f72158317852d191df9a106
14:23:29.723  I  a=candidate:Hc0a8426d 1 UDP 2130706431 192.168.66.109 4011 typ host
14:23:29.723  I  a=candidate:H6622f135 1 UDP 2130706175 102.34.241.53 4011 typ host
14:23:29.723  I  a=candidate:Hc0a8426d 2 UDP 2130706430 192.168.66.109 4010 typ host
14:23:29.723  I  a=candidate:H6622f135 2 UDP 2130706174 102.34.241.53 4010 typ host
14:23:29.723  I  
14:23:29.723  I  --end msg--
14:23:29.753  I  14:23:29.752       tcpc0x7b22ae9028  TCP connect() error: [code=120111]: Connection refused
14:23:29.754  I  14:23:29.753        tsx0x7a9ca1b0a8  Temporary failure in sending Request msg INVITE/cseq=14634 (tdta0x7a9ca140a8), will try next server: Connection refused
14:23:29.755  I  14:23:29.754           pjsua_core.c  TX 1731 bytes Request msg INVITE/cseq=14634 (tdta0x7a9ca140a8) to UDP 48.25.22.222:5060:
14:23:29.755  I  INVITE sip:johnNumber@voip.myserver.com SIP/2.0
14:23:29.755  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport;branch=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746
14:23:29.755  I  Max-Forwards: 70
14:23:29.755  I  From: sip:david@voip.myserver.com;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.755  I  To: sip:johnNumber@voip.myserver.com
14:23:29.755  I  Contact: <sip:david@192.168.66.109:6000;ob>
14:23:29.755  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.755  I  CSeq: 14634 INVITE
14:23:29.755  I  Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
14:23:29.755  I  Supported: replaces, 100rel, timer, norefersub
14:23:29.755  I  Session-Expires: 1800
14:23:29.755  I  Min-SE: 90
14:23:29.755  I  User-Agent: Pjsua2 Android 2.13-dev
14:23:29.755  I  Content-Type: application/sdp
14:23:29.755  I  Content-Length:  1076
14:23:29.755  I  
14:23:29.755  I  v=0
14:23:29.755  I  o=- 3900221609 3900221609 IN IP4 192.168.66.109
14:23:29.755  I  s=pjmedia
14:23:29.755  I  b=AS:84
14:23:29.755  I  t=0 0
14:23:29.756  I  a=X-nat:0
14:23:29.756  I  m=audio 4011 RTP/AVP 96 97 98 99 100 101 3 0 8 9 120 121 122
14:23:29.756  I  c=IN IP4 192.168.66.109
14:23:29.756  I  b=TIAS:64000
14:23:29.756  I  a=rtcp:4010 IN IP4 192.168.66.109
14:23:29.756  I  a=sendrecv
14:23:29.756  I  a=rtpmap:96 speex/16000
14:23:29.756  I  a=rtpmap:97 speex/8000
14:23:29.756  I  a=rtpmap:98 speex/32000
14:23:29.756  I  a=rtpmap:99 AMR/8000
14:23:29.756  I  a=fmtp:99 octet-align=1
14:23:29.756  I  a=rtpmap:100 AMR-WB/16000
14:23:29.756  I  a=fmtp:100 octet-align=1
14:23:29.756  I  a=rtpmap:101 iLBC/8000
14:23:29.756  I  a=fmtp:101 mode=30
14:23:29.756  I  a=rtpmap:3 GSM/8000
14:23:29.756  I  a=rtpmap:0 PCMU/8000
14:23:29.756  I  a=rtpmap:8 PCMA/8000
14:23:29.756  I  a=rtpmap:9 G722/8000
14:23:29.756  I  a=rtpmap:120 telephone-event/16000
14:23:29.756  I  a=fmtp:120 0-16
14:23:29.756  I  a=rtpmap:121 telephone-event/8000
14:23:29.756  I  a=fmtp:121 0-16
14:23:29.756  I  a=rtpmap:122 telephone-event/32000
14:23:29.756  I  a=fmtp:122 0-16
14:23:29.756  I  a=ssrc:758325129 cname:0b0551f62bfa6faf
14:23:29.756  I  a=ice-ufrag:32779952
14:23:29.756  I  a=ice-pwd:6f72158317852d191df9a106
14:23:29.756  I  a=candidate:Hc0a8426d 1 UDP 2130706431 192.168.66.109 4011 typ host
14:23:29.756  I  a=candidate:H6622f135 1 UDP 2130706175 102.34.241.53 4011 typ host
14:23:29.756  I  a=candidate:Hc0a8426d 2 UDP 2130706430 192.168.66.109 4010 typ host
14:23:29.756  I  a=candidate:H6622f135 2 UDP 2130706174 102.34.241.53 4010 typ host
14:23:29.756  I  
14:23:29.756  I  --end msg--
14:23:29.757  I  14:23:29.757            pjsua_acc.c  Disconnected notification for transport tcpc0x7b22ae9028
14:23:29.757  I  14:23:29.757        sip_transport.c  .Transport tcpc0x7b22ae9028 shutting down, force=0
14:23:29.758  I  14:23:29.758       tcpc0x7b22ae9028  TCP transport destroyed with reason 120111: Connection refused
14:23:29.758  I  [INFO] isPopOver=false config=true
14:23:29.759  I  updateCaptionType: isFloating=false isApplication=true hasWindowDecorCaption=false this=DecorView@e83d0f5[]
14:23:29.759  D  setCaptionType = 0, this = DecorView@e83d0f5[]
14:23:29.771  I  getCurrentDensityDpi: from real metrics. densityDpi=420 msg=resources_loaded
14:23:29.771  I  setWindowBackground: isPopOver=false color=fff6f6f6 d=android.graphics.drawable.StateListDrawable@6ed4956
14:23:29.771  I  14:23:29.771           pjsua_core.c  .RX 580 bytes Response msg 401/INVITE/cseq=14634 (rdata0x7ab78ae028) from UDP 48.25.22.222:5060:
14:23:29.771  I  SIP/2.0 401 Unauthorized
14:23:29.771  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport=6000;received=192.168.66.109;branch=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746
14:23:29.771  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.771  I  From: <sip:david@voip.myserver.com>;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.771  I  To: <sip:johnNumber@voip.myserver.com>;tag=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746
14:23:29.771  I  CSeq: 14634 INVITE
14:23:29.771  I  WWW-Authenticate: Digest realm="asterisk",nonce="1691232808/4b58bdf644fb9ecbb0350604fdb14fdc",opaque="439c1604720cbd4e",algorithm=MD5,qop="auth"
14:23:29.771  I  Server: FPBX-15.0.37(16.30.0)
14:23:29.771  I  Content-Length:  0
14:23:29.772  I  
14:23:29.772  I  
14:23:29.772  I  --end msg--
14:23:29.772  I  14:23:29.772           pjsua_core.c  ..TX 404 bytes Request msg ACK/cseq=14634 (tdta0x7a9ca170a8) to UDP 48.25.22.222:5060:
14:23:29.772  I  ACK sip:johnNumber@voip.myserver.com SIP/2.0
14:23:29.772  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport;branch=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746
14:23:29.772  I  Max-Forwards: 70
14:23:29.772  I  From: sip:david@voip.myserver.com;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.772  I  To: sip:johnNumber@voip.myserver.com;tag=z9hG4bKPja55fc95a-af86-4b83-be69-01bd3a549746
14:23:29.772  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.772  I  CSeq: 14634 ACK
14:23:29.772  I  Content-Length:  0
14:23:29.772  I  
14:23:29.772  I  
14:23:29.772  I  --end msg--
14:23:29.773  I  14:23:29.773      sip_auth_client.c  ....Digest algorithm is "MD5"
14:23:29.774  I  14:23:29.774           pjsua_core.c  .......TX 2032 bytes Request msg INVITE/cseq=14635 (tdta0x7a9ca140a8) to UDP 48.25.22.222:5060:
14:23:29.774  I  INVITE sip:johnNumber@voip.myserver.com SIP/2.0
14:23:29.774  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport;branch=z9hG4bKPj95aa56a2-90b2-4caa-a4cc-92d99547b3f0
14:23:29.774  I  Max-Forwards: 70
14:23:29.774  I  From: sip:david@voip.myserver.com;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.774  I  To: sip:johnNumber@voip.myserver.com
14:23:29.774  I  Contact: <sip:david@192.168.66.109:6000;ob>
14:23:29.774  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.774  I  CSeq: 14635 INVITE
14:23:29.774  I  Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
14:23:29.774  I  Supported: replaces, 100rel, timer, norefersub
14:23:29.774  I  Session-Expires: 1800
14:23:29.774  I  Min-SE: 90
14:23:29.774  I  User-Agent: Pjsua2 Android 2.13-dev
14:23:29.774  I  Authorization: Digest username="654", realm="asterisk", nonce="1691232808/4b58bdf644fb9ecbb0350604fdb14fdc", uri="sip:johnNumber@voip.myserver.com", response="7e26e877a71af78bbf3f9b9d28bdbae7", algorithm=MD5, cnonce="9ea1b55e47fb48868f73fd46cf519396", opaque="439c1604720cbd4e", qop=auth, nc=00000001
14:23:29.774  I  Content-Type: application/sdp
14:23:29.774  I  Content-Length:  1076
14:23:29.774  I  
14:23:29.775  I  v=0
14:23:29.775  I  o=- 3900221609 3900221609 IN IP4 192.168.66.109
14:23:29.775  I  s=pjmedia
14:23:29.775  I  b=AS:84
14:23:29.775  I  t=0 0
14:23:29.775  I  a=X-nat:0
14:23:29.775  I  m=audio 4011 RTP/AVP 96 97 98 99 100 101 3 0 8 9 120 121 122
14:23:29.775  I  c=IN IP4 192.168.66.109
14:23:29.775  I  b=TIAS:64000
14:23:29.775  I  a=rtcp:4010 IN IP4 192.168.66.109
14:23:29.775  I  a=sendrecv
14:23:29.775  I  a=rtpmap:96 speex/16000
14:23:29.775  I  a=rtpmap:97 speex/8000
14:23:29.775  I  a=rtpmap:98 speex/32000
14:23:29.775  I  a=rtpmap:99 AMR/8000
14:23:29.775  I  a=fmtp:99 octet-align=1
14:23:29.775  I  a=rtpmap:100 AMR-WB/16000
14:23:29.775  I  a=fmtp:100 octet-align=1
14:23:29.775  I  a=rtpmap:101 iLBC/8000
14:23:29.775  I  a=fmtp:101 mode=30
14:23:29.775  I  a=rtpmap:3 GSM/8000
14:23:29.775  I  a=rtpmap:0 PCMU/8000
14:23:29.775  I  a=rtpmap:8 PCMA/8000
14:23:29.775  I  a=rtpmap:9 G722/8000
14:23:29.775  I  a=rtpmap:120 telephone-event/16000
14:23:29.775  I  a=fmtp:120 0-16
14:23:29.775  I  a=rtpmap:121 telephone-event/8000
14:23:29.775  I  a=fmtp:121 0-16
14:23:29.775  I  a=rtpmap:122 telephone-event/32000
14:23:29.775  I  a=fmtp:122 0-16
14:23:29.775  I  a=ssrc:758325129 cname:0b0551f62bfa6faf
14:23:29.775  I  a=ice-ufrag:32779952
14:23:29.775  I  a=ice-pwd:6f72158317852d191df9a106
14:23:29.775  I  a=candidate:Hc0a8426d 1 UDP 2130706431 192.168.66.109 4011 typ host
14:23:29.775  I  a=candidate:H6622f135 1 UDP 2130706175 102.34.241.53 4011 typ host
14:23:29.775  I  a=candidate:Hc0a8426d 2 UDP 2130706430 192.168.66.109 4010 typ host
14:23:29.775  I  a=candidate:H6622f135 2 UDP 2130706174 102.34.241.53 4010 typ host
14:23:29.775  I  
14:23:29.775  I  --end msg--
14:23:29.787  D  updateSurface: has no frame
14:23:29.788  D  updateSurface: has no frame
14:23:29.791  I  check: return. pkg=org.pjsip.pjsua2.app parent=null callers=com.android.internal.policy.DecorView.setVisibility:4378 android.app.ActivityThread.handleResumeActivity:5463 android.app.servertransaction.ResumeActivityItem.execute:54 android.app.servertransaction.ActivityTransactionItem.execute:45 android.app.servertransaction.TransactionExecutor.executeLifecycleState:176 
14:23:29.791  I  removeMultiSplitHandler: no exist. decor=DecorView@e83d0f5[]
14:23:29.793  I  14:23:29.792           pjsua_core.c  .RX 378 bytes Response msg 100/INVITE/cseq=14635 (rdata0x7ab78ae028) from UDP 48.25.22.222:5060:
14:23:29.793  I  SIP/2.0 100 Trying
14:23:29.793  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport=6000;received=192.168.66.109;branch=z9hG4bKPj95aa56a2-90b2-4caa-a4cc-92d99547b3f0
14:23:29.793  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.793  I  From: <sip:david@voip.myserver.com>;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.793  I  To: <sip:johnNumber@voip.myserver.com>
14:23:29.793  I  CSeq: 14635 INVITE
14:23:29.793  I  Server: FPBX-15.0.37(16.30.0)
14:23:29.793  I  Content-Length:  0
14:23:29.793  I  
14:23:29.793  I  
14:23:29.793  I  --end msg--
14:23:29.794  I  14:23:29.794           pjsua_core.c  .RX 432 bytes Response msg 488/INVITE/cseq=14635 (rdata0x7ab78ae028) from UDP 48.25.22.222:5060:
**14:23:29.794  I  SIP/2.0 488 Not Acceptable Here**
14:23:29.794  I  Via: SIP/2.0/UDP 192.168.66.109:6000;rport=6000;received=192.168.66.109;branch=z9hG4bKPj95aa56a2-90b2-4caa-a4cc-92d99547b3f0
14:23:29.794  I  Call-ID: 1da27124-8b58-4a2a-b1d6-2c9e2d04cfd8
14:23:29.794  I  From: <sip:david@voip.myserver.com>;tag=deebae0c-87a2-4150-aba9-9815c897d35a
14:23:29.794  I  To: <sip:johnNumber@voip.myserver.com>;tag=b3afff7e-60a8-4666-988c-050b194dc374
14:23:29.794  I  CSeq: 14635 INVITE
14:23:29.794  I  Server: FPBX-15.0.37(16.30.0)
14:23:29.794  I  Content-Length:  0

You can’t have an endpoint that is used for both WebRTC and non-WebRTC. The PJSIP client is not using WebRTC, thus rejected.

1 Like

thank you, so what is the solution now? should i change pjsip or make some config to asterisk. i read last document of pjsip and the said that support webrtc :
Release PJSIP version 2.12 Β· pjsip/pjproject Β· GitHub
also the said :
PJSIP version 2.8 is just released with the main focus on supporting WebRTC interopability
i do not know how to fix this

Have an endpoint for WebRTC, have an endpoint for normal SIP.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.