【问题标题】:Response "488 Not Acceptable here" in Asterisk在 Asterisk 中响应“488 Not Acceptable here”
【发布时间】:2016-12-19 12:25:49
【问题描述】:

我在这里和谷歌上阅读了很多关于这个的帖子,但我仍然无法解决这个问题。我已经在服务器上安装了 Asterisk 并从 GSM 调用它。跟踪显示488 Not Acceptable Here。这是日志

<--- SIP read from UDP:xxx.xxx.xxx.xxx:5078 --->
INVITE sip:1002@xxx.xx.x.xx;user=phone SIP/2.0
Via: SIP/2.0/UDP xxx.xx.x.xx:5078;branch=z9hG4bKiectcmpi5pjew7vw7etticvmv;X-DispMsg=1401
Route: <sip:xxx.xx.x.xx:5060;transport=udp;lr>
Call-ID: t7mjcpnsmcc668tsnwjijwnmiucvjsuv@xxx.xx.x.xx
From: "1003"<sip:1003@xxx.xx.x.xx;transport=udp;user=phone>;tag=vww8u6mn-CC-1005-OFC-64
To: "1002"<sip:1002@xxx.xx.x.xx;transport=udp;user=phone>
CSeq: 1 INVITE
P-Charging-Vector: icid-value=A621B143ED238320161219141053;orig-ioi=xxx.xx.x.xx
Max-Forwards: 70
P-Access-Network-Info: GEN-ACCESS;"area-number=+xxx"
Contact: <sip:xxx.xx.x.xx:5060>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER,UPDATE
P-Asserted-Identity: <tel:878010200>
Supported: 100rel,timer,histinfo,precondition
Min-SE: 90
Session-Expires: 1800;refresher=uac
P-Early-Media: supported
Content-Length: 335
Content-Type: application/sdp

v=0
o=HuaweiSoftx3000 1073786885 1073786886 IN IP4 xxx.xx.x.xx
s=SipCall
c=IN IP4 xxx.xx.x.xx
t=0 0
m=audio 41908 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=ptime:5
a=curr:qos local sendrecv
a=curr:qos remote none
a=des:qos optional local sendrecv
a=des:qos optional remote sendrecv
a=3gOoBTC
<------------->
--- (19 headers 14 lines) ---
Sending to xxx.xx.x.xx:5078 (NAT)
Sending to xxx.xx.x.xx:5078 (NAT)
Using INVITE request as basis request - t7mjcpnsmcc668tsnwjijwnmiucvjsuv@xxx.xx.x.xx
Found peer '1003' for '1003' from xxx.xx.x.xx:5078
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 116
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 116
[Dec 19 09:10:00] NOTICE[4051][C-0000004a]: chan_sip.c:10563 process_sdp: No compatible codecs, not accepting this offer!

注意:IP 是虚拟的,因为信息很敏感。我相信这是关于

的部分
m=audio 41908 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000

如您所见,错误与编解码器有关。

[Dec 19 09:10:00] NOTICE[4051][C-0000004a]:chan_sip.c:10563 process_sdp:没有兼容的编解码器,不接受此优惠!

我已经在服务器端添加了这个编解码器

sip.conf

[general]
regcontext=dundiextens
srvlookup=no
nat=force_rport
bindport=5060
allowguest=yes
canreinvite=no
rtcachefriends=yes
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm

有人可以帮我解决这个问题吗?

CLI 中的编解码器:

    *CLI> core show codecs
    Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
          ID  TYPE     NAME DESCRIPTION
    -----------------------------------------------------------------------------------
          30 image      png (PNG Image)
           5 audio     g726 (G.726 RFC3551)
           3 audio     alaw (G.711 a-law)
           1 audio     g723 (G.723.1)
          19 audio    speex (SpeeX)
          20 audio    speex (SpeeX 16khz)
          21 audio    speex (SpeeX 32khz)
          23 audio     g722 (G722)
          31 video     h261 (H.261 video)
          32 video     h263 (H.263 video)
           7 audio    adpcm (Dialogic ADPCM)
          24 audio   siren7 (ITU G.722.1 (Siren7, licensed from Polycom))
          27 audio     g719 (ITU G.719)
          33 video    h263p (H.263+ video)
          34 video     h264 (H.264 video)
          18 audio     g729 (G.729A)
           8 audio     slin (16 bit Signed Linear PCM)
           9 audio     slin (16 bit Signed Linear PCM (12kHz))
          10 audio     slin (16 bit Signed Linear PCM (16kHz))
          11 audio     slin (16 bit Signed Linear PCM (24kHz))
          12 audio     slin (16 bit Signed Linear PCM (32kHz))
          13 audio     slin (16 bit Signed Linear PCM (44kHz))
          14 audio     slin (16 bit Signed Linear PCM (48kHz))
          15 audio     slin (16 bit Signed Linear PCM (96kHz))
          16 audio     slin (16 bit Signed Linear PCM (192kHz))
           2 audio     ulaw (G.711 u-law)
          17 audio    lpc10 (LPC10)
          26 audio  testlaw (G.711 test-law)
          39 audio     none (<Null> codec)
          25 audio  siren14 (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
           6 audio g726aal2 (G.726 AAL2)
          36 video      vp8 (VP8 video)
           4 audio      gsm (GSM)
          35 video    mpeg4 (MPEG4 video)
          22 audio     ilbc (iLBC)
          37  text      red (T.140 Realtime Text with redundancy)
          38  text     t140 (Passthrough T.140 Realtime Text)
          28 audio     opus (Opus Codec)
          29 image     jpeg (JPEG image)

【问题讨论】:

  • 您可以使用星号 cli 和以下命令检查星号中启用的编解码器:show codecs **, show translation and show translation recalc 10 if I think voip-info.org/wiki/view/Asterisk+codecs 可能不是最好的建议,但确实如此您尝试重新启动您的星号服务器或使其重新加载其配置文件?
  • 谢谢。当我输入上述命令时,我看到了很多编解码器。但这是哪个a=rtpmap:8 PCMA/8000
  • 我做了core reloadsip reloadiax2 reload ..各种重装..
  • 你应该有“8 (1
  • 你试过“/var/lib/asterisk/bin/module_admin reload”

标签: asterisk sip


【解决方案1】:

我看到您在 [general] 中允许了一些编解码器,但您是否在对等配置中禁止了任何编解码器?对等配置将覆盖 [general] 中的任何内容。

执行sip show peer PEERNAME 以检查允许特定对等方的编解码器。如果缺少编解码器,则更新配置。

检查至少有一个来自sip show peer PEERNAME 的编解码器在您使用的软件电话上可用。

【讨论】:

  • 感谢您的回答。我发现了问题。我正在使用 MySQL 的实时配置。我发现在我的 sip 用户那里,编解码器设置为gsm。我的问题是,既然我在 sip.conf 常规部分中也定义了 gsm,为什么它们不匹配?
  • 如果您在对等实时配置中没有放置任何内容,那么它应该采用 [general] 中的设置。如果您在对等实时配置中添加某些内容,那么它将忽略 [常规] 设置。
  • 所以这很奇怪,因为在实时配置中我有gsm,而在[一般]我又有gsm,例如在我的问题中你可以看到它。
  • 是的……我想。
  • 但是,如果您知道为什么会发生这种情况,我会很高兴听到的。否则感谢您检查sip show peer PEERNAME的要点,它也给了我一些答案
猜你喜欢
  • 1970-01-01
  • 2019-12-16
  • 1970-01-01
  • 2020-07-26
  • 2017-05-25
  • 1970-01-01
  • 1970-01-01
  • 2016-02-21
  • 1970-01-01
相关资源
最近更新 更多