diff options
-rw-r--r-- | apps/app_confbridge.c | 6 | ||||
-rw-r--r-- | channels/chan_iax2.c | 2 | ||||
-rw-r--r-- | configs/basic-pbx/modules.conf | 1 | ||||
-rw-r--r-- | res/res_pjsip_t38.c | 26 | ||||
-rw-r--r-- | res/res_rtp_asterisk.c | 9 | ||||
-rw-r--r-- | res/res_stasis_snoop.c | 22 | ||||
-rw-r--r-- | sounds/Makefile | 5 | ||||
-rw-r--r-- | sounds/sounds.xml | 27 |
8 files changed, 80 insertions, 18 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index c06466018..f95aaaf56 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -2137,6 +2137,7 @@ static int conf_rec_name(struct confbridge_user *user, const char *conf_name) } if (res == -1) { + ast_filedelete(user->name_rec_location, NULL); user->name_rec_location[0] = '\0'; return -1; } @@ -2228,6 +2229,7 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) { int res = 0, volume_adjustments[2]; int quiet = 0; + int async_delete_task_pushed = 0; char *parse; const char *b_profile_name = NULL; const char *u_profile_name = NULL; @@ -2473,6 +2475,7 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) async_play_sound_file(conference, conf_get_sound(CONF_SOUND_HAS_LEFT, conference->b_profile.sounds), NULL); async_delete_name_rec(conference, user.name_rec_location); + async_delete_task_pushed = 1; } /* play the leave sound */ @@ -2501,6 +2504,9 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) } confbridge_cleanup: + if (!async_delete_task_pushed && !ast_strlen_zero(user.name_rec_location)) { + ast_filedelete(user.name_rec_location, NULL); + } ast_bridge_features_cleanup(&user.features); conf_bridge_profile_destroy(&user.b_profile); return res; diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 67552ce4e..98d60ef51 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -13084,7 +13084,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st ast_free_acl_list(oldacl); } - if (!ast_strlen_zero(peer->mailbox)) { + if (!ast_strlen_zero(peer->mailbox) && !peer->mwi_event_sub) { struct stasis_topic *mailbox_specific_topic; mailbox_specific_topic = ast_mwi_topic(peer->mailbox); diff --git a/configs/basic-pbx/modules.conf b/configs/basic-pbx/modules.conf index 7b60125b7..05fcc1488 100644 --- a/configs/basic-pbx/modules.conf +++ b/configs/basic-pbx/modules.conf @@ -78,7 +78,6 @@ load = res_pjsip_exten_state.so load = res_pjsip_header_funcs.so load = res_pjsip_logger.so load = res_pjsip_messaging.so -load = res_pjsip_multihomed.so load = res_pjsip_mwi_body_generator.so load = res_pjsip_mwi.so load = res_pjsip_nat.so diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index 4e76ac3c6..91af292c1 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -403,16 +403,21 @@ static int t38_interpret_parameters(void *obj) static struct ast_frame *t38_framehook_write(struct ast_channel *chan, struct ast_sip_session *session, struct ast_frame *f) { - if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_T38_PARAMETERS && - session->endpoint->media.t38.enabled) { - struct t38_parameters_task_data *data = t38_parameters_task_data_alloc(session, f); + if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_T38_PARAMETERS) { + if (session->endpoint->media.t38.enabled) { + struct t38_parameters_task_data *data = t38_parameters_task_data_alloc(session, f); - if (!data) { - return f; - } + if (!data) { + return f; + } - if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) { - ao2_ref(data, -1); + if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) { + ao2_ref(data, -1); + } + } else { + struct ast_control_t38_parameters parameters = { .request_response = AST_T38_REFUSED, }; + ast_debug(2, "T.38 support not enabled, rejecting T.38 control packet\n"); + ast_queue_control_data(session->channel, AST_CONTROL_T38_PARAMETERS, ¶meters, sizeof(parameters)); } } else if (f->frametype == AST_FRAME_MODEM) { struct ast_sip_session_media *session_media; @@ -503,10 +508,7 @@ static void t38_attach_framehook(struct ast_sip_session *session) return; } - /* Only attach the framehook if t38 is enabled for the endpoint */ - if (!session->endpoint->media.t38.enabled) { - return; - } + /* Always attach the framehook so we can quickly reject */ ast_channel_lock(session->channel); diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index da405e19c..e52175642 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2587,17 +2587,22 @@ static int __rtp_sendto(struct ast_rtp_instance *instance, void *buf, size_t siz #ifdef HAVE_PJPROJECT if (rtp->ice) { + enum ast_rtp_ice_component_type component = rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP; pj_status_t status; struct ice_wrap *ice; + /* If RTCP is sharing the same socket then use the same component */ + if (rtcp && rtp->rtcp->s == rtp->s) { + component = AST_RTP_ICE_COMPONENT_RTP; + } + pj_thread_register_check(); /* Release the instance lock to avoid deadlock with PJPROJECT group lock */ ice = rtp->ice; ao2_ref(ice, +1); ao2_unlock(instance); - status = pj_ice_sess_send_data(ice->real_ice, - rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP, temp, len); + status = pj_ice_sess_send_data(ice->real_ice, component, temp, len); ao2_ref(ice, -1); ao2_lock(instance); if (status == PJ_SUCCESS) { diff --git a/res/res_stasis_snoop.c b/res/res_stasis_snoop.c index abdef6e46..da66894f6 100644 --- a/res/res_stasis_snoop.c +++ b/res/res_stasis_snoop.c @@ -74,6 +74,8 @@ struct stasis_app_snoop { unsigned int whisper_active:1; /*! \brief Uniqueid of the channel this snoop is snooping on */ char uniqueid[AST_MAX_UNIQUEID]; + /*! \brief A frame of silence to use when the audiohook returns null */ + struct ast_frame silence; }; /*! \brief Destructor for snoop structure */ @@ -93,6 +95,11 @@ static void snoop_destroy(void *obj) ast_audiohook_destroy(&snoop->whisper); } + if (snoop->silence.data.ptr) { + ast_free(snoop->silence.data.ptr); + snoop->silence.data.ptr = NULL; + } + ast_free(snoop->app); ast_channel_cleanup(snoop->chan); @@ -199,7 +206,7 @@ static struct ast_frame *snoop_read(struct ast_channel *chan) frame = ast_audiohook_read_frame(&snoop->spy, snoop->spy_samples, snoop->spy_direction, snoop->spy_format); ast_audiohook_unlock(&snoop->spy); - return frame ? frame : &ast_null_frame; + return frame ? frame : &snoop->silence; } /*! \brief Callback function for hanging up a Snoop channel */ @@ -385,6 +392,19 @@ struct ast_channel *stasis_app_control_snoop(struct ast_channel *chan, snoop->spy_samples = ast_format_get_sample_rate(snoop->spy_format) / (1000 / SNOOP_INTERVAL); snoop->spy_active = 1; + + snoop->silence.frametype = AST_FRAME_VOICE, + snoop->silence.datalen = snoop->spy_samples * sizeof(uint16_t), + snoop->silence.samples = snoop->spy_samples, + snoop->silence.mallocd = 0, + snoop->silence.offset = 0, + snoop->silence.src = __PRETTY_FUNCTION__, + snoop->silence.subclass.format = snoop->spy_format, + snoop->silence.data.ptr = ast_calloc(snoop->spy_samples, sizeof(uint16_t)); + if (!snoop->silence.data.ptr) { + ast_hangup(snoop->chan); + return NULL; + } } /* If whispering is enabled set up the audiohook */ diff --git a/sounds/Makefile b/sounds/Makefile index 84d0f45c0..9dfd0c61c 100644 --- a/sounds/Makefile +++ b/sounds/Makefile @@ -19,13 +19,14 @@ CMD_PREFIX?=@ SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds SOUNDS_CACHE_DIR?= MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh -CORE_SOUNDS_VERSION:=1.5 +CORE_SOUNDS_VERSION:=1.6 EXTRA_SOUNDS_VERSION:=1.5 MOH_VERSION:=2.03 SOUNDS_URL:=http://downloads.asterisk.org/pub/telephony/sounds/releases MCS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS)) MCS:=$(subst -EN_AU-,-en_AU-,$(MCS)) MCS:=$(subst -EN_GB-,-en_GB-,$(MCS)) +MCS:=$(subst -EN_NZ-,-en_NZ-,$(MCS)) MCS:=$(subst -FR-,-fr-,$(MCS)) MCS:=$(subst -ES-,-es-,$(MCS)) MCS:=$(subst -RU-,-ru-,$(MCS)) @@ -144,6 +145,8 @@ $(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en_AU,$(CORE_SOUN $(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en_GB,$(CORE_SOUNDS_VERSION))) +$(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en_NZ,$(CORE_SOUNDS_VERSION))) + $(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,es,$(CORE_SOUNDS_VERSION))) $(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,fr,$(CORE_SOUNDS_VERSION))) diff --git a/sounds/sounds.xml b/sounds/sounds.xml index 547be4b4a..2d996c57e 100644 --- a/sounds/sounds.xml +++ b/sounds/sounds.xml @@ -81,6 +81,33 @@ <member name="CORE-SOUNDS-EN_GB-SIREN14" displayname="English (British Accent), G.722.1C (Siren14) format"> <support_level>core</support_level> </member> + <member name="CORE-SOUNDS-EN_NZ-WAV" displayname="English (New Zealand Accent), WAV format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-ULAW" displayname="English (New Zealand Accent), mu-Law format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-ALAW" displayname="English (New Zealand Accent), a-Law format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-GSM" displayname="English (New Zealand Accent), GSM format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-G729" displayname="English (New Zealand Accent), G.729 format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-G722" displayname="English (New Zealand Accent), G.722 format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-SLN16" displayname="English (New Zealand Accent), Signed-linear 16kHz format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-SIREN7" displayname="English (New Zealand Accent), G.722.1 (Siren7) format"> + <support_level>core</support_level> + </member> + <member name="CORE-SOUNDS-EN_NZ-SIREN14" displayname="English (New Zealand Accent), G.722.1C (Siren14) format"> + <support_level>core</support_level> + </member> <member name="CORE-SOUNDS-ES-WAV" displayname="Spanish, WAV format"> <support_level>core</support_level> </member> |