Конечно, вы можете сделать это, используя системную команду в диалплане. Или используя скрипт AGI. Обратите внимание, что SIP-протокол Asterisk может не работать, пока нет DNS-сервера (новые вызовы).
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.