Author Topic: Play wave on chan.disconnected  (Read 517 times)

andr04

  • Newbie
  • *
  • Posts: 18
    • View Profile
Play wave on chan.disconnected
« on: February 26, 2018, 05:52:52 AM »
Hello.

I want to play different slin files on to inform the caller about the reason of disconnection the other side: wrong number, unavailable and so on.

I watch chan.disconnected message and use chan.masquerade to play the message with options:
{
  'message': 'call.execute',
  'id': params['id'],
  'callto': 'wave/play//share/yate/sounds/%s.slin' % sound
}


If the provider sent progress message before (ring tones), the rtp is up and busy message on disconnect is played. If there is no progress and earlymedia, no any sound is hear (but msgsniffer shows all good and message was played).

What I've forgottent to make this work?

Monica Tepelus

  • Administrator
  • Full Member
  • *****
  • Posts: 192
    • View Profile
Re: Play wave on chan.disconnected
« Reply #1 on: February 28, 2018, 04:34:29 AM »
Hi,

Please provide telnet log with sniffer activated.

marian

  • Hero Member
  • *****
  • Posts: 508
    • View Profile
Re: Play wave on chan.disconnected
« Reply #2 on: March 01, 2018, 03:16:53 AM »
The incoming call leg won't play any media to calling party if not signaled to do so.

After wave chan is connected (call.execute succeeds) you must send a call.progress (on its behalf) with earlymedia=yes

This may be done by watching for chan.connected messages.