Mark,
Ok, so, you want to send some non-rtp bits out on the media socket.
I think the real solution to adding this type of flexibility would be to add
an "external media transport" feature to sipXtapi and sipXmediaLib such that
the application would create & manage the media sockets, and the application
would be informed via a callback with data for sending out on a socket - and
the application could invoke a method in the media library to "push packets"
into the flow graph when they were received on the socket. In this case,
you could inject your own bit-block to send, and could look for the same
type of bit-block on the receiving end.
But, there is probably also a "hack" that you could implement:
So, I would think about adding your own plumbing to sipXtapi that would
allow you to get the media socket for a particular call handle.
There is an MprToNet object associated with an MpConnection object. The
MprToNet object has a socket object that, if exposed, could be used for
writing your own data. MpCallFlowGraph is the owner of the MpConnection
object, and CpPhoneMediaInterface (which implements CpMediaInterface) owns
and instantiates the MpCallFlowGraph object, and
MpCallFlowGraph::createConnection is also called from there. So, with the
proper plubming, if you can get the CpPhoneMediaInterface object, then you
can get the media socket.
There is already a function defined in sipXtapiInternal.h that will allow
you to get the CpMediaInterface object, given a call handle:
/**
* Gets an CpMediaInterface pointer, associated with the call connection.
*
* @param hCall Handle to a call. Call handles are obtained either by
* invoking sipxCallCreate or passed to your application through
* a listener interface.
* @param ppInstData pointer to a memory address that is set to the media
interface
* pointer.
*/
SIPXTAPI_API SIPX_RESULT sipxCallGetConnectionMediaInterface(const SIPX_CALL
hCall,
void**
ppInstData);
So, if you have modified the CpPhoneMediaInterface object such that it
exposes the media socket, you can call the
sipxCallGetConnectionMediaInterface function with the call handle, get the
media socket, and write whatever you want to it.
Please be aware that if you are writing these bits to a user-agent that is
not expecting them, and is instead expecting RTP, that unwanted results are
likely to occur! Probably something you thought about, but I just wanted to
state that clearly.
Mike Cohen
Principal Software Engineer
Pingtel Corporation
Work: 781.938.5306 x115
Cell: 781.724.9453
> -----Original Message-----
> From: rmit [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 17, 2006 10:00 AM
> To: Michael Cohen
> Cc: [EMAIL PROTECTED]
> Subject: RE: [sipX-dev] sipXezPhone - Hook into Stream
>
> Hi Michael,
>
> We would like to be able to send and receive set information over the
> link so as to provide a means to do QoS testing on the block of bits. If
> the information we send is known then we have something to test against
> at the receiver.
>
> What I have in mind, and I would be happy for comments, is to send a
> block of bits from a source softphone and to identify the block of bits
> at the receiver. This would possibly be a first step to building in
> techniques to analyse QoS.
>
> I think that we may want to move to RTP packets as a next step.
>
> Ultimately a module that users (both ends) could download that would
> permit QoS testing.
>
> Regards
> Mark
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Michael Cohen
> Sent: Thursday, 17 August 2006 11:43 PM
> To: 'Melanie M.'; [EMAIL PROTECTED]
> Cc: [email protected]
> Subject: Re: [sipX-dev] sipXezPhone - Hook into Stream
>
> Melanie,
>
> I don't believe there is currently a simple way to hook into the media
> stream, however, I think it could be done.
>
> As a workaround, I would change NetInTask.cpp so that it contains a
> reference to a callback function defined for the purpose of hooking into
> the media stream.
>
> Such a callback function could be invoked from NetInTask::get1Msg
> whenever an RTP socket is read.
>
> This wouldn't really be a general purpose solution, but I think you
> could get it to work.
>
> As for injecting into the RTP stream, there are several functions in
> sipXtapi for sending out audio. (sipxCallPlayBufferStart).
> Is this what you're looking to do, or do you want to control and insert
> your own outbound RTP packets? Just wondering what the use-case is.
>
>
> Mike Cohen
>
> Principal Software Engineer
>
> Pingtel Corporation
>
>
>
> Work: 781.938.5306 x115
>
> Cell: 781.724.9453
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:sipx-dev-
> > [EMAIL PROTECTED] On Behalf Of Melanie M.
> > Sent: Thursday, August 17, 2006 1:44 AM
> > To: [EMAIL PROTECTED]
> > Cc: [email protected]
> > Subject: [sipX-dev] sipXezPhone - Hook into Stream
> >
> > Hi all,
> >
> > I am enquiring about the sipXezPhone; in particular about the
> > extraction and injection into stream.
> >
> > I am working on the sipXezPhone and I would like to hook into the
> stream.
> >
> > Could someone please tell me what do I need to do to:
> >
> > - hook into the stream
> > - inject into the stream
> > - capture the parts of the stream
> >
> > I am looking forward to receiving some information from you.
> >
> > Thank you for your help!
> >
> > Regards
> > Melanie
> >
> >
> > _______________________________________________
> > sipx-dev mailing list
> > [EMAIL PROTECTED]
> > List Archive: http://list.sipfoundry.org/archive/sipx-dev
> > Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
>
>
> _______________________________________________
> sipx-dev mailing list
> [EMAIL PROTECTED]
> List Archive: http://list.sipfoundry.org/archive/sipx-dev
> Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/