使用粘附发起呼叫

发布于 2024-09-05 02:32:05 字数 890 浏览 9 评论 0原文

我搜索了谷歌,尝试阅读粘合文档并理解这些例子。我理解其中的一部分,但无法将其组合在一起。我可以编辑extensions.conf并执行agi(agi://localhost)并处理dialplan.rb中的传入呼叫。我已经用这种方式写了一个ivr,它在现实世界中使用。

我已经编辑了 manager.conf 和 config/setup.rb,当我这样做时 - 我

 INFO ami: Successful AMI actions-only connection into [email protected]
 INFO ami: Successful AMI events-only connection into [email protected]

现在明白我想知道的非常具体如下:

  1. 我在哪里以及如何编写在 adhearsion 应用程序启动时执行的代码。即没有任何事件或 agi 调用。
  2. 我究竟要写什么来拨出。

请不要给我部分回复,例如

methods_for :dialplan
  sub foo
    # stuff here
  end

请不要给我模糊的回复,例如“创建组件并将其分叉到左侧”或其他内容......我一直在阅读类似的内容,但我无法理解。请告诉我具体步骤。

i have searched google, tried to read adhearsion docs and make sense of the examples. i understand parts of it but am not able to put it together. i can edit extensions.conf and do agi(agi://localhost) and handle incoming calls in the dialplan.rb. i have written an ivr that way which is in use in the real world.

i have edited manager.conf and config/setup.rb and when i do ahn - i see

 INFO ami: Successful AMI actions-only connection into [email protected]
 INFO ami: Successful AMI events-only connection into [email protected]

now what i want to know is very specifically the following:

  1. where and how do i write code that executes when the adhearsion app starts. i.e. without any event or agi call.
  2. what exactly do i write to dial out.

please dont give me partial responses like

methods_for :dialplan
  sub foo
    # stuff here
  end

please dont give me vague responses like "create component and fork it to the left", or something... i have been reading stuff like that, and i am not able get it. please tell me specific steps.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

桃扇骨 2024-09-12 02:32:05

您的 google foo 显然低于标准

使用“after_initialized”事件命名空间 1

您想何时拨出?您需要查看拨号方案中的“拨号”,或其他地方的“发起”。

Your google foo is quite obviously sub par

Use the 'after_initialized' event namespace for 1

When do you want to dial out? You need to look at either "dial" in the dialplan, or "originate" elsewhere.

夏末的微笑 2024-09-12 02:32:05

扩展.conf

[context]

exten => extension_number,1,Noop()

exten => extension_number,n,AGI(agi://localhost)


in adhearsion project directory.

dialplan.rb 

context {
#your code goes here.
dial "SIP/xxxxx"
dial "SIP/xxxxx"
}


for methods:

 your_ahn_directory/components/component_name/lib/component_name.rb


  methods_for :dialplan do

    def sum(n1,n2)

    n1+n2

   end

end

extensions.conf

[context]

exten => extension_number,1,Noop()

exten => extension_number,n,AGI(agi://localhost)


in adhearsion project directory.

dialplan.rb 

context {
#your code goes here.
dial "SIP/xxxxx"
dial "SIP/xxxxx"
}


for methods:

 your_ahn_directory/components/component_name/lib/component_name.rb


  methods_for :dialplan do

    def sum(n1,n2)

    n1+n2

   end

end
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文