Skip to content
Snippets Groups Projects
Commit e8c9c699 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2521] Fix pysflphonectrlsimple (Module md5 not supported anymore)

parent 81643457
Branches
Tags
No related merge requests found
......@@ -29,7 +29,7 @@ from gobject import GObject
import getopt
import time
import md5
import hashlib
from threading import Thread
......@@ -405,11 +405,12 @@ class SflPhoneCtrlSimple(object):
if dest is None or dest == "":
raise SflPhoneError("Invalid call destination")
# callid = str(random.randrange(2**32-1))
# Generate a call ID for this
m = hashlib.md5()
t = long( time.time() * 1000 )
r = long( random.random()*100000000000000000L )
data = str(t) + str(r)
callid = md5.md5(data).hexdigest()
m.update(str(t) + str(r))
callid = m.hexdigest()
# Add the call to the list of active calls and set status to SENT
self.activeCalls[callid] = {'Account': self.account, 'To': dest, 'State': 'SENT' }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment