Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Website callback


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
michiel at vanbaak.info
Guest





PostPosted: Wed Jun 18, 2008 4:05 pm    Post subject: [asterisk-users] Website callback Reply with quote

On 15:45, Wed 18 Jun 08, Mark Hamilton wrote:
Quote:
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
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"
Back to top
stotaro at totarotechn...
Guest





PostPosted: Wed Jun 18, 2008 4:21 pm    Post subject: [asterisk-users] Website callback Reply with quote

On Wed, Jun 18, 2008 at 5:05 PM, Michiel van Baak <michiel at vanbaak.info> wrote:
Quote:
On 15:45, Wed 18 Jun 08, Mark Hamilton wrote:
Quote:
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
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

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

Check this thread
http://lists.digium.com/pipermail/asterisk-users/2004-February/031334.html

It might save you a great deal of time.

Thanks,
Steve Totaro
Back to top
gordon+asterisk at dro...
Guest





PostPosted: Thu Jun 19, 2008 3:22 am    Post subject: [asterisk-users] Website callback Reply with quote

On Wed, 18 Jun 2008, Mark Hamilton wrote:

Quote:
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
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Thu Jun 19, 2008 3:41 am    Post subject: [asterisk-users] Website callback Reply with quote

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

Quote:
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:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
gordon+asterisk at dro...
Guest





PostPosted: Thu Jun 19, 2008 4:47 am    Post subject: [asterisk-users] Website callback Reply with quote

On Thu, 19 Jun 2008, Tzafrir Cohen wrote:

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

Quote:
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 Smile

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
Back to top
mark.h at cage151.com
Guest





PostPosted: Thu Jun 19, 2008 7:57 am    Post subject: [asterisk-users] Website callback Reply with quote

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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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:

Quote:
Hi,

I have a website where customers enter their phone numbers to be called.
I'd
Quote:
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
Quote:
in at the time it needs to be called, or I don't know what else) and then
if
Quote:
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
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Thu Jun 19, 2008 8:05 am    Post subject: [asterisk-users] Website callback Reply with quote

On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
Quote:
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
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Thu Jun 19, 2008 8:57 am    Post subject: [asterisk-users] Website callback Reply with quote

On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
Quote:
On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
Quote:
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

Quote:

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:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
stotaro at totarotechn...
Guest





PostPosted: Thu Jun 19, 2008 9:32 am    Post subject: [asterisk-users] Website callback Reply with quote

On Thu, Jun 19, 2008 at 9:57 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote:
On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
Quote:
On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
Quote:
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

Quote:

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:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir


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

Thanks,
Steve T
Back to top
benny+usenet at amorse...
Guest





PostPosted: Fri Jun 20, 2008 5:46 am    Post subject: [asterisk-users] Website callback Reply with quote

Tilghman Lesher <tilghman at mail.jeffandtilghman.com> writes:

Quote:
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
Back to top
mark.h at cage151.com
Guest





PostPosted: Fri Jun 20, 2008 12:15 pm    Post subject: [asterisk-users] Website callback Reply with quote

Great, thanks guys!

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <tzafrir.cohen at xorcom.com>
wrote:
Quote:
On Thu, Jun 19, 2008 at 08:05:59AM -0500, Tilghman Lesher wrote:
Quote:
On Thursday 19 June 2008 07:57:07 Mark Hamilton wrote:
Quote:
LOL, I agree, it _did_ sound a little complicated than to just schedule
a
Quote:
Quote:
Quote:
call in the future. I apologize for not being able to find this on the
wiki
Quote:
Quote:
Quote:
earlier when I searched.

The other cron jobs and everything probably bring _something_ to the
table.
Quote:
Quote:
Quote:
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

Quote:

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,
Quote:
Quote:
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:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services