mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
FS-11281: Verto.newCall dialog callback overrides should be set before invite
Verto.newCall() permits passing custom callback functions per call that override the default dialog callbacks inherited from the Verto object. However, they are currently set after calling the invite() function, and it's possible that some of these callbacks could be called during the invite() function's execution. To avoid a race condition, move setting these custom callbacks on the dialog to happen before calling invite().
This commit is contained in:
parent
d5af929660
commit
5f96f669c2
@ -465,12 +465,12 @@
|
||||
|
||||
var dialog = new $.verto.dialog($.verto.enum.direction.outbound, this, args);
|
||||
|
||||
dialog.invite();
|
||||
|
||||
if (callbacks) {
|
||||
dialog.callbacks = callbacks;
|
||||
}
|
||||
|
||||
dialog.invite();
|
||||
|
||||
return dialog;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user