[Freeswitch-users] simple fs commands taking inputs from a webpage

Jonathan Palley jpalley at idapted.com
Tue Apr 29 07:09:01 PDT 2008


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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- 
> users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list