Hii,
I am using playback to play song to the caller.
Asterisk server(using manager ami) is calling a sip and when the sip user answer it,it plays based on extension set by manager AMI.
Initially it worked fine but now when I am calling asterisk,its playing mixture of songs.It starts the song from starting(00 seconds) and the same song from the point where the user hung up the previous time its called.
For example:in the first call user hung up at 30 seconds and if I will call now it will play mixture of two songs one from time 00 seconds and other from time 30 seconds.
If a third call will be placed after the user hung up then it will be a mixture of 3 songs
I am playing a songfile named 23.sln(in /home/atul/Desktop/23)
Here are the necessary details
extensions.conf
[outgoing-call]
exten=>_XX,1,Answer()
same=>n,Playback(/home/atul/Desktop/${EXTEN})
same=>n,Hangup()
Asterisk JAVA Code
Public void run() throws AuthenticationFailedException{
OriginateAction originateAction;
ManagerResponse originateResponse;
managerConnection.login();
String sip="SIP/1000abc";String context="outgoing-call";exten="23"
originateAction = new OriginateAction();
originateAction.setChannel(sip);
originateAction.setContext(context);
originateAction.setExten(exten);
originateAction.setPriority(new Integer(1));
originateAction.setTimeout(30000L);
originateAction.setAsync(true);
originateResponse = managerConnection.sendAction(originateAction,10000);
managerConnection.logoff();
}