diff --git a/conf/autoload_configs/modules.conf.xml b/conf/autoload_configs/modules.conf.xml index 8b4a4e7ea4..0e485b24e3 100644 --- a/conf/autoload_configs/modules.conf.xml +++ b/conf/autoload_configs/modules.conf.xml @@ -52,6 +52,7 @@ + diff --git a/conf/autoload_configs/switch.conf.xml b/conf/autoload_configs/switch.conf.xml index 95c43331e4..4f72c6a65d 100644 --- a/conf/autoload_configs/switch.conf.xml +++ b/conf/autoload_configs/switch.conf.xml @@ -98,7 +98,9 @@ - + + + diff --git a/docs/ChangeLog b/docs/ChangeLog index 41f94d78ab..356cbdc852 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -35,6 +35,7 @@ freeswitch (1.0.7) config: Disallow global-intercept and group-intercept can intercept an outbound call in default dialplan (r:890871ba/FS-2777) config: fix single domain assumption in default config to be more portable *cough* bkw *cough* (r:f987903e) config: Bump Doxygen.conf version to 1.0.6... belatedly (r:cfeae1ba) + config: docs for acl (r:57b410eb) core: Add RTCP support (FSRTP-14) core: handle some errors on missing db handle conditions core: add ... and shutdown as a fail-safe when no modules are loaded @@ -164,6 +165,24 @@ freeswitch (1.0.7) core: drop rtp frame that was already replaced with a cng frame (r:34a0ca50) core: fix partial match counting as exact match in dmachine (r:5eb951aa) core: try to adjust the timer to be ok with the horrible 10000 microsecond kernel resolution on amazon ec3 but that doesn't mean it's not horribly wrong to run the kernel that slow (r:903b2901) + core: make exact matches return sooner in dmachine (r:e897646e) + core: don't let inherit_codec work when we have ep_codec_string set and the B-leg codec is not in that list since it will lead to failure (r:f79f9766) + core: set maximum query run time to 30 seconds at least on drivers that support SQL_ATTR_QUERY_TIMEOUT (r:5bb525e1) + core: dd switch_cache_db_affected_rows() to switch_core_sqldb (and switch_odbc) and expose it through Lua dbh:affected_rows() (r:d79cf484/FS-2962) + core: add bind meta on A-D and refactor (r:27869d7a) + core: add temp_hold_music var that is only valid until you transfer the call and finishing touches on bind meta to A-D (r:b262f44c) + core: add function to help set session read codec to slinear (r:1a08df9b) + core: add rtp_bug IGNORE_DTMF_DURATION to speed up dtmf detection of RFC2833 on strange carriers (r:b3fc001e) + core: Fix crash when re-connecting to non-working database server (r:29daaa07/FS-2960) + core: treat EINTR returns as a BREAK (now mapped to SWITCH_STATUS_INTR), we appriciate the interrupted syscalls but we would like to continue working properly (r:316963c5) + core: eat rtp frames with the wrong payload type number (r:fe1711fd) + core: up assert vaule on header loop detection to 1 meeeeelyonne for hmmhesegs (r:d9c56345) + core: Fix race condition in originate where USER_BUSY is reported as a no answer (r:cc06fdb5/FS-2992) + core: Allow check ip change to be optional (r:1cf79386/FS-2917) + core: handle 2833 in do_flush instead of dropping valid dtmf (r:3fa3e11c/FS-3002) + core: add record_restart_time_limit_on_dtmf var (r:7a1dcb69) + core: fix unreachable condition with a null args to make any key stop playback/record etc without dequing and remove hard-coded flush digits in play_and_get_digits be sure to flush it yourself before using (r:976859bb) + core: Fix a lock on reloadxml when stderr write is blocked. Also remove an error parsing print since reason generated were wrong and duplicate. (r:2d6161e8) embedded languages: Provide core level support for conditional Set Global Variable (r:c017c24b/FSCORE-612) embedded languages: add insertFile front end to switch_ivr_insert_file and reswig (r:c4e350ab) lang: Improve French phrase files (FSCONFIG-23) @@ -188,11 +207,14 @@ freeswitch (1.0.7) libesl: Make last_event pointer last longer (r:a15f51d5/ESL-37) libesl: use a packet buffer for ESL (r:2081bf97) libesl: Noevent/Noevents disparity (r:d29d83d7/ESL-53) + libesl: FS-2957 esl lib on windows fails to build (r:5254df04/FS-2957) + libesl: Small fix on ESL that cause event_id to be set wrong on headers that had value failure. (r:eb88304a) libfreetdm: implemented freetdm config nodes and ss7 initial configuration libfreetdm: fix codec for CAS signaling (r:b76e7f18) libfreetdm: freetdm: ss7- added support for incoming group blocks, started adding support for ansi (r:c219a73c) libg7221: A bunch of tweaks to the G.722.1 codec (r:5d548570) libgnutls: link to libgcrypt as well, please report any platforms this breaks, but it should be portable (r:c569fb0f/FS-1248) + libjs: non-portable comment syntax in .s files libopenzap: Add CLI tracing libs: Merged OpenZAP and FreeTDM into the FreeSWITCH tree. libs: Add support for TLS on Windows using openssl (r:1abe3b93/MODSOFIA-92) @@ -207,6 +229,7 @@ freeswitch (1.0.7) libspandsp: Fix Windows build after libspandsp update (r:d70cc852/FSBUILD-293) libspandsp: Fix for T.30 processing of operator interrupts, to improve compatibility with some machines, which seem to send them when no operator is around. (r:84ee0ae6) libspandsp: spandsp t38 fax receiving error in win XP - regression from f029f7ef (r:761cec8f/FS-2766) + libspandsp: Added missing error codes when an ECM FAX is abandoned with the T30_ERR message (r:ec57dc7a) mod_avmd: Initial check in - Advanced Voicemail Detect (r:10c6a30a) (by Eric Des Courtis) mod_avmd: Add to windows build (r:df4bd935) mod_avmd: Fix mem leak (r:cd951384/FS-2839) @@ -229,8 +252,12 @@ freeswitch (1.0.7) mod_callcenter: Fix bad return type so it compile on archlinux, thx bougyman (r:3a475986) mod_callcenter: Make callcenter_config agent get return the value of the item requested. Also added queue param max-wait-time-with-no-agent-time-reached: If the max-wai-time-with-no-agent is already reached for the queue, then new caller can wait for x amount of second before it kicked out of the queue rather than get rejected automatically. (r:81a03869) mod_callcenter: Add new event socket agent-offering. Plus some documentation and better handling of bad agent type -- FS-2869 (r:80174cf3/FS-2869) + mod_callcenter: Add error response for queue load and queue reload (FS-2988) (r:49a5effc/FS-2988) mod_cdr_sqlite: initial commit (r:f625fe3b) mod_cdr_sqlite: config file for mod_cdr_sqlite (r:25bc8fe3) + mod_cdr_sqlite: Drop transaction BEGIN/END around INSERT. We're only executing one command, and autocommit will automatically rollback if the INSERT fails. Sync state_handlers with mod_cdr_csv. Minor libpq fixups. (r:0f95b870) + mod_celt: Bump celt to 0.10.0 (r:231fbe5e) + mod_celt: update code in mod_celt to match API of 0.10.0 (r:6e4c30ea) mod_cidlookup: null xml is bad (r:095815f8) mod_cid_lookup: honor skipcitystate when using whitepages (r:a66654de/FSMOD-53) mod_commands: make break uuid_break and add cascade flag @@ -252,6 +279,7 @@ freeswitch (1.0.7) mod_commands: Dramatic jitterbuffer changes (r:d5470961) mod_commands: add uuid_buglist to fetch the current media-bugs attached to a given session uuid (r:f6eab64c) mod_commands: add recovery_refresh app and api and use it in mod_conference to send a message to the channel telling it to sync its recovery snapshot (r:650393fb) + mod_commands: add moh by default to uuid_broadcast when only broadcasting to A leg use aleg arg to disable this (r:d164a797) mod_conference: Fix reporting of volume up/down (MODAPP-419) mod_conference: add last talking time per member to conference xml list mod_conference: add terminate-on-silence conference param @@ -265,6 +293,10 @@ freeswitch (1.0.7) mod_conference: Add a chan var conference_enter_sound to override conference enter-sound param on the profile (r:651acc62) mod_conference: Add an unique id to the conference obj so that we can track conferences. (r:479f3de2) mod_conference: Fix corrupted audio when playing "you are now (un)muted..." (r:10257c7d/FS-2768) + mod_conference: clear last_transferred conference when you exit the conference app (r:fb017a52) + mod_conference: Add energy level to conference_add_event_member_data (r:8d6d52e0) + mod_conference: if more digits than the length of the correct pin the remaining digits are accounted for next retry (r:b88cd345/FS-3000) + mod_conference: Fix unexpected behavior with endconf and auto-outcalls and pre_answer (r:6f58e6aa/FS-2771) mod_curl: use method=post when post requested (r:c6a4ddd0/FSMOD-69) mod_db: fix stack corruption (MODAPP-407) mod_dialplan_xml: Add in the INFO log the caller id number when processing a request (Currenly only show the caller name) (r:e1df5e13) @@ -282,12 +314,16 @@ freeswitch (1.0.7) mod_dptools: refactor export code and add new bridge_export app which is like export but exports across when one channel bridges another (r:4aa9a838) mod_dptools: add bind_digit_action application (r:9537197b) mod_dptools: emit event when user presses DTMFs (r:37298f56) + mod_dptools: Log error when there's no IVR menus configured when you call 'ivr' DP app (r:30034891) + mod_easyroute: Fix possible segfaults and memory leak during unload, and add new setting odbc-retries (r:7fbc47f8/FS-2973) mod_erlang_event: Make XML fetch reply ACKs distinguishable, update freeswitch.erl (r:9d44ed04) mod_erlang_event: Add 3 new commands; session_event, session_noevents, session_nixevent (r:698fa045) mod_erlang_event: generate long node names the same as erlang does (r:9ad509c2) mod_erlang_event: Improve some logging to include UUIDs (r:c0d51b83) mod_erlang_event: Support for reading erlang cookie from a file (r:094ffe37) mod_erlang_event: Rewrite XML fetch conditional wait to be more sane (Reported by James Aimonetti) (r:6941c6eb/FS-2775) + mod_erlang_event: Don't urlencode events (and destroy an event after use) (r:4eccdfef) + mod_erlang_event Add proper locking for the list of XML bindings (r:9fe440b2) mod_event_socket: fix up other users of switch_event_xmlize() to use SWITCH_EVENT_NONE (r:d6eb7562) mod_event_socket: Fix small mem leaks (r:e4f90584/MODEVENT-68) mod_event_socket: Add "-ERR" to api cmd response when failure occurs (r:58759052/FS-2827) @@ -301,6 +337,8 @@ freeswitch (1.0.7) mod_fifo: add outbound_ring_timeout param to mod_fifo (r:3885eea7) mod_fifo: add default_lag to fifo (r:dd4fb5be) mod_fifo: Fix crash when using fifo_destroy_after_use (r:ee562c82/FS-2879) + mod_fifo: don't seg in edge case error conditions (r:9ee13b72) + mod_fifo: set tracking data before enabling hooks (r:34267869) mod_freetdm: Fix for TON and NPI not passed through to channel variables on incoming calls mod_freetdm: add pvt data to freetdm channels fix fxs features (r:9d456900) mod_freetdm: export and import boost custom data (r:edb2d582) @@ -334,6 +372,7 @@ freeswitch (1.0.7) mod_freetdm: created cmake files for freetdm (r:fc55997b) mod_freetdm: ss7 - added support to control mtp2, mtp3, and isup timers via freetdm.conf.xml (r:4455d581) mod_freetdm: made ftmod_r2 use FTDM_SPAN_USE_SIGNALS_QUEUE and properly send FTDM_SIGEVENT_SIGSTATUS_CHANGED (r:af5f0a4a) + mod_fsk: add mod_fsk (r:fcc912a9) mod_gsmopen: copy from branch mod_gsmopen: fix FS-2793, compilation stops (r:355c0dbb/FS-2793) mod_gsmopen: retry serial initialization if failed, zeroing audio buffers, slower retry on soundcard busy (EAGAIN) (r:c7aefe93) @@ -351,6 +390,7 @@ freeswitch (1.0.7) mod_hash: use 5 seconds connection timeouts for remote connections (r:7431fbe9) mod_hash: use esl_recv_timed with a 5000ms timeout when doing api commands (r:27d8378f) mod_hash: limit_remote_thread sending invalid handle to esl_connect_timeout causing core (r:6cdd3e2a/MODAPP-446) + mod_hash: avoid scheduler caling a function on null hash during shutdown (r:8458adeb) mod_h323: initial t.38 support. remake logical channel opening. add missing param name in example config. (r:8c58074c) mod_h323: some t.38 and lockinng improvements. replace ptrace with switch_log_printf. (r:5efe5c88) mod_h323: add missing conf prameter (r:0b353d7a) @@ -379,6 +419,8 @@ freeswitch (1.0.7) mod_lua: Made 2nd arg to freeswitch.Dbh:query (cb func) optional (r:87db11af) mod_lua: Added SAF_ROUTING_EXEC flag to lua app, so it can be run inline (r:7d5ca1c0) mod_lua: spelling error in -ERR return code encounterd -> encountered (r:86e7cdc5/FS-2949) + mod_lua: Make dbh:connected accessible from Lua - thanks Grmt (r:09e6fd3f) + mod_lua: Added optional core: prefix to first arg passed to freeswitch.Dbh for giving direct access to sqlite db (r:a0181479) mod_managed: Added wrapper for switch_event_bind for .net (r:a5f07a80/MODLANG-165) mod_managed: add additional support (r:5be58aac) mod_managed: add mono 2.8 patch file see FS-2774 (r:6a948bd9/FS-2774) @@ -442,6 +484,7 @@ freeswitch (1.0.7) mod_snapshot: fix bad codepaths in mod_snapshot (r:844ac220) mod_sndfile: Add support for .alaw and .ulaw to mod_sndfile (r:facf09b8/MODFORM-41) mod_sndfile: return break in mod_sndfile when seek returns failure (r:564dc7e4) + mod_snmp: initial checkin of mod_snmp (r:6e2b1bd3) mod_sofia: Send SIP MESSAGE to unregistered users by prefixing sip: to user@domain mod_sofia: fix callee being updated with callee information mod_sofia: set appearance-index in update statement for SLA @@ -548,6 +591,20 @@ freeswitch (1.0.7) mod_sofia: improve fail2ban logging (r:f4d52d4c/FS-2943) mod_sofia: refactor sofia_contact to try the profile_name first then the domain to resolve the profile then fall back to querying every profile to reduce confusion with multi-homers (d'oh) also special profile name * will force a search-all situation (r:81608da0) mod_sofia: support allowing pidf-ful presence clients to share the same account and 'appear offline' without influencing each other =/ also refactor the contact generation string based on nat into a helper function (r:97a68c50) + mod_sofia: gateway not identified when extension-in-contact is set (r:7b289941/FS-502) + mod_sofia: Fix erroneous error log on SQL statement (r:2c595a6c/FS-2961) + mod_sofia: Fix routing behavior of inbound calls from gateways that only match gateway based on the gw request uri param (r:0132cd3f) + mod_sofia: don't say we are not for polycom phones (safe rport) when its not really nat (r:9462f53c) + mod_sofia: Set route header as a var on channel like Diversion header (r:d41e6498) + mod_sofia: fix seg related to ptime mismatch + CNG + PLC (if you ever get purple ptime mismatch warnings you want this patch) (r:54de293b) + mod_sofia: be more iOS friendly when using TCP or TLS because the phone never sleeps thus drains the battery (r:159ae989) + mod_sofia: add send-presence-on-register (true|false|first-only) param to sofia and api command sofia global debug [presence|sla|none] + mod_sofia: disable media timeout when encountering a recvonly stream (r:029d68ce) + mod_sofia: fix sofia flush_inbound_reg to work when @domain is given (r:68bf642c) + mod_sofia: fix session timer failure when freeswitch is generating the sdp and there are enough dynamic codecs enabled to conflict with the 2833 pt (4 by default) (r:018a3800) + mod_sofia: Places ;fs_path= within the contact string <...> when using NDLB-connectile-dysfunction-2.0, instead of just appending to the end of the contact string. (r:afc02747/FS-2989) + mod_sofia: Fix handling SUBSCRIBE to "park+" fifo, the NOTIFY data was not being generated from mod_fifo data. (r:3dd9d5c0/FS-3007) + mod_sofia: fsctl pause improvements (r:008e527c/FS-3012) mod_spandsp: initial checkin of mod_fax/mod_voipcodecs merge into mod_spandsp (r:fa9a59a8) mod_spandsp: rework of new mod_spandsp to have functions broken up into different c files (r:65400642) mod_spandsp: improve duplicate digit detection and add 'min_dup_digit_spacing_ms' channel variable for use with the dtmf detector (r:eab4f246/FSMOD-45) @@ -559,6 +616,7 @@ freeswitch (1.0.7) mod_spandsp: deadlock in mod_spandsp (mod_spandsp_fax.c) (r:b02c69bb/FS-1690) mod_spandsp: T.38 reINVITE glare condition causes FAX processing to stop. (r:04aa7ef9/FS-1682) mod_spandsp: improve nat handling when using stun or host as ext-rtp-ip (r:03e74c51/FS-526) + mod_spandsp: Fire event when fax is finished; indicates result of fax attempt (r:314a2a1e/FS-3004) mod_spidermonkey: allow vars to be set containing vars from languages (r:5cd072a3) mod_spidermonkey: fix seg in js hangup (r:7d554c11) mod_spidermonkey: Fix mod_spidermonkey build on FreeBSD, (Undefined symbol PR_LocalTimeParameters). (r:3edb8419) @@ -579,10 +637,14 @@ freeswitch (1.0.7) mod_voicemail: add quotes to vm_cc command generated internally to escape spaces in the caller id name (r:5f012813) mod_voicemail: Play caller id of callee prior to playing a vmail (r:e7b97907/FS-2719) mod_voicemail: FS-1776 Add support for per user operator exten override param vm-operator-extension (r:df5b3498/FS-1776) + mod_voicemail: Set email address from within directory (r:83ce26b2/FS-2972) + mod_voicemail: add events for record/change greeting and record name (r:54421f59) + mod_voicemail: let vmain-key and operator-key be set empty (r:de49305a) mod_xml_cdr: add force_process_cdr var to process b leg cdr on a case by case basis when b leg cdr is disabled (XML-17) mod_xml_cdr: add leg param to query string (XML-24) mod_xml_cdr: fix locked sessions (XML-26) mod_xml_cdr: fix minor memory leaks and config bug (r:19253d83/MODEVENT-62) + mod_xml_cdr: Fix prefix-a-leg not respected for url submission (r:ea9021a2/FS-2998) mod_xml_rpc: Fix crash if unauthorized XML RPC is attempted (r:9835395c/FS-184) scripts: added honeypot.pl and blacklist.pl which add extra SIP security options (r:b6a81ba7) scripts: do simple verification to make sure we are getting IP addresses from VoIP abuse blacklist (r:b0049160) diff --git a/freeswitch.spec b/freeswitch.spec index 7fb9f80d8e..1000a89239 100644 --- a/freeswitch.spec +++ b/freeswitch.spec @@ -27,6 +27,14 @@ # Maintainer(s): Michal Bielicki 910 @@ -282,14 +295,72 @@ German language phrases module and directory structure for say module and voicem Summary: Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH Group: System/Libraries Requires: %{name} = %{version}-%{release} -%{?with_sang_isdn: Requires: wanpipe } -%{?with_sang_isdn: Requires: libsng_isdn } -%{?with_sang_isdn: BuildRequires: wanpipe } -%{?with_sang_isdn: BuildRequires: libang_isdn } %description freetdm FreeTDM +%if %{build_sng_isdn} + +%package freetdm-sng-isdn +Summary: Sangoma ISDN Module for FreeTDM +Group: System/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-freetdm = %{version}-%{release} +Requires: wanpipe +Requires: libsng_isdn +BuildRequires: wanpipe +BuildRequires: libsng_isdn + +%description freetdm-sng-isdn +Sangoma ISDN Module for freetdm + +%endif + +%if %{build_sng_ss7} + +%package freetdm-sng-ss7 +Summary: Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH, Sangoma SS7 Module +Group: System/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-freetdm = %{version}-%{release} +Requires: wanpipe +Requires: libsng_ss7 +BuildRequires: wanpipe +BuildRequires: libsng_ss7 + +%description freetdm-sng-ss7 +Sangoma SMG-SS7 drivers for FreeTDM + +%endif + + +%if %{build_sng_tc} + +%package sangoma-codec +Summary: Sangoma D100 and D500 Codec Card Support +Group: System/Libraries +Requires: %{name} = %{version}-%{release} +Requires: sng-tc-linux +BuildRequires: sng-tc-linux + +%description sangoma-codec +Sangoma D100 and D500 Codec Card Support + +%endif + +%package skypopen +Summary: Skype Endpoint +Group: System/Libraries +Requires: %{name} = %{version}-%{release} +Requires: libX11 +BuildRequires: libX11-devel + +%description skypopen +This software (Skypopen) uses the Skype API but is not endorsed, certified or otherwise approved in any way by Skype. +Skypopen is an endpoint (channel driver) that uses the Skype client as an interface to the Skype network, and allows +incoming and outgoing Skype calls to/from FreeSWITCH (that can be bridged, originated, answered, etc. as in all other +endpoints, e.g. Sofia-SIP). + ###################################################################################################################### # # Unpack and prepare Source archives, copy stuff around etc .. @@ -309,6 +380,8 @@ cp %{SOURCE8} libs/ cp %{SOURCE9} libs/ cp %{SOURCE10} libs/ cp %{SOURCE11} libs/ +cp %{SOURCE12} libs/ +cp %{SOURCE13} libs/ ###################################################################################################################### # @@ -358,7 +431,11 @@ ASR_TTS_MODULES="asr_tts/mod_pocketsphinx asr_tts/mod_flite asr_tts/mod_unimrcp" # ###################################################################################################################### CODECS_MODULES="codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod_celt codecs/mod_codec2 codecs/mod_ilbc codecs/mod_mp4v \ - codecs/mod_silk codecs/mod_siren codecs/mod_theora" + codecs/mod_opus codecs/mod_silk codecs/mod_siren codecs/mod_theora " +# +%if %{build_sng_tc} +CODECS_MODULES+="codecs/mod_sangoma_codec" +%endif ###################################################################################################################### # # Dialplan Modules @@ -377,7 +454,7 @@ DIRECTORIES_MODULES="" # ###################################################################################################################### ENDPOINTS_MODULES="endpoints/mod_dingaling endpoints/mod_loopback ../../libs/freetdm/mod_freetdm endpoints/mod_portaudio \ - endpoints/mod_sofia" + endpoints/mod_sofia endpoints/mod_skinny endpoints/mod_skypopen" ###################################################################################################################### # @@ -483,11 +560,13 @@ fi %{?configure_options} #Create the version header file here -cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/%{version}/g" > src/include/switch_version.h -touch .noversion +#cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/%{version}/g" > src/include/switch_version.h +#touch .noversion %{__make} +cd libs/esl +%{__make} pymod ###################################################################################################################### # @@ -503,6 +582,11 @@ touch .noversion %{__mkdir} -p %{buildroot}%{logfiledir} %{__mkdir} -p %{buildroot}%{runtimedir} +#install the esl stuff +cd libs/esl +%{__make} DESTDIR=%{buildroot} pymod-install +cd ../.. + %ifos linux # Install init files # On SuSE: @@ -522,6 +606,23 @@ touch .noversion # Add monit file %{__install} -D -m 644 build/freeswitch.monitrc %{buildroot}/etc/monit.d/freeswitch.monitrc %endif +###################################################################################################################### +# +# Remove files that are not wanted if they exist +# +###################################################################################################################### + +%if %{build_sng_ss7} +#do not delete a thing +%else +%{__rm} -f %{buildroot}/%{prefix}/mod/ftmod_sangoma_ss7* +%endif +%if %{build_sng_isdn} +#do not delete a thing +%else +%{__rm} -f %{buildroot}/%{prefix}/mod/ftmod_sangoma_isdn* +%endif + ###################################################################################################################### @@ -545,8 +646,6 @@ fi chkconfig --add freeswitch - - %postun ###################################################################################################################### # @@ -790,6 +889,7 @@ fi %{prefix}/mod/mod_mp4v.so* %{prefix}/mod/mod_native_file.so* %{prefix}/mod/mod_nibblebill.so* +%{prefix}/mod/mod_opus.so* %{prefix}/mod/mod_pocketsphinx.so* %{prefix}/mod/mod_portaudio.so* %{prefix}/mod/mod_portaudio_stream.so* @@ -798,6 +898,7 @@ fi %{prefix}/mod/mod_shout.so* %{prefix}/mod/mod_silk.so* %{prefix}/mod/mod_siren.so* +%{prefix}/mod/mod_skinny.so* %{prefix}/mod/mod_sndfile.so* %{prefix}/mod/mod_snom.so* %{prefix}/mod/mod_sofia.so* @@ -831,7 +932,7 @@ fi %{prefix}/include/*.h ###################################################################################################################### # -# OpenZAP Module for TDM Interaction +# FreeTDM Module for TDM Interaction # ###################################################################################################################### %files freetdm @@ -844,7 +945,26 @@ fi %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/zt.conf %{prefix}/lib/libfreetdm.so* %{prefix}/mod/mod_freetdm.so* -%{prefix}/mod/ftm*.so* +%{prefix}/mod/ftmod_skel*.so* +%{prefix}/mod/ftmod_[a-r,t-z]*.so* + +%if %{build_sng_tc} +%files sangoma-codec +%defattr(-, freeswitch, daemon) +%{prefix}/mod/mod_sangoma_codec.so* +%endif + +%if %{build_sng_ss7} +%files freetdm-sng-ss7 +%defattr(-, freeswitch, daemon) +%{prefix}/mod/ftmod_sangoma_ss7.so* +%endif + +%if %{build_sng_isdn} +%files freetdm-sng-isdn +%defattr(-, freeswitch, daemon) +%{prefix}/mod/ftmod_sangoma_isdn.so* +%endif ###################################################################################################################### # @@ -899,9 +1019,14 @@ fi %defattr(-,freeswitch,daemon) %{prefix}/mod/mod_python*.so* %attr(0644, root, bin) /usr/lib/python*/site-packages/freeswitch.py* +%attr(0755, root, bin) /usr/lib/python*/site-packages/_ESL.so* +%attr(0755, root, bin) /usr/lib/python*/site-packages/ESL.py* %dir %attr(0750, freeswitch, daemon) %{prefix}/conf/autoload_configs %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/python.conf.xml +%files skypopen +%defattr(-,freeswitch,daemon) +%{prefix}/mod/mod_skypopen.so* ###################################################################################################################### # # Language Modules @@ -956,6 +1081,17 @@ fi # ###################################################################################################################### %changelog +* Wed Feb 16 2011 - michal.bielicki@seventhsignal.de +- added mod_skinny +- added sangoma libraries +- added sangoma codec module for D100 and D150 and D500 +- added skypopen module +- fixes for ss7 freetdm modules +- added mod_opus +- added selector for sangoma modules +- addded python esl module to rpm +- some minor cleanups +- cut sangoma modules into separate rpms as addons for freetdm * Tue Jan 18 2011 - michal.bielicki@seventhsignal.de - Fedora adjustments * Fri Oct 15 2010 - michal.bielicki@seventhsignal.de @@ -1090,3 +1226,4 @@ fi - Added devel package * Thu Mar 15 2007 - peter+rpmspam@suntel.com.tr - Initial RPM release + diff --git a/libs/esl/Makefile b/libs/esl/Makefile index ab50bac4d9..fbc870ac24 100644 --- a/libs/esl/Makefile +++ b/libs/esl/Makefile @@ -95,4 +95,7 @@ managedmod: $(MYLIB) phpmod-install: phpmod $(MAKE) -C php install +pymod-install: pymod + $(MAKE) -C python install + everymod: perlmod phpmod luamod pymod rubymod javamod managedmod diff --git a/libs/esl/java/Makefile b/libs/esl/java/Makefile index 9474a83276..3606edf331 100644 --- a/libs/esl/java/Makefile +++ b/libs/esl/java/Makefile @@ -1,4 +1,4 @@ -LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.6.0_14/include -I/usr/java/jdk1.6.0_14/include/linux -I/usr/lib/jvm/java-6-openjdk/include/ +LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.6.0_14/include -I/usr/java/jdk1.6.0_14/include/linux -I/usr/lib/jvm/java-6-openjdk/include/ -I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/linux GCC_WARNING_JUNK=-w CLASSES=org/freeswitch/esl/* diff --git a/libs/esl/php/Makefile b/libs/esl/php/Makefile index 44fdd22dae..e970ff7d82 100644 --- a/libs/esl/php/Makefile +++ b/libs/esl/php/Makefile @@ -25,6 +25,6 @@ swigclean: reswig: swigclean esl_wrap.cpp install: ESL.so - cp ESL.so $(shell php-config --extension-dir) - cp ESL.php $(shell php -r 'echo ini_get("include_path");' | cut -d: -f2) - echo 'extension=ESL.so' >> $(shell php-config --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=)/esl.ini + cp ESL.so $(DESTDIR)/$(shell php-config --extension-dir) + cp ESL.php /$(DESTDIR)/$(shell php -r 'echo ini_get("include_path");' | cut -d: -f2) + echo 'extension=ESL.so' >> $(DESTDIR)/$(shell php-config --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=)/esl.ini diff --git a/libs/esl/python/Makefile b/libs/esl/python/Makefile index 758aeaf500..7504665561 100644 --- a/libs/esl/python/Makefile +++ b/libs/esl/python/Makefile @@ -1,5 +1,6 @@ LOCAL_CFLAGS=`python ./python-config --includes` LOCAL_LDFLAGS=`python ./python-config --ldflags` +SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"` all: _ESL.so @@ -12,6 +13,10 @@ esl_wrap.o: esl_wrap.cpp _ESL.so: esl_wrap.o $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS) +install: _ESL.so + install -m 755 _ESL.so $(SITE_DIR) + install -m 755 ESL.py $(SITE_DIR) + clean: rm -f *.o *.so *~ diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 8b1925f84f..cd2c4850a4 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -2175,8 +2175,6 @@ static ftdm_status_t _ftdm_channel_call_hangup_nl(const char *file, const char * { ftdm_status_t status = FTDM_SUCCESS; - ftdm_set_echocancel_call_end(chan); - if (chan->state != FTDM_CHANNEL_STATE_DOWN) { if (chan->state == FTDM_CHANNEL_STATE_HANGUP) { /* make user's life easier, and just ignore double hangup requests */ diff --git a/libs/freetdm/src/ftdm_state.c b/libs/freetdm/src/ftdm_state.c index de62c0f0e7..9fe2b911dc 100644 --- a/libs/freetdm/src/ftdm_state.c +++ b/libs/freetdm/src/ftdm_state.c @@ -83,6 +83,8 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_complete_state(const char *file, const c msg.channel = fchan; msg.event_id = FTDM_SIGEVENT_DIALING; ftdm_span_send_signal(fchan->span, &msg); + } else if (state == FTDM_CHANNEL_STATE_HANGUP) { + ftdm_set_echocancel_call_end(fchan); } /* MAINTENANCE WARNING diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c index f77cdd3afa..13454c1a8e 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c +++ b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c @@ -8665,10 +8665,6 @@ void outgoing_destroy(nta_outgoing_t *orq) orq->orq_destroyed = 1; orq->orq_callback = outgoing_default_cb; orq->orq_magic = NULL; - - if (orq->orq_method != sip_method_invite && - orq->orq_method != sip_method_ack) - outgoing_terminate(orq); } /** @internal Outgoing transaction timer routine. diff --git a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c index f104274ef4..e00d3912d8 100644 --- a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c +++ b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c @@ -1036,13 +1036,15 @@ int soa_sdp_mode_set(sdp_session_t const *user, assert(s2u); - for (j = 0, um = user->sdp_media; j != s2u[i]; um = um->m_next, j++) - assert(um); + for (j = 0, um = user->sdp_media; j != s2u[i]; um = um->m_next, j++) { + if (!um) break; + } + if (um == NULL) { if (dryrun) - return 1; + return 1; else - retval = 1; + retval = 1; sm->m_rejected = 1; sm->m_mode = sdp_inactive; sm->m_port = 0; diff --git a/scripts/perl/randomize-passwords.pl b/scripts/perl/randomize-passwords.pl new file mode 100755 index 0000000000..d792f2b293 --- /dev/null +++ b/scripts/perl/randomize-passwords.pl @@ -0,0 +1,179 @@ +#!/usr/bin/perl +# +# randomize-passwords.pl +# +# Randomizes the auth passwords for any file in the file spec given by the user +# Randomizes the vm passwords for the same files +# Creates a backup copy of each file altered; optionally will remove backups +# +# This program uses only pure Perl modules so it should be portable. +# +# Michael S. Collins +# 2009-11-11 +# +# Freely contributed to the FreeSWITCH project for use as the developers and community see fit + +use strict; +use warnings; +use Getopt::Long; +use File::Basename; +use File::Copy; + +$|++; + +## 'CHARACTERS' contains punctuation marks +use constant CHARACTERS => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=+?> 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; +my $numalphas = length(ALPHACHARS); + +my $vmlen = 4; # Length of VM password +my $authlen = 10; # Length of auth password +my $filespec; # File specification +my $delbak; # Flag - delete backups (default = keep backups) +my $nopunct; # Flag - set to true to disable punction marks (i.e. alphanumerics only) in auth passwords + +my $opts_ok = GetOptions ("h" => \&usage, + "help" => \&usage, + "vmlen=i" => \$vmlen, + "authlen=i" => \$authlen, + "files=s" => \$filespec, + "D" => \$delbak, + "nopunct" => \$nopunct, + ); + +## Confirm that a file spec was provided +if ( ! $filespec ) { + warn "\nPlease provide a file specification.\n"; + die "Example: --files=/usr/local/freeswitch/conf/directory/default/1*.xml\n\n"; +} + +## Collect the files +my @FILELIST = glob($filespec); +if ( ! @FILELIST ) { + print "\nNo files found matching this spec:\n$filespec\n"; + exit(0); +} else { + print "\nFound " . @FILELIST . " file(s).\n\n"; +} + +## Iterate through the list, process each file +foreach my $file ( @FILELIST ) { + print "Processing file: $file\n"; + my $bakfile = $file . '.bak'; + + if ( move($file,$bakfile) ) { + print " $file ===> $bakfile\n"; + } else { + print " Unable to backup $file to $bakfile. Skipping...\n"; + next; + } + + ## FILEIN is the backup file, FILEOUT is the updated file + open(FILEIN ,'<',$bakfile) or die "Could not open $bakfile - aborting operation.\n"; + open(FILEOUT,'>',$file ) or die "Could not open $file - aborting operation.\n"; + + ## Retrieve new passwords from random generators + my $newauth = &get_random_chars($authlen); + my $newvm = &get_random_digits($vmlen); + + ## Loop through "bak" file, replace passwords, write out to original file + while() { + ## Check for passwords; if found swap + if ( m/param name="password"/ ) { + # Found auth password, swap it + s/value="(.*?)"/value="$newauth"/; + print " Old/new auth pass: $1 ==> $newauth\n"; + } + + if ( m/param name="vm-password"/ ) { + # Found vm password, swap it + s/value="(.*?)"/value="$newvm"/; + print " Old/new vm pass: $1 ==> $newvm\n"; + } + + print FILEOUT $_; + + } ## while() + + close(FILEIN); + close(FILEOUT); + + ## Clear out the backup file if user asked for it + if ( $delbak ) { + print " Removing $bakfile...\n"; + unlink $bakfile; + } + print " Finished with $file.\n\n"; + +} ## foreach my $file ( @FILELIST ) + +exit(0); + +## Return random chars for auth password +sub get_random_chars () { + my $length = shift; + if ( ! $length ) { $length = $authlen; } + my $chars; + + if ( $nopunct ) { + foreach my $i (1 .. $length) { + my $nextchar = substr( ALPHACHARS,int(rand $numalphas),1 ); + $chars .= $nextchar; + } + + } else { + foreach my $i (1 .. $length) { + my $nextchar = substr( CHARACTERS,int(rand $numchars),1 ); + $chars .= $nextchar; + } + } + return $chars; +} + +## Return only digits for vm password +sub get_random_digits () { + my $length = shift; + if ( ! $length ) { $length = $vmlen; } + my $digits; + foreach my $i (1 .. $length) { + my $nextdigit = int(rand 10); + $digits .= $nextdigit; + } + return $digits; + +} + +sub usage () { +print < [-D] [--vmlen=] [--authlen=] + +Options: + + -h, --help Display this help page + + -D Delete backups (default is to save backups) + + --files Specify files to process. Use typical file globs. On a standard Linux install it would look like: + --files=/usr/local/freeswitch/conf/directory/default/1*.xml + + --vmlen Set length of voice mail password. (Default is 4 digits) + + --authlen Set length of auth password. (Default is 10 characters) + + --nopunct Disable punction marks in auth passwords, i.e. alphanumerics only + +Example: + To randomize all the passwords for a default Linux install, with 6 digit VM passwords, use this command: + + ./randomize-passwords.pl --files=/usr/local/freeswitch/conf/directory/default/1*.xml -D --vmlen=6 + +END_USAGE +; +exit(0); +} diff --git a/src/include/private/switch_core_pvt.h b/src/include/private/switch_core_pvt.h index f8c6a794b9..ab0777ed3b 100644 --- a/src/include/private/switch_core_pvt.h +++ b/src/include/private/switch_core_pvt.h @@ -248,6 +248,7 @@ struct switch_runtime { int max_sql_buffer_len; switch_dbtype_t odbc_dbtype; char hostname[256]; + int multiple_registrations; }; extern struct switch_runtime runtime; diff --git a/src/include/switch_rtp.h b/src/include/switch_rtp.h index 27dacc7c18..2870bba3af 100644 --- a/src/include/switch_rtp.h +++ b/src/include/switch_rtp.h @@ -437,6 +437,8 @@ SWITCH_DECLARE(void) switch_rtp_set_private(switch_rtp_t *rtp_session, void *pri */ SWITCH_DECLARE(void) switch_rtp_set_telephony_event(switch_rtp_t *rtp_session, switch_payload_t te); SWITCH_DECLARE(void) switch_rtp_set_telephony_recv_event(switch_rtp_t *rtp_session, switch_payload_t te); +SWITCH_DECLARE(void) switch_rtp_set_recv_pt(switch_rtp_t *rtp_session, switch_payload_t pt); + /*! \brief Set the payload type for comfort noise \param rtp_session the RTP session to modify diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 030cb8e867..517134d2e1 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -780,7 +780,7 @@ SWITCH_STANDARD_API(user_data_function) if ((domain = strchr(user, '@'))) { *domain++ = '\0'; } else { - if ((dup_domain = switch_core_get_variable("domain"))) { + if ((dup_domain = switch_core_get_variable_dup("domain"))) { domain = dup_domain; } else { domain = "cluecon.com"; diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 0aee35224c..5eeae5c781 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -266,6 +266,7 @@ typedef struct conference_obj { switch_thread_rwlock_t *rwlock; uint32_t count; int32_t energy_level; + int32_t agc_energy_level; uint8_t min; switch_speech_handle_t lsh; switch_speech_handle_t *sh; @@ -326,6 +327,7 @@ struct conference_member { uint32_t frame_size; uint8_t *mux_frame; uint32_t read; + uint32_t vol_period; int32_t energy_level; int32_t agc_volume_in_level; int32_t volume_in_level; @@ -345,7 +347,7 @@ struct conference_member { uint32_t verbose_events; uint32_t avg_score; uint32_t avg_itt; - uint32_t avg_tally; + uint32_t avg_tally; struct conference_member *next; switch_ivr_dmachine_t *dmachine; }; @@ -1940,6 +1942,17 @@ static void conference_loop_fn_hangup(conference_member_t *member, caller_contro switch_clear_flag_locked(member, MFLAG_RUNNING); } +static void clear_avg(conference_member_t *member) +{ + + member->agc_volume_in_level = 0; + member->avg_score = 0; + member->avg_itt = 0; + member->avg_tally = 0; + member->nt_tally = 0; +} + + /* marshall frames from the call leg to the conference thread for muxing to other call legs */ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *obj) { @@ -1948,7 +1961,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v switch_channel_t *channel; switch_status_t status; switch_frame_t *read_frame = NULL; - uint32_t hangover = 40, hangunder = 15, hangover_hits = 0, hangunder_hits = 0, energy_level = 0, diff_level = 400; + uint32_t hangover = 40, hangunder = 5, hangover_hits = 0, hangunder_hits = 0, energy_level = 0, diff_level = 400; switch_codec_implementation_t read_impl = { 0 }; switch_core_session_t *session = member->session; int check_floor_change; @@ -1991,6 +2004,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v if (++hangover_hits >= hangover) { hangover_hits = hangunder_hits = 0; switch_clear_flag_locked(member, MFLAG_TALKING); + clear_avg(member); if (test_eflag(member->conference, EFLAG_STOP_TALKING) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { @@ -2006,19 +2020,9 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v /* Check for input volume adjustments */ if (!member->conference->agc_level) { - member->agc_volume_in_level = 0; - member->avg_score = 0; - member->avg_itt = 0; - member->avg_tally = 0; - } - - if (member->conference->agc_level && member->agc_volume_in_level) { - switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->agc_volume_in_level); - } else if (member->volume_in_level) { - switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->volume_in_level); + clear_avg(member); } - energy_level = member->energy_level; /* if the member can speak, compute the audio energy level and */ @@ -2027,7 +2031,8 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v uint32_t energy = 0, i = 0, samples = 0, j = 0; int16_t *data; int divisor = 0; - int one_sec = (read_impl.actual_samples_per_second / read_impl.samples_per_packet); + int agc_period = (read_impl.actual_samples_per_second / read_impl.samples_per_packet) / 2; + int combined_vol = 0; data = read_frame->data; @@ -2037,77 +2042,62 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v member->score = 0; + combined_vol = member->agc_volume_in_level; + if (member->conference->agc_level) { + combined_vol += member->agc_volume_in_level; + } + + if (combined_vol) { + switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, combined_vol); + } + if ((samples = read_frame->datalen / sizeof(*data))) { for (i = 0; i < samples; i++) { energy += abs(data[j]); j += read_impl.number_of_channels; } member->score = energy / (samples / divisor); - member->avg_tally += member->score; - member->avg_score = member->avg_tally / ++member->avg_itt; - if (!member->avg_itt) member->avg_tally = member->score; } + if (member->vol_period) { + member->vol_period--; + } + if (member->conference->agc_level && member->score && - switch_test_flag(member, MFLAG_TALKING) && switch_test_flag(member, MFLAG_CAN_SPEAK) && - member->score > member->energy_level + member->score > member->conference->agc_energy_level ) { - int diff = member->conference->agc_level - member->score; - if (abs(diff) >= 200) { - member->agc_concur++; - } else { - member->agc_concur = 0; - } - -#if 0 - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG8, - "conf %s FOO %d %d %d %d %d\n", - member->conference->name, - member->id, diff, member->conference->agc_level, - member->score, member->agc_volume_in_level); -#endif + member->avg_tally += member->score; + member->avg_itt++; + if (!member->avg_itt) member->avg_itt++; + member->avg_score = member->avg_tally / member->avg_itt; - if (member->agc_concur >= one_sec) { - if (member->score < member->conference->agc_level) { - member->agc_volume_in_level++; - - switch_normalize_volume(member->agc_volume_in_level); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG7, - "conf %s AGC +++ %d %d %d %d %d\n", - member->conference->name, - member->id, diff, member->conference->agc_level, - member->score, member->agc_volume_in_level); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG7, + "conf %s AGC %d %d %d %d %d %d\n", + member->conference->name, + member->id, member->conference->agc_level - member->avg_score, member->conference->agc_level, + member->score, member->avg_score, member->agc_volume_in_level); - } else { - member->agc_volume_in_level--; - - switch_normalize_volume(member->agc_volume_in_level); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG7, - "conf %s AGC --- %d %d %d %d %d\n", - member->conference->name, - member->id, diff, member->conference->agc_level, - member->score, member->agc_volume_in_level); + + if (++member->nt_tally >= agc_period) { + if (!member->vol_period) { + if (member->avg_score < member->conference->agc_level) { + member->agc_volume_in_level++; + switch_normalize_volume(member->agc_volume_in_level); + member->vol_period = (read_impl.actual_samples_per_second / read_impl.samples_per_packet) * 2; + } + + if (member->avg_score > member->conference->agc_level) { + member->agc_volume_in_level--; + switch_normalize_volume(member->agc_volume_in_level); + member->vol_period = (read_impl.actual_samples_per_second / read_impl.samples_per_packet) * 2; + } } - member->agc_concur = 0; - } - member->nt_tally = 0; - } else { - member->nt_tally++; - member->agc_concur = 0; - - if (member->nt_tally > one_sec * 5) { - member->agc_volume_in_level = 0; member->nt_tally = 0; - member->avg_itt = 0; - member->avg_tally = 0; - member->avg_score = member->score; } - - } member->score_iir = (int) (((1.0 - SCORE_DECAY) * (float) member->score) + (SCORE_DECAY * (float) member->score_iir)); @@ -2162,6 +2152,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v if (++hangover_hits >= hangover) { hangover_hits = hangunder_hits = 0; switch_clear_flag_locked(member, MFLAG_TALKING); + clear_avg(member); if (test_eflag(member->conference, EFLAG_STOP_TALKING) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { @@ -3421,7 +3412,7 @@ static switch_status_t conf_api_sub_mute(conference_member_t *member, switch_str static switch_status_t conf_api_sub_agc(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv) { - int level; + int level, energy_level; int on = 0; if (argc == 2) { @@ -3439,7 +3430,13 @@ static switch_status_t conf_api_sub_agc(conference_obj_t *conference, switch_str if (argc > 3) { level = atoi(argv[3]); } else { - level = 2000; + level = 650; + } + + if (argc > 4) { + energy_level = atoi(argv[4]); + } else { + energy_level = 100; } if (level > conference->energy_level) { @@ -3447,9 +3444,10 @@ static switch_status_t conf_api_sub_agc(conference_obj_t *conference, switch_str conference->avg_itt = 0; conference->avg_tally = 0; conference->agc_level = level; - + conference->agc_energy_level = energy_level; + if (stream) { - stream->write_function(stream, "OK AGC ENABLED %d\n", conference->agc_level); + stream->write_function(stream, "OK AGC ENABLED %d %d\n", conference->agc_level, conference->agc_energy_level); } } else { @@ -3823,7 +3821,7 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer if (conference->agc_level) { char tmp[30] = ""; - switch_snprintf(tmp, sizeof(tmp), "%d", conference->agc_level); + switch_snprintf(tmp, sizeof(tmp), "%d:%d", conference->agc_level, conference->agc_energy_level); switch_xml_set_attr_d_buf(x_conference, "agc", tmp); } @@ -4878,7 +4876,6 @@ static switch_status_t conference_outcall(conference_obj_t *conference, rdlock = 1; peer_channel = switch_core_session_get_channel(peer_session); - switch_channel_set_state(peer_channel, CS_SOFT_EXECUTE); /* make sure the conference still exists */ if (!switch_test_flag(conference, CFLAG_RUNNING)) { @@ -6392,16 +6389,30 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c if (!zstr(auto_gain_level)) { int level = 0; + int energy_level = 100; if (switch_true(auto_gain_level)) { - level = 2000; + level = 650; } else { + char *p; + int tmp = 0; + level = atoi(auto_gain_level); + if ((p = strchr(auto_gain_level, ':'))) { + p++; + if (p) tmp = atoi(p); + if (tmp > 0) { + energy_level = tmp; + } + } } if (level > 0 && level > conference->energy_level) { conference->agc_level = level; } + + conference->agc_energy_level = energy_level; + } if (!zstr(maxmember_sound)) { diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 894e49a511..5515f76b72 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -1725,8 +1725,7 @@ static void update_mwi(vm_profile_t *profile, const char *id, const char *domain #define FREE_DOMAIN_ROOT() if (x_user) switch_xml_free(x_user); x_user = NULL - -static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *profile, const char *domain_name, const char *id, int auth) +static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *profile, const char *domain_name, const char *id, int auth, const char *uuid_in) { vm_check_state_t vm_check_state = VM_CHECK_START; switch_channel_t *channel = switch_core_session_get_channel(session); @@ -1900,6 +1899,9 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p cbt.type = play_msg_type; cbt.move = VM_MOVE_NEXT; vm_execute_sql_callback(profile, profile->mutex, sql, listen_callback, &cbt); + if (!zstr(uuid_in) && strcmp(cbt.uuid, uuid_in)) { + continue; + } status = listen_file(session, profile, &cbt); if (cbt.move == VM_MOVE_PREV) { if (cur_message <= 0) { @@ -3017,6 +3019,8 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p vm_email = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "vm-notify-mailto")) { vm_notify_email = switch_core_session_strdup(session, val); + } else if (!strcasecmp(var, "vm-skip-instructions")) { + skip_instructions = switch_true(val); } else if (!strcasecmp(var, "email-addr")) { email_addr = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "vm-email-all-messages") && (send_main = switch_true(val))) { @@ -3154,12 +3158,12 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p if (*buf != '\0') { greet_key_press: if (switch_stristr(buf, profile->login_keys)) { - voicemail_check_main(session, profile, domain_name, id, 0); + voicemail_check_main(session, profile, domain_name, id, 0, NULL); } else if ((!zstr(profile->operator_ext) || !zstr(operator_ext)) && !zstr(profile->operator_key) && !strcasecmp(buf, profile->operator_key) ) { int argc; char *argv[4]; char *mycmd; - + if ((!zstr(operator_ext) && (mycmd = switch_core_session_strdup(session, operator_ext))) || (!zstr(profile->operator_ext) && (mycmd = switch_core_session_strdup(session, profile->operator_ext)))) { argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0]))); @@ -3292,7 +3296,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p #define VM_DESC "voicemail" -#define VM_USAGE "[check] [auth] []" +#define VM_USAGE "[check] [auth] [] [uuid]" SWITCH_STANDARD_APP(voicemail_function) { @@ -3304,6 +3308,7 @@ SWITCH_STANDARD_APP(voicemail_function) const char *domain_name = NULL; const char *id = NULL; const char *auth_var = NULL; + const char *uuid = NULL; int x = 0, check = 0, auth = 0; switch_channel_t *channel = switch_core_session_get_channel(session); @@ -3363,7 +3368,10 @@ SWITCH_STANDARD_APP(voicemail_function) } if (check) { - voicemail_check_main(session, profile, domain_name, id, auth); + if (argv[x]) { + uuid = argv[x++]; + } + voicemail_check_main(session, profile, domain_name, id, auth, uuid); } else { voicemail_leave_main(session, profile, domain_name, id); } diff --git a/src/mod/endpoints/mod_khomp/Install/files/khomp.conf.xml b/src/mod/endpoints/mod_khomp/Install/files/khomp.conf.xml index 79c00516b9..069792935c 100644 --- a/src/mod/endpoints/mod_khomp/Install/files/khomp.conf.xml +++ b/src/mod/endpoints/mod_khomp/Install/files/khomp.conf.xml @@ -272,6 +272,15 @@ a FXS branch. --> + + + +