我安装了一个FreePbx。但我有一个问题。我想拨打自己的手机,但我不能。
我有一个IP电话。我把他的类型从pjsip改为sip。
分机:102
扩展.conf:
[cocugunuzukarsilayin]
exten => myphonenumber,1,Answer()
exten => myphonenumber,n,Wait(1)
exten => myphonenumber,n,Playback(custom/sound2)
exten => myphonenumber,n,Wait(1)
exten => myphonenumber,n,Hangup()
测试.调用
Channel: SIP/102/myphonenumber
MaxRetries: 2
RetryTime: 30
WaitTime: 15
Context: cocugunuzukarsilayin
Extension: cocugunuzukarsilayin
Priority: 2
错误:
[2019-06-19 14:08:39] WARNING[8744]: chan_sip.c:6274 create_addr: Purely numeric hostname (102), and not a peer--rejecting!
[2019-06-19 14:08:39] NOTICE[8744]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[2019-06-19 14:08:39] WARNING[8744]: pbx_spool.c:350 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/test.call: Operation not permitted
问题出在哪里?
我有同样的错误消息。而且,我无法拨打电话。我的消息日志具有以下顺序:
chan_sip.c: Purely numeric hostname (1001), and not a peer--rejecting!
app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
我终于找到了解决方案,这是通过阅读这里的提示。我的问题是由扩展.conf中的技术类型不匹配引起的。我正在从sip.conf切换到pjsip.conf。但是我未能正确更新我的扩展名。
exten => 1001,1,Dial(SIP/1001,20,Ttm)
same => n,Hangup
修复是按如下方式修改:
exten => 1001,1,Dial(PJSIP/1001,20,Ttm)
same => n,Hangup
将该 SIP 更改为 PJSIP 后,错误消息将消除并恢复正常功能。
频道格式如下:
Channel: <Technology/Channel_Type>/<Resource/Gateway>/<Extension/Number>
请检查提到的"102"是否有效网关。