How to solve this error --- Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)

ERROR[22900]: res_pjsip_session.c:937 handle_incoming_sdp: 2022207: Couldn’t negotiate stream 0:audio-0:audio:sendrecv (nothing)
<— Transmitting SIP response (373 bytes) to WSS:192.161.177.252:11738 —>
SIP/2.0 488 Not Acceptable Here

after registered successfully, when try call, I can see this error in asterisk log.

#include pjsip.endpoint_custom.conf

[2022207]
type=endpoint
aors=2022207
auth=2022207-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722,opus,g729
context=from-internal
callerid=2022207 <2022207>

dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=yes
refer_blind_progress=yes
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord

[102030]
type=endpoint
aors=102030
auth=102030-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722,opus,g729
context=from-internal
callerid=102030 <102030>

dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=yes
refer_blind_progress=yes
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord

[IDT-previous]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722,h264,mpeg4
aors=IDT-previous
send_connected_line=false
language=en
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=yes
t38_udptl_nat=no
send_rpid=yes
send_pai=yes
trust_id_outbound=yes
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

Try adding “disallow=all” before “allow=…” where it is missing.

I updated. and tried.
but same error
ERROR[23062]: res_pjsip_session.c:937 handle_incoming_sdp: 2022207: Couldn’t negotiate stream 0:audio-0:audio:sendrecv (nothing)
<— Transmitting SIP response (370 bytes) to WSS:104.223.86.8:46176 —>
SIP/2.0 488 Not Acceptable Here

You have different codecs allowed in different areas. Is that engineered?

what’s mean?
same codes allowed in two extensions

If using WebRTC then you can’t use an endpoint configured for a non-WebRTC device. The “webrtc” option on the endpoint will turn on WebRTC support for it.

I am trying to test on mobile phones.
mobile phones are impossible to use webrtc?

I can’t comment on mobile phones, I have no idea what you mean when saying that. You would need to provide actual full logging using “pjsip set logger on”. Due to the fact that WSS is in use I guessed that WebRTC is in use, since it is really the only thing that uses WSS.

@beatificangel I think what jcolp is trying to say is that your endpoint is not configured for webrtc. You must have:

[102030]
type=endpoint
webrtc=yes
...

Without webrtc=yes Asterisk doesn’t know to correctly create the DTSL stream for a call.

jcolp, what @beatificangel is saying is that rather than using the browser of a PC, a lot of people are attempting to use WebRTC solutions in mobile browser windows. Even tho there are a number of trade-offs, it seems a poplar option. Safari and Chrome etc, have recently added support for WebRTC, and you can capture the microphone and camera (after the permission request). It’s something of a developing sector of the industry but is exploding with demand - probably be cause of the availability of mobile phones vs actual laptop PCs. There are a number of Apps that serve as phones that are SIP capable, but probably seem plagued with issues, expensive, and are insecure by default, something that WebRTC solves. It also seems poplar with developers because you are able to use tools like HTML and Javascript to roll out a telephone solution of your own making.

Indeed, but specificity is important when providing information. We’re currently guessing based on the limited amount of information we have, so the responses can be incorrect. Providing an actual full trace would confirm this, instead of just referring to a mobile phone.

will check soon and update

it works!
thanks.
current I can call and receive.