Hello! I've installed latest svn trunk on a dedicatet machine, so vmware issues are gone. Music on hold now sounds pretty good! :-) I would like to issue some commands to freeswitch via web browser. I think that XML-RPC is the way to go but I've just found this documentation http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC which is not enough for me at this point. Is there any XML-RPC quickstart as the Javascript quickstart? I would like to try some click to dial from a web browser, maybe with a bit of javascript too :-) Thanks a lot! Ciao, Claudio Internet Email Confidentiality Footer ----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -----------------------------------------------------------------------------------------------------
That's really all there is to it. Any commands that are registered to the FSAPI interface are instantly available over xmlrpc. You can also execute any api command from the FS dev CLI to test them. If you need to execute a custom command, you make a module that adds an api call to the FSAPI and then you can call it over xmlrpc. 2008/4/24 Cavalera Claudio Luigi <Claudio.Cavalera@italtel.it>:
Hello! I've installed latest svn trunk on a dedicatet machine, so vmware issues are gone. Music on hold now sounds pretty good! :-) I would like to issue some commands to freeswitch via web browser. I think that XML-RPC is the way to go but I've just found this documentation http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC which is not enough for me at this point. Is there any XML-RPC quickstart as the Javascript quickstart? I would like to try some click to dial from a web browser, maybe with a bit of javascript too :-) Thanks a lot!
Ciao, Claudio
Internet Email Confidentiality Footer
----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Hello, I'm trying to realize a demo for this use case: 1) a user inserts two sip users (e.g. 1001 and 1002) into a web page 2) fs calls the users (already registered to fs) and bridge them I've succeeded to achieve 2) by a mix of commands such as: originate sofia/default/1001%131.132.133.134 & park() originate sofia/default/1002%131.132.133.134 & park() show channels uuid_bridge uuid1001 uuid1002 it works so well! Now concerning a robust (yet simple :-) method to achieve 1) : which interface should I use? # mod_event socket # mod_xmpp event # mod_xml_rpc socket # any of the scripting interfaces such as mod_perl, mod_spidermonkey, mod_python, etc. and which server side technology do you suggest to implement the bit of logic (e.g. PHP or Perl with apache, Java with Tomcat) At the moment I'm going to write some PHP to talk directly with mod_event socket, but any hints are welcome! :-) Thanks a lot, Claudio Internet Email Confidentiality Footer ----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -----------------------------------------------------------------------------------------------------
The correct answer is "take your pick" Every mechanism you described is a thin layer on top of the same core code so they all work the same way. The FSAPI interface is designed to be connected to any lightweight control protocol. With all the time you saved not having to wrestle with a solution to your goals, maybe you can collaborate with the guys on irc and develop your PHP event socket code into a robust library that everyone can use and we can check it into tree and give you all commit access to it. On Tue, Apr 29, 2008 at 4:37 AM, Cavalera Claudio Luigi < Claudio.Cavalera@italtel.it> wrote:
Hello, I'm trying to realize a demo for this use case: 1) a user inserts two sip users (e.g. 1001 and 1002) into a web page 2) fs calls the users (already registered to fs) and bridge them
I've succeeded to achieve 2) by a mix of commands such as:
originate sofia/default/1001%131.132.133.134 & park() originate sofia/default/1002%131.132.133.134 & park() show channels uuid_bridge uuid1001 uuid1002
it works so well!
Now concerning a robust (yet simple :-) method to achieve 1) : which interface should I use? # mod_event socket # mod_xmpp event # mod_xml_rpc socket # any of the scripting interfaces such as mod_perl, mod_spidermonkey, mod_python, etc.
and which server side technology do you suggest to implement the bit of logic (e.g. PHP or Perl with apache, Java with Tomcat)
At the moment I'm going to write some PHP to talk directly with mod_event socket, but any hints are welcome! :-)
Thanks a lot, Claudio
Internet Email Confidentiality Footer
----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
This is really the basis of CallBack Here is what one can do with CallBack · You tell the service what telephone number you are calling from. · You tell the service what telephone number you want to call. · The service dials both (you first) and connect the two. Remember, since you are being call, it is in an inbound call to you, like receiving a call from a friend. This is how it may/can work: *1) Web callback* You dial from your PC. Log into your account page · Specify the telephone number you are on. · Specify the telephone number you want to call. · Click 'make call'. · Your telephone will ring. Answer it. · The number you are calling will then ring in the usual way. *2) SMS callback* You make the call by sending a simple SMS message. · Send a blank SMS message to 2125557777. · Your mobile will ring. Answer it. · When prompted, enter the number you want to call. · The number you are calling will then ring in the usual way. *3) Phone callback* You make the call by dialing the callback number. · Use the dial in Web page to find the number to call from your location. · Call the number and then hang up. · Your phone will ring. Answer it. · When prompted, enter the number you want to call. · The number you are calling will then ring in the usual way. -E http://Mobiquity.ws http://Messagr.us
Yes, I'm trying to do 1) "Web callback" at the moment :-) BRs, Claudio ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of EdPimentl Sent: Tuesday, April 29, 2008 3:41 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] simple fs commands taking inputs from awebpage This is really the basis of CallBack Here is what one can do with CallBack * You tell the service what telephone number you are calling from. * You tell the service what telephone number you want to call. * The service dials both (you first) and connect the two. Remember, since you are being call, it is in an inbound call to you, like receiving a call from a friend. This is how it may/can work: 1) Web callback You dial from your PC. Log into your account page * Specify the telephone number you are on. * Specify the telephone number you want to call. * Click 'make call'. * Your telephone will ring. Answer it. * The number you are calling will then ring in the usual way. 2) SMS callback You make the call by sending a simple SMS message. * Send a blank SMS message to 2125557777. * Your mobile will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way. 3) Phone callback You make the call by dialing the callback number. * Use the dial in Web page to find the number to call from your location. * Call the number and then hang up. * Your phone will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way. -E http://Mobiquity.ws http://Messagr.us Internet Email Confidentiality Footer ----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -----------------------------------------------------------------------------------------------------
Hello! I've realized a simple PHP page which takes two phone numbers as input and sends a command to fs event socket api. I've got two flavours of it, one for softphones registered to fs and one for real phones. The command for softphones is something like this and it works well: $command = "api originate {ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/".$Call er."%my_freeswitch_ip &bridge(sofia/default/".$Callee."%my_fs_ip\r\n\r\n"; $Caller and $Callee are two softphones registered with default user accounts such as 1000 and 1001. Now strange things happen when I try to route the call to real phones through my personal softswitch, the command I issue is something like this: $command = "api originate {ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/".$Call er."@my_softswitch_ip &bridge(sofia/default/".$Callee."@my_softswitch_ip)\r\n\r\n"; $Caller and $Callee are two real phones connected to public network such as my mobile phone number and my grandma home number. Here is what's happening: - $Caller gets called - $Callee gets called - any of the two answers first and hears the normal ringback tone - the second phone answers and it works well So in this case there is no play of mysound.wav but the two phones can speak. Instead if I answer $Caller before $Callee gets called (i.e. is ringing) it just receives hang up with this message in fs log: 2008-05-16 16:05:19 [ERR] switch_core_io.c:521 switch_core_session_write_frame() sofia/default/+39....@.... has no write codec. I have not configured any sip gateway yet. I'm almost sure I'm doing wrong in the use of the command here and I need something more complex to realize the callback through the softswitch :-) Thanks for every hint! Ciao, Claudio freeswitch-users-bounces@lists.freeswitch.org wrote:
Yes, I'm trying to do 1) "Web callback" at the moment :-) BRs, Claudio
I'm sending this command through a simple php page. api originate {ringback=/usr/local/freeswitch/sounds/tsb/hello.wav}sofia/default/+3933 46450644@138.132.186.4 &bridge(sofia/default/+393477517958@138.132.186.4)
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of EdPimentl Sent: Tuesday, April 29, 2008 3:41 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] simple fs commands taking inputs from awebpage
This is really the basis of CallBack
Here is what one can do with CallBack
* You tell the service what telephone number you are calling from. * You tell the service what telephone number you want to call. * The service dials both (you first) and connect the two.
Remember, since you are being call, it is in an inbound call to you, like receiving a call from a friend.
This is how it may/can work:
1) Web callback
You dial from your PC.
Log into your account page
* Specify the telephone number you are on. * Specify the telephone number you want to call. * Click 'make call'. * Your telephone will ring. Answer it. * The number you are calling will then ring in the usual way.
2) SMS callback
You make the call by sending a simple SMS message.
* Send a blank SMS message to 2125557777. * Your mobile will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way.
3) Phone callback
You make the call by dialing the callback number.
* Use the dial in Web page to find the number to call from your location. * Call the number and then hang up. * Your phone will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way.
-E http://Mobiquity.ws http://Messagr.us
Internet Email Confidentiality Footer -------------------------------------------------------------- --------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -------------------------------------------------------------- ---------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freesw itch-users http://www.freeswitch.org
What SVN Rev are you on? /b On May 16, 2008, at 9:16 AM, Cavalera Claudio Luigi wrote:
Hello! I've realized a simple PHP page which takes two phone numbers as input and sends a command to fs event socket api. I've got two flavours of it, one for softphones registered to fs and one for real phones.
The command for softphones is something like this and it works well: $command = "api originate {ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/". $Call er."%my_freeswitch_ip &bridge(sofia/default/".$Callee."%my_fs_ip\r\n\r\n"; $Caller and $Callee are two softphones registered with default user accounts such as 1000 and 1001.
Now strange things happen when I try to route the call to real phones through my personal softswitch, the command I issue is something like this: $command = "api originate {ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/". $Call er."@my_softswitch_ip &bridge(sofia/default/".$Callee."@my_softswitch_ip)\r\n\r\n"; $Caller and $Callee are two real phones connected to public network such as my mobile phone number and my grandma home number. Here is what's happening: - $Caller gets called - $Callee gets called - any of the two answers first and hears the normal ringback tone - the second phone answers and it works well So in this case there is no play of mysound.wav but the two phones can speak.
Instead if I answer $Caller before $Callee gets called (i.e. is ringing) it just receives hang up with this message in fs log: 2008-05-16 16:05:19 [ERR] switch_core_io.c:521 switch_core_session_write_frame() sofia/default/+39....@.... has no write codec.
I have not configured any sip gateway yet. I'm almost sure I'm doing wrong in the use of the command here and I need something more complex to realize the callback through the softswitch :-)
Thanks for every hint!
Ciao, Claudio
freeswitch-users-bounces@lists.freeswitch.org wrote:
Yes, I'm trying to do 1) "Web callback" at the moment :-) BRs, Claudio
I'm sending this command through a simple php page.
api originate {ringback=/usr/local/freeswitch/sounds/tsb/hello.wav}sofia/default/ +3933 46450644@138.132.186.4 &bridge(sofia/default/+393477517958@138.132.186.4)
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of EdPimentl Sent: Tuesday, April 29, 2008 3:41 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] simple fs commands taking inputs from awebpage
This is really the basis of CallBack
Here is what one can do with CallBack
* You tell the service what telephone number you are calling from. * You tell the service what telephone number you want to call. * The service dials both (you first) and connect the two.
Remember, since you are being call, it is in an inbound call to you, like receiving a call from a friend.
This is how it may/can work:
1) Web callback
You dial from your PC.
Log into your account page
* Specify the telephone number you are on. * Specify the telephone number you want to call. * Click 'make call'. * Your telephone will ring. Answer it. * The number you are calling will then ring in the usual way.
2) SMS callback
You make the call by sending a simple SMS message.
* Send a blank SMS message to 2125557777. * Your mobile will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way.
3) Phone callback
You make the call by dialing the callback number.
* Use the dial in Web page to find the number to call from your location. * Call the number and then hang up. * Your phone will ring. Answer it. * When prompted, enter the number you want to call. * The number you are calling will then ring in the usual way.
-E http://Mobiquity.ws http://Messagr.us
Internet Email Confidentiality Footer -------------------------------------------------------------- --------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -------------------------------------------------------------- ---------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freesw itch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Brian West sip:brian@freeswitch.org
freeswitch-users-bounces@lists.freeswitch.org wrote:
What SVN Rev are you on?
/b
Latest, of this morning. BRs, Claudio Internet Email Confidentiality Footer ----------------------------------------------------------------------------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. -----------------------------------------------------------------------------------------------------
I like the idea of contribute actively to fs development, however at the moment I can contribute only report my experience as user. In fact I am a PHP newbie anyway, I post here my script in case it can be useful to anyone. It still needs a lot of work, but it's a rough start. Caller is <?php echo htmlspecialchars($_POST['Caller']); ?>.<br> Callee is <?php echo htmlspecialchars($_POST['Callee']); ?>.<br> <br> <?php $Caller = htmlspecialchars($_POST['Caller']); $Callee = htmlspecialchars($_POST['Callee']); echo "Php now!<br>"; echo "Caller is: $Caller<br>"; echo "Callee is: $Callee<br>"; $handle = fsockopen('127.0.0.1', '8021', $erno, $errstr, 30); if (!$handle) { //if connection fails exit and tell us what went wrong. die("Connect failed with erno $erno and errstr $errstr\n"); } else { //read the first line the smtp server gives us (usually the version string) //$responses = fgets($handle, 1024); $response= fread($handle, 1024); echo "connection opened, got response:<br> $response<br><br>"; $authMessage = "auth ClueCon\r\n\r\n"; fwrite($handle, "$authMessage"); $response = fread($handle, 1024); echo "authMessage sent, got response:<br> $response<br>"; $command = "api originate sofia/default/".$Caller."%131.132.133.134 &bridge(sofia/default/".$Callee."%131.132.133.134\r\n\r\n"; echo "command is $command"; fwrite($handle, $command); $response = fread($handle, 1024); echo "command sent, got response:<br> $response<br>"; $response = fread($handle, 1024); echo "command sent, got response:<br> $response<br>"; fclose($handle); } ?> ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: Tuesday, April 29, 2008 3:22 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] simple fs commands taking inputs from awebpage The correct answer is "take your pick" Every mechanism you described is a thin layer on top of the same core code so they all work the same way. The FSAPI interface is designed to be connected to any lightweight control protocol. With all the time you saved not having to wrestle with a solution to your goals, maybe you can collaborate with the guys on irc and develop your PHP event socket code into a robust library that everyone can use and we can check it into tree and give you all commit access to it. On Tue, Apr 29, 2008 at 4:37 AM, Cavalera Claudio Luigi <Claudio.Cavalera@italtel.it> wrote: Hello, I'm trying to realize a demo for this use case: 1) a user inserts two sip users (e.g. 1001 and 1002) into a web page 2) fs calls the users (already registered to fs) and bridge them I've succeeded to achieve 2) by a mix of commands such as: originate sofia/default/1001%131.132.133.134 & park() originate sofia/default/1002%131.132.133.134 & park() show channels uuid_bridge uuid1001 uuid1002 it works so well! Now concerning a robust (yet simple :-) method to achieve 1) : which interface should I use? # mod_event socket # mod_xmpp event # mod_xml_rpc socket # any of the scripting interfaces such as mod_perl, mod_spidermonkey, mod_python, etc. and which server side technology do you suggest to implement the bit of logic (e.g. PHP or Perl with apache, Java with Tomcat) At the moment I'm going to write some PHP to talk directly with mod_event socket, but any hints are welcome! :-) Thanks a lot, Claudio Internet Email Confidentiality Footer ------------------------------------------------------------------------ ----------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. ------------------------------------------------------------------------ ----------------------------- _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Cavalera - You'll find it much easier to use the XML-RPC for this sort of thing, I think. I'm sure there is a php library for XML-RPC and then its just one or two lines of code. On Apr 29, 2008, at 10:59 PM, Cavalera Claudio Luigi wrote:
I like the idea of contribute actively to fs development, however at the moment I can contribute only report my experience as user. In fact I am a PHP newbie anyway, I post here my script in case it can be useful to anyone. It still needs a lot of work, but it's a rough start.
Caller is <?php echo htmlspecialchars($_POST['Caller']); ?>.<br> Callee is <?php echo htmlspecialchars($_POST['Callee']); ?>.<br> <br>
<?php $Caller = htmlspecialchars($_POST['Caller']); $Callee = htmlspecialchars($_POST['Callee']); echo "Php now!<br>"; echo "Caller is: $Caller<br>"; echo "Callee is: $Callee<br>";
$handle = fsockopen('127.0.0.1', '8021', $erno, $errstr, 30); if (!$handle) { //if connection fails exit and tell us what went wrong. die("Connect failed with erno $erno and errstr $errstr\n"); } else { //read the first line the smtp server gives us (usually the version string) //$responses = fgets($handle, 1024); $response= fread($handle, 1024); echo "connection opened, got response:<br> $response<br><br>";
$authMessage = "auth ClueCon\r\n\r\n"; fwrite($handle, "$authMessage");
$response = fread($handle, 1024); echo "authMessage sent, got response:<br> $response<br>";
$command = "api originate sofia/default/".$Caller."%131.132.133.134 &bridge(sofia/default/".$Callee."%131.132.133.134\r\n\r\n"; echo "command is $command"; fwrite($handle, $command);
$response = fread($handle, 1024); echo "command sent, got response:<br> $response<br>"; $response = fread($handle, 1024); echo "command sent, got response:<br> $response<br>";
fclose($handle); } ?>
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: Tuesday, April 29, 2008 3:22 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] simple fs commands taking inputs from awebpage
The correct answer is "take your pick"
Every mechanism you described is a thin layer on top of the same core code so they all work the same way. The FSAPI interface is designed to be connected to any lightweight control protocol.
With all the time you saved not having to wrestle with a solution to your goals, maybe you can collaborate with the guys on irc and develop your PHP event socket code into a robust library that everyone can use and we can check it into tree and give you all commit access to it.
On Tue, Apr 29, 2008 at 4:37 AM, Cavalera Claudio Luigi <Claudio.Cavalera@italtel.it> wrote:
Hello, I'm trying to realize a demo for this use case: 1) a user inserts two sip users (e.g. 1001 and 1002) into a web page 2) fs calls the users (already registered to fs) and bridge them
I've succeeded to achieve 2) by a mix of commands such as:
originate sofia/default/1001%131.132.133.134 & park() originate sofia/default/1002%131.132.133.134 & park() show channels uuid_bridge uuid1001 uuid1002
it works so well!
Now concerning a robust (yet simple :-) method to achieve 1) : which interface should I use? # mod_event socket # mod_xmpp event # mod_xml_rpc socket # any of the scripting interfaces such as mod_perl, mod_spidermonkey, mod_python, etc.
and which server side technology do you suggest to implement the bit of logic (e.g. PHP or Perl with apache, Java with Tomcat)
At the moment I'm going to write some PHP to talk directly with mod_event socket, but any hints are welcome! :-)
Thanks a lot, Claudio
Internet Email Confidentiality Footer
---------------------------------------------------------------------- -- ----------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
---------------------------------------------------------------------- -- -----------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
Claudio - I can give you some pre-release Ruby on Rails code that, if you are developing your web app in Rails will do the trick in a few lines. Specifically class CallController < ApplicationController def create VoiceChannel.create(:destination => "sip/default/#{params [:user1]}", :callback => url_for (:action=>:connect, :destination=>params[:user2])) end def connect render_voice do |voice| voice.ring_ready voice.ringback = "ringback tone.." voice.bridge "sofia/default/#{params[:destination])" end end end On Apr 29, 2008, at 5:37 PM, Cavalera Claudio Luigi wrote:
Hello, I'm trying to realize a demo for this use case: 1) a user inserts two sip users (e.g. 1001 and 1002) into a web page 2) fs calls the users (already registered to fs) and bridge them
I've succeeded to achieve 2) by a mix of commands such as:
originate sofia/default/1001%131.132.133.134 & park() originate sofia/default/1002%131.132.133.134 & park() show channels uuid_bridge uuid1001 uuid1002
it works so well!
Now concerning a robust (yet simple :-) method to achieve 1) : which interface should I use? # mod_event socket # mod_xmpp event # mod_xml_rpc socket # any of the scripting interfaces such as mod_perl, mod_spidermonkey, mod_python, etc.
and which server side technology do you suggest to implement the bit of logic (e.g. PHP or Perl with apache, Java with Tomcat)
At the moment I'm going to write some PHP to talk directly with mod_event socket, but any hints are welcome! :-)
Thanks a lot, Claudio
Internet Email Confidentiality Footer ---------------------------------------------------------------------- ------------------------------- La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. ---------------------------------------------------------------------- -------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
participants (5)
-
Anthony Minessale
-
Brian West
-
Cavalera Claudio Luigi
-
EdPimentl
-
Jonathan Palley