Mountain View
Jabber SDK API Documentation

Tutorial: Hold/Resume

Hold/Resume

Title In this tutorial it will be shown how to:
  • Put conversation on hold
  • Resume conversation that is on hold
Putting TelephonyConversation on hold will trigger "onConversationUpdated" event. First it needs to be checked if conversation has canHold capability, and if it does, then call TelephonyConversation.hold as it is shown in the snippet below:

        var conversation;

        // ...
        // Here we choose which conversation we want to put on hold.
        // ...

        if(conversation.capabilities.canHold)
        {
            // Put conversation on hold.
            conversation.hold();
        }
    
Resuming TelephonyConversation that is on hold is done almost the same, after which "onConversationUpdated" event is fired. First it needs to be checked if conversation has canResume capability, and if it does, then call TelephonyConversation.resume as it is shown in the snippet below:

        var conversation;

        // ...
        // Here we choose which conversation we want to resume.
        // ...

        if(conversation.capabilities.canResume)
        {
            // Resume conversation.
            conversation.resume();
        }
    


Next

Previous