创建和删除Asterisk的扩展通过Python

huangapple go评论61阅读模式
英文:

Create and Delete Extensions for Asterisk via Python

问题

我有一个Python脚本,需要在用户达到我的应用程序的某个特定点时添加新的扩展。不确定要使用哪些库,因为pyst和另一个库对我来说都不起作用,我无法将它们导入。

我真的只需要能够创建一个带有唯一用户名和密码的新扩展,并将该信息传递给用户,以便他们可以在软电话上登录。我还需要能够根据需要删除特定的扩展,当它们不再需要时。

对Asterisk(FreePBX)仍然相对陌生,无法弄清楚如何在AMI或ARI上执行此操作,而不包括使用Python API。

英文:

I have a python script that needs to add new Extensions for users when they get to a certain point in my app. Not sure what libraries to use as pyst and another library don't work at all for me I cant get them to import.

I really just need to be able to create a new Extension with unique user and pass and pass along that information to the user so they can login on the softphone. I also need to be able to delete specific Extensions as needed when they are no longer needed.

Still fairly new to Asterisk(FreePBX) and can't figure out how to do this on AMI or ARI by itself not including using a python api.

答案1

得分: 0

如果你只需"添加扩展" - 使用星号 REALTIME 架构与 MySQL 数据库,并将信息存入数据库。

然而,大多数系统还需要控制扩展的拨号计划。如何做到这一点,你可以阅读,例如,在 Freepbx.org 源代码中。

英文:

If you "just need add extension" - use asterisk REALTIME architecture with mysql database and put info into db.

However most systems also need control extension dialplan. How to do that you can read, for example, in Freepbx.org source code.

huangapple
  • 本文由 发表于 2023年6月6日 17:08:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76413062.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定