这是我的 sip.conf
; inbound configuration
[nexmo-sip]
fromdomain=sip.nexmo.com
type=friend
context=nexmo
insecure=port,invite
nat=no
;Add your codec list here.
; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
allow=ulaw
allow=alaw
allow=G729
dtmfmode=rfc2833
[nexmo-sip-01](nexmo-sip)
host=173.193.199.24
[nexmo-sip-02](nexmo-sip)
host=174.37.245.34
[nexmo-sip-03](nexmo-sip)
host=5.10.112.121
[nexmo-sip-04](nexmo-sip)
host=5.10.112.122
[nexmo-sip-05](nexmo-sip)
host=119.81.44.6
[nexmo-sip-06](nexmo-sip)
host=119.81.44.7
;outbound configuration
[general]
register => <api-key>:<api-secret>@sip.nexmo.com
registerattempts=0
srvlookup=yes
context=nexmo-sip1
[nexmo]
username=<api-key>
host=sip.nexmo.com
defaultuser=<api-key>
fromuser=<myNumber123>
fromdomain=sip.nexmo.com
secret=<api-secret>
type=friend
context=nexmo-sip1
insecure=very
qualify=yes
nat=no
;Add your codec list here.
; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
allow=ulaw
allow=alaw
allow=G729
dtmfmode=rfc2833
[<myNumber123>] ; this number is at soft phone client
type=friend
context=nexmo-sip1
host=dynamic
secret=<myNumber123>
qualify=yes
[<mynumber123456>] ; this is my mobile number
type=friend
context=nexmo-sip1
host=dynamic
secret=<secretkey>
qualify=yes
这是 extensions.conf
[general]
live_dangerously=yes
[globals]
[nexmo-sip1]
exten => _X.,1,Dial(SIP/${EXTEN}@nexmo)
[default]
exten => s,1,gosub(nexmo-sip1,${EXTEN},1)
设置 1:如果上面是 extensions.conf 的设置,我可以从我的软客户端进行呼出,但无法获得对那个软客户端的呼入
设置 2:如果我将 extensions.conf 的设置更改如下,我可以在 softclient 接听来电,但无法拨打外呼。
[general]
live_dangerously=yes
[globals]
[nexmo-sip1]
exten => _X.,1,Dial(SIP/${EXTEN},30)
[default]
exten => s,1,gosub(nexmo-sip1,${EXTEN},1)
问题 1) 我应该进行哪些更改才能同时获得呼出和呼入电话?
问题 2:当我将 extensions.conf 设置为设置 1 时,我听不到对方的声音,但是当 extensions.conf 设置为设置 2 时,我听到双方的对话。如何解决这个问题?这是我没听到时看到的日志
[7 月 1 日 22:50:38] 警告 [11299]:chan_sip.c:4175 retrans_pkt:在传输 tvK9cRGNN 时达到重传超时 - 用于 seqno 21(关键响应)——参见https://wiki.asterisk.org/wiki/ display/AST/SIP+ Retransmissions Packet 在 8383ms 后超时,没有响应 [Jul 1 22:50:38] WARNING[11299]: chan_sip.c:4204 retrans_pkt: Hanging up call tvK9cRGNN- - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions)。
我知道有很多错误的配置,比如 insecure=very 等。但现在我想让这个原型成功运行