Yate Community Forum
General Category => Yate users hangout place => Topic started by: ganapathi on September 28, 2018, 12:53:04 AM
-
Hi
How do i play audio files (file1,file2..) to customer who called in inbound as a loop until sip user answered.
Scenario :
- Customer called as inbound.
- call.route checking users
- call.execute with fork calling list of users.
- It's ringing when called in inbound. If system generated call to customer then while using chan.masquerade with call.execute then no ringing.it's been silent
In these both cases how do i play audio instead of ringing/silent as a loop until call answered by sip user.
As i seen mail list to play audio to the caller like mentioned below.
m = new Message("chan.masquerade")
m->addparam("message","chan.attach");
m->addparam("id",peerid of call.execute);
m->addparam("source","wave/play/fullpath/audio.au");
But as i guess it won't work as loop/instead of ringing.
Kindly help me on this.
-
Hi Ganapathi,
To indefinitely repeat an audio file you can include the parameter autorepeat = true :
but I've only used this in PHP
-
Thanks .
But for me chan.attach is not working. Only call.execute is working for me. will u pls help me if there any parameters which I missed there ?.
Also I seen some necessary parameters in doc as consumer and sniffer. Don't know what would be the value for this call.
-
When a call leg is connected to another one data endpoints are connected to each other.
You have 2 solutions:
- track chan.connected and re-attach the play data source when call leg is connected
- make 2 separate calls and connect to each other when appropriate (you may use chan.connect message for this. See docs.yate.ro)