General Category > Yate users hangout place

Play the file after the call

(1/2) > >>

parti3an:
Hi, all!

User A calls B.
After completing the call B, A to play a file.

Tried to do so but the file does not play:

[extra]
chan.disconnected = 20

[chan.disconnected]
^.*$=wave/play//home/test/test.g729

[contexts]

[default]
${rtp_forward}^.*=;rtp_forward=no
\(.*\)$=sip/sip:\0@1.1.1.1

How can this be done?
Thank you very much for your help.

Monica Tepelus:
Hi,

Try doing this from a php/javascript global script or from a javascript routing script. You have better control over your parameters.

In a global script catch chan.disconnected and send a call.execute inside chan.masquerade on behalf of the chan A

An example in php:
$m = new Yate("chan.masquerade");
$m->params["message"] = "call.execute";
$m->params["id"] = "id_chan_A";
$m->params["callto"] = "wave/play//home/test/test.g729";
$m->Dispatch();

parti3an:
Hi,

I have formed here is the query in Yate:

Returned false 'chan.masquerade' delay=0.046953
  thread=0x7efee8040ea0 'Engine Worker'
  data=0x7efee8020600
  retval='66666666666666666666666666666666'
  param['cause_sip'] = '200'
  param['reason_sip'] = 'OK'
  param['rtp_stats'] = 'PS=39,OS=1170,PR=64,OR=1280,PL=0'
  param['sip_user-agent'] = 'Digilinea'
  param['sip_x-asterisk-hangupcause'] = 'Normal Clearing'
  param['sip_x-asterisk-hangupcausecode'] = '16'
  param['id'] = 'sip/92'
  param['module'] = 'sip'
  param['status'] = 'answered'
  param['address'] = '1.1.1.1:5064'
  param['targetid'] = 'sip/93'
  param['billid'] = '1420531230-60'
  param['lastpeerid'] = 'sip/93'
  param['answered'] = 'true'
  param['direction'] = 'incoming'
  param['domain'] = '2.2.2.2'
  param['callid'] = 'sip/989ff44c-5fd63660@192.168.1.2/d8acbb5cdd119a90o3/2016253436'
  param['message'] = 'call.execute'
  param['callto'] = 'wave/play//home/test/test.g729

But nothing happens, you can still tell what is. Thank U.

Monica Tepelus:
I need a complete log to see what is happening. You might have sent this too late or for the wrong channel id. Post a longer sniffer log. One that contains both chan.disconnected messages.

parti3an:
Thank you very much for your help.
Figured out how it should work.

Navigation

[0] Message Index

[#] Next page

Go to full version