python - Creating an outgoing call using Asterisk Manager and "pyst" -


i trying write automation tests make phone call local asterisk instance , check receiving sip client has received call.

it understanding can create outgoing call event using asterisk manager. have been trying use python 'pyst' library.

i have not been able find working examples of how implement scenario. information have managed gather, have come script:

from asterisk import manager  host = 'localhost' port = 5068  m = manager.manager()  m.connect( host )  m.login( 'admin', 'temp123' ) targeturl = '441610000001'  response = m.originate(     targeturl ,     's',     context='outgoing',     priority='1'     )  print m.status()  m.logoff()  m.close() 

this script reports 'success' response asterisk manager not create outgoing call.

has written script in python?

i familiar python language solutions in other languages wouldn't helpful me!

please read again documentation

"targeturl" in program have channel, in code have no channel type , host(if sip).

valid examples are:

 targeturl = 'sip/441610000001@myprovider_name'  targeturl = 'local/441610000001@outbound_context' 

context "outbound" have valid , have deliver call.

pyst opensource framework. if realy "familar" python, recommend read source of originate method , check send asterisk doc

http://www.voip-info.org/wiki/view/asterisk+manager+api+action+originate

note: bad idea program asterisk using framework pyst if have no general knowledge asterisk itself. first need read asterisk book.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -