Im having some troubles with the Lync 2013 client SDK. I want to accept incoming conversations with my own program. For AV-calls this is working fine: When a new conversation starts, the ConversationAdded event fires, the AVModality state of the conversation is Notified and when calling Accept on the modality, the conversation window of Lync pops up as expected.
The trouble comes when trying to handling incoming IMcalls. On an incoming IMcall, the InstantMessageModality State is connected instead of notified. Also, calling Accept() on the modality does nothing. The first is acceptable, as i can register to window available events and interpret that. The second however, is not. To me it seems rather strange this doesn't work.
Is there any way to accept an incoming IM conversation like a AVconversation? (Ie, the Lync toast should dissappear and the lync conversation window should open)
Thnx
Did you already look at How to: Join a Lync conversation on MSDN? In that doc they explain how joining/accepting an incoming A/V conversation is different than doing the same for an incoming IM conversation.
E.g. one of the differences is that IM conversation does not need to be connected.
HTH
Related
We're using ActiveMQ locally to transfer data between 5 processes that turn simultaneously.
I have some data I need to send to a process, both at runtime (which works perfectly fine), but also a default value on start. Thing is it is published when the process starts, it just doesn't read because it wasn't subscribed to the topic at the time the data was sent.
I have multiple solutions : I could delay the first publishing for a moment so that the process has time to launch (which doesn't seem very appealing) ; or is there a way to send all stored previously non-treated messages to some process that just subscribed ?
I'm coding in C#.
I don't have any experience with ActiveMQ, but other message system usually have an option which marks the subscription as persistent, which means that; after the first subscription; the message queue itself checks if a certain message is delivered to that system and retries with a timeout. In this scenario you need to start the receiver at least 1 time.
If this is not an option and you want to plug in receiver afterwards, you might want to consider a setup of your messages which allows you to retrieve the full state, i.e. if you send total-messages instead of differential- messages.
After a little google, I came upon this definition durable subscribers, I hope this helps:
See:
http://activemq.apache.org/how-do-durable-queues-and-topics-work.html
and
http://activemq.apache.org/manage-durable-subscribers.html
since you are using C# client i don't konw if this is supported
topic = new ActiveMQTopic("TEST.Topic?consumer.retroactive=true");
http://activemq.apache.org/retroactive-consumer.html
So, another solution is to configure this behavior on the broker side by adding that to the activemq.xml and restart :
The subscription recovery policy allows you to go back in time when
you subscribe to a topic.
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" >
<subscriptionRecoveryPolicy>
<timedSubscriptionRecoveryPolicy recoverDuration="10000" />
<fixedCountSubscriptionRecoveryPolicy maximumSize="10000" />
</subscriptionRecoveryPolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
http://activemq.apache.org/subscription-recovery-policy.html
I went around the issue by sending a message from each process when they're launched back to the main one, and then only sending the info I needed to send.
I am using SharpSNMPLib on C# to send Informs but always getting a timeoutException. This is apparently caused by the lack of reply as stated on the documentation here :
Messenger.SendInform(0,
VersionCode.V2,
new IPEndPoint(IPAddress.Parse("192.168.1.3"), 162),
new OctetString("public"),
new ObjectIdentifier("1.3.6.1.2.1.1"),
0,
new List<Variable>(),
2000,
null,
null);
The manager should send back a reply to this INFORM message.
Otherwise, a TimeoutException occurs.
Does anyone know how to send back a reply in order to avoid this exception?
Answered offline, but paste the answer here for future reference.
The code base contains an snmptrapd sample, which illustrated how to construct a manager pipeline,
https://github.com/lextm/sharpsnmplib/blob/master/Samples/CSharp/snmptrapd/Program.cs
It is such a pipeline that handles incoming TRAP and INFORM messages and replies in a proper way.
You might further read the checkout steps to see how the test agent and snmptrapd should work together,
http://docs.sharpsnmp.com/en/latest/samples/command-line-tools.html#checkout
When an INFORM message is sent from the test agent after the button is clicked, the snmptrapd program will reply to it and log to console.
I am working with Cisco phones and i want to send them alert messages.
I do this by posting the following to the phone
"<CiscoIPPhoneExecute><ExecuteItem URL=\"Play:chime.raw\"/><ExecuteItem Priority=\"0\" URL=MY GET MESSAGE URL></CiscoIPPhoneExecute>";
My HTTP server then responds with a CiscoIPPhoneText xml object.
This is all working fine, however it is my desire not to have the messages stacking up on top of each other so that the user does not have to dismiss each message individually. I wish only for the most recent message to remain active on the phone so regardless of how many messages the phone has received the user can dismiss one and be returned home.
At first i included an init:services uri in the post but this caused a conflict with another service and my CiscoIPPhoneText was being dismissed immediately by the other service (i have no control over the other service).
Is there a way to return the phone to the home screen before an CiscoIPPhoneText is displayed or any other way to ensure that only one message is active?
Thanks
I found the answer
App:Close:0 is an internal URI which closes the current (or specified) application.
All my messages have the same AppId so when this URI is invoked all my messages close
I'm working on a project which receive notification from GCM server.
I've got the registration ID from GCM server and i send it to my server application which save it in the database.
My device receive the message but when I try to send another one, the precedent is replaced.
I know that we've 2 types of message:
Collapsible "send to sync"
Non-Collapsible
So without changing the name of the message, how can I get two message send at different time?
UPDATE 1:
When my device is offline (for example airport mode activated), I try
to send for example 2 messages from my application server to Google
server (I read that Google stores all the messages). But when I
desactivate this mode, I receive only the last message sent.
I use different collapse_key for different message and I receive all
of them (of course when the device online).
Is anybody knows how can I fix this?
The collapse key is relevant only to messages that were sent to the GCM server but haven't reached the destination device yet (if more than one such message has the same collapse key, only one of them will be sent to the device when it becomes online).
In your question you describe a different situation - the first message is received by the device and then the second message is received by the device and replaces the original message. That has nothing to do with GCM. It has to do with the way your application handles the received messages. For example, if your application code that receives the message displays is as a notification, it's up to you to decide whether a new message will override the existing notification or create a new notification.
You need to make sure that the value of the 'collapse_key' field in each message is different
I have 2 sets of code for you to look at, both are available at PasteBin here:
First is my c# Socket server: http://pastebin.com/wvT4f19m
Second is my code within my AS3 application: http://pastebin.com/bKvabFSP
In the code, what I am trying to do is a simple Send/Receive to see what happens. If I open my application in 2 instances the c# socket server registers that they exist and all is fine!. If I close one of my instances, the c# server still thinks that the user exists and the socket isn't closed.
My code is based off the example at : http://msdn.microsoft.com/en-us/library/fx6588te.aspx
In the MS example, the following lines are added to the SendCallBack() function:
handler.Shutdown(SocketShutdown.Both);
handler.Close();
These definately close the sockets, something I do not want to happen.
I am new at socket programming and it has taken me a fair amount of time to play with the MS example to get it working roughly how I need it. The only problem is the acknowledgement of user disconnects so that I can remove the user from the Clients list that I have set up in the server. Also, when disconnects are acknowledged, I can inform other clients.
thanks all!
Upon each attempt to send data to the user, I do a quick check for a successful transmission/Poll the user and if it fails, the user is removed from my server.
Closing the socket won't affect your listener, it will only affect the current connection. Why do you say this is not what you want?
It sounds like this is exactly what you want.