DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
This HOWTO will attempt to explain how to integrate "Click-to-Call" functionality from Open For Business to an Asterisk Server running the Asterisk Manager API*. *Note: REQUIRES Java JDK 1.5+*
| Note | ||
|---|---|---|
| ||
Tribox and most here are for those that have local lines and need hardware to hook pnone lines into the asterisk server. The other way is to use VIOP service that has Asterisk interface. this takes the place of the Tribox. |
| Note | ||
|---|---|---|
| ||
if your running a dedicated server with a 3gz cpu and 4gb memory you can run Asterisk as well. |
Setting Up Asterisk
Because of the process priority that Asterisk must take for quality voice transmission, you'll want to run Asterisk from its own box. This makes TrixBox a perfect solution to accomplish this. It is a Centos OS distribution with Asterisk and FreePBX built in.
...
- Patch your OFBiz installation with trixbox.patch
- this will create a component in your hot-deploy directory (ofbizhome/hot-deploy/trixbox)
- create a lib folder in the trixbox component (ofbizhome/hot-deploy/trixbox/lib)
- Download the 4 jars into the lib folder (ofbizhome/hot-deploy/trixbox/lib/
- asterisk-java-0.3-m1.jar (285 kb)
- asterisk-jtapi-0.2.jar (46 kb)
- gjtapi-20060515.jar (610 kb)
- jtapi-1.3.1.jar (131 kb)
- Patch your OFBiz installation so that it can accept primitive types (OFBiz JIRA issue 400)
- Open a Command prompt and go to the ofbizhome/framework/base directory
- run ant clean
- run ant
Setting Up Trixbox component
...
- Locate /trixbox/config/trixbox.properties
- Change the following settings to match your Asterisk Manager API
- server - the location of your Asterisk Server either by domain name or IP address (ie 192.168.1.101)
- port
...
- - unless you changed this in your /etc/asterisk/manager.conf file on your Asterisk server leave this unchanged
- login
...
- - Manager name you assigned when setting up the Asterisk Manager API credentials
- secret
...
- - password you assigned when setting up the Asterisk Manager API credentials
- timeout
...
- - leave as is
Utilize the service - callOriginThenExtension
This is a service that invokes a simple-method and just needs a few parameters to initiate the click to dial call. You can use your imagination on how to invoke it and pass the parameters (ie form, hyperlink, other services, etc). Please be cautious of security though because you are likely giving OFBiz access to an outside line that someone could use.
- originatingChannel
- unmigrated-wiki-markup
- This is the first channel to call. Should be in the format of IAX2/\[extension\] or SIP/\[extension\].
- I will do some testing to see what format it needs to be in for the originatingChannel to be POTS number possibly something like ZAP/[outsideNumber]
- This is the first channel to call. Should be in the format of IAX2/\[extension\] or SIP/\[extension\].
- extension
- This is the second channel to call. This is usually just the phone number. Your dialplan in asterisk should determine how to handle this.
- priority
- I don't have all the details on what this does. If not provided, the service will assume "1" which I believe takes top priority (ie call now)
- context
- This is the context that it will invoke from in the dial plan. I haven't done much experimenting here yet. This is likely where you'll want to implement security.
- actionTimeout
- The timeout in milliseconds for the action to complete, in this case I believe it is the cumulative time it takes for the first channel to answer and the second channel to respond
- The timeout in milliseconds for the action to complete, in this case I believe it is the cumulative time it takes for the first channel to answer and the second channel to respond