communication probelm with Freeswitch through ESL
Hi, I am not bale to communicate with Freeswith over ESL: When I run the following program: import ESL con = ESL.ESLconnection('localhost', '8021', 'ClueCon') if con.connected: con.events('plain', 'ALL') while 1: e = con.recvEvent() if e: print e.serialize() I get output as : "Event-Name: SERVER_DISCONNECTED" similarly, If I run any command using "con.api("originate sofia/gateway/MySIP/XXXX &park")", the events do not get fired. Regards Deepika
Have you checked ESL IP/port binding and password ?
Le 12 avr. 2017 à 11:51, Deepika Yadav <deepikay@iiitd.ac.in> a écrit :
Hi,
I am not bale to communicate with Freeswith over ESL:
When I run the following program:
import ESL
con = ESL.ESLconnection('localhost', '8021', 'ClueCon')
if con.connected: con.events('plain', 'ALL') while 1: e = con.recvEvent() if e: print e.serialize()
I get output as :
"Event-Name: SERVER_DISCONNECTED"
similarly, If I run any command using "con.api("originate sofia/gateway/MySIP/XXXX &park")", the events do not get fired.
Regards Deepika
_________________________________________________________________________ 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 12 April 2017 at 17:51, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I am not bale to communicate with Freeswith over ESL:
When I run the following program:
import ESL
con = ESL.ESLconnection('localhost', '8021', 'ClueCon')
if con.connected: con.events('plain', 'ALL') while 1: e = con.recvEvent() if e: print e.serialize()
I get output as :
"Event-Name: SERVER_DISCONNECTED"
Can you run ? fs_cli -pClueCon fs_cli also using the same esl socket so it a good way to verify the socket connection is fine. Other than that, try also with telnet:- telnet localhost 8021 After getting prompt like:- Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Content-Type: auth/request Enter:- auth ClueCon And press Enter twice. After than type:- events plain all And press Enter twice again. You should be getting events data from freeswitch.
Thanks, I checked by running fs_cli, there was no connection with the Freeswitch. The Freeswitch was somehow not running on the port 8021, so I changed it and it worked. Regards, Deepika On Wed, Apr 12, 2017 at 5:34 PM, Kamal Mustafa <kamal.mustafa@gmail.com> wrote:
On 12 April 2017 at 17:51, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I am not bale to communicate with Freeswith over ESL:
When I run the following program:
import ESL
con = ESL.ESLconnection('localhost', '8021', 'ClueCon')
if con.connected: con.events('plain', 'ALL') while 1: e = con.recvEvent() if e: print e.serialize()
I get output as :
"Event-Name: SERVER_DISCONNECTED"
Can you run ?
fs_cli -pClueCon
fs_cli also using the same esl socket so it a good way to verify the socket connection is fine. Other than that, try also with telnet:-
telnet localhost 8021
After getting prompt like:-
Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Content-Type: auth/request
Enter:-
auth ClueCon
And press Enter twice. After than type:-
events plain all
And press Enter twice again. You should be getting events data from freeswitch.
_________________________________________________________________________ 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
-- Regards Deepika https://www.iiitd.edu.in/~deepikay/
participants (3)
-
David Ponzone
-
Deepika Yadav
-
Kamal Mustafa