[Ekiga-list] ekiga call flow
- From: Ramachandran M <ram tataelxsi co in>
- To: <ekiga-list gnome org>
- Subject: [Ekiga-list] ekiga call flow
- Date: Wed, 6 Dec 2006 11:33:44 +0530
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]