I want to use Asterisk in a shell Linux program more or less like this :
asterisk -r && console dial 101
How can I do that ? Thank you.
I want to use Asterisk in a shell Linux program more or less like this :
asterisk -r && console dial 101
How can I do that ? Thank you.
You can run an asterisk command by adding the -x
option.
From the man page:
-x command
Connect to a running Asterisk process and execute a command on a
command line, passing any output through to standard out and
then terminating when the command execution completes. Implies
-r when -R is not explicitly supplied.
So you can do something like:
asterisk -rx "pjsip show endpoints"