Hi I would like to know if I can use freeswitch with PHP for voice chat.
I have downloaded the freeswitch software But I am not getting how to configure php with freeswitch where to use this in freeswitch can voice chat application be created using php. how freeswitch is going to interact with php database

Dani AI

Generated

Yes — FreeSWITCH is a great choice for the real‑time side of a web voice/chat app while PHP handles the website, authentication and the database. Typical pattern: FreeSWITCH does signaling and media; PHP provides the UI, user state and business logic. Two integration approaches are common: control FreeSWITCH from PHP via the Event Socket (ESL) or have FreeSWITCH fetch dynamic dialplan/data from your webapp (mod_xml_curl). (developer.signalwire.com)

For web browsers use WebRTC (recommended) and connect browsers to FreeSWITCH using mod_verto, or use SIP-over-WebSocket with a JS SIP stack. WebRTC requires valid TLS (WSS) and usually a TURN service for NAT traversal — plan certs and TURN early. FreeSWITCH will bridge a WebRTC client into SIP, PSTN or a conference. (developer.signalwire.com)

From PHP you should not handle RTP. Use ESL for call control and events: maintain a persistent socket process in PHP or use an async PHP library so you can react to events and issue API/dialplan commands. Modern, maintained PHP libraries (RTCKit/ESL and React/ESL) are available via Composer and avoid building old PHP extensions. Example starter step:

composer require rtckit/esl

Use ESL for call control and mod_xml_curl when you want FreeSWITCH to query your webapp for dialplan/user info. (packagist.org)

For multiparty voice use mod_conference (FreeSWITCH mixer) but test CPU and network load; for large-scale WebRTC conferences consider an SFU/MCU architecture. Common troubleshooting items: enable mod_event_socket, secure the ESL ACL, open and forward RTP port ranges, install valid certs for WSS, and run small POCs first. As noted, you’ll need server/root access to install and configure FreeSWITCH; merged duplicates so use this consolidated advice. (developer.signalwire.com)

Recommended Answers

All 7 Replies

How to Create A Simple Web-based Chat Application.
using php,jquery,ajax. I need text chat and voice chat with this

need a Web based Chat Application created in php mysql ajax. to configure it with free switch. plz help

try searching for free available services. Google is our friend..

Writing an application like this takes time. But if all you need is a raw flat file based chat script... I can probably show you how, but it is no guarantee when I could do this, because of my time constraints. I am just too busy with my schooling right now. Just hanging out here posting response on easy questions.. :)

Member Avatar for Member #120589

So did I. I went to Google and found loads of good ones.

Dude, you are posting the same question twice already this one and .

>> you need to have root access on your server..
>> Connect to your server, using Putty or depending on your OS if you are running Ubuntu as your os, just open your teminal.

>> Login using the terminal and follow the freeswitch wiki.

>> Most servers are based on linux and unix, so it will be easy for you to do it behind terminal (black box).

Merged three threads for the same question. Please do not post the same question multiple times.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.