Forums
« Back to APIs

RE: catch the calling number using Jabber SDK

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,  
 
Is there any way to retrieve the calling number of an incoming call using the “Jabber SDK” ?  
Any help would be greatly appreciated
thanks,        

When you bind a callback function to the conversationIncoming event, you can use properties on the conversation object that gets passed into the callback to get the calling number.  There are two properties: callingPartyDirectoryNumber and callingPartyNumber.  Here is an example:
$('#phone').bind('conversationIncoming.cwic', function(evt, conversation, container) {
    console.log('Incoming call from: ' + conversation.callingPartyDirectoryNumber);
    conv = conversation;
});

Thank's O'Rourke for helping, it seems working