Author Message
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi all,

I am creating two party call.
Caller : 2304@collaboratory.avaya.com
Called Person : 15132285743 (Scopia DID number)

First, i am suspending call in callOriginated() callback and then I am playing media .

However, media is not being played. I can see code is being executed for playing media but media is not getting played.

I have added 2304 user to the Service Profile and assigned my service to that profile.

However, Media is being played if i am doing one party call i.e System calls the user itself.

Code :

@Override
public void callOriginated(Call call) {
logger.info("Call originated");
call.suspend();
if(call.getAttribute("conference").equals("false"))
{
try
{
logger.info("CONFERENCE ATTRIBUTE FALSE");
final DigitOptions digitoptions=MediaFactory.createDigitOptions().setNumberOfDigits(1).setTimeout(20000);
final MyListner mediaListener = new MyListner(call);
final MediaService mediaService = MediaFactory.createMediaService();
final PlayItem playItem=MediaFactory.createPlayItem();
playItem.setInterruptible(true);
playItem.setIterateCount(1);

playItem.setSource("file://"+MyResource.initString+""+MyResource.randomNumber2+".wav");
//playItem.setSource("file://output109454.wav");

logger.info("Play Item : "+MyResource.initString+""+MyResource.randomNumber2+".wav");

call.setAttribute("playItem", playItem);
call.setAttribute("digitoptions", digitoptions);
call.setAttribute("medialistener", mediaListener);
call.setAttribute("mediaservice", mediaService);
final UUID requestId=mediaService.promptAndCollect(call.getCalledParty(), playItem, digitoptions, mediaListener);
logger.info("Media Played");

}
catch(URISyntaxException e)
{
// TODO Auto-generated catch block
logger.error("Error while playing Media : ",e);
}
}


}




  • Please let me know what is the problem because i am not seeing any errors.
    I can see in logs "Media Played". But actually i am not hearing any media.

  • Please let me know how i should dial Scopia DID number from My softphone. What dialing rules needs to be changed in the setting?



  • Looking forward to your earlier response.

    Swapnil_Bhosale
    Joined: May 18, 2015
    Messages: 88
    Offline
    Issue Resolved Thank you all.
    JoelEzell
    Joined: Nov 15, 2013
    Messages: 780
    Offline
    I'm happy to hear that the issue has been resolved. Would you mind sharing the solution in case other DevConnect members encounter the same issue?
    Swapnil_Bhosale
    Joined: May 18, 2015
    Messages: 88
    Offline
    Hi Joel,

    The problem was in following line of code :

    mediaService.promptAndCollect(call.getCalledParty(), playItem, digitoptions, mediaListener);

    It should be call.getCallingParty();

    That is why i was not able to play media for calling party.


    JoelEzell
    Joined: Nov 15, 2013
    Messages: 780
    Offline
    Great, thanks for sharing!
    Go to:   
    Mobile view