That's really cool :-) Thanks.
I must admit I found it really hard to keep straight what is already done
in base functions...
I'll try out with adaptive buffer with your changes.
g-)
On Tue, 02 Dec 2008 23:13:09 +0100, Stefan Sayer <[EMAIL PROTECTED]>
wrote:
Hi Greger,
I have made some simplifications to your application. you can for most
just use the base AmB2ABSession functions, and it will work without
problems. For example, if you additionally add the session to the
container, you will have it added there twice with the same dialog
identifiers, so there will be a problem later; createCalleeSession just
needs to create the session, it is added to the session container by
setupCalleeSession of AmB2ABSession.
I also added an optional feature to relay headers from the first INVITE
into the callee leg.
Stefan
o Greger V. Teigre [11/23/08 15:24]:
Thanks a lot for your input, Stefan. I managed to make it work :-) It
was acceptAudio I was looking for, but where connectSession() was my
futile attempts :-)
By adding onB2ABEvent to both legs (and of course clean up the
connectSession stuff), it worked.
If there's an interest, feel free to add it as an example app (but
maybe verify it first?!). I attach it in case others are looking for a
combined media and signaling b2bua.
BTW, I have ser+rtpproxy+sems running on the same server. Just made
sure that rtpproxy and sems don't use the same media ports.
g-)
Stefan Sayer wrote:
Hi,
I haven't tried your b2b_connect plugin, but your use of
connectSession() in both caller and callee session seems strange to
me. If you look at AmB2ABSession, it calls connectSession in both
caller and callee session at the right place, so if everything goes up
to the logic of that base classes, then you don't need to call it in
your dialog class.
Also, note that onSessionStart is called right after onInvite - so it
tries to connect the session right after processing the invite, but
there is no connector (callee session not yet there), so this will
fail.
I think, you are missing to call acceptAudio (which sets up RTP
stream); this needs to be called when the positive reply comes from
callee leg (see how it is done in AmSession::onInvite, which you are
correctly overriding). That would be if you receive a B2ABConnectAudio
event. maybe like this:
void b2b_connectDialog::onB2ABEvent(B2ABEvent* ev)
{
if (ev->event_id == B2ABConnectAudio) {
// delayed processing of first INVITE request
onInvite(invite_req);
}
AmB2ABCallerSession::onB2ABEvent(B2ABEvent* ev);
}
I have used this b2b with media only in the way to first accept the
call, play something to the caller, and then call the callee with
connectCallee. But, if you tweak it a little further, it should work
in your way as well.
Stefan
o Greger V. Teigre [11/22/08 13:46]:
Hi guys,
I have been trying to start out with auth_b2b and create a b2bua that
handles both signaling and media. I have looked at the serviceline
and jukebox applications and tried to pull together something that
works. Everything seems to work up to receiving callee's 200 OK and
audio is supposed to get started...
I believe I do something wrong when connecting the audio of the two
legs and I get the error message below telling me that RTP send is
trying to send on a non-socket. Further up in the log, I can see
that a port has ed out been allocated locally and the error seems to
be within the callee leg, i.e. I suspect sems is trying to write rtp
to callee (a cisco pstn gw).
I have stared myself blind (and must admit that I don't really
understand all the mechanics...)
I attach my new plugin, b2b_connect.
Can anybody see som claring mistakes?!
Cheers,
Greger
Nov 22 13:35:29 cleo sems[25269]: ERROR: [b75f4b90] send
(AmRtpPacket.cpp:212): while sending RTP packet: Socket operation on
non-socket
Nov 22 13:35:29 cleo sems[25269]: ERROR: [b75f4b90] send
(AmRtpStream.cpp:241): while sending RTP packet.
------------------------------------------------------------------------
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev