[asterisk-users] Asterisk Time Card
Nitesh Divecha
nitesh at vipernetworks.com
Sat May 26 10:16:11 MST 2007
Thanks Shanon and everyones input...
Finally, got the application working as planned with PHPAGI...
Now the only draw back is the voice... I am using text2wav to prompt all
the questions, but the voice is creepy...
Is their any easier way to replace the text2wav voice with proper
recorded female voice?
Please advice...
Cheers,
Nitesh
Shanon Swafford wrote:
> I was messing with something similar one day for a trucking company to track
> progress of their drivers.
>
> It is HIGHLY beta, but should get you started:
>
>
> ########## extensions.conf ###################
> exten => s,1,NoOp(FXO Line is Ringing : ${CALLERID(all)})
> exten => s,n,NoOp(${CALLERID(all)})
> exten => s,n,NoOp(${CALLERID(num)})
> exten => s,n,NoOp(${CALLERID(name)})
> exten => s,n,GotoIf($["${CALLERID(num)}"="9728311600"]?agitest|s|1)
> exten => s,n,GotoIf($["${CALLERID(num)}"="200"]?agitest|s|1)
>
> [agitest]
> exten => s,1,AGI(test.php)
> exten => s,n,Answer
> exten => s,n,Background(shanon-welcome) ; "Thanks for calling press
> 1 for sales, 2 for support, ..."
> exten => s,n,WaitExten
>
>
>
>
> ###############test.php#######################
> <?php
> set_time_limit(6);
> require('/var/lib/asterisk/agi-bin/phpagi/phpagi.php');
>
> $agi = new AGI();
> $agi->answer();
>
> $cidnum = $agi->request['agi_callerid'];
> $cidname = $agi->request['agi_calleridname'];
>
> $agi->text2wav("Hello $cidname");
> $agi->text2wav('We are testing so please call our cell phones. ');
>
> $test = 0;
> while ( $test <> 1 ) {
> $agi->text2wav("Enter your Order Number ");
> $load_num = $agi->get_data('beep', 3000, 6);
> $tmp = strsplit($load_num);
> $mydata = "";
> foreach ($tmp as $value) {
> $mydata .= $value . " ";
> }
> $agi->text2wav("You entered $mydata. Enter 1 if this is correct");
> $test = $agi->get_data('beep', 3000, 1);
>
> $agi->conlog("Customer Entered: $test");
> }
>
> /* Add code here to insert $test into a database */
>
> $agi->text2wav('Goodbye');
> // $agi->hangup();
>
>
>
> function strsplit($str, $l=1) {
> do {$ret[]=substr($str,0,$l); $str=substr($str,$l); }
> while($str != "");
> return $ret;
> }
> ?>
>
>
> Regards,
> Shanon
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Nitesh Divecha
> Sent: Thursday, May 24, 2007 9:08 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Asterisk Time Card
>
>
> Thanks for your reply,
>
> The basic system would work as follows: -
>
> Method 1
> =======
> An employee would call in to the system and a welcome message is
> prompted. After that a employee is asked to enter the employee ID and
> PIN number and once verified Employee ID, Caller ID, and time of day is
> stored into MySQL DB. By end of the day employee will call in again to
> logout from the system and same information is stored into the DB.
>
> Method 2
> =======
> This time employee is verified with Caller ID, so the employee ID and
> PIN number is skipped and time of day is logged into the DB.
>
> Is it possible?
>
> Thanks,
> Nitesh
>
>
>
>
>
>
>
> ram wrote:
>
>> On 5/24/07, *Nitesh Divecha* <nitesh at vipernetworks.com
>> <mailto:nitesh at vipernetworks.com>> wrote:
>>
>> Hello All,
>>
>> I have been looking for this solution for quite sometimes
>> "Asterisk Time
>> Card System". I found some discussion from Digium forum but not quite
>> helpful.
>>
>>
>>
>> Hi
>>
>> what is the mean of time card system ?
>>
>> is this kind of attendent system ?
>>
>> kindly give some more details
>>
>> ram
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> --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
>>
>>
>
> _______________________________________________
> --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
>
>
> _______________________________________________
> --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
>
>
More information about the asterisk-users
mailing list