Options for initiating call from browser (not WebRTC)
I have a simple call recording solution set up with a Twilio-like PaaS. The user interacts with a web app where she enters a destination number. My web app then instructs the PaaS to 1. Call the users phone 2. Wait for the user to answer 3. Start a recording. 4. Connect the destination number. The resulting wav is available for the user to download in the web app. I now want to replace the PaaS with FreeSwitch. I've done a lot of experimenting with FS during the last year, and managed to get callrecording of PSTN and WebRTC calls to work. With those calls origination was from PSTN or WebRTC. Now I want to do origination with a HTTP request. When leafing through the FreeSwitch book from PACKT I see that I have multiple options for doing this. 1. fs_cli Have the browser talk to a separate web app (written in node or python or whatever) that the initiates the call with fs_cli. 2. mod_httapi Have the browser talk to a webapp that talks to FS via mod_httapi. In this scenario I can't find any info on how to originate calls in mod_httapi though. 3. mod_event_socket Have a the browser talk to a webapp that talks to FS via mod_event_socket. In all of these scenarios I figure that I'll have the webapp running on the same box as FS and that I'll do all authentication/authorization of the user in the webapp. But which option should I go with? regards Oivvio
mod xml rpc or php esl Envoyé de mon iPhone
Le 3 mai 2017 à 11:41, Oivvio Polite <mylists@polite.se> a écrit :
I have a simple call recording solution set up with a Twilio-like PaaS.
The user interacts with a web app where she enters a destination number. My web app then instructs the PaaS to
1. Call the users phone 2. Wait for the user to answer 3. Start a recording. 4. Connect the destination number.
The resulting wav is available for the user to download in the web app.
I now want to replace the PaaS with FreeSwitch. I've done a lot of experimenting with FS during the last year, and managed to get callrecording of PSTN and WebRTC calls to work.
With those calls origination was from PSTN or WebRTC. Now I want to do origination with a HTTP request. When leafing through the FreeSwitch book from PACKT I see that I have multiple options for doing this.
1. fs_cli
Have the browser talk to a separate web app (written in node or python or whatever) that the initiates the call with fs_cli.
2. mod_httapi
Have the browser talk to a webapp that talks to FS via mod_httapi. In this scenario I can't find any info on how to originate calls in mod_httapi though.
3. mod_event_socket
Have a the browser talk to a webapp that talks to FS via mod_event_socket.
In all of these scenarios I figure that I'll have the webapp running on the same box as FS and that I'll do all authentication/authorization of the user in the webapp.
But which option should I go with?
regards Oivvio
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
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
On 3 May 2017 at 18:41, Oivvio Polite <mylists@polite.se> wrote:
I now want to replace the PaaS with FreeSwitch. I've done a lot of experimenting with FS during the last year, and managed to get callrecording of PSTN and WebRTC calls to work.
With those calls origination was from PSTN or WebRTC. Now I want to do origination with a HTTP request. When leafing through the FreeSwitch book from PACKT I see that I have multiple options for doing this.
Wondering why you don't want to use webrtc (mod_verto) here ? I think it's the most logical option here. But maybe you don't need the audio stream to come back real time to the browser. So in this case using ESL lib is the most straightforward. We use python but should be similar in other language, which look like:- def make_call(request): number = request.POST.get('number', None) if number is not None: conn = ESL.ESLconnection(host, port, password) command = 'originate [some_var=....]sofia/gateway/provider/{destination} &playback(file.mp3)'.format(destination=number) ret = self.bgapi(command)
participants (3)
-
Kamal Mustafa
-
Oivvio Polite
-
tayeb.meftah@gmail.com