Playback a file to both sites of a call by DTMF request

这一生的挚爱 提交于 2019-12-12 01:44:49

问题


I want to play a sound file to both call legs whenever the caller clicks a DTMF, I used asterisk features so if the caller clicks the dtmf 6 a sound file will be played to both call legs, The problem is asterisk features only allow the feature to run on one side of the call: self OR peer, I tried configuring 2 features with the same DTMF like that: features.conf:

[applicationmap] PlaySound6p => 6,peer/peer,Playback,tt-monkeys PlaySound6s => 6,self/peer,Playback,tt-monkeys

but the playback of tt-monkeys works only 1 time, here is the log:

-- Feature Found: PlaySound6p exten: PlaySound6p -- Playing 'tt-monkeys.slin' (language 'en') writting asterisk features show command returns:

Dynamic Feature Default Current --------------- ------- ------- PlaySound6s no def 6 PlaySound6p no def 6

It appears asterisk doesn't fire 2 features when they are configured on the same DTMF, Anyone knows a way this can be done? Thanks, Rami.


回答1:


Only one feature can be fired by digit.

Digits will be "consumed" and not go after that.

However you can start on that digit one or more OTHER call, each one you can connect to this channel by ChanSpy or audiohooks and whatever you want.



来源:https://stackoverflow.com/questions/34977312/playback-a-file-to-both-sites-of-a-call-by-dtmf-request

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!