<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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>
<blockquote cite="mid008c01c6a96f$344a8200$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-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" style=""><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Thanks for
your help but where is should put this bash script ,can
you guide me please </span></font><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><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;"><o:p> </o:p></span></font></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>
<br>
sh script<br>
#!/bin/bash<br>
digits=$1<br>
number=$2<br>
echo "$1" >> $2.txt<br>
<br>
<o:p></o:p></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><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><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><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><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><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><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><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><o:p></o:p></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="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></p>
</div>
</blockquote>
<br>
</body>
</html>