[Ekiga-list] ekiga call flow

Ramachandran M ram at tataelxsi.co.in
Wed Dec 6 06:03:44 UTC 2006


hi all

i have some doubt in the SIP call flow.Please help me....

STEPS:
1.sender receives the 180 ringing, so onrecivedRinging() is to be called.

void SIPConnection::OnReceivedRinging(SIP_PDU & /*response*/)
{
  PTRACE(2, "SIP\tReceived Ringing response");

  if (phase < AlertingPhase)
  {
    phase = AlertingPhase;
    OnAlerting();
  }

2.In OnReceivedRinging() function,OnAlerting is also called.
BOOL OpalCall::OnAlerting(OpalConnection & connection)
{
  PTRACE(3, "Call\tOnAlerting " << connection);

  BOOL ok = FALSE;

  if (!LockReadWrite())
    return FALSE;

  partyB = connection.GetRemotePartyName();

  UnlockReadWrite();


  BOOL hasMedia =
connection.GetMediaStream(OpalMediaFormat::DefaultAudioSessionID, TRUE) !=
NULL;

  for (PSafePtr<OpalConnection> conn(connectionsActive, PSafeReadOnly); conn
!= NULL; ++conn) {
    if (conn != &connection) {
      if (conn->SetAlerting(connection.GetRemotePartyName(), hasMedia))
        ok = TRUE;
    }
  }

  return ok;
}

3. See this line in OnAlerting() function:
conn->SetAlerting(connection.GetRemotePartyName(), hasMedia))


here we are calling setAlerting()



4.the setalerting() definition is given below:

BOOL SIPConnection::SetAlerting(const PString & /*calleeName*/, BOOL
/*withMedia*/)
{
  if (IsOriginating()) {
    PTRACE(2, "SIP\tSetAlerting ignored on call we originated.");
    return TRUE;
  }

  PTRACE(2, "SIP\tSetAlerting");

  if (phase != SetUpPhase)
    return FALSE;

  SIP_PDU response(*originalInvite, SIP_PDU::Information_Ringing);
  SendPDU(response, originalInvite->GetViaAddress(endpoint));
  phase = AlertingPhase;

  return TRUE;
}




Here we are sending SIP_PDU::Information_Ringing to the "PartyB",why it is
so?

But actual flow i studied in SIP TUTORIAL is
partyA has to send the invite,
the partyB has to send the 180::Ringing,200::OK
then PartyA has to send the ACK


Can you clarify me?


thanks


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.gnome.org/archives/ekiga-list/attachments/20061206/efa7b620/attachment.html>


More information about the ekiga-list mailing list