如何将IVR连接到星号到python代码 [英] how to connect IVR to asteric to python code

查看:192
本文介绍了如何将IVR连接到星号到python代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想接收来自IVR的星号呼叫,将其传递给处理它的python,然后将其返回给ivr.谁能指导我进行设置这就是我所做的我的操作系统是CentOs 8我正在使用python 3.6我正在使用星号vs 17

I want to receive call from IVR to asterisk, pass it to python who processors it and response it back to ivr. Can anyone guide me how to set it up This is what I have done My os is CentOs 8 I am using python 3.6 I am using asterisk vs 17

我已经创建了sip.config

I have created sip.config

[general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=ulaw
alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=192.168.1.0/255.255.255.0
[7001]
type=friend
host=dynamic
secret=123
context=internal
[7002]
type=friend
host=dynamic
secret=456
context=internal

我的extension.config

My extention.config

[internal]
exten => 7001,1,Answer()
exten => 7001,2,Dial(SIP/7001,60)
exten => 7001,3,Playback(vm-nobodyavail)
exten => 7001,4,VoiceMail(7001@main)
exten => 7001,5,Hangup()
exten => 7002,1,Answer()
exten => 7002,2,Dial(SIP/7002,60)
exten => 7002,3,Playback(vm-nobodyavail)
exten=> 7002,4,VoiceMail(7002@main)
exten => 7002,5,Hangup()
exten => 8001,1,VoicemailMain(7001@main)
exten => 8001,2,Hangup()
exten => 8002,1,VoicemailMain(7002@main)
exten => 8002,2,Hangup()

在modules.config中我已经添加了require = chan_sip.so

at modules.config i have added require = chan_sip.so

星号正在运行.现在,我将如何连接python,以便当电话打到星号时python会接收到它并还以音频形式返回响应在多个地方,我正在阅读有关AGR的信息,但我没有得到相同的任何正确的设置文件.我没有使用pjsip,因为我找不到好的配置文件.我使用了多个拨号号码,但只会在需要时使用

asterisk is running . Now how will i connect python such that when a call hits asterisk python receives it and also return response as audio In multiple places i am reading about AGR but i am not getting any proper setup file for the same. I didnt use pjsip because i couldnt find good config file. I used multiple dial number but will use only if needed

推荐答案

有很多方法可以做到这一点.

There are plenty methods to do that.

最先进的方法是使用func_ODBC和func_curl编写拨号计划(完全不需要python即可工作,具体取决于您的需求).

The most advanced is to write dialplan using func_ODBC and func_curl(may work without python at all, depend on what you need).

您还可以检查AGI和AMI接口.

Also you can check AGI and AMI interfaces.

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=32375589

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573

这篇关于如何将IVR连接到星号到python代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆