Merge pull request #32 from Revent/patch-1

Update Manager.py added EarlyMedia to originate
master
Randall Degges 2017-01-13 14:06:32 -08:00 committed by GitHub
commit d8795f8864
1 changed files with 3 additions and 1 deletions

View File

@ -575,7 +575,7 @@ class Manager(object):
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"""
cdict = {'Action': 'Originate'}
@ -591,6 +591,8 @@ class Manager(object):
cdict['CallerID'] = caller_id
if async:
cdict['Async'] = 'yes'
if earlymedia:
cdict['EarlyMedia'] = earlymedia
if account:
cdict['Account'] = account
# join dict of vairables together in a string in the form of 'key=val|key=val'