Playing a music file before call connects using Asterisk
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:
- 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,
SriramUse 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)
精彩评论