Asterisk 不会像 extension_custom.conf 说的那样

Asterisk won't does as extension_custom.conf says

我目前正在做一个项目,我需要使用星号来完成一些特定的任务。

我做了什么

我 运行 通过 raspberry pi 星号并使用 Obi110 设备将 PSTN 呼叫转换为 VoIP。但是它将来电路由到我的 FreePBX。正如扩展文件所说,它以 "from trunk" 上下文名称出现。因此,为了能够接听来电并播放声音文件,我遵循了在线教程,并作为示例使用了提供的代码来检查它是否真的有效。所以在 extension_custom.conf 我写了下面的代码,

[from-trunk]
exten => s,1,Answer ; 
exten => s,2,Playback(tt-weasels) ; 
exten => s,3,Hangup ; 

exten => ste,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => ste,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => ste,hint,SIP/ste; hint  'ste' used for presence notification
exten => ste,3,Dial(SIP/ste) ; call the user ste'


exten => steand,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => steand,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => steand,hint,SIP/ste; hint  'steand' used for presence notification
exten => steand,3,Dial(SIP/steand) call the user 'steand' used for presence 
notification

我的问题

保存并重新启动 asterisk 并拨打 PSTN 线路 phone 后,它仍然响铃而不是按照命令进行。难道我做错了什么?我对此很陌生。谢谢。

分机的意思是 "no extension"。更可能的是,您在拨号方案中没有转到该分机。

使用

asterisk -rvvv 

来电时检查星号的输出,您将看到使用的上下文和扩展名。

此外,您不应该在自定义中使用 SAME 上下文。你应该使用 from-trunk-custom.