Well, I think I've got a fairly decent graph about how Sip Communicator handles setting up an RTP stream for incoming calls.
Problem is, I can't touch any of it from my code.
So implementing CallListener means that the Mailbox bundle can receive CallEvents when a new call comes in. Right now it does that, and properly waits around for the call to go unanswered.
My plan after that was to expose the RTPManager associated with that call, have it create a new SendStream using a DataSource I set up from the outgoing message file, and then essentially make SIP Communicator think that I had pressed the "answer call button." After all the SIP handshaking, CallManager would start up my SendStream for me and I'd be rocking. Easy Peesy, right?
not so much. It turns out that the method of CallSipImpl that exposes the CallSession object is not part of the Call interface, meaning I can't get to it from a package import. Same story with CallManager's AnswerCall method - it's not in an interface for a bundle so I can't get to it.
This is somewhat irritating, for a few reasons
-Since my experience with SIP Communicator and OSGI is quite limited, I was fooled by the fact that both of said methods have "public" scope.
-This means that neither of these problems show up at compile-time... all I get is a "NoClassDefFound." The compiler knows where these classes are via a simple import, but the runtime classloader can apparently only see the bundles that are listed in the application's manifest, and so trying to cast down to CallSipImpl fails miserably.
-All of this meant that I wasted a load of time trying to figure out what the problem was.
Ah well, que sedilla sedilla.
Anyway, I see the road ahead of me going in one of three directions
-I'm missing a really obvious way to set up a SendStream and I'll be kicking myself once I figure it out
-I need to handle all the SIP Handshaking as well as setting up a new RTP Manager all in the mailbox, which seems like way too much reinventing the wheel
-I need to change my whole design plan and instead focus on modifying the classes that already handle incoming calls. I don't even want to think about that one right now.
Anyway, day wasn't a total loss as at least I feel like I know what's going on.