Http://stackoverflow.com/questions/6018136/making-audio-calls-using-microsoft-lync-from-a-third-party-application-lync-sd
Http://stackoverflow.com/questions/11399881/lync-sdk-automation-dial-number
Http://msdn.microsoft.com/en-us/library/lync/jj933180.aspx
Http://msdn.microsoft.com/en-US/lync
Using System; Using System. Collections. Generic; Using System. LINQ; Using System. text; Using System. Threading. tasks; Using Microsoft. lync. model; Using Microsoft. lync. model. extensibility; Using Microsoft. lync. model. device; Using Microsoft. lync. model. conversation; Using Microsoft. lync. controls; Using Microsoft. lync. utilities; Namespace Tlync { Class Program { Static Void Main ( String [] ARGs) {(); Return ; Microsoft. lync. model. lyncclient LC = Null ; Try {LC =Microsoft. lync. model. lyncclient. getclient ();} Catch {Log ( " Can not getclient " );} LC. beginsignin ( " Test3@abc.local " , " ABC \ test3 " , " Abcdefg " , Result => { If (Result. iscompleted) {LC. endsignin (result); log ( " Login complete. " );} Else {Log ( " Login err " );}}, " Str " As Object ); Console. Readline ();} Static Maid = Null ; Static Void A () {lyncclient =Lyncclient. getclient (); // If (maid. State = clientstate. uninitialized) // { // Lyncclient. begininitialize (AR) => // { // Lyncclient. endinitialize (AR ); // Lyncclient. statechanged + = lyncclient_statechanged; // }, Null ); // } // If (maid. State = clientstate. signedout) // { // Lyncclient. beginsignin ( // Null, // Null, // Null, // (AR) => // {Lyncclient. endsignin (AR );}, // Null ); // } // Lyncclient. beginsignin ("test3@abc.local", "ABC \ test3", "abcdefg", result => // { // If (result. iscompleted) // { // Lyncclient. endsignin (result ); // Log ("Login complete ."); // } // Else // { // Log ("Login Err "); // } // }, "Str" as object ); VaR Automation = Lyncclient. getautomation (); VaR Conversationsettings = New Dictionary <automationmodalitysettings, Object > (); List < String > Maid =New List < String > (); VaR Contact = lyncclient. contactmanager. getcontactbyuri ( " 0186111111111 " ); // VaR contact2 = maid. contactmanager. getcontactbyuri ("013611111111 "); VaR Contact2 = maid. contactmanager. getcontactbyuri ( " 013611111111 " ); Maid. Add (contact. Uri ); // Participant. Add (contact2.uri ); Automation. beginstartconversation (automationmodalities. Audio, participant, Null , Result => {Log (result. tostring () ;}, automation );} Static Void Lyncclient_statechanged ( Object Sender, clientstatechangedeventargs e ){ If (E. newstate = Clientstate. signedout ){ If (Lyncclient. insuppressedmode = True ){}}} Static Void Log ( String Str) {console. writeline (STR );}}}