Cannot make new call leg, request dropped as legService is not ready or is blocked
hello,
I am programming by SASS in order to integrate FMS with FMG.
first, I confige the rtmp.xml and the workflow.xml of the FMG.
second, I create a fms application, and program the main.asc:
Client.prototype.requestService = function(name){
if(!application.legService.isConnected){
services.request(name);
}else{
trace("FMG legservice is already connected");
}
}
the client call the requestService ,and the onConnect of main.asc is called:
application.onConnect = function(client){
trace("on connect ,the client.agent="+client.agent);
if(client.agent == "FMG Aux Leg Service 1.0"){
return;
} else if(client.agent == "FMG Leg Service 1.0"){
trace("2:A callLegServer (FMG) connect");
if(!this.legService.isConnected){
this.legService.setServer(client);
serviceConnected = true;
trace("3: connected");
}else{
trace("3: but no connected");
}
return;
}
and the log '3: connected' is printed
but, when I called the createNewCall function, I was told error, the application.legService.ready is false:
Client.prototype.createNewCall = function(destAddress){
trace("2:creating a new call,application.legService.ready="+application.legService.ready);
if(!application.legService.ready){
trace("error: Cannot make new call leg, request dropped as legService is not ready or is blocked.");
return false;
}
return application.legService.createCall(this.clientID, destAddress, this.clientID+"-1", this.clientID+"-2");
}
what can I do to let the application.legService.ready is true:
Thanks verymuch!
