执行asterisk -r 打开asterisk控制台
当客户端软电话注册分机时显示如下错误
chan_sip.c:8876 process_sdp: No compatible codecs, not accepting this offer!
可能就是asterisk配置的编码不支持
在电话配置中,配置允许所有编码
如我的电话配置在sip.conf中,
[general]
context = default
bindport = 5065
bindaddr = 0.0.0.0
tcpbindaddr = 0.0.0.0
tcpenable = yes
[1001]
type = friend
callerid = User One
username = 1001
secret = 1001
host = dynamic
canreinvite = no
context = from-ipphone
dtmfmode = rfc2833
mailbox = 1001
allow=all
;disallow = all
;allow = ulaw
;transport = udp
[1002]
type = friend
callerid = User Two
username = 1002
secret = 1002
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = 1002
context = from-ipphone
allow=all
;disallow = all
;allow = ulaw
;transport = udp
添加一行allow = all , 改为:
[general]
context = default
bindport = 5065
bindaddr = 0.0.0.0
tcpbindaddr = 0.0.0.0
tcpenable = yes
[1001]
type = friend
callerid = User One
username = 1001
secret = 1001
host = dynamic
canreinvite = no
context = from-ipphone
dtmfmode = rfc2833
mailbox = 1001
;disallow = all
allow = ulaw
;transport = udp
[1002]
type = friend
callerid = User Two
username = 1002
secret = 1002
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = 1002
context = from-ipphone
;disallow = all
allow = ulaw
;transport = udp