Asterisk ringback tone recording

348 views Asked by At

I made an outbound-call service application using Asterisk AMI interface. Following is how my application works.

  1. I generate an Originate request to internal channel using TCP/IP socket.

  2. my dialplan accepts the request and run dial command. extension.conf file is

    [from-internal]
    exten => _X.,1,NoOP()
    same => n,MixMonitor(${DialMonitorFile}.wav)
    same => n,Dial(PJSIP/${EXTEN}@TRUNK_100-1234-5678,30)
    

What I want to do is record whole call process (from ringback tone sound until user hangup).

But, when dial started, only 44 byte size file is generated (maybe wav file header?) before user accepts the call. And, file increased after user accepts call.

Can someone help me how can I record ringback tone sound as well ?

Regards, Brian

1

There are 1 answers

1
arheops On

You should do Answer before MixMonitor if you want that

Please note, CDRs will be affected