Asterisk 是一个开放源代码的软件VoIP PBX系统,我们用Asterisk 搭建企业内部电话系统。
Asterisk AMI的Asterisk管理接口。可以实现对Asterisk系统的监控和控制。
安装 asterisk-ami
pip install asterisk-ami
pip install git+https://github.com/ettoreleandrotognoli/python-ami
源码
#!/usr/bin/env python #-*- coding: utf-8 -*- from asterisk.ami import AMIClient from asterisk.ami import SimpleAction def CallSip(exten,ponebind,callid): client = AMIClient(address='10.200.22.79', port=5038) client.login(username='lucal',secret='test') sip='SIP/%s'%ponebind print (sip) action = SimpleAction( 'Originate', Channel=sip, Exten=callid,#目标电话 Priority=1, Context='MAIN_OUTGOING',#呼叫规则 CallerID=exten,#来自电话 ) client.send_action(action) future = client.send_action(action) response = future.response if __name__ == '__main__': exten='2100' ponebind='2100' callid='2101' CallSip(exten, ponebind, callid)
以上这篇python 控制Asterisk AMI接口外呼电话的例子就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
金钱帮资源网 Copyright www.kbjia.com
暂无“python 控制Asterisk AMI接口外呼电话的例子”评论...
更新日志
2024年10月09日
2024年10月09日
- 腾讯音乐人《浪漫火焰(新势力计划合辑 Vol.11)[FLAC/分轨][147.45MB]
- 2024年,哪里还可以玩有趣的魔兽RPG?
- 类银河恶魔城动作游戏《灵魂熔解》已正式登陆Steam
- 国庆七天总票房破20亿!《志愿军》8亿票房超速领跑!
- 绝区零轰隆隆驶向日落任务攻略 怎么完成
- dnf手游浩瀚星海神秘武器介绍 沧海长风武器升级
- 初音未来缤纷舞台国服预约开启 上线时间一览
- s14全球总决赛瑞士轮抽签结果是什么 S14瑞士轮抽签结果详情
- gam是哪个国家的队 s14世界赛gam战队国家赛区介绍
- s14全球世界赛主题是什么 英雄联盟s14世界赛最新主题介绍
- 鉴宝博主半年涨粉1500万 鉴宝成网友新晋电子榨菜
- 重大里程碑!《底特律 化身为人》销量突破1000万套
- 网友总结游戏业界七宗罪厂商:暴食的微软 傲慢的育碧
- 棒棒堂.2007-哪里怕(引进版)【EMI百代】【WAV+CUE】
- 邓丽君.2024-美好世界8CD(日本唱片志限量编号版)【环球】【WAV+CUE】