Asterisk 关于星号VOIP

Asterisk 关于星号VOIP,asterisk,Asterisk,大家好!我们可以使用服务器星号停止dns服务器或启动dhcp服务吗??(当用户呼叫服务器时,他将收到服务器部分的响应“按按钮1停止dns服务,按按钮2重新启动服务器dns”。当然,您可以使用system comand in dialplan.或使用AGI脚本来完成此操作。 请注意,asterisk的SIP协议在没有DNS服务器(新呼叫)时可能无法工作 首先感谢您的回复!但我想问的是:当用户调用IVR时,系统必须提出5个选项,即:1-重新启动DHCP服务器2-重新启动DNS服务器3-重新启动web

大家好!我们可以使用服务器星号停止dns服务器或启动dhcp服务吗??(当用户呼叫服务器时,他将收到服务器部分的响应“按按钮1停止dns服务,按按钮2重新启动服务器dns”。

当然,您可以使用system comand in dialplan.或使用AGI脚本来完成此操作。 请注意,asterisk的SIP协议在没有DNS服务器(新呼叫)时可能无法工作


首先感谢您的回复!但我想问的是:当用户调用IVR时,系统必须提出5个选项,即:1-重新启动DHCP服务器2-重新启动DNS服务器3-重新启动web服务器4-停止DHCP服务器5-停止您看到的DNS服务器,因此,如果用户选择,系统必须执行相关的命令选择问题是什么?是的,星号可以做IVR。不,它不能猜出你需要哪个IVR并自己写。是的,它可以做任何系统命令,可能需要sudo权限等。事实上我不知道如何做…你能告诉我在IVR中写什么语法吗?例如,按下按钮1停止dns服务对不起,不,i c不要在一篇文章中教你写拨号计划。使用像奥雷利的《星号电话的未来》这样的书。好的,谢谢!!
System()  

Execute a system (Linux shell) command Description

System(command) – System command alone System(command arg1 arg2 etc) – Pass in some arguments System(command|args) – Use the standard asterisk syntax to pass in arguments Technical Info

Executes a command by using system(). System() passes the string unaltered to system(3). Running “man 3 system” will show exactly what system(3) does:

system() executes a command specified in string by calling /bin/sh -c string, and returns after the command has been completed.

Therefore System(command arg1 arg2 etc) can be used to pass along arguments. Return codes

System(command): Executes a command by using system(). If the command fails, the console should report a fallthrough. If you need to return a specific value (string) to the dialplan then use either AGI or Asterisk func shell as introduced in Asterisk 1.6.0.

Result of execution is returned in the SYSTEMSTATUS channel variable:

FAILURE Could not execute the specified command SUCCESS Specified command successfully executed APPERROR Triggered for example when you try to delete a file but the file was not there. NOTE – not documented, but can also return APPERROR NOTE – I don’t seem to be able to create a situation when FAILURE will be returned.