Hi *

Just a note for those who would like to make sure that there is early media
(ringing sound when calling b party) when using B2BASessions:

if you look at the serviceline example the method onSessionStart looks like
this:

void AmB2ABCalleeSession::onSessionStart(const AmSipReply& rep) {
       DBG("onSessionStart of callee session\n");
      // connect our audio
      connector = new AmSessionAudioConnector();
      connectSession();
      relayEvent(new B2ABConnectAudioEvent(connector));
}

This means that only once a 200OK received (i.e. B party answers call) will
you hear audio in the calling party's device (an therefore not the ringing
signal).

To fix this simply implement the onEarlySessionStart method like so:

void AmB2ABCalleeSession::onEarlySessionStart(const AmSipReply& rep){
  if (!sessionStarted){
      sessionStarted=true;
      INFO("onEarlySessionStart of callee session\n");
      // connect our audio
      connector = new AmSessionAudioConnector();
      connectSession();
      relayEvent(new B2ABConnectAudioEvent(connector));
  }
}

you will notice I have added a boolean var to track when the session is
started just in case there is no early media and the 200Ok still has to
connect the audio.

Of course you will have to enable early media boolean flag with
accept_early_session = true;

Hope this helps someone in the future

Cheers
Jason
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to