NO JOY Looping a Dialplan System() Command

John Squared

New Member
Joined
Jan 25, 2016
Messages
8
Reaction score
0
Hello,

I'm hopijng someone can explain to me how I would go about running the following command (python) to run in bash in it's own process and set it to run X amount of times?

exten => s,n,System(gvoice -b -e ${GVACCT} -p ${GVPASS} send_sms ${SMSNUM} "${utterance}")

I've tried things like the following but still can't understand how this is done:

exten => s,n,System(n=0; while [[ $n -lt 2 ]]; do gvoice -b -e ${GVACCT} -p ${GVPASS} send_sms ${SMSNUM} "${utterance}"; n=$((n+1)); done)

exten => s,n,System(run -n 2 'gvoice -b -e ${GVACCT} -p ${GVPASS} send_sms ${SMSNUM} "${utterance}"')

Basically I just want to have pygooglevoice run my command twice so that two text messages are send instead of just one.

Any and all information will be greatly appreciated. Thanks!
 

Members online

Forum statistics

Threads
25,812
Messages
167,763
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top