Author Topic: Audio files as Loop Instead of call ringing  (Read 7572 times)

ganapathi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Audio files as Loop Instead of call ringing
« 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.

jamie

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Audio files as Loop Instead of call ringing
« Reply #1 on: October 01, 2018, 02:19:58 PM »
Hi Ganapathi,

To indefinitely repeat an audio file you can include the parameter autorepeat = true :

but I've only used this in PHP



ganapathi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: Audio files as Loop Instead of call ringing
« Reply #2 on: October 01, 2018, 10:48:14 PM »
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.

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: Audio files as Loop Instead of call ringing
« Reply #3 on: October 02, 2018, 12:07:17 AM »
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)