[asterisk-users] RES: RES: How to invoke a binary file from the dial plan?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Wed Jun 3 08:10:01 CDT 2015


Hi Kevin.

Thank you very much for the hint! It worked very well!

Your example     ' exten => 1234,1,System(echo "This is a test" >> /var/log/asterisk/test.txt) '     executes when the SIP client (my softphone Jitsi) sends  a SIP INVITE to asterisk.  So, the softphone tries to establish a session with target 1234.

Now, lets suppose my softphone rings and I answer a call. During the call, the caller asks me to execute a command (ex: to open a door or gate). In this case, what have I to program in dial plan to Asterisk execute System() again? Is it possible to execute a dial plan even during an ongoing call?

Finally, lets suppose I want to use my softphone to execute a dial plan, even without establishing a call (no session with target 1234). For example, If I decide to open a dor or gate using my softphone, without existing an ongoing call, what have I to program in dial plan to Asterisk executes System(). Is this idea possible?

Any hint will be very hepful!

Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
________________________________________
De: asterisk-users-bounces at lists.digium.com [asterisk-users-bounces at lists.digium.com] em Nome de Kevin Larsen [kevin.larsen at pioneerballoon.com]
Enviado: terça-feira, 2 de junho de 2015 17:50
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: How to invoke a binary file from the dial    plan?

> Ok. Thanks for the hint.
>
> But, what exactly is a "System() dialplan application"? Is it a kind
> of command that i can call in dial plan?
>
> I will look for System() related to dial plans.

>From the Asterisk CLI type:
core show application System

It will print out the syntax for the command. One of the easier dialplan applications.

exten => 1234,1,System(echo "This is a test" >> /var/log/asterisk/test.txt)

That line would use the Linux echo command to place the text "This is a test" into a file named test.txt located in the /var/log/asterisk directory.



More information about the asterisk-users mailing list