Thanks, You are right, the bash version should be:
#!bin/bash #Get and spawn AGI variables declare -a array while read -e ARG && [ "$ARG" ]; do array=(` echo $ARG | sed -e 's/://'`) export ${array[0]}={array[1]} done echo "EXEC \"Dial\" \"DAHDI/g2/$agi_dnid\"" #Get execution answer answer=read line Yes, it could also be written using C instead. Regards Gustavo -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users