<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
cd /var/lib/asterisk/agi-bin<br>
touch dtmf2txt.sh<br>
chmod +x dtmfivr.sh<br>
edit dtmf2txt.sh by Your favorite text editor<br>
i'm using mc -e dtfmivr.sh<br>
(this is onlu an example)<br>
#!/bin/bash<br>
digits=$1<br>
number=$2<br>
time=`date`<br>
echo "$time : $1" >> /home/dtmf2txt/$2.txt<br>
<br>
in extensions conf when DTMF are pressed You have to store pressed
numbers in variable<br>
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})<br>
or AGI(/var/lib/asterisk/agi-bin/stmfivr.sh
${variable_with_number_pressed} ${calleridnum})<br>
then make some test : does System / AGI is executed ? doeas script
create proper files ? <br>
<blockquote cite="mid00ef01c6aa3c$8d1c7550$6e05a8c0@ck" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<div>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">I know may
be I am disturbing you ,but I am
too thanks full for your help <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">But can you
explain in detailed steps how
to do that <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">What I
understand from you I that I should
put this line at asterisk.conf and its already exist <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">And create a
bash script </span></font><br>
#!/bin/bash<br>
digits=$1<br>
number=$2<br>
echo "$1" >> $2.txt<br>
<br>
<font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal"><font color="navy" face="Times New Roman"
size="3"><span style="font-size: 12pt; color: navy;">At </span></font>/var/lib/asterisk/agi-bin/dtmfivr.sh
for example <o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">After that what should I do <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;"><o:p> <br>
</o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">Regards<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">And really thanks <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Times New Roman"
size="3"><span style="font-size: 12pt; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">in asterisk.conf there is <br>
"astagidir => /var/lib/asterisk/agi-bin"<br>
it can be used for storing any scripts/programs fo *, it is suggested
for
storiong AGI scripts there<br>
example: /var/lib/asterisk/agi-bin/dtmf2text.file.sh<br>
<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><!--[if gte mso 9]><xml>
<u1:shapedefaults u2:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u3:shapelayout u4:ext="edit">
<u3:idmap u4:ext="edit" data="1"/>
</u3:shapelayout>
</xml><![endif]-->Thanks
for your help but where is should put this bash script
,can you guide me please </span></font><u5:p></u5:p><o:p></o:p></p>
</div>
<p class="MsoNormal"><font color="navy" face="Times New Roman"
size="3"><span style="font-size: 12pt; color: navy;">Regards </span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><u5:p> </u5:p></span></font><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">"...</span></font><font
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">receiving digits from IVR
through
dtmf and store it on a text file </span></font>"<br>
short idea:<br>
1 IVR start<br>
2 set(number=)<br>
3 playback(press_digit_or_#_to_finish)<br>
4 (pressed) set(number=${number}${digit_pressed})<br>
5 playback(press_another_digit_or_#_to_finish)<br>
6 if digit pressed goto(pressed[point 44])<br>
7 if # pressed execute
System(put_string_with_pressed_didgits_into_text_file.sh
${digit_pressed}
${calleridnum})<br>
<font color="navy"><span style="color: navy;">#########this
script###############################</span></font><br>
sh script<br>
#!/bin/bash<br>
digits=$1<br>
number=$2<br>
echo "$1" >> $2.txt<br>
<br>
<br>
<font color="navy"><span style="color: navy;"><o:p></o:p></span></font></p>
<u5:p></u5:p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">Dear <u1:p></u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><u1:p> </u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"> I want to make</span></font><font
color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> a</span></font><font
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"> billing recharge through
receiving digits from IVR
through dtmf and store it on a text file ,<u1:p></u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><u1:p> </u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">How can </span></font><font
color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">to</span></font><font
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">do that ?<u1:p></u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><u1:p> </u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">Regards<u1:p></u1:p></span></font><u5:p></u5:p><o:p></o:p></p>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><u1:p> </u1:p></span></font><u5:p></u5:p><o:p></o:p><br>
<font color="black" face="Times New Roman" size="3"><span
style="font-size: 12pt;"><u5:p> </u5:p></span></font></p>
</div>
</blockquote>
<br>
</body>
</html>