[Freeswitch-users] Newbie Questions

Michael Jerris mike at jerris.com
Fri Oct 3 07:05:51 PDT 2008

On Oct 3, 2008, at 4:54 AM, Vito Andolini wrote:

> Hi All,
> I am familiar with Asterisk and doing some testing for my next  
> project. I have had some difficulties Asterisk, and now researching  
> FreeSwitch hoping that it has some out-of-the box answers for my  
> questions.
> Basically I want to implement a Click 2 Call service.  Very simple,  
> user types in his/her number on a website, that number is called,  
> after it's answered, the company number is called and they are  
> bridged together.
> 1) Is there a way to communicate with FreeSwitch programatically and  
> issue commands such as initiate calls etc ? (ver much like manager  
> API in Asterisk)

There is an interface that we call the fsapi interface that can be  
accessed in many ways, including over a socket method similar to a  
combination of AMI and FAGI:


and xmlrpc:


> 2) If you initiate a call from the software and then once its  
> answered call a 2nd number. How do you bridge them?

You can do this all in one command:


> 3) After the 2 numbers talk and hang up. How does your cdr look  
> like? Do you have 2 cdr's that correspond to both calls or just 1  
> after both numbers are bridged together? This is one of the problems  
> I can't solve with Asterisk as it generates only 1 cdr after the 2  
> calss are bridged. The reason for this request is, in case of a  
> Click2Call service, you are charged for both calls by your SIP  
> provider therefore you need to be able to track both calls for  
> invoices/payments etc.

We can do either per leg or combined cdr's


We have multiple supported formats for cdr:


> 4) Is there a way to programatically know if a call has been  
> asnwered or not and act based upon that. I understand the cdr  
> contains that information. But what I want is, if the call is not  
> answered maybe I can play a prerecorded message or take them to the  
> voicemail or whatnot. So I need a way to do a flow-control based on  
> if the call has been asnwered or not in the dialplan. Does that  
> exist? If so can you point me to some resources?

There are several approaches you could take to this.  You could do  
this all in dialplan if there is not any real forking other than if  
the call worked.  You can use the variables:


and just playing the sounds in the dial-plan after a bridge line.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081003/4fe45f97/attachment-0002.html 

More information about the FreeSWITCH-users mailing list