Module: sems Branch: master Commit: 67b2d1b952fdb6203ac9740ef5703d7d62476dd9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=67b2d1b952fdb6203ac9740ef5703d7d62476dd9
Author: Juha Heinanen <[email protected]> Committer: Juha Heinanen <[email protected]> Date: Thu May 22 08:23:56 2014 +0300 apps/dsm/mod_sbc: added message_filter and message_list profile variables --- apps/dsm/mods/mod_sbc/ModSbc.cpp | 18 +++++++++++++++++- doc/dsm/dsm_sbc_syntax.txt | 25 +++++++++++++------------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/apps/dsm/mods/mod_sbc/ModSbc.cpp b/apps/dsm/mods/mod_sbc/ModSbc.cpp index a2f3a9b..945d263 100644 --- a/apps/dsm/mods/mod_sbc/ModSbc.cpp +++ b/apps/dsm/mods/mod_sbc/ModSbc.cpp @@ -210,6 +210,7 @@ CONST_ACTION_2P(MODSBCActionProfileSet, ',', false); EXEC_ACTION_START(MODSBCActionProfileSet) { string profile_param = resolveVars(par1, sess, sc_sess, event_params); string value = resolveVars(par2, sess, sc_sess, event_params); + FilterEntry mf; ACTION_GET_PROFILE; @@ -268,7 +269,6 @@ EXEC_ACTION_START(MODSBCActionProfileSet) { SET_TO_CALL_PROFILE("aleg_next_hop", aleg_next_hop); - // TODO: message_filter // TODO: header_filter // TODO: sdp_filter @@ -312,6 +312,22 @@ EXEC_ACTION_START(MODSBCActionProfileSet) { EXEC_ACTION_STOP; } + if (profile_param == "message_filter") { + mf.filter_type = String2FilterType(value.c_str()); + DBG("message_filter set to '%s'\n", value.c_str()); + EXEC_ACTION_STOP; + } + + if (profile_param == "message_list") { + vector<string> elems = explode(value, ","); + for (vector<string>::iterator it=elems.begin(); it != elems.end(); it++) + mf.filter_list.insert(*it); + profile->messagefilter.push_back(mf); + mf.filter_type = Undefined; + DBG("message_list set to '%s'\n", value.c_str()); + EXEC_ACTION_STOP; + } + } // TODO: Transcoder Settings diff --git a/doc/dsm/dsm_sbc_syntax.txt b/doc/dsm/dsm_sbc_syntax.txt index cc0c312..be00a92 100644 --- a/doc/dsm/dsm_sbc_syntax.txt +++ b/doc/dsm/dsm_sbc_syntax.txt @@ -154,19 +154,20 @@ sbc.isDisconnected() / sbc.isNoReply() / sbc.isRinging() / sbc.isConnected() / s Actions ------- sbc.profileSet(profile_variable, value) - set SBC profile options - *** only meaningful in 'start' event (later, most profile options are not used any more) *** - profile_variables: To, RURI, FROM, Call-ID, next_hop, RURI_host, refuse_with, - outbound_proxy, force_outbound_proxy = "yes" | "no, + *** only meaningful in 'start' event (later, most profile options + are not used any more) *** + profile_variables: To, RURI, FROM, Call-ID, next_hop, RURI_host, + refuse_with, outbound_proxy, force_outbound_proxy = "yes" | "no, aleg_outbound_proxy, aleg_force_outbound_proxy = "yes" | "no, - next_hop_1st_req = "yes" | "no, patch_ruri_next_hop = "yes" | "no, - aleg_next_hop, - append_headers, append_headers_req, - rtprelay_enabled = "yes" | "no, - force_symmetric_rtp = "yes" | "no, aleg_force_symmetric_rtp = "yes" | "no, - msgflags_symmetric_rtp = "yes" | "no, - rtprelay_transparent_seqno = "yes" | "no, rtprelay_transparent_ssrc = "yes" | "no, - rtprelay_interface, aleg_rtprelay_interface, - rtprelay_dtmf_detection = "yes" | "no, rtprelay_dtmf_filtering = "yes" | "no + next_hop_1st_req = "yes" | "no, patch_ruri_next_hop = "yes" | "no, + aleg_next_hop, append_headers, append_headers_req, + rtprelay_enabled = "yes" | "no, force_symmetric_rtp = "yes" | "no, + aleg_force_symmetric_rtp = "yes" | "no, msgflags_symmetric_rtp = + "yes" | "no, rtprelay_transparent_seqno = "yes" | "no, + rtprelay_transparent_ssrc = "yes" | "no, + rtprelay_interface, aleg_rtprelay_interface, + rtprelay_dtmf_detection = "yes" | "no, rtprelay_dtmf_filtering = + "yes" | "no, message_filter, message_list sbc.stopCall(string cause) - stop both call legs _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
