开发者

Playing a music file before call connects using Asterisk

开发者 https://www.devze.com 2023-02-04 14:42 出处:网络
I have an asterisk server. I use the server to connect an incoming call to another extension based on a few key presses. There is a certa开发者_运维问答in time lag (after the key/extension press and b

I have an asterisk server. I use the server to connect an incoming call to another extension based on a few key presses. There is a certa开发者_运维问答in time lag (after the key/extension press and before the call connects). How can I play a small music file (of my choice) in this period? There are some constraints that come to my mind:

  1. The music should play only as long as the call does not connect. So, the method used should be a non-locking one.

Any help on this is most welcome.

Thanks,

Sriram


Use the m flag to the Dial application, to play music on hold while the call is connecting.

exten => 9000,1,Noop
exten => 9000,n,Answer
exten => 9000,n,Dial(SIP/device,0,m)


I think Background is your friend (http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGround)

0

精彩评论

暂无评论...
验证码 换一张
取 消