Asterisk
星號:對呼叫文件使用擴展模式
我正在嘗試製作一個腳本來為 Asterisk 執行呼叫文件,但是我希望呼叫文件中的副檔名與我的副檔名的模式相匹配。
呼叫文件:
Channel: trunk/10 Context: call-file Extension: 123 Priority: 1
extensions.conf:
[call-file] exten = _XXX,1,NoOp(it works)
123 應該能夠被 _XXX 匹配,但是只有當我在我的 extensions.conf 中明確寫入 123 時它才有效。使用該模式,我收到以下錯誤:
sent to invalid extension but no invalid handler: context,exten,priority=call-file,123,1
請注意,它首先嘗試呼叫trunk/10。
你的例子對我有用
Asterisk 1.8.32.2 [call-file] exten = _XXX,1,NoOp(it works) exten = _XXX,n,Wait(100) exten => s,1,Answer exten => s,2,Wait(10) Channel: Local/s@call-file/n Context: call-file Extension: 123 Priority: 1
結果:
-- Executing [s@call-file:1] Answer("Local/s@call-file-00000000;2", "") in new stack -- Executing [123@call-file:1] NoOp("Local/s@call-file-00000000;1", "it works") in new stack -- Executing [123@call-file:2] Wait("Local/s@call-file-00000000;1", "100") in new stack -- Remote UNIX connection -- Executing [s@call-file:2] Wait("Local/s@call-file-00000000;2", "10") in new stack
也許它不能呼叫中繼或者你需要更新你的星號。