您可以在拨号计划中执行此操作...
[menu-main]
exten => s,1,Noop()
exten => s,n(msg),Background(ForTodayPress1TomorrPress2)
exten => s,1,Goto(menu-today)
exten => s,2,Goto(menu-tomorrow)
exten => i,1,Playback(invalid)
exten => i,n,Goto(msg)
exten => t,1,Goto(msg)
[menu-today]
etc...
[menu-tomorrow]
etc...
或者正如其他人建议的那样,您可以使用任何可以写入标准输入并从标准输出读取的语言来执行此操作。phpagi 实现是我特别喜欢的风格。它可能适合此示例,例如 PHP 在单独的盒子上运行,因此它不会在任何类型的负载下影响 PBX。
[menu-main]
exten => s,1,Noop()
exten => s,n(msg),Background(ForTodayPress1TomorrPress2)
exten => s,1,Goto(menu-today,s,1)
exten => s,2,Goto(menu-tomorrow,s,1)
exten => i,1,Playback(invalid)
exten => i,n,Goto(msg)
exten => t,1,Goto(msg)
[menu-today]
exten => s,1,Noop()
exten => s,n,agi(http://myapache/agi/readschedule.php)
exten => s,n,Hangup()