04-17-2019 05:32 PM
I want to get CallID information in Macro, but I can not run xEvent command in Macro.
How to get Call information in Macro?
xEvent CallSuccessful
*es Event CallSuccessful CallId
*es Event CallSuccessful CallRate
*es Event CallSuccessful Direction
*es Event CallSuccessful EncryptionIn
*es Event CallSuccessful EncryptionOut
*es Event CallSuccessful Protocol
*es Event CallSuccessful RemoteURI
** end
04-18-2019 03:17 AM
04-21-2019 12:30 PM
Hi,
The CallId can be fetched on the callsuccessful event, incomingcallindication and outgoingcallindication. When you have the ID you can get the specific call from xStatus as you are doing right now.
function callEvent() { xapi.event.on('OutgoingCallIndication', (event) => { //Listen for outgoing calls xapi.status.get('Call ' + event.CallId).then(verifyCall); });
If you do not have the CallId you may get the wrong call in certain scenarios, but if you know its only in one call your method will work as well.
/Magnus
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide