summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")) {