Re: [asterisk-users] Website callback

2008-06-20 Thread Benny Amorsen
Tilghman Lesher [EMAIL PROTECTED] writes:

 One very big benefit of using a database with cron jobs is that your web
 application does not need to run as the same user (or otherwise weaken
 security permissions) as the Asterisk daemon.  If running as the same user,
 you'd have to either set both daemons to the same group (which means the
 web server has access to all other files that Asterisk writes) or world
 writable, which is even worse.

You can use ACL's.

setfacl -m u:webapp:w /path/to/calldir


/Benny



___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-20 Thread Mark Hamilton
Great, thanks guys!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Totaro
Sent: June 19, 2008 10:32 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Website callback

On Thu, Jun 19, 2008 at 9:57 AM, Tzafrir Cohen [EMAIL PROTECTED]
wrote:
 On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
 On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
  LOL, I agree, it _did_ sound a little complicated than to just schedule
a
  call in the future. I apologize for not being able to find this on the
wiki
  earlier when I searched.
 
  The other cron jobs and everything probably bring _something_ to the
table.
  I wonder what.
  Either way, please keep 'em coming boys, and yes I'd like to know the
  answer to Tzafrir's question about performance.

 Test it yourself?

 for i in `seq 1500`; do
  something to create a call file
  sleep a_bit
 done


 One very big benefit of using a database with cron jobs is that your web
 application does not need to run as the same user (or otherwise weaken
 security permissions) as the Asterisk daemon.  If running as the same
user,
 you'd have to either set both daemons to the same group (which means the
 web server has access to all other files that Asterisk writes) or world
 writable, which is even worse.

 In any version you'll still need something with permissions to originate
 calls on Asterisk.

 --
   Tzafrir Cohen
 icq#16849755  jabber:[EMAIL PROTECTED]
 +972-50-7952406   mailto:[EMAIL PROTECTED]
 http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir


I have done hundreds at once, takes a few seconds to handle (all SIP)

Thanks,
Steve T

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Gordon Henderson
On Wed, 18 Jun 2008, Mark Hamilton wrote:

 Hi,

 I have a website where customers enter their phone numbers to be called. I'd
 like them to have to put in information and 'schedule' a call.


 1)  Call Immediately

 2)  Call in the next _ minutes

 3)  Call me tomorrow, same time.

 So, Asterisk will pull two variables from this php websites, $phonenumber
 and $timetocall. $timetocall will need to be calculated as to exactly what
 time Asterisk will need to call.



 Then, Asterisk calls it (by way of call files? Either putting the call file
 in at the time it needs to be called, or I don't know what else) and then if
 the call is has a human on it, plays a message saying We're now
 transferring you to an agent. Please wait. And transfer that call to a
 queue.


 How can I do this? Is there something prebuilt like this?

Reading the replies so-far... Cron jobs, databases, shell scripts... Ye 
Gods... Try reading the manual (or at least the wiki)

http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out

Scroll down to the bit headed:

   How to schedule a Call in the Future

Assuming you already have some PHP to write the call-file and move it into 
place, inserting a touch call after writing the file and moving it into 
place ought to be trivial...

http://uk.php.net/manual/en/function.touch.php

Gordon

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Tzafrir Cohen
On Thu, Jun 19, 2008 at 09:22:04AM +0100, Gordon Henderson wrote:

 Reading the replies so-far... Cron jobs, databases, shell scripts... Ye 
 Gods... Try reading the manual (or at least the wiki)
 
 http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out
 
 Scroll down to the bit headed:
 
How to schedule a Call in the Future

What's the performance impact of having e.g. 30 such files at any given
moment in the spool directory?

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Gordon Henderson
On Thu, 19 Jun 2008, Tzafrir Cohen wrote:

 On Thu, Jun 19, 2008 at 09:22:04AM +0100, Gordon Henderson wrote:

 Reading the replies so-far... Cron jobs, databases, shell scripts... Ye
 Gods... Try reading the manual (or at least the wiki)

 http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out

 Scroll down to the bit headed:

How to schedule a Call in the Future

 What's the performance impact of having e.g. 30 such files at any given
 moment in the spool directory?

A very quick scan through pbx_spool.c would suggest it's reasonably 
efficient as it only does an opendir/readdir at most once a second, and 
even then, only if the directory itself has been updated since the last 
look - there also seems to be more code to do a scan if it's not been 
updated, but when a file is old enough... I think Maybe the author 
could comment deeper :)

So the inneficiencies will come from the underlying operating system when 
it's doing the actual readdir operation - which for 30-1000 files isn't 
going to be that high - less-so if if it's using ext3 + btree/dir_index 
mode. (or some other filesystem with efficient directory searches)

Gordon

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Mark Hamilton
LOL, I agree, it _did_ sound a little complicated than to just schedule a
call in the future. I apologize for not being able to find this on the wiki
earlier when I searched.

The other cron jobs and everything probably bring _something_ to the table.
I wonder what.
Either way, please keep 'em coming boys, and yes I'd like to know the answer
to Tzafrir's question about performance. 

There will probably be 1500 calls that need to be made over a span of 15
hours. Some might happen as a handful, some might not.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Henderson
Sent: June 19, 2008 4:22 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Website callback

On Wed, 18 Jun 2008, Mark Hamilton wrote:

 Hi,

 I have a website where customers enter their phone numbers to be called.
I'd
 like them to have to put in information and 'schedule' a call.


 1)  Call Immediately

 2)  Call in the next _ minutes

 3)  Call me tomorrow, same time.

 So, Asterisk will pull two variables from this php websites, $phonenumber
 and $timetocall. $timetocall will need to be calculated as to exactly what
 time Asterisk will need to call.



 Then, Asterisk calls it (by way of call files? Either putting the call
file
 in at the time it needs to be called, or I don't know what else) and then
if
 the call is has a human on it, plays a message saying We're now
 transferring you to an agent. Please wait. And transfer that call to a
 queue.


 How can I do this? Is there something prebuilt like this?

Reading the replies so-far... Cron jobs, databases, shell scripts... Ye 
Gods... Try reading the manual (or at least the wiki)

http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out

Scroll down to the bit headed:

   How to schedule a Call in the Future

Assuming you already have some PHP to write the call-file and move it into 
place, inserting a touch call after writing the file and moving it into 
place ought to be trivial...

http://uk.php.net/manual/en/function.touch.php

Gordon

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Tilghman Lesher
On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
 LOL, I agree, it _did_ sound a little complicated than to just schedule a
 call in the future. I apologize for not being able to find this on the wiki
 earlier when I searched.

 The other cron jobs and everything probably bring _something_ to the table.
 I wonder what.
 Either way, please keep 'em coming boys, and yes I'd like to know the
 answer to Tzafrir's question about performance.

One very big benefit of using a database with cron jobs is that your web
application does not need to run as the same user (or otherwise weaken
security permissions) as the Asterisk daemon.  If running as the same user,
you'd have to either set both daemons to the same group (which means the
web server has access to all other files that Asterisk writes) or world
writable, which is even worse.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Tzafrir Cohen
On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
 On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
  LOL, I agree, it _did_ sound a little complicated than to just schedule a
  call in the future. I apologize for not being able to find this on the wiki
  earlier when I searched.
 
  The other cron jobs and everything probably bring _something_ to the table.
  I wonder what.
  Either way, please keep 'em coming boys, and yes I'd like to know the
  answer to Tzafrir's question about performance.

Test it yourself?

for i in `seq 1500`; do 
  something to create a call file
  sleep a_bit
done

 
 One very big benefit of using a database with cron jobs is that your web
 application does not need to run as the same user (or otherwise weaken
 security permissions) as the Asterisk daemon.  If running as the same user,
 you'd have to either set both daemons to the same group (which means the
 web server has access to all other files that Asterisk writes) or world
 writable, which is even worse.

In any version you'll still need something with permissions to originate
calls on Asterisk. 

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Website callback

2008-06-19 Thread Steve Totaro
On Thu, Jun 19, 2008 at 9:57 AM, Tzafrir Cohen [EMAIL PROTECTED] wrote:
 On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
 On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
  LOL, I agree, it _did_ sound a little complicated than to just schedule a
  call in the future. I apologize for not being able to find this on the wiki
  earlier when I searched.
 
  The other cron jobs and everything probably bring _something_ to the table.
  I wonder what.
  Either way, please keep 'em coming boys, and yes I'd like to know the
  answer to Tzafrir's question about performance.

 Test it yourself?

 for i in `seq 1500`; do
  something to create a call file
  sleep a_bit
 done


 One very big benefit of using a database with cron jobs is that your web
 application does not need to run as the same user (or otherwise weaken
 security permissions) as the Asterisk daemon.  If running as the same user,
 you'd have to either set both daemons to the same group (which means the
 web server has access to all other files that Asterisk writes) or world
 writable, which is even worse.

 In any version you'll still need something with permissions to originate
 calls on Asterisk.

 --
   Tzafrir Cohen
 icq#16849755  jabber:[EMAIL PROTECTED]
 +972-50-7952406   mailto:[EMAIL PROTECTED]
 http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir


I have done hundreds at once, takes a few seconds to handle (all SIP)

Thanks,
Steve T

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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


[asterisk-users] Website callback

2008-06-18 Thread Mark Hamilton
Hi,

 

I have a website where customers enter their phone numbers to be called. I'd
like them to have to put in information and 'schedule' a call.

 

1)  Call Immediately

2)  Call in the next _ minutes

3)  Call me tomorrow, same time.

 

So, Asterisk will pull two variables from this php websites, $phonenumber
and $timetocall. $timetocall will need to be calculated as to exactly what
time Asterisk will need to call. 

 

Then, Asterisk calls it (by way of call files? Either putting the call file
in at the time it needs to be called, or I don't know what else) and then if
the call is has a human on it, plays a message saying We're now
transferring you to an agent. Please wait. And transfer that call to a
queue.

 

How can I do this? Is there something prebuilt like this?

Thanks,

Mark.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Website callback

2008-06-18 Thread Christian Victor
I don't know if there is something like that prebuilt. But is seems to be
quite easy. Push the call events in the database, let a cron run ever minute
and create a .call file for evry call thet is due.

The alternative is to not use a database and create a .call file with a
future date/time. Afaik asterisk processes only callfiles with a past
date/time.

In the call context ask the callee to press a digit to be sure he is human
(press one to be connected to one of our agents) and then - as you said -
drop him in a cue.

Christian
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Website callback

2008-06-18 Thread Michiel van Baak
On 15:45, Wed 18 Jun 08, Mark Hamilton wrote:
 Hi,
 
  
 
 I have a website where customers enter their phone numbers to be called. I'd
 like them to have to put in information and 'schedule' a call.
 
  
 
 1)  Call Immediately
 
 2)  Call in the next _ minutes
 
 3)  Call me tomorrow, same time.
 
  
 
 So, Asterisk will pull two variables from this php websites, $phonenumber
 and $timetocall. $timetocall will need to be calculated as to exactly what
 time Asterisk will need to call. 
 
  
 
 Then, Asterisk calls it (by way of call files? Either putting the call file
 in at the time it needs to be called, or I don't know what else) and then if
 the call is has a human on it, plays a message saying We're now
 transferring you to an agent. Please wait. And transfer that call to a
 queue.
 
  
 
 How can I do this? Is there something prebuilt like this?

I would store the info in a database (RDBMS, flat file, whatever) and
have a cronjob running every minute that processes this info, creating
call files when needed.
-- 

Michiel van Baak
[EMAIL PROTECTED]
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x71C946BD

Why is it drug addicts and computer aficionados are both called users?


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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