cd /var/lib/asterisk/agi-bin
touch dtmf2txt.sh
chmod +x dtmfivr.sh
edit dtmf2txt.sh by Your favorite text editor
i'm using mc -e dtfmivr.sh
(this is onlu an example)
    #!/bin/bash
    digits=$1
    number=$2
    time=`date`
    echo "$time : $1" >> /home/dtmf2txt/$2.txt

in extensions conf when DTMF are pressed You have to store pressed numbers in variable
when full number is reached You have to execute bash script using System(/var/lib/asterisk/agi-bin/stmfivr.sh ${variable_with_number_pressed} ${calleridnum})
or AGI(/var/lib/asterisk/agi-bin/stmfivr.sh ${variable_with_number_pressed} ${calleridnum})
then make some test : does System / AGI is executed ? doeas script create proper files ?

I know may be I am disturbing you ,but I am too thanks full for your help

But can you explain in detailed steps how to do that

 

What I understand from you I that I should  put this line at asterisk.conf and its already exist

And create a bash script            
#!/bin/bash
digits=$1
number=$2
echo "$1" >> $2.txt

At /var/lib/asterisk/agi-bin/dtmfivr.sh for example

After that what should I do

 

Regards

And really thanks

 

 

in asterisk.conf there is
"astagidir => /var/lib/asterisk/agi-bin"
it can be used for storing any scripts/programs fo *, it is suggested for storiong AGI scripts there
example: /var/lib/asterisk/agi-bin/dtmf2text.file.sh


Thanks for your help but where is should put this bash script ,can you guide me please

Regards

 

"...receiving digits from IVR through dtmf and store it on a text file "
short idea:
 1 IVR start
 2 set(number=)
 3 playback(press_digit_or_#_to_finish)
 4 (pressed) set(number=${number}${digit_pressed})
 5 playback(press_another_digit_or_#_to_finish)
 6 if digit pressed goto(pressed[point 44])
 7 if # pressed execute System(put_string_with_pressed_didgits_into_text_file.sh ${digit_pressed} ${calleridnum})
#########this script###############################
sh script
#!/bin/bash
digits=$1
number=$2
echo "$1" >> $2.txt


Dear

 

 I want to make a billing recharge through receiving digits from IVR through dtmf and store it on a text file ,

 

How can todo that ?

 

Regards

 
 


_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to