Asterisk@Home Click-To-Call Application Ideas
First off, let me apologize for not posting in awhile. There's another project I've been working on that has unfortunately been taking up all of my available free time...
There's been a lot of good suggestions on ways to improve my initial Click-to-Call script. There also seems to be a lot of interest in the Click-to-Call functionality, and I'm sure we can all see the many uses and advantages of developing something that seamlessly integrates with AAH/Asterisk, is feature-rich, secure, and easy to setup. This being said, I'd like to propose something to all who are interested.
Let's put our heads together (similar to the way we have been with comments) and come up with the requirements of an ultimate click-to-call application. Something that is full-featured, easy to setup on an asterisk or aah box, and configurable; easy for the user to modify the way the application works in order to accommodate their needs.
Some of the requirements already mentioned:
1. Client-server architecture
2. Logging
3. If the call is not received by the asterisk extension, call the number anyway and play a message.
4. Limiting access to only certain IPs
5. Email notifications.
Requirements I'd like to see:
1. Management web interface to specify behavior rules based on weekday/weekend, day time and night time hours.
2. Calling a ring group instead of just a single internal extension - the first extension that answers completes the call to the remote number.
If there is enough interest, and we have a strong set of requirements put together, I'll begin developing this. If others wish to help with the development, please let me know (PHP is not my forte, so it will take me longer to develop than someone who is more familiar with php). Maybe there’s enough interest in this to start a sourceforge project? Just throwing ideas around here…
So please, leave your comments on what you would like to see in a click-to-call application, your feedback on how such an application could/should be developed, etc.
For those of you who have already made some changes to the initial script, I'm glad you found it useful, as that was the intention. And to answer one question that was asked, I don't have any problems with you changing the script, and it will not violate any licensing terms. If you do something that you feel could help others though, it would be good (though not required) of you to give us an update on what you did and why it was beneficial to you.
If someone wants to email me directly about this, send to ohamilton{at}voipjots{dot}com
Thanks, Everyone.
Olin
10 Comments:
As for the request 4. Limiting access to only certain IPs, i just play with the htaccess config, and just set up 3 users with their passwords (for family members calls, its gonna be used). Just letting you know.
I would be willing to incorporate this into my website if script kiddie abuse can be substantially thwarted. It's a great idea.
Mike
I am considering a setup like thisone for my small business.
The thing I would be worried about would be that my phonebill would run wild if someone would post a toll-based number...
I would like to see the processing code in a php in the asterisk server (or other server with access to asterisk) but the form in an html page so it can be used elsewhere. Also, I am no expert in php, but I could help with it a little bit, and translate to spanish if desired. Send me an email rd_cortes (a_t) walla (do_t) com
Another idea... How about a script that calls the web page user, and connects them to my IVR? Is it possible? Please send me any ideas to rd_cortes(_at)walla(_dot)com
I have been changing your code around to try something new.
I now have it so that the person entering the number gets called first. Then an internal call is initiated to a specific context where it plays rings prior to sending the caller to "from-pstn" where the time check is performed for our main reception menus.
Here is the code:
#--------------------------------------------------------------------------------------------
#Shouldn't need to edit anything below this point to make this script work
#--------------------------------------------------------------------------------------------
#get the phone number from the posted form
$strChannel = $_POST['txtphonenumber'];
#specify the caller id for the call
$strCallerId = "Web Call <$strChannel>";
$length = strlen($strChannel);
if ($length == 11 && is_numeric($strChannel))
{
$oSocket = fsockopen($strHost, 5038, $errnum, $errdesc,20) or die("Connection to host failed");
fputs($oSocket, "Action: login\r\n");
fputs($oSocket, "Username: $strUser\r\n");
fputs($oSocket, "Secret: $strSecret\r\n\r\n");
fputs($oSocket, "Events: off\r\n");
sleep(1) ;
fputs($oSocket, "Action: originate\r\n");
fputs($oSocket, "Channel: SIP/mytrunkname/$strChannel\r\n");
fputs($oSocket, "CallerId: $strCallerId\r\n");
fputs($oSocket, "Context: custom-from-web\r\n");
fputs($oSocket, "Extension: s\r\n");
fputs($oSocket, "Priority: 1\r\n\r\n");
fputs($oSocket, "Action: Logoff\r\n\r\n");
sleep(2) ;
fclose($oSocket);
_________________________________
I use the strChannel variable for the outgoing call now.
I had to create a context in extensions-custom.conf called custom-from-web that looks like this:
[custom-from-web]
exten => s,1,Answer
exten => s,2,Playtones(ring)
exten => s,3,Wait(10)
exten => s,4,Goto(from-pstn,,1);
exten => s,5,Hangup
I had to play the ring for about 10 seconds to let the initial call connect to the web user so they can hear the beginning of our menu system.
In order to block the potential for dialing bad area codes, I added them to the trunk dialing rules like this:
1900XXXXXXX|
The pipe at the end sends nothing out the trunk - all circuits busy.
I have about 20 numbers on the list, including all the toll free prefixes. I used to be a prank caller in my younger years, security is important.
I like having the web user get the call first, from a business perspective. If we are closed, they will be given the appropriate menu system based on our incoming call time settings and still be able to leave a voice message.
In order to show online presence, I created my own icon that works with skype at http://www.onlinestatus.org/
I give the web view 2 options, text chat with skype or click-to-call. Even if we are off line, they can still make the phone call and leave a message - no false hopes.
I don't claim to know much about asterisk, but I do like to dabble now and then.
Thanks
I have modified the script a little bit...
actually I have made 3 more versions of it,
one calls the webpage user first and connects them to the IVR using the time conditions (Needs a custom-context in extensions.conf),
the second one lets you write your number, calls you, asks for your passcode, and gives you DISA (this also requires a custom-context, and for security I placed it in the admin folder so it asks for user and password before accesing it,
the last one lets you write the number at which you want to be called, and the number you wish to call, this one needs two custom-contexts (for security) and is also in the admin folder so it asks for user and password before you can use it.
If anyone needs the scripts, email me at rd_cortes (at) walla (dot) com
Question to anyone who can answer this. I'm trying to make it to where my call center employees can simply click on the web page and call the clinet that is currently on there screen. I will be importing the phone number from a database, but instead of having the click-to-call functionality call the user and then the client, I'm looking to have the program call the client directly from that agent's softphone(currently using x-lite). Is click-to-call a possiblity in this situation?
In reply to ADS above, You are probably looking to modify/customise something like NerdVittles Asteridex (http://nerdvittles.com/index.php?p=143). There are a few commercial apps that do what you mention in your post, but you might want to try and modify the Asteridex.
ads:
I also found this SF project that might be of interest to you:
http://activa.sourceforge.net/
Good Luck.
Post a Comment
<< Home