javaasteriskfastagi

How to play sound for callee in asterisk


For dialing a number I am using

exec("DIAL", "DAHDI/g0/" + callingPhoneNo + "," + currentTimeOut + ",mg,");

in my java application. And for playing sound for caller using this snippet:

exec("background", "custom/incorrectPassword");

But how can I play sound for call receiver after callee the phone up?


Solution

  • as mentioned in :voip-info it is possible with A option. Means that for this case using

    exec("DIAL", "DAHDI/g0/" + callingPhoneNo + "," + currentTimeOut + ",mg|A(custom/greet)");
    

    command, play greet file for callee after picking the phone up.