Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
f3b17ffa
Commit
f3b17ffa
authored
Mar 31, 2008
by
Emmanuel Milou
Browse files
SIP Bug: The incoming call rings back!
parent
3af3bb9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sipcall.cpp
View file @
f3b17ffa
/*
/*
* Copyright (C) 2004-2007 Savoir-Faire Linux inc.
* Copyright (C) 2004-2007 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
* Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
* Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
* Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
...
@@ -110,9 +111,9 @@ SIPCall::SIPCallInvite(eXosip_event_t *event)
...
@@ -110,9 +111,9 @@ SIPCall::SIPCallInvite(eXosip_event_t *event)
sdp_message_free
(
local_sdp
);
sdp_message_free
(
local_sdp
);
}
}
_debug
(
"< Sending answer 183
\n
"
);
_debug
(
"< Sending answer 183
\n
"
);
if
(
0
!=
eXosip_call_send_answer
(
event
->
tid
,
183
,
answer
))
{
//
if (0 != eXosip_call_send_answer (event->tid, 183, answer)) {
_debug
(
"SipCall::newIncomingCall: cannot send 183 progress?
\n
"
);
//
_debug("SipCall::newIncomingCall: cannot send 183 progress?\n");
}
//
}
}
}
}
}
eXosip_unlock
();
eXosip_unlock
();
...
...
src/sipvoiplink.cpp
View file @
f3b17ffa
...
@@ -249,8 +249,8 @@ SIPVoIPLink::getEvent()
...
@@ -249,8 +249,8 @@ SIPVoIPLink::getEvent()
/* INVITE related events within calls */
/* INVITE related events within calls */
case
EXOSIP_CALL_INVITE
:
/** 05 < announce a new call */
case
EXOSIP_CALL_INVITE
:
/** 05 < announce a new call */
SIPCallInvite
(
event
);
_debugMid
(
" !EXOSIP_CALL_INVITE
\n
"
);
_debugMid
(
" !EXOSIP_CALL_INVITE
\n
"
);
SIPCallInvite
(
event
);
break
;
break
;
case
EXOSIP_CALL_REINVITE
:
/** 06 < announce a new INVITE within call */
case
EXOSIP_CALL_REINVITE
:
/** 06 < announce a new INVITE within call */
SIPCallReinvite
(
event
);
SIPCallReinvite
(
event
);
...
@@ -599,13 +599,6 @@ SIPVoIPLink::answer(const CallID& id)
...
@@ -599,13 +599,6 @@ SIPVoIPLink::answer(const CallID& id)
return
false
;
return
false
;
}
}
// Send 180 RINGING
_debug
(
"< Send 180 Ringing
\n
"
);
eXosip_lock
();
eXosip_call_send_answer
(
call
->
getTid
(),
SIP_RINGING
,
NULL
);
eXosip_unlock
();
call
->
setConnectionState
(
Call
::
Ringing
);
// Send 200 OK
// Send 200 OK
osip_message_t
*
answerMessage
=
NULL
;
osip_message_t
*
answerMessage
=
NULL
;
eXosip_lock
();
eXosip_lock
();
...
@@ -665,7 +658,6 @@ SIPVoIPLink::answer(const CallID& id)
...
@@ -665,7 +658,6 @@ SIPVoIPLink::answer(const CallID& id)
bool
bool
SIPVoIPLink
::
hangup
(
const
CallID
&
id
)
SIPVoIPLink
::
hangup
(
const
CallID
&
id
)
{
{
_debug
(
"nvlnljbnzjkdbnjzdfbnjzdflnbjlzdfnbjlzdfbnzdfjlnjlb
\n
"
);
SIPCall
*
call
=
getSIPCall
(
id
);
SIPCall
*
call
=
getSIPCall
(
id
);
Manager
::
instance
().
peerHungupCall
(
id
);
Manager
::
instance
().
peerHungupCall
(
id
);
if
(
call
==
0
)
{
_debug
(
"! SIP Error: Call doesn't exist
\n
"
);
return
false
;
}
if
(
call
==
0
)
{
_debug
(
"! SIP Error: Call doesn't exist
\n
"
);
return
false
;
}
...
@@ -1275,7 +1267,6 @@ void
...
@@ -1275,7 +1267,6 @@ void
SIPVoIPLink
::
SIPCallInvite
(
eXosip_event_t
*
event
)
SIPVoIPLink
::
SIPCallInvite
(
eXosip_event_t
*
event
)
{
{
_debug
(
"> INVITE (receive)
\n
"
);
_debug
(
"> INVITE (receive)
\n
"
);
CallID
id
=
Manager
::
instance
().
getNewCallID
();
CallID
id
=
Manager
::
instance
().
getNewCallID
();
SIPCall
*
call
=
new
SIPCall
(
id
,
Call
::
Incoming
);
SIPCall
*
call
=
new
SIPCall
(
id
,
Call
::
Incoming
);
...
@@ -1283,6 +1274,7 @@ SIPVoIPLink::SIPCallInvite(eXosip_event_t *event)
...
@@ -1283,6 +1274,7 @@ SIPVoIPLink::SIPCallInvite(eXosip_event_t *event)
_debug
(
"! SIP Failure: unable to create an incoming call"
);
_debug
(
"! SIP Failure: unable to create an incoming call"
);
return
;
return
;
}
}
setCallAudioLocal
(
call
);
setCallAudioLocal
(
call
);
call
->
setCodecMap
(
Manager
::
instance
().
getCodecDescriptorMap
());
call
->
setCodecMap
(
Manager
::
instance
().
getCodecDescriptorMap
());
call
->
setConnectionState
(
Call
::
Progressing
);
call
->
setConnectionState
(
Call
::
Progressing
);
...
@@ -1295,6 +1287,12 @@ SIPVoIPLink::SIPCallInvite(eXosip_event_t *event)
...
@@ -1295,6 +1287,12 @@ SIPVoIPLink::SIPCallInvite(eXosip_event_t *event)
}
else
{
}
else
{
delete
call
;
call
=
0
;
delete
call
;
call
=
0
;
}
}
// Send 180 RINGING
_debug
(
"< Send 180 Ringing
\n
"
);
eXosip_lock
();
eXosip_call_send_answer
(
event
->
tid
,
180
,
NULL
);
eXosip_unlock
();
call
->
setConnectionState
(
Call
::
Ringing
);
}
}
void
void
...
@@ -1324,6 +1322,7 @@ SIPVoIPLink::SIPCallReinvite(eXosip_event_t *event)
...
@@ -1324,6 +1322,7 @@ SIPVoIPLink::SIPCallReinvite(eXosip_event_t *event)
void
void
SIPVoIPLink
::
SIPCallRinging
(
eXosip_event_t
*
event
)
SIPVoIPLink
::
SIPCallRinging
(
eXosip_event_t
*
event
)
{
{
SIPCall
*
call
=
findSIPCallWithCid
(
event
->
cid
);
SIPCall
*
call
=
findSIPCallWithCid
(
event
->
cid
);
if
(
!
call
)
{
if
(
!
call
)
{
_debug
(
"! SIP Failure: unknown call
\n
"
);
_debug
(
"! SIP Failure: unknown call
\n
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment