mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
[mod_python3, ESL py3mod] Add Python3 support.
This commit is contained in:
20
libs/esl/python3/events.py
Normal file
20
libs/esl/python3/events.py
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import string
|
||||
import sys
|
||||
|
||||
from ESL import *
|
||||
|
||||
con = ESLconnection("localhost","8021","ClueCon")
|
||||
#are we connected?
|
||||
|
||||
if con.connected:
|
||||
|
||||
con.events("plain", "all");
|
||||
|
||||
while 1:
|
||||
#my $e = $con->recvEventTimed(100);
|
||||
e = con.recvEvent()
|
||||
|
||||
if e:
|
||||
print e.serialize()
|
Reference in New Issue
Block a user