Select Page

Calling

PJ_SIP responds media is not accepted after enable SRTP in client with error SIP/2.0 488 Not Acceptable Here:

<--- Received SIP request (1876 bytes) from TLS:90.90.90.90:18243 --->
INVITE sip:66@voip.system.com:56061;transport=tls SIP/2.0
Via: SIP/2.0/TLS 90.90.90.90:18243;rport;branch=z9hG4bKPj8d1746d587cd45c3a4db32fd9400aa3d;alias
Max-Forwards: 70
From: "9001" <sip:9001@voip.system.com>;tag=5cbd7a8e71284a81acb0de85a918b70b
To: <sip:66@voip.system.com>
Contact: <sip:9001@90.90.90.90:18243;transport=TLS;ob>
Call-ID: 46d89b0c3e0840e7b092a8f1fc6fa229
CSeq: 20718 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.22
Authorization: Digest username="9001", realm="asterisk", nonce="1576584242/8d6213e4f54abe72cfaff003d3d3857c", uri="sip:66@voip.system.com:56061;transport=tls", response="8a2dd44925b57396348e72fc02ad2a16", algorithm=md5, cnonce="4364af5a8bb04255a67d55f2153b6d86", opaque="5f43353163452e5a", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   857

v=0
o=- 3785576641 3785576641 IN IP4 90.90.90.90
s=pjmedia
b=AS:84
t=0 0
a=X-nat:1
m=audio 15852 RTP/SAVP 107 8 0 101
c=IN IP4 90.90.90.90
b=TIAS:64000
a=rtcp:19230 IN IP4 90.90.90.90
a=sendrecv
a=rtpmap:107 opus/48000/2
a=fmtp:107 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=20000;useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:710349890 cname:4aec1e657d806148
a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:Qa3AtJlznmOH6vh4SdOoupd7a4YIgMRdV1NVFK8MZJX/V/J11EnLMJRI1Pi55g==
a=crypto:2 AES_256_CM_HMAC_SHA1_32 inline:NIVFx4Es6lZUEyIJu/803fjF9C+F6h12EGqtDpAP6YiZ++Zyl66g3wHmkesV1w==
a=crypto:3 AES_CM_128_HMAC_SHA1_80 inline:r8EoiqpH1GOqjFyrt+IVaRTDRU2cNC9zGWsB57E0
a=crypto:4 AES_CM_128_HMAC_SHA1_32 inline:YB9kd6DRjjuV/Sfg8ehhqnoPSntxoiSbkNyTgZeC

  == Setting global variable 'SIPDOMAIN' to 'voip.system.com'
<--- Transmitting SIP response (386 bytes) to TLS:90.90.90.90:18243 --->
SIP/2.0 100 Trying
Via: SIP/2.0/TLS 90.90.90.90:18243;rport=18243;received=90.90.90.90;branch=z9hG4bKPj8d1746d587cd45c3a4db32fd9400aa3d;alias
Call-ID: 46d89b0c3e0840e7b092a8f1fc6fa229
From: "9001" <sip:9001@voip.system.com>;tag=5cbd7a8e71284a81acb0de85a918b70b
To: <sip:66@voip.system.com>
CSeq: 20718 INVITE
Server: Asterisk PBX 16.6.2
Content-Length:  0


<--- Transmitting SIP response (440 bytes) to TLS:90.90.90.90:18243 --->
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/TLS 90.90.90.90:18243;rport=18243;received=90.90.90.90;branch=z9hG4bKPj8d1746d587cd45c3a4db32fd9400aa3d;alias
Call-ID: 46d89b0c3e0840e7b092a8f1fc6fa229
From: "9001" <sip:9001@voip.system.com>;tag=5cbd7a8e71284a81acb0de85a918b70b
To: <sip:66@voip.system.com>;tag=b54b0c73-9b77-4682-a5bb-5c483bd9f89a
CSeq: 20718 INVITE
Server: Asterisk PBX 16.6.2
Content-Length:  0

Debug is revealing below:


[Dec 17 12:37:31] DEBUG[8300] res_pjsip/pjsip_distributor.c: Searching for serializer associated with dialog dlg0x7f1178023508 for Request msg ACK/cseq=26966 (rdata0x7f10d802ef28)
[Dec 17 12:37:31] DEBUG[8300] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-0000004b to use for Request msg ACK/cseq=26966 (rdata0x7f10d802ef28)
[Dec 17 12:37:31] DEBUG[10517] netsock2.c: Splitting '90.152.65.76' into...
[Dec 17 12:37:31] DEBUG[10517] netsock2.c: ...host '90.152.65.76' and port ''.
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username '9001' domain 'voip.system.com'
[Dec 17 12:37:31] DEBUG[10517] res_config_mysql.c: MySQL RealTime: Connection okay.
[Dec 17 12:37:31] DEBUG[10517] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM ps_endpoints WHERE id = '9001@voip.system.com'
[Dec 17 12:37:31] DEBUG[10517] res_sorcery_realtime.c: Filtering out realtime field 'disallow' from retrieval
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [1800] in [0, 4294967295] gives [1800](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [1] in [0, 4294967295] gives [1](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [1] in [0, 4294967295] gives [1](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [90] in [0, 4294967295] gives [90](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_endpoint_identifier_user.c: Identified by From username '9001' domain 'voip.system.com'
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: Function session_inv_on_tsx_state_changed called on event TSX_STATE
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: inv_session 0x7f1168005158 has no ast session
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: The inv session still has an invite_tsx (0x7f1178009b68)
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: The UAS INVITE transaction involved in this state change is 0x7f1178009b68
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: The current transaction state is Confirmed
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: The transaction state change event is RX_MSG
[Dec 17 12:37:31] DEBUG[10517] res_pjsip_session.c: The current inv state is DISCONNCTD
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: Function session_inv_on_tsx_state_changed called on event TSX_STATE
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: inv_session 0x7f1168005158 has no ast session
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: The inv session does NOT have an invite_tsx
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: The UAS INVITE transaction involved in this state change is 0x7f1178009b68
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: The current transaction state is Terminated
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: The transaction state change event is TIMER
[Dec 17 12:37:31] DEBUG[8300] res_pjsip_session.c: The current inv state is DISCONNCTD
[Dec 17 12:37:40] DEBUG[10885] threadpool.c: Worker thread idle timeout reached. Dying.
[Dec 17 12:37:40] DEBUG[8276] threadpool.c: Destroying worker thread 80

Solution is to set use_avpf to false

'force_rport' => true
'ice_support' => true
'use_avpf' => false
'media_encryption' => 'sdes'