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

-- 
Stefan Sayer
VoIP Services

[EMAIL PROTECTED]
www.iptego.com

IPTEGO GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to