Add IM message to UCMA AudioVideo Call - ucma

I have a UCMA AudioVideo call going to (Use called the bot). I could not figure out how to add an IM message to same call. Can anybody give a hint please.
And when IM and AV are in same call, then how to get the state of both calls?

Figured out the answer, There is conversation object associated with one type of call, same object is to be used to create another type of call.

Related

Twilio call hold not working

We are using twilio API for hold call process but we are facing problem :
If we connect the call from A to B, then our call connecting successfully but when we are update the call for hold(Using updating method) then B putting on hold success, but A call disconnecting.
I want to put B on hold but should not disconnect the A call.
Please give me suitable suggestion for this hold process.
Thanks.
Firstly ,Its important to understand that putting a call on hold in the Twilio environment is not a native function rather it works like all updates to a call to connect the call to something else, which could be dialing a number,play an audio, place in queue etc..What you choose to implement the On Hold idiom is up to you.
Make sure you are updating the child sid not the parent sid.
I suggest reading this article What-is-a-Call-SID
If you update the parentsid the child will automatically be lost.
If you update the child sid , the parent call will be disconnected and continue with the original twiml that bridged the call in the first place. You have the option of leaving default fallthrough twiml to go to a queue etc..
Another method of implementing hold , is calling out using theAgent Outbund Conference Api

Remove BOPF Message (from /bobf/if_frw_message) via ABAP

I got an object with TYPE REF TO /bobf/if_frw_message.
And I need to remove some messages from object before "send it" to UI
Only I know is message class name and message number.
Which is the proper way to deal with it?
As you have noticed the interface only has methods to add and read. The only option you really have here is to use GET( ) to get all the messages, instantiate a new instance of the object and add all the messages one by one using ADD_CM( ) and then skip the one you do not need.
Question is why you need to remove the message. A part of the application wanted to report this, it would be better to suppress it at the point where it gets generated.

Discard message from nServiceBus mutator

I need to discard a message if a specific header is present.
I tried to implement a IMutateTransportMessages and call DoNotContinueDispatchingCurrentMessageToHandlers() method inside MutateIncoming but the message is dispatched to handlers anyway.
I can discard the message using an handler but I don't like it because I need also to specify the handlers' order.
Any solution?
Thanks,
Federico
I don't think this will be possible from a message mutator. After all, this isn't really the kind of activity a message mutator should be doing - it has nothing to do with changing the structure of the message.
I agree with you that it sounds messy to do this in a handler, because you're right - then you are very dependent upon the handler order.
Discarding a message due to the presence (or absence) of a header is an infrastructure concern, and since you are using NServiceBus V5, the best way to customize the infrastructure is by customizing the message handling pipeline.
Here's the relevant documentation that covers creating a behavior and inserting it into the pipeline but here's the short version:
You need to create a behavior that implements IBehavior<IncomingContext>. All of the behaviors together form a behavior chain that progress to the next step by calling next() - an Action present in the implementation) method.
Within the behavior, check for your header. To stop processing the message, just don't call next() and call context.DoNotInvokeAnyMoreHandlers() instead.
Create a class inheriting RegisterStep which, from its constructor, will define where in the pipeline to insert your behavior. You could register it right before the MutateIncomingTransportMessage step.
Create a class implementing INeedInitialization (note that this could be the same as the RegisterStep class) which calls busConfig.Pipeline.Register<TClassThatInheritsRegisterStep>().
Again, that's the short version. Check out the docs for the full story and an example.
Shameless plug: This process is also described in detail in Learning NServiceBus - Second Edition in Chapter 7, with an example.

server problem in objective-c

I am hitting an url when the server shutdown.Then the program hang up.May i know how to handle the error when the server shutdown.I mean at that situation I want to give an alert.
Thanks in advance
this is in objective-c
Check reachability api code example in cocoa documentation.
The delegate you supply to an NSURLConnection should handle the error. It will receive the -connection:didFailWithError: message in the event that anything goes wrong. Listing 4 here gives a simple example of just logging the error. If you want an alert dialog to appear you can just sent -presentError: with the NSError as a parameter to a view or a NSDocumentController.

Media Foundation: another way to call IMFActivate::ShutdownObject?

Here is a question about IMFActivate::ActivateObject and IMFActivate::ShutdownObject in Media Foundation.
According to MSDN, the component that calls ActivateObject is responsible for calling ShutdownObject.
But there are two examples not following this rule:
http://msdn.microsoft.com/en-us/library/dd388503%28VS.85%29.aspx
and
http://msdn.microsoft.com/en-us/library/dd317912%28VS.85%29.aspx
In these two examples, they call ActivateObject and then release IMFActivate interface without calling ShutdownObject method.
This is going to lead to memory leaking, right? Or there is another way to release the resource occupied by the object?
(Can I use IMFMediaSource::Shutdown to release the object instead of using IMFActivate::ShutdownObject)
Thanks in advance.
You're right that you're supposed to call IMFActivate::ShutdownObject when you're done using the object you activated. However, notice that the sample in question is instantiating an IMFMediaSource to be returned in an out param.
HRESULT CreateVideoDeviceSource(IMFMediaSource **ppSource)
If CreateVideoDeviceSource were to do a ShutdownObject on the IMFMediaSource it instantiated and then hand it back to you, it would be in a shut-down state and therefore probably unusable.
To answer your question about what you're supposed to do about this, you can probably get away with a pMyMediaSource->Shutdown() after you're all done using it.
More info: IMFActivate's other use in Media Foundation is for allowing an MF object to be instantiated in a different process (useful because the MF Media Session will play DRM-protected content in a separate process); in that case, the MF Media Session will indeed call IMFActivate::ShutdownObject on any IMFActivates you gave it.