Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

Asterisk PBX FastAGI script Server Anyone?

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee Jenkins

A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source Asterisk PBX server. For those of you not familiar with Asterisk, FastAGI is the TCP/IP network implementation of the Asterisk Gateway Interface (AGI) which allows you control call flow in the Asterisk PBX in realtime through stdin/stndout. The FastAGI implementation uses TCP sockets instead of stdin/stdout.

Background:
AsterPas is written in 100% Lazarus/Freepascal and provides many built in objects for working with databases, Cepstral Text to Speech Engine, Call files and more to offer a wide range of functionality for controlling call flow in real time for the Asterisk PBX system.

I have limited time and often get myself into projects (like this one) which interest me, but then find myself unable to spend time in adding new features, etc once the product is stable and working well.

We use it internally for our Asterisk PBX system extensively. Some of our internal uses:

- Real-Time Telemarketer BlackList -
When a telemarketer calls, I say "Please hold" and then transfer the caller to an extension that calls a script on my AsterPas server that uses Cepstral Text to Speech to say "Please be advised that you have been added to our do not call list. Please add our number to your do not call list. Each future attempt to call us is being recorded and may be used to by Authorities to pursue legal action".

If they call back again, Cepstral says "You were added to our do not call list. We will not accept calls from you and each attempt to call is being recorded and may by used as evidence in legal proceedings." Logs call in database and hangs up.

- Priority Caller Routing.
Incoming caller id is looked up in a database. If the caller is determined to be a "VIP", then Cepstral's William speech personality says "Thank you for calling. Because your phone is recognized as a VIP with DataTrak Business Solutions, we will by-pass the regular menu for you and route your call directly to an account representative. Please hold while I transfer your call...". Script then places caller in a special priority queue.

It really is a lot of fun to use and there doesn't seem to be a limit on the kinds of things you can do with Asterisk and FastAGI.

We are thinking of releasing it under some form of open source license. I know Ido works with Asterisk a lot, but if anyone is interested please let me know too please.

More information on the product can be found here:

http://www.datatrakpos.com/pos/datatalk/asterpas.aspx

If there's enough interest, I'll add public access to the svn and add a forum to my message board for AsterPas discussion.

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."
ik
to Lee Jenkins

Hi Lee,

First of all Asterisk has "torture" mode :)
Secondly, I can do some of the routing without AGI, but using extentions.conf and wiring dialplan, including the issue with telemarketing :)

Anyway, I wrote 8 months ago a fast agi using lnet, but it sucks, and I lack the time to rewrite it, so I thought in merge your code into lnet (instead of mine).

And if I'll require to write some AGI/FastAGI and I'll be able to use technology I'll choose, I'll use your library :)

Ido

Lee Jenkins wrote 66 lines
A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source Asterisk PBX server. For those of you not familiar with Asterisk, FastAGI is the TCP/IP network implementation of the Asterisk Gateway Interface (AGI) which allows you control call flow in the Asterisk PBX in realtime through stdin/stndout. The FastAGI implementation uses TCP sockets instead of stdin/stdout. Background: AsterPas is written in 100% Lazarus/Freepascal and provides many built in objects for working with databases, Cepstral Text to Speech Engine, Call files and more to offer a wide range of functionality for controlling call flow in real time for the Asterisk PBX system. I have limited time and often get myself into projects (like this one) which interest me, but then find myself unable to spend time in adding new features, etc once the product is stable and working well. We use it internally for our Asterisk PBX system extensively. Some of our internal uses: - Real-Time Telemarketer BlackList - When a telemarketer calls, I say "Please hold" and then transfer the caller to an extension that calls a script on my AsterPas server that uses Cepstral Text to Speech to say "Please be advised that you have been added to our do not call list. Please add our number to your do not call list. Each future attempt to call us is being recorded and may be used to by Authorities to pursue legal action". If they call back again, Cepstral says "You were added to our do not call list. We will not accept calls from you and each attempt to call is being recorded and may by used as evidence in legal proceedings." Logs call in database and hangs up. - Priority Caller Routing. Incoming caller id is looked up in a database. If the caller is determined to be a "VIP", then Cepstral's William speech personality says "Thank you for calling. Because your phone is recognized as a VIP with DataTrak Business Solutions, we will by-pass the regular menu for you and route your call directly to an account representative. Please hold while I transfer your call...". Script then places caller in a special priority queue. It really is a lot of fun to use and there doesn't seem to be a limit on the kinds of things you can do with Asterisk and FastAGI. We are thinking of releasing it under some form of open source license. I know Ido works with Asterisk a lot, but if anyone is interested please let me know too please. More information on the product can be found here: http://www.datatrakpos.com/pos/datatalk/asterpas.aspx If there's enough interest, I'll add public access to the svn and add a forum to my message board for AsterPas discussion. -- Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door." _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Lee Jenkins
to ik
ik wrote 6 lines
Hi Lee, First of all Asterisk has "torture" mode :) Secondly, I can do some of the routing without AGI, but using extentions.conf and wiring dialplan, including the issue with telemarketing :)

Of course! But I don't prefer Asterisk "flat" script for extensive logic. I wrote a dialplan generator for that simple kind of thing anyway (http://www.datatrakpos.com/pos/datatalk/Default.aspx). AEL2 by Steve Murphy is pretty nice though.

Personally, I prefer to leave only dialplan specific logic in Asterisk and to shell out to AGI/FastAGI those tasks that aren't necessarily related to Asterisk dialplan like database lookups, etc.

Anyway, I wrote 8 months ago a fast agi using lnet, but it sucks, and I lack the time to rewrite it, so I thought in merge your code into lnet (instead of mine).

You are welcome to use the source as you see fit, but AsterPas already uses the open source synapse library. As a matter of fact, these are the external libraries currently used:

- Synapse (http://synapse.ararat.cz)
- Pascal Data Object (http://pdo.sourceforge.net/)
- sqlite3ds (included with lazarus?)
- TPasAGI (included with AsterPas sources, written by me ;) )
- RemObject Pascal Script (http://www.remobjects.com)

I don't think RemObjects PS is open source, but it's free to use.

And if I'll require to write some AGI/FastAGI and I'll be able to use technology I'll choose, I'll use your library :)

Excellent. I hope you enjoy using it and maybe contribute if you're inclined.

Show quoted text 56 lines
Ido On Sun, Mar 30, 2008 at 5:16 PM, Lee Jenkins wrote: > A while back, I wrote a FastAGI Script Server (called AsterPas) for the open > source Asterisk PBX server. For those of you not familiar with Asterisk, > FastAGI is the TCP/IP network implementation of the Asterisk Gateway Interface > (AGI) which allows you control call flow in the Asterisk PBX in realtime through > stdin/stndout. The FastAGI implementation uses TCP sockets instead of stdin/stdout. > > Background: > AsterPas is written in 100% Lazarus/Freepascal and provides many built in > objects for working with databases, Cepstral Text to Speech Engine, Call files > and more to offer a wide range of functionality for controlling call flow in > real time for the Asterisk PBX system. > > I have limited time and often get myself into projects (like this one) which > interest me, but then find myself unable to spend time in adding new features, > etc once the product is stable and working well. > > We use it internally for our Asterisk PBX system extensively. Some of our > internal uses: > > - Real-Time Telemarketer BlackList - > When a telemarketer calls, I say "Please hold" and then transfer the caller to > an extension that calls a script on my AsterPas server that uses Cepstral Text > to Speech to say "Please be advised that you have been added to our do not call > list. Please add our number to your do not call list. Each future attempt to > call us is being recorded and may be used to by Authorities to pursue legal action". > > If they call back again, Cepstral says "You were added to our do not call list. > We will not accept calls from you and each attempt to call is being recorded > and may by used as evidence in legal proceedings." Logs call in database and > hangs up. > > - Priority Caller Routing. > Incoming caller id is looked up in a database. If the caller is determined to > be a "VIP", then Cepstral's William speech personality says "Thank you for > calling. Because your phone is recognized as a VIP with DataTrak Business > Solutions, we will by-pass the regular menu for you and route your call directly > to an account representative. Please hold while I transfer your call...". > Script then places caller in a special priority queue. > > It really is a lot of fun to use and there doesn't seem to be a limit on the > kinds of things you can do with Asterisk and FastAGI. > > We are thinking of releasing it under some form of open source license. I know > Ido works with Asterisk a lot, but if anyone is interested please let me know > too please. > > More information on the product can be found here: > > http://www.datatrakpos.com/pos/datatalk/asterpas.aspx > > If there's enough interest, I'll add public access to the svn and add a forum to > my message board for AsterPas discussion. >
Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."
Lee Jenkins
to Lee Jenkins
Lee Jenkins wrote 25 lines
ik wrote: > Hi Lee, > > First of all Asterisk has "torture" mode :) > Secondly, I can do some of the routing without AGI, but using > extentions.conf and wiring dialplan, including the issue with > telemarketing :) Of course! But I don't prefer Asterisk "flat" script for extensive logic. I wrote a dialplan generator for that simple kind of thing anyway (http://www.datatrakpos.com/pos/datatalk/Default.aspx). AEL2 by Steve Murphy is pretty nice though. Personally, I prefer to leave only dialplan specific logic in Asterisk and to shell out to AGI/FastAGI those tasks that aren't necessarily related to Asterisk dialplan like database lookups, etc. > Anyway, I wrote 8 months ago a fast agi using lnet, but it sucks, and > I lack the time to rewrite it, so I thought in merge your code into > lnet (instead of mine). You are welcome to use the source as you see fit, but AsterPas already uses the open source synapse library. As a matter of fact, these are the external libraries currently used:

Oops, I forgot to add the link to sources:

http://www.leebo.dreamhosters.com/asterpas/

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."
willem
to Lee Jenkins: A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source…
Lee Jenkins wrote 54 lines
A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source Asterisk PBX server. For those of you not familiar with Asterisk, FastAGI is the TCP/IP network implementation of the Asterisk Gateway Interface (AGI) which allows you control call flow in the Asterisk PBX in realtime through stdin/stndout. The FastAGI implementation uses TCP sockets instead of stdin/stdout. Background: AsterPas is written in 100% Lazarus/Freepascal and provides many built in objects for working with databases, Cepstral Text to Speech Engine, Call files and more to offer a wide range of functionality for controlling call flow in real time for the Asterisk PBX system. I have limited time and often get myself into projects (like this one) which interest me, but then find myself unable to spend time in adding new features, etc once the product is stable and working well. We use it internally for our Asterisk PBX system extensively. Some of our internal uses: - Real-Time Telemarketer BlackList - When a telemarketer calls, I say "Please hold" and then transfer the caller to an extension that calls a script on my AsterPas server that uses Cepstral Text to Speech to say "Please be advised that you have been added to our do not call list. Please add our number to your do not call list. Each future attempt to call us is being recorded and may be used to by Authorities to pursue legal action". If they call back again, Cepstral says "You were added to our do not call list. We will not accept calls from you and each attempt to call is being recorded and may by used as evidence in legal proceedings." Logs call in database and hangs up. - Priority Caller Routing. Incoming caller id is looked up in a database. If the caller is determined to be a "VIP", then Cepstral's William speech personality says "Thank you for calling. Because your phone is recognized as a VIP with DataTrak Business Solutions, we will by-pass the regular menu for you and route your call directly to an account representative. Please hold while I transfer your call...". Script then places caller in a special priority queue. It really is a lot of fun to use and there doesn't seem to be a limit on the kinds of things you can do with Asterisk and FastAGI. We are thinking of releasing it under some form of open source license. I know Ido works with Asterisk a lot, but if anyone is interested please let me know too please. More information on the product can be found here: http://www.datatrakpos.com/pos/datatalk/asterpas.aspx If there's enough interest, I'll add public access to the svn and add a forum to my message board for AsterPas discussion.

Well I am interested

regards

Lee Jenkins
to Unknown author
Show quoted text 10 lines
Hello, I have seen that you are using REMOBJECTS Pascal Interpreter ... for me this interpreter does not compile corectly after a CVS change a long time ago. Do you have another version than I have ? I use that of the Sourceforge Lazarus Component site ... Regards, Stephan

I Stephan,

I haven't had a problem with it for the most part and I believe I downloaded directly from Rem's website. If you send me a private email, I'll zip up and send you the ROPS sources that I have for you to try.

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."
Lee Jenkins
to Unknown author: I have seen that you are using REMOBJECTS Pascal Interpreter ... for me this interpreter…
Show quoted text 10 lines
Hello, I have seen that you are using REMOBJECTS Pascal Interpreter ... for me this interpreter does not compile corectly after a CVS change a long time ago. Do you have another version than I have ? I use that of the Sourceforge Lazarus Component site ... Regards, Stephan

Stephan,

I should also mention that I do not use (or try to install) the IDE components of Rem objects pascalscript, just use the units from code.

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."
Lee Jenkins
to Lee Jenkins: A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source…
Lee Jenkins wrote 53 lines
A while back, I wrote a FastAGI Script Server (called AsterPas) for the open source Asterisk PBX server. For those of you not familiar with Asterisk, FastAGI is the TCP/IP network implementation of the Asterisk Gateway Interface (AGI) which allows you control call flow in the Asterisk PBX in realtime through stdin/stndout. The FastAGI implementation uses TCP sockets instead of stdin/stdout. Background: AsterPas is written in 100% Lazarus/Freepascal and provides many built in objects for working with databases, Cepstral Text to Speech Engine, Call files and more to offer a wide range of functionality for controlling call flow in real time for the Asterisk PBX system. I have limited time and often get myself into projects (like this one) which interest me, but then find myself unable to spend time in adding new features, etc once the product is stable and working well. We use it internally for our Asterisk PBX system extensively. Some of our internal uses: - Real-Time Telemarketer BlackList - When a telemarketer calls, I say "Please hold" and then transfer the caller to an extension that calls a script on my AsterPas server that uses Cepstral Text to Speech to say "Please be advised that you have been added to our do not call list. Please add our number to your do not call list. Each future attempt to call us is being recorded and may be used to by Authorities to pursue legal action". If they call back again, Cepstral says "You were added to our do not call list. We will not accept calls from you and each attempt to call is being recorded and may by used as evidence in legal proceedings." Logs call in database and hangs up. - Priority Caller Routing. Incoming caller id is looked up in a database. If the caller is determined to be a "VIP", then Cepstral's William speech personality says "Thank you for calling. Because your phone is recognized as a VIP with DataTrak Business Solutions, we will by-pass the regular menu for you and route your call directly to an account representative. Please hold while I transfer your call...". Script then places caller in a special priority queue. It really is a lot of fun to use and there doesn't seem to be a limit on the kinds of things you can do with Asterisk and FastAGI. We are thinking of releasing it under some form of open source license. I know Ido works with Asterisk a lot, but if anyone is interested please let me know too please. More information on the product can be found here: http://www.datatrakpos.com/pos/datatalk/asterpas.aspx If there's enough interest, I'll add public access to the svn and add a forum to my message board for AsterPas discussion.

OK, we have released the sources for AsterPas here:

http://www.leebo.dreamhosters.com/asterpas/

I have created an additional forum for AsterPas discussion:

http://www.leebo.dreamhosters.com/pbxbb/index.php

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."