Re: [Asterisk-Users] Digital Receptionist

2006-06-15 Thread Lewis Agosta
This information may help. Not sure if this is exactly what you need, but can't hurt to try to help...

exten = _XXX,1,Goto(Context_Ext,s,1)

-
[Context_Ext]
exten = s,1,Wait(0.5)exten = s,2,DigitTimeout,1exten = s,3,ResponseTimeout,1exten = s,4,Background(...YourMessageHere...)
.
.
.
On 6/15/06, Avi Miller [EMAIL PROTECTED] wrote:
Khaled Chehab wrote: Hi I make a Digital Receptionist ,but how can I attach it to an extension
[EMAIL PROTECTED] is now called TrixBox. You'll get a lot more support athttp://www.trixbox.orgcYa,Avi--National Manager - Special Projects Melbourne / Sydney / Canberra / Hobart / London /
2/340 Gore StreetT: 1 300 SQUIZ (77859)Fitzroy, VIC T: 03 9486 04113065 F: 03 9486 0611 W: http://www.squiz.net/
. Open Source- Own it-Squiz.net ./___--Bandwidth and Colocation provided by Easynews.com
 --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:http://lists.digium.com/mailman/listinfo/asterisk-users
-- Origination that includes real support!http://www.VoIPStreet.com 
___
--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


Re: [Asterisk-Users] AGI to read MySQL

2006-06-15 Thread Lewis Agosta
We user mySQL in certain instances of AGI and it works great. This information has helped us quite a bit. If you are using php - make sure you are using the CLI version.

http://phpagi.sourceforge.net/

Here is a code snip of how we are doing it.

#!/usr/local/bin/php -q?php/*** @package phpAGI_examples* @version 2.0*/#set_time_limit(60);require('phpagi.php');$agi = new AGI();$agi-verbose(Launching AGI...);
#$link = mysql_connect(0.0.0.0, dbname, dbpass)or die(Could not connect:  . mysql_error());#mysql_select_db(dbname)
or die ('The database specified in database_name must exist and must be accessible by the user specified in mysql_connect');#$query = SELECT * FROM yourtable;$agi-verbose($query);$result = mysql_query ($query)
or die('could not select yourtable file!');$arow = mysql_fetch_array($result);...and so on...
On 6/15/06, Frederic Jean [EMAIL PROTECTED] wrote:



Walid,

Check the ASTCC agi script ; it just does exactly that:

http://www.voip-info.org/wiki-ASTCC

Cheers,
Fred


- Original Message - 
From: Walid Azab 
To: asterisk-users@lists.digium.com
 
Sent: Thursday, June 15, 2006 11:14
Subject: [Asterisk-Users] AGI to read MySQL

Hello everyone,
I am not an expert in Asterisk programming yet. So, can someone help me put my first steps on how to use AGI to access MySQL tables and do queries. Any reference or help is appreciated. My target is to get Festival to read TTS from data stored in MySQL table based on the ID that the caller will input after his call is answered.

Thanks





___--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users


___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!http://www.VoIPStreet.com
 
___
--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


Re: [Asterisk-Users] long distance ask for pin

2006-06-09 Thread Lewis Agosta
This may not be the most gracefull approach, but this is how I have done it.

exten = s,n,Setvar(Auth=No)exten = s,n,DigitTimeout(3)exten = s,n,ResponseTimeout(5)exten = s,n,Read(MyPin,agent-pass)exten = s,n,Gotoif($[${MyPin} = ${GOODPIN}]?n:n+x)exten = s,n,Background(pin-number-accepted)
exten = s,n,Setvar(Auth=Yes)
on and on...
On 6/9/06, Pietro U [EMAIL PROTECTED] wrote:

On 6/9/06, Doug Lytle [EMAIL PROTECTED] wrote:




Pietro U wrote: hi all i have my asterisk work perfectly thanks to you now i need to
 apply some improvements like PIN :( i need to add somenthing in here or in other section in the conf?
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Authenticate

yes but this is for extensions numbers, not for longdistance calls, because the same user can call in my city but i need to asterisk ask a pin when this people dial a longdistance 

Doug--Ben Franklin quote:Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. 
___--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:  
http://lists.digium.com/mailman/listinfo/asterisk-users
___--Bandwidth and Colocation provided by Easynews.com
 --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!http://www.VoIPStreet.com
 
___
--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


Re: [Asterisk-Users] Set(CDR(userfield)) Trouble

2006-06-07 Thread Lewis Agosta
Hello,

I ran into something similar and found the following in the wiki...

Note : If using cdr_mysql addon make sure to set userfield=1 to in 
cdr_mysql.conf. If using cdr_csv, edit cdr_csv.c and (re)compile to enable the user field. This command has no effect if the user field is not enabled. 

See: http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetCDRUserField

This actually was not my problem, but it was good information. I was actually setting it and then overwriting it later on in the dialplan.

Hope the information is helpfull.
On 6/7/06, Tristan [EMAIL PROTECTED] wrote:
Hi,I have troubles setting the userfield in mysql ( using asterisk 1.2.8 /addons 1.2.3 )I use this in my dialplan:
exten = s,n,SetCDRUserField(SOMEVALUE)I tried also:exten = s,n,Set(CDR(userfield)=SOMEVALUE)But everytime i look at the cdr database the userfield is still emptyDoes anyone has a clue on how toget things working ?
Thanks in advance !___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!
http://www.VoIPStreet.com 
___
--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


Re: [Asterisk-Users] Set(CDR(userfield)) Trouble

2006-06-07 Thread Lewis Agosta
Glad I could help.

Cheers.
On 6/7/06, Tristan [EMAIL PROTECTED] wrote:


Shame on me, that was my trouble, seems like I didn't read enough...Thanks a lot !Lewis Agosta a écrit: 


Hello,

I ran into something similar and found the following in the wiki...

Note : If using cdr_mysql addon make sure to set userfield=1 to in 
cdr_mysql.conf. If using 
cdr_csv, edit cdr_csv.c and (re)compile to enable the user field. This command has no effect if the user field is not enabled. 
See: http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetCDRUserField


This actually was not my problem, but it was good information. I was actually setting it and then overwriting it later on in the dialplan.

Hope the information is helpfull.
On 6/7/06, Tristan [EMAIL PROTECTED] wrote:
 
Hi,I have troubles setting the userfield in mysql ( using asterisk 1.2.8 /addons 1.2.3
 )I use this in my dialplan: exten = s,n,SetCDRUserField(SOMEVALUE)I tried also:exten = s,n,Set(CDR(userfield)=SOMEVALUE)But everytime i look at the cdr database the userfield is still empty
Does anyone has a clue on how toget things working ? Thanks in advance !___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support! 
http://www.VoIPStreet.com 

___ --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 listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!http://www.VoIPStreet.com
 
___
--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


Re: [Asterisk-Users] New Member, saying Hi. :)

2006-06-05 Thread Lewis Agosta
Welcome to our world. You will find yourself up nights thinking of all the possibilities and kicking yourself all day because you can't get them all done :)

Good luck.
On 4 Jun 2006 06:02:39 -, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:
Hello everyone.I had heard about this open-source PBX once a while back.I wasn't too interested in it at the time but I kept the info filed away
for possible future use.A couple of days ago, I was walking around Barnesand Nobles and I found this book, called Asterisk: The Future of Telephony.I paged through it a little and I was really excited by what I read.Then
I remembered the open-source PBX I had read about before: it was Asterisk!This book was about that open-source PBX.It was very enlightening and Idecided to buy the book so I could learn more.When I got home, I read
through a few chapters and I also started looking online to find a download.I somehow managed to find a ready-made appliance called PoundKey whichI downloaded and installed on my spare PC.Now I got confused because I wasn't
sure where to go from the command-line prompt.So, I'm starting over at squareone and I am going to download plain-jane Asterisk and get it running on aKnoppix HD installation... I hope.:)Anyway, this has been a brief (trust
me, brief is good!) introduction of myself to the group.I'm sure I'll beasking lots of questions.:)Undrhil___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:http://lists.digium.com/mailman/listinfo/asterisk-users
-- Origination that includes real support!http://www.VoIPStreet.com 
___
--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


Re: [Asterisk-Users] PHP-AGI help

2006-06-05 Thread Lewis Agosta
Yes. Jon is correct.

$agi[str_replace(agi_,,$s[[0])] = trim($s[[1]);

This line needs some work... Your brackets are mismatched.
On 6/2/06, Jon Farmer [EMAIL PROTECTED] wrote:
Yes you have a parse error in your PHP when I saved it locally and run it from the command line I got
syntax error, unexpected '[', expecting ']' in test.php on line 33Jon FarmerTelford, Shropshire, UK- Original Message From: Matthew Warren [EMAIL PROTECTED]
To: asterisk-users@lists.digium.comSent: Friday, 2 June, 2006 3:32:10 PMSubject: [Asterisk-Users] PHP-AGI helpCan someone help me with this AGI script to send an email.It just isn't
working.The file is being called in the dialplan and is saved as em.agibut it isn't sending the email.#!/usr/bin/php4 -q?phpob_implicit_flush(true);set_time_limit(6);$in = fopen(php://stdin,r);
$stdlog = fopen(/var/log/asterisk/my_agi.log, w);// toggle debugging output (more verbose)$debug = false;// Do function definitions before we start the main loopfunction read() {
global $in, $debug, $stdlog;$input = str_replace(\n, , fgets($in, 4096));if ($debug) fputs($stdlog, read: $input\n);return $input;}function errlog($line) {
global $err;echo VERBOSE \$line\\n;}function write($line) {global $debug, $stdlog;if ($debug) fputs($stdlog, write: $line\n);echo $line.\n;
}// parse agi headers into arraywhile ($env=read()) {$s = split(: ,$env);$agi[str_replace(agi_,,$s[[0])] = trim($s[[1]);if (($env == ) || ($env == \n)) {
break;}} $sender = [EMAIL PROTECTED]; $recipient = [EMAIL PROTECTED];
 $subject = call from someone; $header = From:  . $sender . \r\n; $header.= Reply-to:  . $sender . \r\n; mail($recipient, $subject, $message, $header);
fclose($in);fclose($stdlog);exit;?___--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:http://lists.digium.com/mailman/listinfo/asterisk-users
___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!
http://www.VoIPStreet.com 
___
--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


Re: [Asterisk-Users] Can´t send emails

2006-06-05 Thread Lewis Agosta
Have you checked the validity of the mailcmd setting in voicemail.conf? Make sure that the command supplied there is the exact location to the application that will process your mail.

ie. mailcmd=/usr/sbin/sendmail -t

Also, make sure that the variable emailbody doesn't have something funky defined that is causing it to error out. Have you reviewed your mail server logs to see if the email is being sent? You would most likely get some good information from there if you could determine if the email is being sent out, or erroring out during the attempt.

On 6/5/06, yrving rivas [EMAIL PROTECTED] wrote:

Alex:I verified my SMTP with telnet ([EMAIL PROTECTED] ip) 25 and sent an email to root.I have another mail server inside my network and, as happens trying to send an email to internet, it gives me a time out.
I can give you all the details if you would.Thanks for your help.yrvingAlex Robar 
[EMAIL PROTECTED] escribió: 
Yrving,How have you verified that your SMTP is working? Can you actually send a message from your Asterisk server to one of your internal addresses?
Alex

On 6/5/06, yrving rivas [EMAIL PROTECTED]
 wrote: 

Hello everybody.I will apreciate your help in this case.I have the environment showed in the picture of the file included in this message.I would like to send trhough internet all the messages received by voicemail. I made all the configuration through the AMP, and all messages are saved properly, so I can receive them directly from my phone with *97, but still the Asterisk don´t send it through Internet. 
As I have seen the SMTP is working, and I can ping any site of Internet, and any of my internal addresses, but still I have no idea about what is happening.Thanks.
Yrving

__Correo Yahoo!Espacio para todos tus mensajes, antivirus y antispam ˇgratis! Regístrate ya - 
http://correo.yahoo.com.mx/ ___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users
-- Alex Robar[EMAIL PROTECTED] ___

--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




__Correo Yahoo!Espacio para todos tus mensajes, antivirus y antispam ˇgratis! Regístrate ya - 
http://correo.yahoo.com.mx/ ___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users-- Origination that includes real support!http://www.VoIPStreet.com
 
___
--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