summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-12-14 20:59:46 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-12-14 20:59:46 +0100
commite223601e6ac48e0c4829c77c016a38ee21b5633a (patch)
tree32be04758e3833cde9cb66dce2639df227280195 /modules
parent07451699ca75df7378558e90c4672bd6d910278c (diff)
menu: add 'ringback_disabled' config
Diffstat (limited to 'modules')
-rw-r--r--modules/menu/menu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/menu/menu.c b/modules/menu/menu.c
index fbd5229..c7f1646 100644
--- a/modules/menu/menu.c
+++ b/modules/menu/menu.c
@@ -37,7 +37,7 @@ static struct {
struct play *play;
struct message_lsnr *message;
bool bell;
-
+ bool ringback_disabled; /**< no ringback on sip 180 respons */
struct tmr tmr_redial; /**< Timer for auto-reconnect */
uint32_t redial_delay; /**< Redial delay in [seconds] */
uint32_t redial_attempts; /**< Number of re-dial attempts */
@@ -979,7 +979,13 @@ static void ua_event_handler(struct ua *ua, enum ua_event ev,
/* stop any ringtones */
menu.play = mem_deref(menu.play);
- (void)play_file(&menu.play, player, "ringback.wav", -1);
+ if (menu.ringback_disabled) {
+ info("\nRingback disabled\n");
+ }
+ else {
+ (void)play_file(&menu.play, player,
+ "ringback.wav",-1);
+ }
break;
case UA_EVENT_CALL_ESTABLISHED:
@@ -1076,6 +1082,8 @@ static int module_init(void)
* Read the config values
*/
conf_get_bool(conf_cur(), "menu_bell", &menu.bell);
+ conf_get_bool(conf_cur(), "ringback_disabled",
+ &menu.ringback_disabled);
if (0 == conf_get(conf_cur(), "redial_attempts", &val) &&
0 == pl_strcasecmp(&val, "inf")) {