<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 3, 2008, at 4:54 AM, Vito Andolini wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <div><span class="571264508-03102008"><font face="Arial" size="2">Hi All,</font></span></div> <div><span class="571264508-03102008"><font face="Arial" size="2"></font></span>&nbsp;</div> <div><span class="571264508-03102008"><font face="Arial" size="2">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. <div><span class="571264508-03102008"><font face="Arial" size="2"></font></span>&nbsp;</div></font></span><span class="571264508-03102008"><font face="Arial" size="2"></font></span></div> <div><span class="571264508-03102008"><font face="Arial" size="2">Basically I want to implement a Click 2 Call service.&nbsp; 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.</font></span></div> <div><span class="571264508-03102008"><font face="Arial" size="2"></font></span>&nbsp;</div> <div><span class="571264508-03102008"><font face="Arial" size="2">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)</font></span></div></div></blockquote><div><br></div><div>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:</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Event_Socket">http://wiki.freeswitch.org/wiki/Event_Socket</a></div><div><br></div><div>and xmlrpc:</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC">http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC</a><span class="Apple-style-span" style="font-family: Arial; -webkit-text-stroke-width: -1; "></span></div><div><span class="Apple-style-span" style="font-family: Arial; -webkit-text-stroke-width: -1; ">&nbsp;</span></div><blockquote type="cite"><div> <div><span class="571264508-03102008"><font face="Arial" size="2">2)&nbsp;If you initiate a call from the software and then once its answered call a 2nd number. How do you bridge them?</font></span></div></div></blockquote><div><br></div>You can do this all in one command:</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Mod_commands#originate">http://wiki.freeswitch.org/wiki/Mod_commands#originate</a></div><div><br></div><div><blockquote type="cite"><div> <div><span class="571264508-03102008"><font face="Arial" size="2">3)&nbsp;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.</font></span></div></div></blockquote><div><br></div><div>We can do either per leg or combined cdr's</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#process_cdr">http://wiki.freeswitch.org/wiki/Channel_Variables#process_cdr</a></div><div><br></div><div>We have multiple supported formats for cdr:</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Mod_xml_cdr">http://wiki.freeswitch.org/wiki/Mod_xml_cdr</a></div><div><a href="http://wiki.freeswitch.org/wiki/Mod_cdr_csv">http://wiki.freeswitch.org/wiki/Mod_cdr_csv</a></div><div>&nbsp;</div><blockquote type="cite"><div> <div><span class="571264508-03102008"><font face="Arial" size="2">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?</font></span></div></div></blockquote><br></div><div>There are several approaches you could take to this. &nbsp;You could do this all in dialplan if there is not any real forking other than if the call worked. &nbsp;You can use the variables:</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#hangup_after_bridge">http://wiki.freeswitch.org/wiki/Channel_Variables#hangup_after_bridge</a></div><div><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail">http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail</a></div><div><br></div><div>and just playing the sounds in the&nbsp;dial-plan&nbsp;after a bridge line.</div><div><br></div><div><br></div><div>Mike</div></body></html>