timeout - UCMA Conference call stuck at first participant establishing -


i'm trying start conference using ucma 4.0 basic conferencing sample , first user endpoint stuck @ establishing call (it's lync not ringing). timeout exception triggered after while. what's main problem ?

btw, platform being started discovering 3 application endpoints established.

sip:kl.dev.local@dev.local;gruu;opaque=srvr:yyapp:ehghh8uxnvqiedxu3ygjyqaayyapp sip:kl.cdev.local@dev.local;gruu;opaque=srvr:yyapp:ehghh8uxnvqiedxu3ygjyqaamachine1 sip:kl.dev.local@dev.local;gruu;opaque=srvr:yyapp:ehghh8uxnvqiedxu3ygjyqaamachine2 sip:kl.dev.local@dev.local;gruu;opaque=srvr:yyapp:ehghh8uxnvqiedxu3ygjyqaamachine3 'lyncgame.gateway.testconnection.vshost.exe' (clr v4.0.30319: lyncgame.gateway.testconnection.vshost.exe): loaded 'c:\windows\microsoft.net\assembly\gac_msil\system.data.sqlxml\v4.0_4.0.0.0__b77a5c561934e089\system.data.sqlxml.dll'. skipped loading symbols. module optimized , debugger option 'just code' enabled. 'lyncgame.gateway.testconnection.vshost.exe' (clr v4.0.30319: lyncgame.gateway.testconnection.vshost.exe): loaded 'system.xml.xsl.compiledquery.1'. thread 0x6e8 has exited code 259 (0x103). thread 0x3dd4 has exited code 259 (0x103). thread 0x2138 has exited code 259 (0x103). 'lyncgame.gateway.testconnection.vshost.exe' (clr v4.0.30319: lyncgame.gateway.testconnection.vshost.exe): loaded 'c:\windows\microsoft.net\assembly\gac_msil\system.security\v4.0_4.0.0.0__b03f5f7f11d50a3a\system.security.dll'. skipped loading symbols. module optimized , debugger option 'just code' enabled. thread 0x3180 has exited code 259 (0x103). thread 0x350c has exited code 259 (0x103). thread 0x1698 has exited code 0 (0x0). thread 0x3ef4 has exited code 0 (0x0). thread 0x3f00 has exited code 259 (0x103). thread 0x2a24 has exited code 259 (0x103). thread 0x3fc0 has exited code 259 (0x103). thread 0x3750 has exited code 259 (0x103). thread 0x27b8 has exited code 259 (0x103). thread 0x11e0 has exited code 259 (0x103). thread 0x2214 has exited code 259 (0x103). thread 0x1564 has exited code 259 (0x103). thread 0x3740 has exited code 259 (0x103). thread 0x28a8 has exited code 259 (0x103). thread 0x1da8 has exited code 259 (0x103). first chance exception of type 'microsoft.rtc.signaling.operationtimeoutexception' occurred in microsoft.rtc.collaboration.dll

class ucmaconference {     #region locals     // im send upon joining mcu.     private static string _messagetosend = "hello, world!";      private conference _conference;      private applicationendpoint _callerendpoint, _calleeendpoint;      //wait handles present keep things synchronous , easy read.     private autoresetevent _waitforcallestablish = new autoresetevent(false);      private autoresetevent _waitforconferencescheduling = new autoresetevent(false);      private autoresetevent _waitforconferencejoin = new autoresetevent(false);      private autoresetevent _waitformessagereceived = new autoresetevent(false);      private autoresetevent _waitformessage2received = new autoresetevent(false);      private autoresetevent waitforuserendpointestablish = new autoresetevent(false);      private autoresetevent _waitforshutdown = new autoresetevent(false);      private autoresetevent _waitforconversationinviteremoteparticipants = new autoresetevent(false);      private instantmessagingflow _imflow;      private instantmessagingflow _imflow2;     #endregion      public conference startconference()     {         try         {             foreach (var item in platformdataprovider.dataprovider.appendpoints)             {                 writelog.addline(item.endpointuri + item.ownerdisplayname);                 console.writeline(item.endpointuri + item.ownerdisplayname);             }             // create end point(s)             ucmacoach ucmacoach = new ucmacoach();             userendpointsettings settings = new userendpointsettings("sip:user8@dev.local");              userendpoint _userendpoint = new userendpoint(platformdataprovider.dataprovider.collabplatform, settings);             _userendpoint.beginestablish(ar =>             {                 try                 {                     _userendpoint.endestablish(ar);                     waitforuserendpointestablish.set();                 }                 catch (exception ex)                 {                     writelog.addline("error on establish: " + ex.message);                     waitforuserendpointestablish.set();                 }              }, null);             waitforuserendpointestablish.waitone();               writelog.addline("user endpoint has been established ");             _userendpoint.localownerpresence.beginsubscribe(r =>             {              }, null);              //iasyncresult result = _userendpoint.localownerpresence.beginpublishpresence(microsoft.rtc.collaboration.presence.presenceavailability.busy);             // create user endpoint, using network credential object             // defined above.             _callerendpoint = platformdataprovider.dataprovider.appendpoints[1];             /* friendly name conference leader endpoint */              // create second user endpoint, using network credential object             // defined above.             _calleeendpoint = platformdataprovider.dataprovider.appendpoints[2];             /* friendly name conference attendee endpoint */              // uri user logged onto microsoft lync             string _ocuseruri = "sip:user9@dev.local";              // 1 of endpoints schedules conference in advance. @              // schedule time, conference settings set.              // base conference settings object, used set policies conference.             conferencescheduleinformation conferencescheduleinformation = new conferencescheduleinformation();             // open meeting (participants can join not on list),              // requiring authentication (no anonymous users allowed.)             conferencescheduleinformation.accesslevel = conferenceaccesslevel.sameenterprise;             // below flag determines whether or not passcode optional             // users joining conference.             conferencescheduleinformation.ispasscodeoptional = true;             conferencescheduleinformation.passcode = "1357924680";             // verbose description of conference             conferencescheduleinformation.description = "startready | conference testing";             // below field indicates date , time after conference can deleted.             conferencescheduleinformation.expirytime = system.datetime.now.addhours(5);              // these 2 lines assign set of modalities (here,              // instantmessage) available mcus conference. custom             // modalities (and corresponding mcus) may added @              // time part of extensibility model.             conferencemcuinformation instantmessagemcu = new conferencemcuinformation(mcutype.instantmessaging);             conferencescheduleinformation.mcus.add(instantmessagemcu);              // setup object complete, schedule conference              // using conference services off of endpoint. note: conference             // organizer considered leader of conference default.             _callerendpoint.conferenceservices.beginscheduleconference(conferencescheduleinformation,                 endscheduleconference, _callerendpoint.conferenceservices);              // wait scheduling complete.             _waitforconferencescheduling.waitone();              // conference scheduled, it's time join it.             // have reference conference object populated             // endscheduleconference call, not need              // conference first. initialize conversation off of endpoint,              // , join conference uri provided above.             conversation callerconversation = new conversation(_callerendpoint);             callerconversation.conferencesession.statechanged += new                 eventhandler<statechangedeventargs<conferencesessionstate>>(conferencesession_statechanged);              // join , wait, again forcing synchronization.             callerconversation.conferencesession.beginjoin(_conference.conferenceuri, null /*joinoptions*/,                 endjoinconference, callerconversation.conferencesession);             _waitforconferencejoin.waitone();              // placing calls on conference-connected conversation              // connects respective mcus. these calls may used             // communicate conference/mcus.             instantmessagingcall instantmessagingcall = new instantmessagingcall(callerconversation);              // hooking event handlers , placing call.             instantmessagingcall.instantmessagingflowconfigurationrequested +=                 this.instantmessagingcall_instantmessagingflowconfigurationrequested;             instantmessagingcall.statechanged += this._call_statechanged;             instantmessagingcall.beginestablish(endcallestablish, instantmessagingcall);              //synchronize ensure call has completed.             _waitforcallestablish.waitone();              //send conf invite             conferenceinvitationdeliveroptions deliveroptions = new conferenceinvitationdeliveroptions();             deliveroptions.toastmessage = new toastmessage("welcome conference of startready demo");              conferenceinvitation invitation = new conferenceinvitation(callerconversation);             invitation.begindeliver(_ocuseruri, deliveroptions, enddeliverinvitation, invitation);              // synchronize ensure invitation complete             _waitforconversationinviteremoteparticipants.waitone();              //and other endpoint's perspective:             //initialize conversation off of endpoint, , join              //conference uri provided above.             conversation calleeconversation = new conversation(_calleeendpoint);             calleeconversation.conferencesession.statechanged += new                 eventhandler<statechangedeventargs<conferencesessionstate>>(conferencesession_statechanged);              // join , wait, again forcing synchronization.             calleeconversation.conferencesession.beginjoin(_conference.conferenceuri, null /*joinoptions*/,                 endjoinconference, calleeconversation.conferencesession);             _waitforconferencejoin.waitone();              // placing calls on conference-connected conversation              // connects respective mcus. these calls may used             //communicate conference/mcus.             instantmessagingcall instantmessagingcall2 = new instantmessagingcall(calleeconversation);              //hooking event handlers , placing call.             instantmessagingcall2.instantmessagingflowconfigurationrequested +=                 this.instantmessagingcall2_instantmessagingflowconfigurationrequested;             instantmessagingcall2.statechanged += this._call_statechanged;             instantmessagingcall2.beginestablish(endcallestablish, instantmessagingcall2);              //synchronize ensure call has completed.             _waitforcallestablish.waitone();              //synchronize ensure messages sent , received             _waitformessagereceived.waitone();              //wait shutdown initiated user             //_waitforshutdown.waitone();              //ucmasamplehelper.pausebeforecontinuing("press enter shutdown , exit.");              return _conference;         }         catch (exception ex)         {             writelog.addline("cannot start conference: " + ex.message);             return null;         }     }      #region side methods     void conferencesession_statechanged(object sender, statechangedeventargs<conferencesessionstate> e)     {         conferencesession confsession = sender conferencesession;          //session participants allow disambiguation.         writelog.addline("the conference session local participant: " +             confsession.conversation.localparticipant + " has changed state. " +             "the previous conference state was: " + e.previousstate +             " , current state is: " + e.state);     }      // flow created indicates there flow present begin media      // operations with, , no longer null.     public void instantmessagingcall_instantmessagingflowconfigurationrequested         (object sender, instantmessagingflowconfigurationrequestedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;         writelog.addline("caller's flow created.");         instantmessagingflow = e.flow;         _imflow = instantmessagingflow;          // flow non-null, bind event handlers state         // changed , message received. when flow goes active, (as          // indicated state changed event) program send          // im in event handler.         instantmessagingflow.statechanged += this.instantmessagingflow_statechanged;          // message received event used indicate message has         // been received far end.         instantmessagingflow.messagereceived += this.instantmessagingflow_messagereceived;     }      // flow created indicates there flow present begin media     // operations with, , no longer null.     public void instantmessagingcall2_instantmessagingflowconfigurationrequested(         object sender, instantmessagingflowconfigurationrequestedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;         writelog.addline("callee's flow created.");         instantmessagingflow = e.flow;         _imflow2 = instantmessagingflow;          // flow non-null, bind event handlers state          // changed , message received. when flow goes active,          // program send im in event handler.         instantmessagingflow.statechanged += this.instantmessagingflow2_statechanged;          // message received event used indicate message          // far end has been received.         instantmessagingflow.messagereceived += this.instantmessagingflow2_messagereceived;     }      private void instantmessagingflow_statechanged(object sender, mediaflowstatechangedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;          writelog.addline("flow state changed " + e.previousstate + " " + e.state);          //when flow active, media operations (here, sending im) may begin.         if (e.state == mediaflowstate.active)         {             _imflow = instantmessagingflow;             writelog.addline("please type message send...");             string msg = console.readline();             //send message on instantmessagingflow.             instantmessagingflow.beginsendinstantmessage(msg, endsendmessage, instantmessagingflow);         }     }      private void instantmessagingflow2_statechanged(object sender, mediaflowstatechangedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;          writelog.addline("flow state changed " + e.previousstate + " " + e.state);          //when flow active, media operations (here, sending im) may begin.         if (e.state == mediaflowstate.active)         {             _imflow2 = instantmessagingflow;         }     }      private void endsendmessage(iasyncresult ar)     {         instantmessagingflow instantmessagingflow = ar.asyncstate instantmessagingflow;         try         {             instantmessagingflow.endsendinstantmessage(ar);             writelog.addline("the message has been sent.");         }         catch (operationtimeoutexception optimeex)         {             // operationfailureexception: indicates failure connect              // im remote party due timeout (called party failed              // respond within expected time).             // todo (left reader): add error handling code             writelog.addline(optimeex.tostring());         }     }     private void instantmessagingflow_messagereceived(object sender, instantmessagereceivedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;         //on incoming instant message, print contents console.         writelog.addline("in caller's message handler: " + e.sender.displayname + " said: " + e.textbody);         _waitformessagereceived.set();     }      private void instantmessagingflow2_messagereceived(object sender, instantmessagereceivedeventargs e)     {         instantmessagingflow instantmessagingflow = sender instantmessagingflow;         //on incoming instant message, print contents console.         writelog.addline("in callee's message handler: " + e.sender.displayname + " said: " + e.textbody);          writelog.addline("message received echoed");         _messagetosend = "echo: " + e.textbody;         //send message on instantmessagingflow.         if (_imflow2 != null && _imflow2.state == mediaflowstate.active)         {             _imflow2.beginsendinstantmessage(_messagetosend, endsendmessage, instantmessagingflow);         }         else             writelog.addline("could not echo message because flow either null or inactive");          _waitformessage2received.set();     }      private void endcallestablish(iasyncresult ar)     {         call call = ar.asyncstate call;         try         {             call.endestablish(ar);             writelog.addline("the call local participant: " + call.conversation.localparticipant +                 " , remote participant: " + call.remoteendpoint.participant +                 " in established state.");         }         catch (operationfailureexception opfailex)         {             // operationfailureexception: indicates failure connect              // call remote party.             // todo (left reader): add error handling code             writelog.addline(opfailex.tostring());         }         catch (realtimeexception exception)         {             // realtimeexception may thrown on media or link-layer              //failures.             // todo (left reader): add error handling code             writelog.addline(exception.tostring());         }                 {             //again, sync completion of code.             _waitforcallestablish.set();         }     }      private void enddeliverinvitation(iasyncresult ar)     {         conferenceinvitation invitation = ar.asyncstate conferenceinvitation;          try         {             invitation.enddeliver(ar);         }         catch (operationfailureexception opfailex)         {             // operationfailureexception: indicates failure connect              // call remote party.             // todo (left reader): add error handling code             writelog.addline(opfailex.tostring());         }         catch (realtimeexception exception)         {             // realtimeexception may thrown on media or link-layer failures.             // todo (left reader): add error handling code             writelog.addline(exception.tostring());         }                 {             //again, sync completion of code.             _waitforconversationinviteremoteparticipants.set();         }     }      private void endscheduleconference(iasyncresult ar)     {         conferenceservices confsession = ar.asyncstate conferenceservices;         try         {             //end schedule conference returns conference object,              // contains vast majority of data relevant             // conference.             _conference = confsession.endscheduleconference(ar);             writelog.addline("");             writelog.addline(" conference scheduled.");             writelog.addline("");          }         catch (conferencefailureexception conffailex)         {             // conferencefailureexception may thrown on failures              // schedule due mcus being absent or unsupported, or due             // malformed parameters.             // todo (left reader): add error handling code             writelog.addline(conffailex.tostring());         }          //again, sync. reasons.         _waitforconferencescheduling.set();     }     private void endjoinconference(iasyncresult ar)     {         conferencesession confsession = ar.asyncstate conferencesession;         try         {             confsession.endjoin(ar);         }         catch (conferencefailureexception conffailex)         {             // conferencefailureexception may thrown on failures due              // mcus being absent or unsupported, or due malformed parameters.             // todo (left reader): add error handling code             writelog.addline(conffailex.tostring());         }         catch (realtimeexception rtex)         {             // todo (left reader): add error handling code             writelog.addline(rtex.tostring());         }                 {             //again, sync. reasons.             _waitforconferencejoin.set();         }     }      //just record state transitions in console.     void _call_statechanged(object sender, callstatechangedeventargs e)     {         call call = sender call;          //call participants allow disambiguation.         writelog.addline("the call local participant: " + call.conversation.localparticipant +             " has changed state. previous call state was: " + e.previousstate +             " , current state is: " + e.state);     }      #endregion } 

}

the other thing that's useful here run ocslogger on application server , see comes back. can run s4 sip traces. might simple you're not able receive messages on 5061 (or whichever callback port specified in provisioning). if it's failing on a/v, @ addresses being used in sdp offer/answer , see if reachable well. again, ocslogger (or lync cls) , snooper friends here.


Comments