Update Manager.py added EarlyMedia to originate

master
Ilya Gorskin 2017-01-13 19:10:24 +05:00 committed by GitHub
parent acba249299
commit d5149c99a9
1 changed files with 3 additions and 1 deletions

View File

@ -575,7 +575,7 @@ class Manager(object):
return response return response
def originate(self, channel, exten, context='', priority='', timeout='', caller_id='', async=False, account='', variables={}): def originate(self, channel, exten, context='', priority='', timeout='', caller_id='', async=False, earlymedia='false', account='', variables={}):
"""Originate a call""" """Originate a call"""
cdict = {'Action': 'Originate'} cdict = {'Action': 'Originate'}
@ -591,6 +591,8 @@ class Manager(object):
cdict['CallerID'] = caller_id cdict['CallerID'] = caller_id
if async: if async:
cdict['Async'] = 'yes' cdict['Async'] = 'yes'
if earlymedia:
cdict['EarlyMedia'] = earlymedia
if account: if account:
cdict['Account'] = account cdict['Account'] = account
# join dict of vairables together in a string in the form of 'key=val|key=val' # join dict of vairables together in a string in the form of 'key=val|key=val'