[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Linphone-developers] Inhibit RTP transmission when mute is on in ac

From: Sven Westergren
Subject: RE: [Linphone-developers] Inhibit RTP transmission when mute is on in active call
Date: Mon, 17 May 2010 08:01:04 +0200

Hi all,


I would ask that if this patch is merged it is configurable (at least at compile time) since some SIP clients will terminate the call if the media stream goes dead for a period of time.


Best regards

Sven Westergren


From: address@hidden [mailto:address@hidden On Behalf Of barry krofchick
Sent: den 15 maj 2010 01:59
To: address@hidden
Subject: [Linphone-developers] Inhibit RTP transmission when mute is on in active call


In order to limit network bandwidth it would be nice if the mute
button inhibited RTP transmission as well as disabling mic input.

I have a modified version of mediastreamer (files audiostream.c,
mediastream.h) and linphonecore.c (a very small mod) which
turns off RTP transmission when the mute button is hit.

This feature could be easily made an option as well.

2 questions:
      1) could this patch be included in the mainline source?
      2) if so should i include the source patches in an email
          attachment here?

I definitely need this feature for an automated server agent
under development. Other than this, linphone is the perfect
SIP client for us.

By the way, kudos on a great product Simon. The ports to
iPhone and Android, as well as the Mac and Windows, along
with command line access, make Linphone the perfect
SIP client.




Just in case this is acceptable I include the small patch
below taken against the 3.2.1 linphone sources  :)
Again it would be greatly appreciated if this was included in
the mainline source.

After all there is no real reason to transmit anyway when
the mic is muted :)


diff -rupN linphone-3.2.1/coreapi/linphonecore.c linphone-new/coreapi/linphonecore.c
--- linphone-3.2.1/coreapi/linphonecore.c    2009-09-28 05:42:11.000000000 -0400
+++ linphone-new/coreapi/linphonecore.c    2010-05-14 19:47:59.000000000 -0400
@@ -2092,6 +2092,7 @@ void linphone_core_mute_mic(LinphoneCore
     if (lc->audiostream!=NULL){
             (val==TRUE) ? 0 : 1.0);
+         audio_stream_mute_rtp(lc->audiostream,val);
diff -rupN linphone-3.2.1/mediastreamer2/include/mediastreamer2/mediastream.h linphone-new/mediastreamer2/include/mediastreamer2/mediastream.h
--- linphone-3.2.1/mediastreamer2/include/mediastreamer2/mediastream.h    2009-08-28 11:59:05.000000000 -0400
+++ linphone-new/mediastreamer2/include/mediastreamer2/mediastream.h    2010-05-14 19:50:10.000000000 -0400
@@ -121,6 +121,8 @@ void audio_stream_set_echo_canceler_para
 void audio_stream_set_mic_gain(AudioStream *stream, float gain);
+void audio_stream_mute_rtp(AudioStream *stream, bool_t val);
 /*enable noise gate, must be done before start()*/
 void audio_stream_enable_noise_gate(AudioStream *stream, bool_t val);
diff -rupN linphone-3.2.1/mediastreamer2/src/audiostream.c linphone-new/mediastreamer2/src/audiostream.c
--- linphone-3.2.1/mediastreamer2/src/audiostream.c    2009-08-28 11:59:05.000000000 -0400
+++ linphone-new/mediastreamer2/src/audiostream.c    2010-05-14 19:48:59.000000000 -0400
@@ -571,3 +571,13 @@ int audio_stream_send_dtmf(AudioStream *
     return 0;
+void audio_stream_mute_rtp(AudioStream *stream, bool_t val)
+  if (stream->rtpsend){
+    if (val)
+      ms_filter_call_method(stream->rtpsend,MS_RTP_SEND_MUTE_MIC,&val);
+    else
+      ms_filter_call_method(stream->rtpsend,MS_RTP_SEND_UNMUTE_MIC,&val);
+  }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]