[telepathy-sofiasip/master] Pretend the call state is Ringing when we get 183 Session Progress
Mikhail Zabaluev
mikhail.zabaluev at nokia.com
Tue Nov 3 09:34:50 PST 2009
This is a quick fix to a bug where the remote media gateway starts sending
early audio with a ringback tone, but we're not getting any because of
a NAT or a firewall, which the local stream cannot puncture yet because
it doesn't yet send any media due to privacy reasons. A semi-good thing
to do in the stream engine would be to send some allowed, but harmless
packets such as comfort noise, but that requires quite a bit of
implementation.
The proper fix in the connection manager will wait for introduction
of a separate call state flag in the Telepathy specification and
telepathy-glib. See fd.o bug #23409.
---
src/sip-media-channel.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/sip-media-channel.c b/src/sip-media-channel.c
index df95fec..3bcfbf5 100644
--- a/src/sip-media-channel.c
+++ b/src/sip-media-channel.c
@@ -1177,12 +1177,18 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
switch ((enum nua_callstate)ss_state)
{
case nua_callstate_proceeding:
- if (status == 180)
- tpsip_media_channel_change_call_state (self, peer,
- TP_CHANNEL_CALL_STATE_RINGING, 0);
- else if (status == 182)
- tpsip_media_channel_change_call_state (self, peer,
- TP_CHANNEL_CALL_STATE_QUEUED, 0);
+ switch (status)
+ {
+ case 180:
+ case 183: /* FIXME: use state IN_PROGRESS when we get it from the spec */
+ tpsip_media_channel_change_call_state (self, peer,
+ TP_CHANNEL_CALL_STATE_RINGING, 0);
+ break;
+ case 182:
+ tpsip_media_channel_change_call_state (self, peer,
+ TP_CHANNEL_CALL_STATE_QUEUED, 0);
+ break;
+ }
break;
case nua_callstate_completing:
--
1.5.6.5
More information about the telepathy-commits
mailing list