Asterisk remote command execution

i have 1 Asterisk and 1 Elastix connected via iax trunk…on Lan…

I wish i could launch from Asterisk box the command : asterisk -rx ecc ecc…to Elastix one…to obtain inuse Sip channel value…

is it this possible?


You can do that using ssh,
ssh user@host "asterisk -rx ‘ASTERISK_CLI_COMMAND’ "

–Satish Barot

hi @satish4asterisk -I have a question

How I can run a command in other server over my dial plan.

i try this and dont works

exten => 7018,1,System(/usr/bin/ssh "lavariega@ init 0 )

I make a public key in mi server. when I run the command in the console the command works.

/usr/bin/ssh "lavariega@ init 0

but in the dial plan fail.

Wy dont you use AMI for this ?