Last active
July 1, 2017 07:02
-
-
Save saukap/f7d6b29d128a36305faabe31900db4fa to your computer and use it in GitHub Desktop.
voxengine scenario - transmit headers when call is declined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(Modules.PushService); | |
// VoxEngine.forwardCallToUser() <-- Previous code | |
// Code to transmit headers when call is declined. | |
VoxImplant.addEventListener(AppEvents.CallAlerting, function (e) { | |
var newCall = VoxEngine.callUser(e.destination, e.callerid, e.displayName, null, e.video); | |
VoxEngine.easyProcess(e.call, newCall, null); | |
newCall.addEventListener(CallEvents.Failed, function(ex) { | |
e.call.reject(ex.code, ex.headers); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(Modules.PushService); | |
// VoxEngine.forwardCallToUserDirect() <-- Previous code | |
// Code to transmit headers when call is declined. | |
VoxImplant.addEventListener(AppEvents.CallAlerting, function (e) { | |
var newCall = VoxEngine.callUserDirect(e.call, e.destination, e.callerid, e.displayName, null); | |
VoxEngine.easyProcess(e.call, newCall, null, true); | |
newCall.addEventListener(CallEvents.Failed, function(ex) { | |
e.call.reject(ex.code, ex.headers); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment