Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch
This commit is contained in:
commit
c2b9756d68
|
@ -52,14 +52,12 @@
|
|||
<X-PRE-PROCESS cmd="include" data="directory/*.xml"/>
|
||||
</section>
|
||||
|
||||
<!-- phrases section (under development still) -->
|
||||
<section name="phrases" description="Speech Phrase Management">
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/de/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/en/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/fr/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/ru/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/he/*.xml"/>
|
||||
</macros>
|
||||
<!-- languages section (under development still) -->
|
||||
<section name="languages" description="Language Management">
|
||||
<X-PRE-PROCESS cmd="include" data="lang/de/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/en/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/fr/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/ru/*.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="lang/he/*.xml"/>
|
||||
</section>
|
||||
</document>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<include>
|
||||
<language name="de" sound-path="/snds" tts-engine="cepstral" tts-voice="david">
|
||||
<X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
|
||||
<!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/tts.xml"/>
|
||||
<language name="de" sound-prefix="/snds" tts-engine="cepstral" tts-voice="david">
|
||||
<phrases>
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
|
||||
<!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/tts.xml"/>
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
</include>
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
<include>
|
||||
<language name="en" sound-path="$${sounds_dir}/en/us/callie" tts-engine="cepstral" tts-voice="callie">
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
|
||||
<language name="en" say-module="en" sound-prefix="$${sounds_dir}/en/us/callie" tts-engine="cepstral" tts-voice="callie">
|
||||
<phrases>
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
</include>
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
<include>
|
||||
<language name="fr" sound-path="/snds" tts-engine="cepstral" tts-voice="david">
|
||||
<X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
|
||||
<!--voicemail_fr_tts is purely implemented with tts, we need a files based implementation too -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
|
||||
<language name="fr" say-module="fr" sound-prefix="$${sounds_dir}/fr/ca/june" tts-engine="cepstral" tts-voice="david">
|
||||
<phrases>
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
|
||||
<!--voicemail_fr_tts is purely implemented with tts, we need a files based implementation too -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
</include>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<include>
|
||||
<language name="he" sound-path="$${sounds_dir}/he/daniel" tts-engine="cepstral" tts-voice="daniel">
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/>
|
||||
<language name="he" sound-prefix="$${sounds_dir}/he/daniel" tts-engine="cepstral" tts-voice="daniel">
|
||||
<phrases>
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/>
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
</include>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--тестовые файлы Вы звуковые файлы можно взять тут svn co http://svn.freeswitch.ru/bbv/mod_say_ru/ru/ -->
|
||||
<include>
|
||||
<language name="ru" sound-path="$${sounds_dir}/ru/RU/elena" tts-engine="cepstral" tts-voice="elena">
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
|
||||
<language name="ru" sound-prefix="$${sounds_dir}/ru/RU/elena" tts-engine="cepstral" tts-voice="elena">
|
||||
<phrases>
|
||||
<macros>
|
||||
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
|
||||
<!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
</include>
|
||||
|
|
|
@ -238,6 +238,13 @@ freeswitch (1.0.7)
|
|||
core: Fix argument parsing for tone_detect app (r:38c3a67a/FS-3229)
|
||||
core: add L16 def for 32ms and allow timer matrix to drop to 1ms to support nelly (r:82e3d49f)
|
||||
core: fix segfault in zrtp srtcp (r:2330b340)
|
||||
core: add switch_clean_name_string util function to strip out caller id name chars that can cause issues (r:244048f8)
|
||||
core: switch_core_sqldb - clear pointer on release (r:aaef33cc)
|
||||
core: all [] {} and <> can be stacked and override the delim per set <><^^:>{}{^^:}{^^;}[][^^:] (r:4c4bf59e/FS-3246)
|
||||
core: fix default tipping point it was too low (r:e4eade33)
|
||||
core: enable optimal defaults on linux kernels that can support newer features. (r:0b51aca3)
|
||||
core: Lower NAT port mapping disabled log msg from WARNING to INFO (r:973a850d)
|
||||
core: Change the structure of the phrases/language system. Previously it was fxml->phrases->macros->language->macro. Changed it so fxml->languages->language->phrases->macros->macro You can have sub macros <macros name="voicemail"><macro ...> and allow you to call it login@voicemail. Change the sound-path to sound-prefix to make it constistant with the rest of freeswitch. Also allow to set a sound-prefix to a macros, so you can override it for a specific file set. You can set say-modules="en" or whatever in the <language section to define that say module to use. (r:4137b360)
|
||||
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)
|
||||
fs_cli: block control-z from fs cli and print a warning how to exit properly (r:dc436b82)
|
||||
|
@ -339,12 +346,16 @@ freeswitch (1.0.7)
|
|||
mod_callcenter: New Agent order Possibility: Agent order by Level and Position by agents.last_offered_call. Change the default and sequentially-by-agent-order strategy to include the longest-idle-agent. This should offer a default consistant way to go through all the agent within the same tier/position. (Before, it was left to the DB to return the order of the result) (r:dcafff20/FS-3158)
|
||||
mod_callcenter: Generate per member uuid different from the member session uuid. Might fix transfer between queue. More changes are coming (r:b63a72f8)
|
||||
mod_callcenter: Remove the concept of Caller for Members. Event Socket event have been changed (CC-Caller.* to CC-Member.*) Also CC-Caller-UUID is renamed to CC-Member-Session-UUID. The reason for this is you could actually put people to be call in the queue. So they are not caller per say. But they are a member of a queue. (r:40a134bd)
|
||||
mod_callcenter: Reload a queue wont delete all the currently waiting members. Only a reload of the module will. (r:c5ae5de0/FS-3250)
|
||||
mod_callcenter: Add a very prototype (and maybe not functional) strategy called : sequentially-by-next-agent-order. It will try to find the last agent we tried to reach, and start calling more agent after that one based on position. It will use the level for the next agent, but once that level is done, it start back at the lowest level (r:bef6f0f4)
|
||||
mod_callcenter: New strategies: round-robin, random, and 'top-down' (r:2b4b23aa,r:bee247ca)
|
||||
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_celt: Add dependency to fix parallel builds (r:6e37a8b2)
|
||||
mod_cepstral: add ability to set encoding of text (r:28738b06/FS-3001)
|
||||
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
|
||||
|
@ -507,10 +518,11 @@ 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_hash: avoid scheduler calling a function on null hash during shutdown (r:8458adeb)
|
||||
mod_hash: add realm filter to hash_dump db command so that you can quickly dump all entries that belong only to a specific realm without getting the whole db (r:81347126)
|
||||
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)
|
||||
mod_h323: some t.38 and locking improvements. replace ptrace with switch_log_printf. (r:5efe5c88)
|
||||
mod_h323: add missing conf praameter (r:0b353d7a)
|
||||
mod_h323: Add mod_h323 to windows (r:015bcaf6/MODENDP-301)
|
||||
mod_h323: move PTrace level set to FSH323EndPoint::Initialise. partially apply patch from from Peter Olsson, Remove UnLock() when TryLock() failed and DEBUG_RTP_PACKETS directiv e. (r:7b5803f7)
|
||||
mod_h323: set network_addr of caller profile to signaling ip address. (requested by Steven Ayre) (r:072bf5ad)
|
||||
|
@ -529,6 +541,7 @@ freeswitch (1.0.7)
|
|||
mod_lcr: fix compiler warning on newer gcc (r:bfa414cb)
|
||||
mod_lcr: don't count twice (r:eaeabc7b/FS-1810)
|
||||
mod_lcr: properly destroy lcr object when done (r:084819a3/FS-3199)
|
||||
mod_lcr: don't add routes that have no rate of the desired type (r:82e3ccf8)
|
||||
mod_loopback: add loopback_bowout_on_execute var to make 1 legged loopback calls bow out of the picture
|
||||
mod_loopback: only execute app once in app mode (r:64f58f2d)
|
||||
mod_loopback: fix bug in mod_loopback where bowout=false (r:e9ab5368)
|
||||
|
@ -565,6 +578,7 @@ freeswitch (1.0.7)
|
|||
mod_portaudio: Fix inbound state (CS_ROUTING not CS_INIT) (MODENDP-302)
|
||||
mod_portaudio: mod_portaudio improvements and bug fixes (r:33b74ca8/FS-3006)
|
||||
mod_portaudio: Add pa devlist to portaudio webapi (r:e8f10ea3)
|
||||
mod_protovm: This is a very early new prototype voicemail ivr system. You need to copy the sounds.xml and make it loadale in the language folder and protovm.conf.xml inside the autoload_configs folder. Configs file will most definitly change. Once stabilized, we make it install those file by default. (r:fb549777)
|
||||
mod_sangoma_codec: Add sample config file
|
||||
mod_sangoma_codec: added load/noload options for the supported codecs
|
||||
mod_sangoma_codec: rename load/noload to register/noregister
|
||||
|
@ -614,6 +628,8 @@ freeswitch (1.0.7)
|
|||
mod_skypopen: making XEvents to works when EARLYMEDIA, and correctly manage threads death
|
||||
mod_skypopen: now answer a call only when directed to do it (before was trying to answer any incoming call). Lot of changes to a messy part, so maybe some problem will come out... (r:45c6c4d3)
|
||||
mod_skypopen: ignore early media sent by channels to be bridged before our channel is answered (r:ef14b78a)
|
||||
mod_skypopen: OSS driver, refinement (r:b0a23f8e)
|
||||
mod_skypopen: deleted osscuse subdir (r:4842a620)
|
||||
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)
|
||||
|
@ -771,6 +787,9 @@ freeswitch (1.0.7)
|
|||
mod_sofia: After further review I can concede the point that we should always say partial considering how we do things. With this commit we should at least be sending separate partial updates for each existing dialog to everyone with a subscription. If we need to introduce more data, consolidate them etc. We need to do it in small chunks and keep things sane. (r:7eae7f37/FS-2877)
|
||||
mod_sofia: Fix:Attended transfer with bypass media fails in various ways (r:4b706dac/FS-3227)
|
||||
mod_sofia: SO, If the RFC told you to jump off a cliff......? (r:07b9186d/FS-3226)
|
||||
mod_sofia: Don't assume incoming "gw" contact param is valid (prevent possible DoS) (r:2b6f7070/FS-3244)
|
||||
mod_sofia: offer both avp and savp when using srtp (r:5857495e)
|
||||
mod_sofia: fix race in sla (r:a4ed829d)
|
||||
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)
|
||||
|
@ -783,6 +802,8 @@ freeswitch (1.0.7)
|
|||
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_spandsp: new option to set sip_execute_on_image to 't38_gateway self nocng' this should skip the tone detection adn go right into the gateway mode so you should be able to do only this and have it work based on remote re-invite (r:9227b538/FS-3252)
|
||||
mod_spandsp: additional fix to this bug and add better fax detect code to mod_spandsp (r:7fe313cf/FS-3252)
|
||||
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)
|
||||
|
@ -796,6 +817,7 @@ freeswitch (1.0.7)
|
|||
mod_unimrcp: fix truncated TTS (r:e37dd41e/FS-3201)
|
||||
mod_unimrcp: Destroy schannel only *after* cleanup of its contents is done (r:0f17bcc5)
|
||||
mod_unimrcp: add locking to mrcp dtmf generator (r:f5704114/FS-3163)
|
||||
mod_unimrcp: check for NULL recog_hdr (r:478d5186/FS-3247)
|
||||
mod_valet_parking: add event data to valet parking hold event
|
||||
mod_valet_parking: add event for Valet Parking action exit
|
||||
mod_valet_parking: pass hold class on transfer (r:76a065ec)
|
||||
|
@ -815,6 +837,8 @@ freeswitch (1.0.7)
|
|||
mod_voicemail: let vmain-key and operator-key be set empty (r:de49305a)
|
||||
mod_voicemail: add ability to jump to a specific message (r:0f8fb4b1)
|
||||
mod_voicemail: vm-skip-instructions param in xml directory to disable instructions how to record a file (r:ed7e1f39)
|
||||
mod_voicemail: Implement 10 new standard api function call that allow you to control fs voicemail storage system. The goal is to have a standard API set for any additional storage system we wish the voicemail to run off. Current list of added api name are : vm_fsdb_msg_count, vm_fsdb_msg_list, vm_fsdb_msg_get, vm_fsdb_msg_delete, vm_fsdb_msg_undelete, vm_fsdb_msg_purge, vm_fsdb_msg_save, vm_fsdb_pref_greeting_set, vm_fsdb_pref_recname_set, vm_fsdb_pref_password_set. (r:1f4cb488)
|
||||
mod_voicemail: Adding a new voicemail fsdb api vm_fsdb_auth_login that does basic login authentication for a user (r:bfdfac5e)
|
||||
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)
|
||||
|
|
|
@ -752,6 +752,7 @@ fi
|
|||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_csv.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_pg_csv.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_sqlite.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cepstral.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cidlookup.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/conference.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/console.conf.xml
|
||||
|
@ -1064,10 +1065,13 @@ fi
|
|||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/en
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/en/demo
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/en/vm
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/en/dir
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/en/ivr
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/en/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/en/demo/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/en/vm/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/en/dir/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/en/ivr/*.xml
|
||||
%{prefix}/mod/mod_say_en.so*
|
||||
|
||||
%files lang-de
|
||||
|
@ -1085,6 +1089,7 @@ fi
|
|||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/fr
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/fr/demo
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/fr/vm
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/fr/dir
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/fr/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/fr/demo/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/fr/vm/*.xml
|
||||
|
@ -1096,6 +1101,7 @@ fi
|
|||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/ru
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/ru/demo
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/ru/vm
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/ru/dir
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/demo/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/vm/*.xml
|
||||
|
@ -1107,6 +1113,7 @@ fi
|
|||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/he/
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/he/demo
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/he/vm
|
||||
%dir %attr(0750, freeswitch, daemon) %{prefix}/conf/lang/he/dir
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/he/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/he/demo/*.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/he/vm/*.xml
|
||||
|
|
|
@ -839,9 +839,9 @@ static const char *basic_gets(int *cnt)
|
|||
}
|
||||
Sleep(20);
|
||||
}
|
||||
#endif
|
||||
|
||||
return command_buf;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1264,6 +1264,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
caller_data.ani.plan = (uint8_t)atoi(sipvar);
|
||||
}
|
||||
|
||||
/* Used by ftmod_sangoma_ss7 only */
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-ANI-NADI");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_clg_nadi", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-ANI2");
|
||||
if (sipvar) {
|
||||
ftdm_set_string(caller_data.aniII, sipvar);
|
||||
|
@ -1284,6 +1290,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
caller_data.dnis.plan = (uint8_t)atoi(sipvar);
|
||||
}
|
||||
|
||||
/* Used by ftmod_sangoma_ss7 only */
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-DNIS-NADI");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_clg_nadi", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS");
|
||||
if (sipvar) {
|
||||
ftdm_set_string(caller_data.rdnis.digits, sipvar);
|
||||
|
@ -1299,6 +1311,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
caller_data.rdnis.plan = (uint8_t)atoi(sipvar);
|
||||
}
|
||||
|
||||
/* Used by ftmod_sangoma_ss7 only */
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS-NADI");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_rdnis_nadi", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-Screen");
|
||||
if (sipvar) {
|
||||
caller_data.screen = (uint8_t)atoi(sipvar);
|
||||
|
@ -1308,6 +1326,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
if (sipvar) {
|
||||
caller_data.pres = (uint8_t)atoi(sipvar);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (switch_test_flag(outbound_profile, SWITCH_CPF_SCREEN)) {
|
||||
|
@ -1568,7 +1588,7 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-RDNIS", "%s", channel_caller_data->rdnis.digits);
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-RDNIS-TON", "%d", channel_caller_data->rdnis.type);
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-RDNIS-Plan", "%d", channel_caller_data->rdnis.plan);
|
||||
|
||||
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-Screen", "%d", channel_caller_data->screen);
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-Presentation", "%d", channel_caller_data->pres);
|
||||
}
|
||||
|
@ -3615,7 +3635,7 @@ void dump_chan_xml(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *
|
|||
"--------------------------------------------------------------------------------\n" \
|
||||
"ftdm list\n" \
|
||||
"ftdm start|stop <span_name|span_id>\n" \
|
||||
"ftdm restart <span_id|span_name> <chan_id>\n" \
|
||||
"ftdm restart <span_id|span_name> [<chan_id>]\n" \
|
||||
"ftdm dump <span_id|span_name> [<chan_id>]\n" \
|
||||
"ftdm sigstatus get|set [<span_id|span_name>] [<channel>] [<sigstatus>]\n" \
|
||||
"ftdm trace <path> <span_id|span_name> [<chan_id>]\n" \
|
||||
|
@ -4141,10 +4161,11 @@ SWITCH_STANDARD_API(ft_function)
|
|||
stream->write_function(stream, "+OK queue sizes set to Rx %d and Tx %d\n", rxsize, txsize);
|
||||
} else if (!strcasecmp(argv[0], "restart")) {
|
||||
uint32_t chan_id = 0;
|
||||
uint32_t ccount = 0;
|
||||
ftdm_channel_t *chan;
|
||||
ftdm_span_t *span = NULL;
|
||||
if (argc < 3) {
|
||||
stream->write_function(stream, "-ERR Usage: ftdm restart <span_id> <chan_id>\n");
|
||||
if (argc < 2) {
|
||||
stream->write_function(stream, "-ERR Usage: ftdm restart <span_id> [<chan_id>]\n");
|
||||
goto end;
|
||||
}
|
||||
ftdm_span_find_by_name(argv[1], &span);
|
||||
|
@ -4152,15 +4173,32 @@ SWITCH_STANDARD_API(ft_function)
|
|||
stream->write_function(stream, "-ERR invalid span\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
chan_id = atoi(argv[2]);
|
||||
chan = ftdm_span_get_channel(span, chan_id);
|
||||
if (!chan) {
|
||||
stream->write_function(stream, "-ERR Could not find chan\n");
|
||||
goto end;
|
||||
|
||||
if (argc > 2) {
|
||||
chan_id = atoi(argv[2]);
|
||||
if (chan_id > ftdm_span_get_chan_count(span)) {
|
||||
stream->write_function(stream, "-ERR invalid chan\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
stream->write_function(stream, "Resetting channel %s:%s\n", argv[2], argv[3]);
|
||||
ftdm_channel_reset(chan);
|
||||
if (chan_id) {
|
||||
chan = ftdm_span_get_channel(span, chan_id);
|
||||
if (!chan) {
|
||||
stream->write_function(stream, "-ERR Could not find chan\n");
|
||||
goto end;
|
||||
}
|
||||
stream->write_function(stream, "Resetting channel %s:%s\n", argv[1], argv[2]);
|
||||
ftdm_channel_reset(chan);
|
||||
} else {
|
||||
uint32_t i = 0;
|
||||
ccount = ftdm_span_get_chan_count(span);
|
||||
for (i = 1; i < ccount; i++) {
|
||||
chan = ftdm_span_get_channel(span, i);
|
||||
stream->write_function(stream, "Resetting channel %s:%d\n", argv[1], i);
|
||||
ftdm_channel_reset(chan);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
char *rply = ftdm_api_execute(cmd);
|
||||
|
|
|
@ -3563,6 +3563,16 @@ static FIO_WRITE_FUNCTION(ftdm_raw_write)
|
|||
static FIO_READ_FUNCTION(ftdm_raw_read)
|
||||
{
|
||||
ftdm_status_t status = ftdmchan->fio->read(ftdmchan, data, datalen);
|
||||
|
||||
if (status == FTDM_SUCCESS && ftdm_test_flag(ftdmchan, FTDM_CHANNEL_USE_RX_GAIN)
|
||||
&& (ftdmchan->native_codec == FTDM_CODEC_ALAW || ftdmchan->native_codec == FTDM_CODEC_ULAW)) {
|
||||
int i = 0;
|
||||
unsigned char *rdata = data;
|
||||
for (i = 0; i < *datalen; i++) {
|
||||
rdata[i] = ftdmchan->rxgain_table[rdata[i]];
|
||||
}
|
||||
}
|
||||
|
||||
if (status == FTDM_SUCCESS && ftdmchan->fds[FTDM_READ_TRACE_INDEX] > -1) {
|
||||
ftdm_size_t dlen = *datalen;
|
||||
if ((ftdm_size_t)write(ftdmchan->fds[FTDM_READ_TRACE_INDEX], data, (int)dlen) != dlen) {
|
||||
|
@ -3730,7 +3740,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
|||
ftdm_status_t status = FTDM_FAIL;
|
||||
fio_codec_t codec_func = NULL;
|
||||
ftdm_size_t max = *datalen;
|
||||
unsigned i = 0;
|
||||
|
||||
ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, "ftdmchan is null\n");
|
||||
ftdm_assert_return(ftdmchan->fio != NULL, FTDM_FAIL, "No I/O module attached to ftdmchan\n");
|
||||
|
@ -3769,13 +3778,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_USE_RX_GAIN)
|
||||
&& (ftdmchan->native_codec == FTDM_CODEC_ALAW || ftdmchan->native_codec == FTDM_CODEC_ULAW)) {
|
||||
unsigned char *rdata = data;
|
||||
for (i = 0; i < *datalen; i++) {
|
||||
rdata[i] = ftdmchan->rxgain_table[rdata[i]];
|
||||
}
|
||||
}
|
||||
handle_tone_generation(ftdmchan);
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_TRANSCODE) && ftdmchan->effective_codec != ftdmchan->native_codec) {
|
||||
|
|
|
@ -996,11 +996,15 @@ static ftdm_status_t ftdm_sangoma_isdn_start(ftdm_span_t *span)
|
|||
ftdm_clear_flag(span, FTDM_SPAN_STOP_THREAD);
|
||||
ftdm_clear_flag(span, FTDM_SPAN_IN_THREAD);
|
||||
|
||||
if (signal_data->raw_trace_q921 == SNGISDN_OPT_TRUE) {
|
||||
if (signal_data->trace_q921 == SNGISDN_OPT_TRUE ||
|
||||
signal_data->raw_trace_q921 == SNGISDN_OPT_TRUE) {
|
||||
|
||||
sngisdn_activate_trace(span, SNGISDN_TRACE_Q921);
|
||||
}
|
||||
|
||||
if (signal_data->raw_trace_q931 == SNGISDN_OPT_TRUE) {
|
||||
if (signal_data->trace_q931 == SNGISDN_OPT_TRUE ||
|
||||
signal_data->raw_trace_q931 == SNGISDN_OPT_TRUE) {
|
||||
|
||||
sngisdn_activate_trace(span, SNGISDN_TRACE_Q931);
|
||||
}
|
||||
|
||||
|
|
|
@ -213,6 +213,8 @@ typedef struct sngisdn_span_data {
|
|||
int8_t facility_timeout;
|
||||
uint8_t num_local_numbers;
|
||||
uint8_t ignore_cause_value;
|
||||
uint8_t trace_q931; /* TODO: combine with trace_flags */
|
||||
uint8_t trace_q921; /* TODO: combine with trace_flags */
|
||||
uint8_t raw_trace_q931; /* TODO: combine with trace_flags */
|
||||
uint8_t raw_trace_q921; /* TODO: combine with trace_flags */
|
||||
uint8_t timer_t3;
|
||||
|
|
|
@ -369,6 +369,10 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
|||
parse_yesno(var, val, &signal_data->facility_ie_decode);
|
||||
} else if (!strcasecmp(var, "ignore-cause-value")) {
|
||||
parse_yesno(var, val, &signal_data->ignore_cause_value);
|
||||
} else if (!strcasecmp(var, "q931-trace")) {
|
||||
parse_yesno(var, val, &signal_data->trace_q931);
|
||||
} else if (!strcasecmp(var, "q921-trace")) {
|
||||
parse_yesno(var, val, &signal_data->trace_q921);
|
||||
} else if (!strcasecmp(var, "q931-raw-trace")) {
|
||||
parse_yesno(var, val, &signal_data->raw_trace_q931);
|
||||
} else if (!strcasecmp(var, "q921-raw-trace")) {
|
||||
|
|
|
@ -207,9 +207,10 @@ int ft_to_sngss7_cfg_all(void)
|
|||
|
||||
/* go through all the relays channels and configure it */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) {
|
||||
while (x < (MAX_RELAY_CHANNELS)) {
|
||||
/* check if this relay channel has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.relay[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
/* send the specific configuration */
|
||||
if (ftmod_ss7_relay_chan_config(x)) {
|
||||
|
@ -223,13 +224,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
g_ftdm_sngss7_data.cfg.relay[x].flags |= SNGSS7_CONFIGURED;
|
||||
} /* if !SNGSS7_CONFIGURED */
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) */
|
||||
} /* while (x < (MAX_RELAY_CHANNELS)) */
|
||||
|
||||
x = 1;
|
||||
while (x < (MAX_MTP_LINKS + 1)) {
|
||||
while (x < (MAX_MTP_LINKS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtp1Link[x].flags & SNGSS7_CONFIGURED) &&
|
||||
(g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtp1Link[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
/* configure mtp1 */
|
||||
if (ftmod_ss7_mtp1_psap_config(x)) {
|
||||
|
@ -243,13 +244,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
g_ftdm_sngss7_data.cfg.mtp1Link[x].flags |= SNGSS7_CONFIGURED;
|
||||
}
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
x = 1;
|
||||
while (x < (MAX_MTP_LINKS + 1)) {
|
||||
while (x < (MAX_MTP_LINKS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtp2Link[x].flags & SNGSS7_CONFIGURED) &&
|
||||
(g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtp2Link[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
/* configure mtp2 */
|
||||
if (ftmod_ss7_mtp2_dlsap_config(x)) {
|
||||
|
@ -263,13 +264,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
g_ftdm_sngss7_data.cfg.mtp2Link[x].flags |= SNGSS7_CONFIGURED;
|
||||
}
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
x = 1;
|
||||
while (x < (MAX_MTP_LINKS + 1)) {
|
||||
while (x < (MAX_MTP_LINKS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtp3Link[x].flags & SNGSS7_CONFIGURED) &&
|
||||
(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtp3Link[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
/* configure mtp3 */
|
||||
if (ftmod_ss7_mtp3_dlsap_config(x)) {
|
||||
|
@ -284,12 +285,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
}
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) {
|
||||
while (x < (MAX_NSAPS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.nsap[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
ret = ftmod_ss7_mtp3_nsap_config(x);
|
||||
if (ret) {
|
||||
|
@ -312,12 +314,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) */
|
||||
} /* while (x < (MAX_NSAPS)) */
|
||||
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKSETS+1)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
if (ftmod_ss7_mtp3_linkset_config(x)) {
|
||||
SS7_CRITICAL("MTP3 LINKSET %d configuration FAILED!\n", x);
|
||||
|
@ -331,12 +334,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKSETS+1)) */
|
||||
|
||||
x = 1;
|
||||
while ((g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0)) {
|
||||
while (x < (MAX_MTP_ROUTES+1)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtpRoute[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtpRoute[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
if (ftmod_ss7_mtp3_route_config(x)) {
|
||||
SS7_CRITICAL("MTP3 ROUTE %d configuration FAILED!\n", x);
|
||||
|
@ -350,12 +354,13 @@ int ft_to_sngss7_cfg_all(void)
|
|||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_ROUTES+1)) */
|
||||
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
|
||||
while (x < (MAX_ISAPS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.isap[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
if (ftmod_ss7_isup_isap_config(x)) {
|
||||
SS7_CRITICAL("ISUP ISAP %d configuration FAILED!\n", x);
|
||||
|
@ -369,13 +374,14 @@ int ft_to_sngss7_cfg_all(void)
|
|||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) */
|
||||
} /* while (x < (MAX_ISAPS)) */
|
||||
|
||||
if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_ISUP)) {
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) {
|
||||
while (x < (MAX_ISUP_INFS)) {
|
||||
/* check if this link has been configured already */
|
||||
if (!(g_ftdm_sngss7_data.cfg.isupIntf[x].flags & SNGSS7_CONFIGURED)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.isupIntf[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
if (ftmod_ss7_isup_intf_config(x)) {
|
||||
SS7_CRITICAL("ISUP INTF %d configuration FAILED!\n", x);
|
||||
|
@ -391,21 +397,25 @@ int ft_to_sngss7_cfg_all(void)
|
|||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) */
|
||||
} /* while (x < (MAX_ISUP_INFS)) */
|
||||
} /* if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_ISUP)) */
|
||||
|
||||
x = (g_ftdm_sngss7_data.cfg.procId * 1000) + 1;
|
||||
while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
|
||||
/* check if this link has been configured already */
|
||||
if ((g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.isupCkt[x].flags & SNGSS7_CONFIGURED))) {
|
||||
|
||||
if (ftmod_ss7_isup_ckt_config(x)) {
|
||||
SS7_CRITICAL("ISUP CKT %d configuration FAILED!\n", x);
|
||||
return 1;
|
||||
} else {
|
||||
SS7_INFO("ISUP CKT %d configuration DONE!\n", x);
|
||||
}
|
||||
if (ftmod_ss7_isup_ckt_config(x)) {
|
||||
SS7_CRITICAL("ISUP CKT %d configuration FAILED!\n", x);
|
||||
return 1;
|
||||
} else {
|
||||
SS7_INFO("ISUP CKT %d configuration DONE!\n", x);
|
||||
}
|
||||
|
||||
/* set the SNGSS7_CONFIGURED flag */
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= SNGSS7_CONFIGURED;
|
||||
/* set the SNGSS7_CONFIGURED flag */
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= SNGSS7_CONFIGURED;
|
||||
} /* if !SNGSS7_CONFIGURED */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) */
|
||||
|
|
|
@ -724,6 +724,9 @@ static ftdm_status_t handle_print_usuage(ftdm_stream_handle_t *stream)
|
|||
stream->write_function(stream, "ftdm ss7 lpo link X\n");
|
||||
stream->write_function(stream, "ftdm ss7 lpr link X\n");
|
||||
stream->write_function(stream, "\n");
|
||||
stream->write_function(stream, "Ftmod_sangoma_ss7 Relay status:\n");
|
||||
stream->write_function(stream, "ftdm ss7 show status relay X\n");
|
||||
stream->write_function(stream, "\n");
|
||||
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
@ -1207,8 +1210,8 @@ static ftdm_status_t handle_show_status(ftdm_stream_handle_t *stream, int span,
|
|||
stream->write_function(stream, "r_hw=N|");
|
||||
}
|
||||
|
||||
if (sngss7_test_ckt_flag(ss7_info, FLAG_RELAY_DOWN)) {
|
||||
stream->write_function(stream, "relay=Y");
|
||||
if (sngss7_test_ckt_blk_flag(ss7_info, FLAG_RELAY_DOWN)) {
|
||||
stream->write_function(stream, "relay=Y|");
|
||||
}else {
|
||||
stream->write_function(stream, "relay=N");
|
||||
}
|
||||
|
@ -1366,7 +1369,7 @@ static ftdm_status_t handle_status_mtp3link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the status request */
|
||||
|
@ -1392,7 +1395,7 @@ static ftdm_status_t handle_status_mtp3link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
|
||||
|
||||
|
@ -1408,7 +1411,7 @@ static ftdm_status_t handle_status_mtp2link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp2Link[x].name, name)) {
|
||||
|
||||
/* send the status request */
|
||||
|
@ -1436,7 +1439,7 @@ static ftdm_status_t handle_status_mtp2link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
|
||||
|
||||
|
@ -1452,7 +1455,7 @@ static ftdm_status_t handle_status_linkset(ftdm_stream_handle_t *stream, char *n
|
|||
|
||||
/* find the linkset request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKSETS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
|
||||
|
||||
/* send the status request */
|
||||
|
@ -1487,7 +1490,7 @@ static ftdm_status_t handle_set_inhibit(ftdm_stream_handle_t *stream, char *name
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the inhibit request */
|
||||
|
@ -1504,7 +1507,7 @@ static ftdm_status_t handle_set_inhibit(ftdm_stream_handle_t *stream, char *name
|
|||
|
||||
/* move to the next linkset */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
|
||||
|
||||
|
@ -1519,7 +1522,7 @@ static ftdm_status_t handle_set_uninhibit(ftdm_stream_handle_t *stream, char *na
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -1536,7 +1539,7 @@ static ftdm_status_t handle_set_uninhibit(ftdm_stream_handle_t *stream, char *na
|
|||
|
||||
/* move to the next linkset */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
|
||||
|
||||
|
@ -1891,7 +1894,7 @@ static ftdm_status_t handle_bind_link(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -1907,7 +1910,7 @@ static ftdm_status_t handle_bind_link(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -1922,7 +1925,7 @@ static ftdm_status_t handle_unbind_link(ftdm_stream_handle_t *stream, char *name
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -1938,7 +1941,7 @@ static ftdm_status_t handle_unbind_link(ftdm_stream_handle_t *stream, char *name
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -1953,7 +1956,7 @@ static ftdm_status_t handle_activate_link(ftdm_stream_handle_t *stream, char *na
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -1969,7 +1972,7 @@ static ftdm_status_t handle_activate_link(ftdm_stream_handle_t *stream, char *na
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -1984,7 +1987,7 @@ static ftdm_status_t handle_deactivate_link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the deactivate request */
|
||||
|
@ -2000,7 +2003,7 @@ static ftdm_status_t handle_deactivate_link(ftdm_stream_handle_t *stream, char *
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -2015,7 +2018,7 @@ static ftdm_status_t handle_activate_linkset(ftdm_stream_handle_t *stream, char
|
|||
|
||||
/* find the linkset request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKSETS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
|
||||
|
||||
/* send the activate request */
|
||||
|
@ -2046,7 +2049,7 @@ static ftdm_status_t handle_deactivate_linkset(ftdm_stream_handle_t *stream, cha
|
|||
|
||||
/* find the linkset request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKSETS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
|
||||
|
||||
/* send the deactivate request */
|
||||
|
@ -2078,7 +2081,7 @@ static ftdm_status_t handle_tx_lpo(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -2094,7 +2097,7 @@ static ftdm_status_t handle_tx_lpo(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -2109,7 +2112,7 @@ static ftdm_status_t handle_tx_lpr(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* find the link request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while(x < (MAX_MTP_LINKS+1)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
|
||||
|
||||
/* send the uninhibit request */
|
||||
|
@ -2125,7 +2128,7 @@ static ftdm_status_t handle_tx_lpr(ftdm_stream_handle_t *stream, char *name)
|
|||
|
||||
/* move to the next link */
|
||||
x++;
|
||||
} /* while (id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKS+1)) */
|
||||
|
||||
stream->write_function(stream, "Could not find link=%s\n", name);
|
||||
|
||||
|
@ -2144,7 +2147,7 @@ static ftdm_status_t handle_status_relay(ftdm_stream_handle_t *stream, char *nam
|
|||
|
||||
/* find the channel request by it's name */
|
||||
x = 1;
|
||||
while(g_ftdm_sngss7_data.cfg.relay[x].id != 0) {
|
||||
while(x < (MAX_RELAY_CHANNELS)) {
|
||||
if (!strcasecmp(g_ftdm_sngss7_data.cfg.relay[x].name, name)) {
|
||||
|
||||
if (ftmod_ss7_relay_status(g_ftdm_sngss7_data.cfg.relay[x].id, &sta)) {
|
||||
|
@ -2168,7 +2171,7 @@ static ftdm_status_t handle_status_relay(ftdm_stream_handle_t *stream, char *nam
|
|||
/* move to the next link */
|
||||
x++;
|
||||
|
||||
} /* g_ftdm_sngss7_data.cfg.relay[x].id */
|
||||
} /* x < (MAX_RELAY_CHANNELS) */
|
||||
|
||||
success:
|
||||
return FTDM_SUCCESS;
|
||||
|
|
|
@ -85,9 +85,10 @@ int ft_to_sngss7_activate_all(void)
|
|||
int x;
|
||||
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
|
||||
while (x < (MAX_ISAPS)) {
|
||||
/* check if this link has already been actived */
|
||||
if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.isap[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE))) {
|
||||
|
||||
if (ftmod_ss7_enable_isap(x)) {
|
||||
SS7_CRITICAL("ISAP %d Enable: NOT OK\n", x);
|
||||
|
@ -101,12 +102,13 @@ int ft_to_sngss7_activate_all(void)
|
|||
} /* if !SNGSS7_ACTIVE */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) */
|
||||
} /* while (x < (MAX_ISAPS)) */
|
||||
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) {
|
||||
while (x < (MAX_NSAPS)) {
|
||||
/* check if this link has already been actived */
|
||||
if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.nsap[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE))) {
|
||||
|
||||
if (ftmod_ss7_enable_nsap(x)) {
|
||||
SS7_CRITICAL("NSAP %d Enable: NOT OK\n", x);
|
||||
|
@ -120,13 +122,14 @@ int ft_to_sngss7_activate_all(void)
|
|||
} /* if !SNGSS7_ACTIVE */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) */
|
||||
} /* while (x < (MAX_NSAPS)) */
|
||||
|
||||
if (g_ftdm_sngss7_data.cfg.mtpRoute[1].id != 0) {
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKSETS+1)) {
|
||||
/* check if this link has already been actived */
|
||||
if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE)) {
|
||||
if ((g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) &&
|
||||
(!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE))) {
|
||||
|
||||
if (ftmod_ss7_enable_mtpLinkSet(x)) {
|
||||
SS7_CRITICAL("LinkSet \"%s\" Enable: NOT OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name);
|
||||
|
@ -140,7 +143,7 @@ int ft_to_sngss7_activate_all(void)
|
|||
} /* if !SNGSS7_ACTIVE */
|
||||
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) */
|
||||
} /* while (x < (MAX_MTP_LINKSETS+1)) */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1565,6 +1565,9 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
/* throw the unblock flag */
|
||||
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_RX);
|
||||
|
||||
/* clear the block flag */
|
||||
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
|
||||
|
||||
/* set the channel to suspended state */
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -149,24 +149,19 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
|
||||
switch (sta->t.usta.alarm.cause) {
|
||||
/******************************************************************/
|
||||
case (LCM_CAUSE_UNKNOWN):
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s\n",
|
||||
buf,
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
|
||||
break;
|
||||
/******************************************************************/
|
||||
case (LCM_CAUSE_MGMT_INITIATED):
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s[MGMT] %s\n",
|
||||
buf,
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
|
||||
break;
|
||||
/******************************************************************/
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s (***unknown cause***)\n",
|
||||
buf,
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
|
||||
break;
|
||||
case (LCM_CAUSE_MGMT_INITIATED):
|
||||
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s[MGMT] cause:%s event:%s\n",
|
||||
buf,
|
||||
DECODE_LCM_CAUSE(sta->t.usta.alarm.cause),
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
|
||||
break;
|
||||
case (LCM_CAUSE_UNKNOWN):
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s cause:%s event:%s\n",
|
||||
buf,
|
||||
DECODE_LCM_CAUSE(sta->t.usta.alarm.cause),
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
|
||||
break;
|
||||
/******************************************************************/
|
||||
} /* switch (sta->t.usta.alarm.cause) */
|
||||
break;
|
||||
|
@ -175,7 +170,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -198,7 +193,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -211,7 +206,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
sprintf(buf, "[%s]", g_ftdm_sngss7_data.cfg.mtp2Link[x].name);
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s : %s\n",
|
||||
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s %s : %s\n",
|
||||
buf,
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event),
|
||||
DECODE_DISC_REASON(sta->t.usta.evntParm[1]));
|
||||
|
@ -222,7 +217,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -248,7 +243,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -271,7 +266,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
|
||||
break;
|
||||
}
|
||||
|
@ -366,7 +361,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
|
|||
|
||||
/* find the name for the sap in question */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
|
||||
while (x < (MAX_MTP_LINKS+1)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp3Link[x].id == sta->hdr.elmId.elmntInst1) {
|
||||
break;
|
||||
}
|
||||
|
@ -402,7 +397,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
|
|||
break;
|
||||
/**********************************************************************/
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP3]%s %s(%d) : %s(%d)\n",
|
||||
ftdm_log(FTDM_LOG_DEBUG,"[MTP3]%s %s(%d) : %s(%d)\n",
|
||||
buf,
|
||||
DECODE_LSN_EVENT(sta->t.usta.alarm.event),
|
||||
sta->t.usta.alarm.event,
|
||||
|
@ -421,7 +416,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
|
|||
break;
|
||||
/**************************************************************************/
|
||||
case (STLNKSET):
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP3][LNKSET:%d] %s : %s\n",
|
||||
ftdm_log(FTDM_LOG_DEBUG,"[MTP3][LNKSET:%d] %s : %s\n",
|
||||
sta->hdr.elmId.elmntInst1,
|
||||
DECODE_LSN_EVENT(sta->t.usta.alarm.event),
|
||||
DECODE_LSN_CAUSE(sta->t.usta.alarm.cause));
|
||||
|
|
|
@ -109,7 +109,15 @@ ftdm_state_map_t sangoma_ss7_state_map = {
|
|||
{FTDM_CHANNEL_STATE_RING, FTDM_END},
|
||||
{FTDM_CHANNEL_STATE_SUSPENDED, FTDM_CHANNEL_STATE_RESTART,
|
||||
FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP,
|
||||
FTDM_CHANNEL_STATE_PROGRESS, FTDM_END}
|
||||
FTDM_CHANNEL_STATE_RINGING, FTDM_CHANNEL_STATE_PROGRESS, FTDM_END}
|
||||
},
|
||||
{
|
||||
ZSD_INBOUND,
|
||||
ZSM_UNACCEPTABLE,
|
||||
{FTDM_CHANNEL_STATE_RINGING, FTDM_END},
|
||||
{FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP,
|
||||
FTDM_CHANNEL_STATE_PROGRESS, FTDM_CHANNEL_STATE_PROGRESS_MEDIA,
|
||||
FTDM_CHANNEL_STATE_UP, FTDM_END},
|
||||
},
|
||||
{
|
||||
ZSD_INBOUND,
|
||||
|
@ -609,6 +617,8 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
/* We handle RING indication the same way we would indicate PROGRESS */
|
||||
case FTDM_CHANNEL_STATE_RINGING:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS:
|
||||
|
||||
if (ftdmchan->last_state == FTDM_CHANNEL_STATE_SUSPENDED) {
|
||||
|
@ -626,7 +636,10 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
|
||||
} else {
|
||||
/* inbound call so we need to send out ACM */
|
||||
ft_to_sngss7_acm(ftdmchan);
|
||||
if (!sngss7_test_ckt_flag(sngss7_info, FLAG_SENT_ACM)) {
|
||||
sngss7_set_ckt_flag(sngss7_info, FLAG_SENT_ACM);
|
||||
ft_to_sngss7_acm(ftdmchan);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -877,6 +890,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
/* clear any call related flags */
|
||||
sngss7_clear_ckt_flag (sngss7_info, FLAG_REMOTE_REL);
|
||||
sngss7_clear_ckt_flag (sngss7_info, FLAG_LOCAL_REL);
|
||||
sngss7_clear_ckt_flag (sngss7_info, FLAG_SENT_ACM);
|
||||
|
||||
|
||||
if (ftdm_test_flag (ftdmchan, FTDM_CHANNEL_OPEN)) {
|
||||
|
@ -1049,18 +1063,20 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
}
|
||||
} /* if (sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) */
|
||||
|
||||
if ((sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED)) &&
|
||||
(ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP))) {
|
||||
if (sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing PAUSE%s\n", "");
|
||||
|
||||
/* bring the sig status down */
|
||||
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_DOWN);
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP)) {
|
||||
/* bring the sig status down */
|
||||
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_DOWN);
|
||||
}
|
||||
} /* if (sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED)) { */
|
||||
|
||||
/**********************************************************************/
|
||||
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX) &&
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_BLOCK_RX) &&
|
||||
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_BLOCK_RX flag %s\n", "");
|
||||
|
||||
/* bring the sig status down */
|
||||
|
@ -1076,8 +1092,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
goto suspend_goto_last;
|
||||
}
|
||||
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX) &&
|
||||
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX_DN)){
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX)){
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_UNBLK_RX flag %s\n", "");
|
||||
|
||||
/* clear the block flags */
|
||||
|
@ -1100,6 +1115,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
/**********************************************************************/
|
||||
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_TX) &&
|
||||
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_TX_DN)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_BLOCK_TX flag %s\n", "");
|
||||
|
||||
/* bring the sig status down */
|
||||
|
@ -1115,8 +1131,8 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
goto suspend_goto_last;
|
||||
}
|
||||
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX) &&
|
||||
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX_DN)){
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_UNBLK_TX flag %s\n", "");
|
||||
|
||||
/* clear the block flags */
|
||||
|
@ -1139,6 +1155,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
/**********************************************************************/
|
||||
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_BLOCK_RX) &&
|
||||
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_BLOCK_RX_DN)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_LC_BLOCK_RX flag %s\n", "");
|
||||
|
||||
/* send a BLA */
|
||||
|
@ -1151,8 +1168,8 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
goto suspend_goto_last;
|
||||
}
|
||||
|
||||
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX) &&
|
||||
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX_DN)) {
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_LC_UNBLK_RX)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_LC_UNBLK_RX flag %s\n", "");
|
||||
|
||||
/* clear the block flags */
|
||||
|
@ -1172,6 +1189,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
/**********************************************************************/
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_BLOCK) &&
|
||||
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_BLOCK_DN)) {
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_UCIC_BLOCK flag %s\n", "");
|
||||
|
||||
/* bring the channel signaling status to down */
|
||||
|
@ -1192,8 +1210,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
goto suspend_goto_last;
|
||||
}
|
||||
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK) &&
|
||||
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK_DN)) {
|
||||
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_UCIC_UNBLK flag %s\n", "");
|
||||
|
||||
/* remove the UCIC block flag */
|
||||
|
@ -1210,7 +1227,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
goto suspend_goto_restart;
|
||||
}
|
||||
|
||||
SS7_ERROR_CHAN(ftdmchan,"No block flag processed!%s\n", "");
|
||||
SS7_DEBUG_CHAN(ftdmchan,"No block flag processed!%s\n", "");
|
||||
|
||||
suspend_goto_last:
|
||||
state_flag = 0;
|
||||
|
@ -1370,6 +1387,9 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
|
|||
ftdm_clear_flag (span, FTDM_SPAN_STOP_THREAD);
|
||||
ftdm_clear_flag (span, FTDM_SPAN_IN_THREAD);
|
||||
|
||||
/* check the status of all isup interfaces */
|
||||
check_status_of_all_isup_intf();
|
||||
|
||||
/* throw the channels in pause */
|
||||
for (x = 1; x < (span->chan_count + 1); x++) {
|
||||
/* extract the channel structure and sngss7 channel data */
|
||||
|
@ -1632,7 +1652,7 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_ss7_unload)
|
|||
if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_RY)) {
|
||||
/* go through all the relays channels and configure it */
|
||||
x = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) {
|
||||
while (x < (MAX_RELAY_CHANNELS)) {
|
||||
/* check if this relay channel has been configured already */
|
||||
if ((g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED)) {
|
||||
|
||||
|
@ -1648,7 +1668,7 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_ss7_unload)
|
|||
g_ftdm_sngss7_data.cfg.relay[x].flags &= !SNGSS7_CONFIGURED;
|
||||
} /* if !SNGSS7_CONFIGURED */
|
||||
x++;
|
||||
} /* while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) */
|
||||
} /* while (x < (MAX_RELAY_CHANNELS)) */
|
||||
|
||||
ftmod_ss7_shutdown_relay();
|
||||
sng_isup_free_relay();
|
||||
|
|
|
@ -316,8 +316,11 @@ typedef struct sng_isup_ckt {
|
|||
uint32_t typeCntrl;
|
||||
uint32_t ssf;
|
||||
uint32_t switchType;
|
||||
|
||||
uint32_t clg_nadi;
|
||||
uint32_t cld_nadi;
|
||||
uint8_t rdnis_nadi;
|
||||
|
||||
uint32_t min_digits;
|
||||
void *obj;
|
||||
uint16_t t3;
|
||||
|
@ -503,6 +506,7 @@ typedef enum {
|
|||
FLAG_GLARE = (1 << 13),
|
||||
FLAG_INFID_RESUME = (1 << 14),
|
||||
FLAG_INFID_PAUSED = (1 << 15),
|
||||
FLAG_SENT_ACM = (1 << 16),
|
||||
FLAG_RELAY_DOWN = (1 << 30),
|
||||
FLAG_CKT_RECONFIG = (1 << 31)
|
||||
} sng_ckt_flag_t;
|
||||
|
@ -524,6 +528,7 @@ typedef enum {
|
|||
"GLARE", \
|
||||
"INF_RESUME", \
|
||||
"INF_PAUSED", \
|
||||
"TX_ACM_SENT" \
|
||||
"RELAY_DOWN", \
|
||||
"CKT_RECONFIG"
|
||||
FTDM_STR2ENUM_P(ftmod_ss7_ckt_state2flag, ftmod_ss7_ckt_flag2str, sng_ckt_flag_t)
|
||||
|
@ -784,8 +789,12 @@ uint8_t copy_cgPtyNum_from_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum
|
|||
uint8_t copy_cgPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum);
|
||||
uint8_t copy_cdPtyNum_from_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum);
|
||||
uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum);
|
||||
uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
ftdm_status_t copy_redirgNum_to_sngss7(ftdm_channel_t *ftdmchan, SiRedirNum *redirgNum);
|
||||
|
||||
|
||||
ftdm_status_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
ftdm_status_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
ftdm_status_t copy_tknStr_to_sngss7(char* str, TknStr *tknStr, TknU8 *oddEven);
|
||||
|
||||
int check_for_state_change(ftdm_channel_t *ftdmchan);
|
||||
int check_cics_in_range(sngss7_chan_data_t *sngss7_info);
|
||||
|
|
|
@ -182,8 +182,7 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
|||
/* copy down the called number information */
|
||||
copy_cdPtyNum_to_sngss7 (&ftdmchan->caller_data, &iam.cdPtyNum);
|
||||
|
||||
/* copy down the calling number information */
|
||||
|
||||
/* copy down the calling number information */
|
||||
copy_cgPtyNum_to_sngss7 (&ftdmchan->caller_data, &iam.cgPtyNum);
|
||||
|
||||
/* check if the user would like a custom NADI value for the calling Pty Num */
|
||||
|
@ -195,7 +194,7 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
|||
iam.cgPtyNum.natAddrInd.val = g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].clg_nadi;
|
||||
SS7_DEBUG_CHAN(ftdmchan,"No user supplied NADI value found for CLG, using \"%d\"\n", iam.cgPtyNum.natAddrInd.val);
|
||||
}
|
||||
|
||||
|
||||
cld_nadi = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_cld_nadi");
|
||||
if ((cld_nadi != NULL) && (*cld_nadi)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Found user supplied Called NADI value \"%s\"\n", cld_nadi);
|
||||
|
@ -244,6 +243,8 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
|||
} /* if (subAddrIE[0] != '0') */
|
||||
}
|
||||
|
||||
copy_redirgNum_to_sngss7(ftdmchan, &iam.redirgNum);
|
||||
|
||||
/* check if the user would like us to send a cld_sub-address */
|
||||
cld_subAddr = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_cld_subaddr");
|
||||
if ((cld_subAddr != NULL) && (*cld_subAddr)) {
|
||||
|
|
|
@ -43,13 +43,6 @@ uint32_t sngss7_id;
|
|||
/******************************************************************************/
|
||||
|
||||
/* PROTOTYPES *****************************************************************/
|
||||
uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
|
||||
uint8_t copy_cgPtyNum_from_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum);
|
||||
uint8_t copy_cgPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum);
|
||||
uint8_t copy_cdPtyNum_from_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum);
|
||||
uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum);
|
||||
|
||||
int check_for_state_change(ftdm_channel_t *ftdmchan);
|
||||
int check_cics_in_range(sngss7_chan_data_t *sngss7_info);
|
||||
int check_for_reset(sngss7_chan_data_t *sngss7_info);
|
||||
|
@ -134,11 +127,12 @@ uint8_t copy_cgPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum)
|
|||
cgPtyNum->niInd.val = 0x00;
|
||||
/**************************************************************************/
|
||||
cgPtyNum->addrSig.pres = PRSNT_NODEF;
|
||||
|
||||
|
||||
/* atoi will search through memory starting from the pointer it is given until
|
||||
* it finds the \0...since tmp is on the stack it will start going through the
|
||||
* possibly causing corruption. Hard code a \0 to prevent this
|
||||
*/
|
||||
|
||||
tmp[1] = '\0';
|
||||
k = 0;
|
||||
j = 0;
|
||||
|
@ -334,8 +328,68 @@ uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
|
||||
ftdm_status_t copy_redirgNum_to_sngss7(ftdm_channel_t *ftdmchan, SiRedirNum *redirgNum)
|
||||
{
|
||||
const char* val = NULL;
|
||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||
ftdm_caller_data_t *caller_data = &ftdmchan->caller_data;
|
||||
uint8_t len = strlen(caller_data->rdnis.digits);
|
||||
if (!len) {
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Redirecting Number %s\n", caller_data->rdnis.digits);
|
||||
|
||||
redirgNum->eh.pres = PRSNT_NODEF;
|
||||
|
||||
/* Nature of address indicator */
|
||||
redirgNum->natAddr.pres = PRSNT_NODEF;
|
||||
|
||||
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_rdnis_nadi");
|
||||
if (!ftdm_strlen_zero(val)) {
|
||||
redirgNum->natAddr.val = atoi(val);
|
||||
} else {
|
||||
redirgNum->natAddr.val = g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].rdnis_nadi;
|
||||
}
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Redirecting Number NADI:%d\n", redirgNum->natAddr.val);
|
||||
|
||||
/* Screening indicator */
|
||||
redirgNum->scrInd.pres = PRSNT_NODEF;
|
||||
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_rdnis_screen_ind");
|
||||
if (!ftdm_strlen_zero(val)) {
|
||||
redirgNum->scrInd.val = atoi(val);
|
||||
} else {
|
||||
redirgNum->scrInd.val = FTDM_SCREENING_VERIFIED_PASSED;
|
||||
}
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Redirecting Number Screening Ind:%d\n", redirgNum->scrInd.val);
|
||||
|
||||
/* Address presentation restricted ind */
|
||||
redirgNum->presRest.pres = PRSNT_NODEF;
|
||||
|
||||
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_rdnis_pres_ind");
|
||||
if (!ftdm_strlen_zero(val)) {
|
||||
redirgNum->presRest.val = atoi(val);
|
||||
} else {
|
||||
redirgNum->presRest.val = FTDM_PRES_ALLOWED;
|
||||
}
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Redirecting Number Address Presentation Restricted Ind:%d\n", redirgNum->presRest.val);
|
||||
|
||||
/* Numbering plan */
|
||||
redirgNum->numPlan.pres = PRSNT_NODEF;
|
||||
|
||||
val = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_rdnis_plan");
|
||||
if (!ftdm_strlen_zero(val)) {
|
||||
redirgNum->numPlan.val = atoi(val);
|
||||
} else {
|
||||
redirgNum->numPlan.val = caller_data->rdnis.plan;
|
||||
}
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Redirecting Number Numbering plan:%d\n", redirgNum->numPlan.val);
|
||||
|
||||
return copy_tknStr_to_sngss7(caller_data->rdnis.digits, &redirgNum->addrSig, &redirgNum->oddEven);
|
||||
}
|
||||
|
||||
ftdm_status_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t j;
|
||||
|
@ -362,14 +416,14 @@ uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
|||
|
||||
} else {
|
||||
SS7_ERROR("Asked to copy tknStr that is not present!\n");
|
||||
return 1;
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
ftdm_status_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
@ -382,7 +436,7 @@ uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
|||
/* confirm that we found an acceptable length */
|
||||
if ( j > 25 ) {
|
||||
SS7_ERROR("string length exceeds maxium value...aborting append!\n");
|
||||
return 1;
|
||||
return FTDM_FAIL;
|
||||
} /* if ( j > 25 ) */
|
||||
|
||||
/* copy in digits */
|
||||
|
@ -405,12 +459,100 @@ uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
|||
} /* if ((oddEven.pres == 1) && (oddEven.val == 1)) */
|
||||
} else {
|
||||
SS7_ERROR("Asked to copy tknStr that is not present!\n");
|
||||
return 1;
|
||||
return FTDM_FAIL;
|
||||
} /* if (str.pres == 1) */
|
||||
|
||||
return 0;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ftdm_status_t copy_tknStr_to_sngss7(char* val, TknStr *tknStr, TknU8 *oddEven)
|
||||
{
|
||||
char tmp[2];
|
||||
int k = 0;
|
||||
int j = 0;
|
||||
uint8_t flag = 0;
|
||||
uint8_t odd = 0;
|
||||
|
||||
uint8_t lower = 0x0;
|
||||
uint8_t upper = 0x0;
|
||||
|
||||
tknStr->pres = PRSNT_NODEF;
|
||||
|
||||
/* atoi will search through memory starting from the pointer it is given until
|
||||
* it finds the \0...since tmp is on the stack it will start going through the
|
||||
* possibly causing corruption. Hard code a \0 to prevent this
|
||||
*/
|
||||
tmp[1] = '\0';
|
||||
|
||||
while (1) {
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = val[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isxdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
|
||||
/* move on to the next value */
|
||||
k++;
|
||||
tmp[0] = val[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
/* push it into the lower nibble */
|
||||
lower = strtol(&tmp[0], (char **)NULL, 16);
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = val[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isxdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
|
||||
k++;
|
||||
tmp[0] = val[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
/* push the digit into the upper nibble */
|
||||
upper = (strtol(&tmp[0], (char **)NULL, 16)) << 4;
|
||||
} else {
|
||||
/* there is no upper ... fill in 0 */
|
||||
upper = 0x0;
|
||||
/* throw the odd flag */
|
||||
odd = 1;
|
||||
/* throw the end flag */
|
||||
flag = 1;
|
||||
} /* if (tmp != '\0') */
|
||||
} else {
|
||||
/* keep the odd flag down */
|
||||
odd = 0;
|
||||
/* break right away since we don't need to write the digits */
|
||||
break;
|
||||
}
|
||||
|
||||
/* push the digits into the trillium structure */
|
||||
tknStr->val[j] = upper | lower;
|
||||
|
||||
/* increment the trillium pointer */
|
||||
j++;
|
||||
|
||||
/* if the flag is up we're through all the digits */
|
||||
if (flag) break;
|
||||
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
} /* while(1) */
|
||||
|
||||
tknStr->len = j;
|
||||
oddEven->pres = PRSNT_NODEF;
|
||||
oddEven->val = odd;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
int check_for_state_change(ftdm_channel_t *ftdmchan)
|
||||
{
|
||||
|
@ -1319,7 +1461,7 @@ ftdm_status_t check_status_of_all_isup_intf(void)
|
|||
|
||||
/* go through all the isupIntfs and ask the stack to give their current state */
|
||||
x = 1;
|
||||
for (x = 1; x < (MAX_ISUP_INFS + 1); x++) {
|
||||
for (x = 1; x < (MAX_ISUP_INFS); x++) {
|
||||
/**************************************************************************/
|
||||
|
||||
if (g_ftdm_sngss7_data.cfg.isupIntf[x].id == 0) continue;
|
||||
|
@ -1376,7 +1518,7 @@ ftdm_status_t check_status_of_all_isup_intf(void)
|
|||
} /* switch (status) */
|
||||
|
||||
/**************************************************************************/
|
||||
} /* for (x = 1; x < MAX_ISUP_INFS + 1); i++) */
|
||||
} /* for (x = 1; x < MAX_ISUP_INFS); i++) */
|
||||
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ typedef struct sng_ccSpan
|
|||
uint32_t ssf;
|
||||
uint32_t clg_nadi;
|
||||
uint32_t cld_nadi;
|
||||
uint32_t rdnis_nadi;
|
||||
uint32_t min_digits;
|
||||
uint32_t t3;
|
||||
uint32_t t12;
|
||||
|
@ -1215,7 +1216,7 @@ static int ftmod_ss7_parse_mtp_linkset(ftdm_conf_node_t *mtp_linkset)
|
|||
|
||||
/* go through all the mtp3 links and fill in the apc */
|
||||
i = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp3Link[i].id != 0) {
|
||||
while (i < (MAX_MTP_LINKS)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtp3Link[i].linkSetId == mtpLinkSet.id) {
|
||||
g_ftdm_sngss7_data.cfg.mtp3Link[i].apc = mtpLinkSet.apc;
|
||||
}
|
||||
|
@ -1757,7 +1758,7 @@ static int ftmod_ss7_parse_isup_interface(ftdm_conf_node_t *isup_interface)
|
|||
/**************************************************************************/
|
||||
/* go through all the links and check if they belong to this linkset*/
|
||||
i = 1;
|
||||
while (g_ftdm_sngss7_data.cfg.mtp3Link[i].id != 0) {
|
||||
while (i < (MAX_MTP_LINKS)) {
|
||||
/* check if this link is in the linkset */
|
||||
if (g_ftdm_sngss7_data.cfg.mtp3Link[i].linkSetId == lnkSet->lsId) {
|
||||
/* fill in the spc */
|
||||
|
@ -1841,6 +1842,7 @@ static int ftmod_ss7_parse_cc_span(ftdm_conf_node_t *cc_span)
|
|||
int num_parms = cc_span->n_parameters;
|
||||
int flag_clg_nadi = 0;
|
||||
int flag_cld_nadi = 0;
|
||||
int flag_rdnis_nadi = 0;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
|
@ -1891,28 +1893,6 @@ static int ftmod_ss7_parse_cc_span(ftdm_conf_node_t *cc_span)
|
|||
SS7_DEBUG("Found an ccSpan typeCntrl = %s\n", sng_cic_cntrl_type_map[ret].sng_type);
|
||||
}
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "ssf")) {
|
||||
/**********************************************************************/
|
||||
ret = find_ssf_type_in_map(parm->val);
|
||||
if (ret == -1) {
|
||||
SS7_ERROR("Found an invalid ccSpan ssf = %s\n", parm->var);
|
||||
return FTDM_FAIL;
|
||||
} else {
|
||||
sng_ccSpan.ssf = sng_ssf_type_map[ret].tril_type;
|
||||
SS7_DEBUG("Found an ccSpan ssf = %s\n", sng_ssf_type_map[ret].sng_type);
|
||||
}
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "switchType")) {
|
||||
/**********************************************************************/
|
||||
ret = find_switch_type_in_map(parm->val);
|
||||
if (ret == -1) {
|
||||
SS7_ERROR("Found an invalid ccSpan switchType = %s\n", parm->var);
|
||||
return FTDM_FAIL;
|
||||
} else {
|
||||
sng_ccSpan.switchType = sng_switch_type_map[ret].tril_isup_type;
|
||||
SS7_DEBUG("Found an ccSpan switchType = %s\n", sng_switch_type_map[ret].sng_type);
|
||||
}
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "cicbase")) {
|
||||
/**********************************************************************/
|
||||
sng_ccSpan.cicbase = atoi(parm->val);
|
||||
|
@ -1934,16 +1914,17 @@ static int ftmod_ss7_parse_cc_span(ftdm_conf_node_t *cc_span)
|
|||
flag_clg_nadi = 1;
|
||||
sng_ccSpan.clg_nadi = atoi(parm->val);
|
||||
SS7_DEBUG("Found default CLG_NADI parm->value = %d\n", sng_ccSpan.clg_nadi);
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "cld_nadi")) {
|
||||
/**********************************************************************/
|
||||
/* throw the flag so that we know we got this optional parameter */
|
||||
flag_cld_nadi = 1;
|
||||
sng_ccSpan.cld_nadi = atoi(parm->val);
|
||||
SS7_DEBUG("Found default CLD_NADI parm->value = %d\n", sng_ccSpan.cld_nadi);
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "rdnis_nadi")) {
|
||||
/* throw the flag so that we know we got this optional parameter */
|
||||
flag_rdnis_nadi = 1;
|
||||
sng_ccSpan.rdnis_nadi = atoi(parm->val);
|
||||
SS7_DEBUG("Found default RDNIS_NADI parm->value = %d\n", sng_ccSpan.rdnis_nadi);
|
||||
} else if (!strcasecmp(parm->var, "obci_bita")) {
|
||||
/**********************************************************************/
|
||||
if (*parm->val == '1') {
|
||||
sngss7_set_options(&sng_ccSpan, SNGSS7_ACM_OBCI_BITA);
|
||||
SS7_DEBUG("Found Optional Backwards Indicator: Bit A (early media) enable option\n");
|
||||
|
@ -2034,6 +2015,15 @@ static int ftmod_ss7_parse_cc_span(ftdm_conf_node_t *cc_span)
|
|||
sng_ccSpan.clg_nadi = 0x03;
|
||||
}
|
||||
|
||||
if (!flag_rdnis_nadi) {
|
||||
/* default the nadi value to national */
|
||||
sng_ccSpan.rdnis_nadi = 0x03;
|
||||
}
|
||||
|
||||
/* pull up the SSF and Switchtype from the isup interface */
|
||||
sng_ccSpan.ssf = g_ftdm_sngss7_data.cfg.isupIntf[sng_ccSpan.isupInf].ssf;
|
||||
sng_ccSpan.switchType = g_ftdm_sngss7_data.cfg.isupIntf[sng_ccSpan.isupInf].switchType;
|
||||
|
||||
/* add this span to our global listing */
|
||||
ftmod_ss7_fill_in_ccSpan(&sng_ccSpan);
|
||||
|
||||
|
@ -2461,7 +2451,7 @@ static int ftmod_ss7_fill_in_self_route(int spc, int linkType, int switchType, i
|
|||
{
|
||||
int i = 1;
|
||||
|
||||
while (g_ftdm_sngss7_data.cfg.mtpRoute[i].id != 0) {
|
||||
while (i < (MAX_MTP_ROUTES)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtpRoute[i].dpc == spc) {
|
||||
/* we have a match so break out of this loop */
|
||||
break;
|
||||
|
@ -2471,6 +2461,16 @@ static int ftmod_ss7_fill_in_self_route(int spc, int linkType, int switchType, i
|
|||
}
|
||||
|
||||
if (g_ftdm_sngss7_data.cfg.mtpRoute[i].id == 0) {
|
||||
/* this is a new route...find the first free spot */
|
||||
i = 1;
|
||||
while (i < (MAX_MTP_ROUTES)) {
|
||||
if (g_ftdm_sngss7_data.cfg.mtpRoute[i].id == 0) {
|
||||
/* we have a match so break out of this loop */
|
||||
break;
|
||||
}
|
||||
/* move on to the next one */
|
||||
i++;
|
||||
}
|
||||
g_ftdm_sngss7_data.cfg.mtpRoute[i].id = i;
|
||||
SS7_DEBUG("found new mtp3 self route\n");
|
||||
} else {
|
||||
|
@ -2909,6 +2909,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
|
|||
g_ftdm_sngss7_data.cfg.isupCkt[x].ssf = ccSpan->ssf;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].cld_nadi = ccSpan->cld_nadi;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].clg_nadi = ccSpan->clg_nadi;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].rdnis_nadi = ccSpan->rdnis_nadi;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].options = ccSpan->options;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].switchType = ccSpan->switchType;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].min_digits = ccSpan->min_digits;
|
||||
|
|
|
@ -417,6 +417,8 @@ SWITCH_DECLARE(switch_xml_section_t) switch_xml_parse_section_string(_In_opt_z_
|
|||
|
||||
SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
///\}
|
||||
#endif // _SWITCH_XML_H
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<menus>
|
||||
<menu name="std_authenticate">
|
||||
<phrases>
|
||||
<phrase name="fail_auth" value="protovm_fail_auth" />
|
||||
<phrase name="fail_auth" value="fail_auth@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
</keys>
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
<menu name="std_authenticate_ask_user">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_enter_id" />
|
||||
<phrase name="instructions" value="enter_id@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" /> <!-- TODO Make the ivrengine: parsed and the key configurable -->
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
<menu name="std_authenticate_ask_password">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_enter_pass" />
|
||||
<phrase name="instructions" value="enter_pass@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" /> <!-- TODO Make the ivrengine: parsed and the key configurable -->
|
||||
|
@ -43,12 +43,12 @@
|
|||
|
||||
<menu name="std_navigator">
|
||||
<phrases>
|
||||
<phrase name="msg_count" value="protovm_message_count" />
|
||||
<phrase name="say_date" value="protovm_say_date_event" />
|
||||
<phrase name="say_msg_number" value="protovm_say_message_number" />
|
||||
<phrase name="menu_options" value="protovm_listen_file_check" />
|
||||
<phrase name="ack" value="protovm_ack" />
|
||||
<phrase name="play_message" value="protovm_play_message" />
|
||||
<phrase name="msg_count" value="message_count@protovm" />
|
||||
<phrase name="say_date" value="say_date_event@protovm" />
|
||||
<phrase name="say_msg_number" value="say_message_number@protovm" />
|
||||
<phrase name="menu_options" value="listen_file_check@protovm" />
|
||||
<phrase name="ack" value="ack@protovm" />
|
||||
<phrase name="play_message" value="play_message@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="skip_intro" variable="VM-Key-Main-Listen-File" />
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
<menu name="std_preference">
|
||||
<phrases>
|
||||
<phrase name="menu_options" value="protovm_config_menu" />
|
||||
<phrase name="menu_options" value="config_menu@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="menu:std_record_greeting_with_slot" variable="VM-Key-Record-Greeting" />
|
||||
|
@ -75,9 +75,9 @@
|
|||
|
||||
<menu name="std_record_greeting">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="voicemail_record_greeting" />
|
||||
<phrase name="play_recording" value="protovm_play_recording" />
|
||||
<phrase name="menu_options" value="protovm_record_file_check" />
|
||||
<phrase name="instructions" value="record_greeting@protovm" />
|
||||
<phrase name="play_recording" value="play_recording@protovm" />
|
||||
<phrase name="menu_options" value="record_file_check@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
|
||||
|
@ -90,9 +90,9 @@
|
|||
|
||||
<menu name="std_record_name">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_record_name" />
|
||||
<phrase name="play_recording" value="protovm_play_recording" />
|
||||
<phrase name="menu_options" value="protovm_record_file_check" />
|
||||
<phrase name="instructions" value="record_name@protovm" />
|
||||
<phrase name="play_recording" value="play_recording@protovm" />
|
||||
<phrase name="menu_options" value="record_file_check@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
|
||||
|
@ -106,9 +106,9 @@
|
|||
|
||||
<menu name="std_select_greeting_slot">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_choose_greeting" />
|
||||
<phrase name="invalid_slot" value="protovm_choose_greeting_fail" />
|
||||
<phrase name="selected_slot" value="protovm_greeting_selected" />
|
||||
<phrase name="instructions" value="choose_greeting@protovm" />
|
||||
<phrase name="invalid_slot" value="choose_greeting_fail@protovm" />
|
||||
<phrase name="selected_slot" value="greeting_selected@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
</keys>
|
||||
|
@ -116,7 +116,7 @@
|
|||
|
||||
<menu name="std_record_greeting_with_slot">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_choose_greeting" />
|
||||
<phrase name="instructions" value="choose_greeting@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
</keys>
|
||||
|
@ -124,7 +124,7 @@
|
|||
|
||||
<menu name="std_set_password">
|
||||
<phrases>
|
||||
<phrase name="instructions" value="protovm_enter_pass" />
|
||||
<phrase name="instructions" value="enter_pass@protovm" />
|
||||
</phrases>
|
||||
<keys>
|
||||
</keys>
|
||||
|
|
|
@ -1,375 +1,376 @@
|
|||
<include><!--This line will be ignored it's here to validate the xml and is optional -->
|
||||
<macro name="protovm_press_key">
|
||||
<input pattern="^(.*):(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="$2"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_plurial_msg">
|
||||
<input pattern="^[01]:(.*):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="$1"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^.*:(.*):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="$2"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_enter_id">
|
||||
<input pattern="(.+)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
|
||||
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
</macro>
|
||||
<macros name="protovm" sound-prefix="$${sounds_dir}/fr/ca/june">
|
||||
<macro name="press_key">
|
||||
<input pattern="^(.*):(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="$2"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="protovm_enter_pass">
|
||||
<input pattern="(.+)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
|
||||
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
|
||||
</nomatch>
|
||||
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_fail_auth">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-fail_auth.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_hello">
|
||||
<input>
|
||||
<match>
|
||||
<!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_goodbye">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-goodbye.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_abort">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-abort.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_message_count">
|
||||
<input field="${VM-Total-New-Urgent-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Urgent-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-urgent-new.wav"/>
|
||||
<action function="phrase" phrase="voicemail_plurial_msg" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input field="${VM-Total-New-Messages}" pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-new.wav"/>
|
||||
<action function="phrase" phrase="voicemail_plurial_msg" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="play-file" data="currency/and.wav"/>
|
||||
<action function="say" data="${VM-Total-Saved-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-saved.wav"/>
|
||||
<action function="phrase" phrase="voicemail_plurial_msg" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_menu">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Play-New-Messages}:voicemail/vm-listen_new.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Play-Saved-Messages}:voicemail/vm-listen_saved.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Config-Menu}:voicemail/vm-advanced.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Terminator}:voicemail/vm-to_exit.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_config_menu">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Record-Greeting}:voicemail/vm-to_record_greeting.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Choose-Greeting}:voicemail/vm-choose_greeting.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Record-Name}:voicemail/vm-record_name2.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Change-Password}:voicemail/vm-change_password.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Menu}:voicemail/vm-main_menu.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_record_name">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_name1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_record_file_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Save-File}:voicemail/vm-save_recording.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Record-File}:voicemail/vm-rerecord.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_record_urgent_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Urgent}:voicemail/vm-mark-urgent.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Terminator}:voicemail/vm-continue.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_forward_prepend">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_forward_message_enter_extension">
|
||||
<input pattern="^([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-followed_by.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_invalid_extension">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_listen_file_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Next-Msg}:voicemail/vm-for_next_msg.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Save-File}:voicemail/vm-save_recording.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Delete-File}:voicemail/vm-delete_recording.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input field="${VM-Message-Email}" pattern="^$">
|
||||
<nomatch>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Email}:voicemail/vm-forward_to_email.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Callback}:voicemail/vm-return_call.wav"/>
|
||||
<action function="phrase" phrase="voicemail_press_key" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_choose_greeting">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_choose_greeting_fail">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_record_greeting">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_greeting.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_record_message">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_message.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_greeting_selected">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-greeting.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-selected.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_play_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-person.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-not_available.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_number">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_message_number">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-${VM-Message-Type}.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-message_number.wav"/>
|
||||
<action function="say" data="${VM-Message-Number}" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_phone_number">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_name">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
|
||||
<macro name="protovm_ack">
|
||||
<input pattern="^(too-small)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-too-small.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(undeleted)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(deleted)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(saved)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(emailed)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(marked-urgent)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_date">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="short_date_time"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_say_date_event">
|
||||
<input>
|
||||
<match>
|
||||
<action function="say" data="${VM-Message-Received-Epoch}" method="pronounced" type="short_date_time"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_play_message">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="${VM-Message-File-Path}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_play_recording">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="${VM-Record-File-Path}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="plurial_msg">
|
||||
<input pattern="^[01]:(.*):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="$1"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^.*:(.*):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="$2"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="protovm_disk_quota_exceeded">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
|
||||
</match>
|
||||
<macro name="enter_id">
|
||||
<input pattern="(.+)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
|
||||
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="enter_pass">
|
||||
<input pattern="(.+)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
|
||||
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
|
||||
</nomatch>
|
||||
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="fail_auth">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-fail_auth.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="hello">
|
||||
<input>
|
||||
<match>
|
||||
<!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="goodbye">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-goodbye.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="abort">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-abort.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="message_count">
|
||||
<input field="${VM-Total-New-Urgent-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Urgent-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-urgent-new.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@protovm" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input field="${VM-Total-New-Messages}" pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-new.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@protovm" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="play-file" data="currency/and.wav"/>
|
||||
<action function="say" data="${VM-Total-Saved-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-saved.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@protovm" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="menu">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Play-New-Messages}:voicemail/vm-listen_new.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Play-Saved-Messages}:voicemail/vm-listen_saved.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Config-Menu}:voicemail/vm-advanced.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Terminator}:voicemail/vm-to_exit.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="config_menu">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Record-Greeting}:voicemail/vm-to_record_greeting.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Choose-Greeting}:voicemail/vm-choose_greeting.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Record-Name}:voicemail/vm-record_name2.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Change-Password}:voicemail/vm-change_password.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Menu}:voicemail/vm-main_menu.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="record_name">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_name1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="record_file_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Save-File}:voicemail/vm-save_recording.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Record-File}:voicemail/vm-rerecord.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="record_urgent_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Urgent}:voicemail/vm-mark-urgent.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Terminator}:voicemail/vm-continue.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="forward_prepend">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="forward_message_enter_extension">
|
||||
<input pattern="^([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-followed_by.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="invalid_extension">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="listen_file_check">
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Next-Msg}:voicemail/vm-for_next_msg.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Save-File}:voicemail/vm-save_recording.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Delete-File}:voicemail/vm-delete_recording.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input field="${VM-Message-Email}" pattern="^$">
|
||||
<nomatch>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Email}:voicemail/vm-forward_to_email.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Callback}:voicemail/vm-return_call.wav"/>
|
||||
<action function="phrase" phrase="press_key@protovm" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="choose_greeting">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="choose_greeting_fail">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="record_greeting">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_greeting.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="record_message">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_message.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="greeting_selected">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-greeting.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-selected.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="play_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-person.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-not_available.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_number">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_message_number">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-${VM-Message-Type}.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-message_number.wav"/>
|
||||
<action function="say" data="${VM-Message-Number}" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_phone_number">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_name">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
|
||||
<macro name="ack">
|
||||
<input pattern="^(too-small)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-too-small.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(undeleted)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(deleted)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(saved)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(emailed)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(marked-urgent)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_date">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="short_date_time"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="say_date_event">
|
||||
<input>
|
||||
<match>
|
||||
<action function="say" data="${VM-Message-Received-Epoch}" method="pronounced" type="short_date_time"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="play_message">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="${VM-Message-File-Path}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="play_recording">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="${VM-Record-File-Path}"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="disk_quota_exceeded">
|
||||
<input>
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
</macros>
|
||||
</include><!--This line will be ignored it's here to validate the xml and is optional -->
|
||||
|
|
|
@ -12688,6 +12688,18 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_clean_string(char * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_clean_name_string(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
result = (char *)switch_clean_name_string(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_safe_strdup(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -25903,7 +25915,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_create_json(void * jarg1, char *
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_create_brackets(char * jarg1, char jarg2, char jarg3, char jarg4, void * jarg5, void * jarg6) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_create_brackets(char * jarg1, char jarg2, char jarg3, char jarg4, void * jarg5, void * jarg6, int jarg7) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char arg2 ;
|
||||
|
@ -25911,6 +25923,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_create_brackets(char * jarg1, cha
|
|||
char arg4 ;
|
||||
switch_event_t **arg5 = (switch_event_t **) 0 ;
|
||||
char **arg6 = (char **) 0 ;
|
||||
switch_bool_t arg7 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
|
@ -25919,7 +25932,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_create_brackets(char * jarg1, cha
|
|||
arg4 = (char)jarg4;
|
||||
arg5 = (switch_event_t **)jarg5;
|
||||
arg6 = (char **)jarg6;
|
||||
result = (switch_status_t)switch_event_create_brackets(arg1,arg2,arg3,arg4,arg5,arg6);
|
||||
arg7 = (switch_bool_t)jarg7;
|
||||
result = (switch_status_t)switch_event_create_brackets(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
|
|
@ -2945,6 +2945,11 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_clean_name_string(string s) {
|
||||
string ret = freeswitchPINVOKE.switch_clean_name_string(s);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_safe_strdup(string it) {
|
||||
string ret = freeswitchPINVOKE.switch_safe_strdup(it);
|
||||
return ret;
|
||||
|
@ -3970,8 +3975,8 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_event_create_brackets(string data, char a, char b, char c, SWIGTYPE_p_p_switch_event arg4, ref string new_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_event_create_brackets(data, a, b, c, SWIGTYPE_p_p_switch_event.getCPtr(arg4), ref new_data);
|
||||
public static switch_status_t switch_event_create_brackets(string data, char a, char b, char c, SWIGTYPE_p_p_switch_event arg4, ref string new_data, switch_bool_t dup) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_event_create_brackets(data, a, b, c, SWIGTYPE_p_p_switch_event.getCPtr(arg4), ref new_data, (int)dup);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -8827,6 +8832,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_clean_string")]
|
||||
public static extern string switch_clean_string(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_clean_name_string")]
|
||||
public static extern string switch_clean_name_string(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_safe_strdup")]
|
||||
public static extern string switch_safe_strdup(string jarg1);
|
||||
|
||||
|
@ -12017,7 +12025,7 @@ class freeswitchPINVOKE {
|
|||
public static extern int switch_event_create_json(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_create_brackets")]
|
||||
public static extern int switch_event_create_brackets(string jarg1, char jarg2, char jarg3, char jarg4, HandleRef jarg5, ref string jarg6);
|
||||
public static extern int switch_event_create_brackets(string jarg1, char jarg2, char jarg3, char jarg4, HandleRef jarg5, ref string jarg6, int jarg7);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_running")]
|
||||
public static extern int switch_event_running();
|
||||
|
|
|
@ -50,7 +50,8 @@ typedef enum {
|
|||
XML_LDAP_CONFIG = 0,
|
||||
XML_LDAP_DIRECTORY,
|
||||
XML_LDAP_DIALPLAN,
|
||||
XML_LDAP_PHRASE
|
||||
XML_LDAP_PHRASE,
|
||||
XML_LDAP_LANGUAGE
|
||||
} xml_ldap_query_type_t;
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_ldap_load);
|
||||
|
@ -247,6 +248,8 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
|
|||
query_type = XML_LDAP_DIALPLAN;
|
||||
} else if (!strcmp(section, "phrases")) {
|
||||
query_type = XML_LDAP_PHRASE;
|
||||
} else if (!strcmp(section, "languages")) {
|
||||
query_type = XML_LDAP_LANGUAGE;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid section\n");
|
||||
return NULL;
|
||||
|
@ -269,6 +272,7 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
|
|||
|
||||
case XML_LDAP_DIALPLAN:
|
||||
case XML_LDAP_PHRASE:
|
||||
case XML_LDAP_LANGUAGE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +330,7 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
|
|||
break;
|
||||
|
||||
case XML_LDAP_PHRASE:
|
||||
case XML_LDAP_LANGUAGE:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
|
130
src/switch_ivr.c
130
src/switch_ivr.c
|
@ -29,6 +29,7 @@
|
|||
* Matt Klein <mklein@nmedia.net>
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Ken Rice <krice at suspicious dot org>
|
||||
* Marc Olivier Chouinard <mochouinard@moctel.com>
|
||||
*
|
||||
* switch_ivr.c -- IVR Library
|
||||
*
|
||||
|
@ -2327,9 +2328,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
|
|||
switch_say_interface_t *si;
|
||||
switch_channel_t *channel;
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
const char *save_path = NULL, *chan_lang = NULL, *lang = NULL, *lname = NULL, *sound_path = NULL;
|
||||
const char *save_path = NULL, *chan_lang = NULL, *lang = NULL, *sound_path = NULL;
|
||||
switch_event_t *hint_data;
|
||||
switch_xml_t cfg, xml = NULL, language, macros;
|
||||
switch_xml_t cfg, xml = NULL, language = NULL, macros = NULL, phrases = NULL;
|
||||
char *p;
|
||||
|
||||
switch_assert(session);
|
||||
|
@ -2341,6 +2342,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
|
|||
}
|
||||
|
||||
if (module_name) {
|
||||
char *p;
|
||||
p = switch_core_session_strdup(session, module_name);
|
||||
module_name = p;
|
||||
|
||||
|
@ -2371,58 +2373,35 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
|
|||
switch_event_add_header_string(hint_data, SWITCH_STACK_BOTTOM, "lang", chan_lang);
|
||||
switch_channel_event_set_data(channel, hint_data);
|
||||
|
||||
if (switch_xml_locate("phrases", NULL, NULL, NULL, &xml, &cfg, hint_data, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of phrases failed.\n");
|
||||
if (switch_xml_locate_language(&xml, &cfg, hint_data, &language, &phrases, ¯os, chan_lang) != SWITCH_STATUS_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(macros = switch_xml_child(cfg, "macros"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macros tag.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(language = switch_xml_child(macros, "language"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language tag.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (language) {
|
||||
if ((lname = (char *) switch_xml_attr(language, "name")) && !strcasecmp(lname, chan_lang)) {
|
||||
const char *tmp;
|
||||
|
||||
if ((tmp = switch_xml_attr(language, "module"))) {
|
||||
module_name = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
language = language->next;
|
||||
}
|
||||
|
||||
if (!language) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language %s.\n", chan_lang);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!module_name) {
|
||||
if ((p = (char *) switch_xml_attr(language, "say-module"))) {
|
||||
module_name = switch_core_session_strdup(session, p);
|
||||
} else if ((p = (char *) switch_xml_attr(language, "module"))) {
|
||||
module_name = switch_core_session_strdup(session, p);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Deprecated usage of module attribute\n");
|
||||
} else {
|
||||
module_name = chan_lang;
|
||||
}
|
||||
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-prefix"))) {
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
}
|
||||
}
|
||||
|
||||
save_path = switch_channel_get_variable(channel, "sound_prefix");
|
||||
|
||||
if (sound_path) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", sound_path);
|
||||
p = switch_core_session_strdup(session, sound_path);
|
||||
sound_path = p;
|
||||
if (channel) {
|
||||
const char *p = switch_channel_get_variable(channel, "sound_prefix_enforced");
|
||||
if (!switch_true(p)) {
|
||||
save_path = switch_channel_get_variable(channel, "sound_prefix");
|
||||
if (sound_path) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", sound_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xml) {
|
||||
switch_xml_free(xml);
|
||||
}
|
||||
|
||||
if ((si = switch_loadable_module_get_say_interface(module_name))) {
|
||||
/* should go back and proto all the say mods to const.... */
|
||||
switch_say_args_t say_args = {0};
|
||||
|
@ -2446,7 +2425,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
|
|||
if (save_path) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", save_path);
|
||||
}
|
||||
|
||||
|
||||
if (xml) {
|
||||
switch_xml_free(xml);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2463,9 +2446,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say_string(switch_core_session_t *ses
|
|||
switch_say_interface_t *si;
|
||||
switch_channel_t *channel = NULL;
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
const char *save_path = NULL, *chan_lang = NULL, *lname = NULL, *sound_path = NULL;
|
||||
const char *save_path = NULL, *chan_lang = NULL, *sound_path = NULL;
|
||||
switch_event_t *hint_data;
|
||||
switch_xml_t cfg, xml = NULL, language, macros;
|
||||
switch_xml_t cfg, xml = NULL, language = NULL, macros = NULL, phrases = NULL;
|
||||
|
||||
if (session) {
|
||||
channel = switch_core_session_get_channel(session);
|
||||
|
@ -2498,52 +2481,31 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say_string(switch_core_session_t *ses
|
|||
switch_channel_event_set_data(channel, hint_data);
|
||||
}
|
||||
|
||||
if (switch_xml_locate("phrases", NULL, NULL, NULL, &xml, &cfg, hint_data, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of phrases failed.\n");
|
||||
if (switch_xml_locate_language(&xml, &cfg, hint_data, &language, &phrases, ¯os, chan_lang) != SWITCH_STATUS_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(macros = switch_xml_child(cfg, "macros"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macros tag.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(language = switch_xml_child(macros, "language"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language tag.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (language) {
|
||||
if ((lname = (char *) switch_xml_attr(language, "name")) && !strcasecmp(lname, chan_lang)) {
|
||||
const char *tmp;
|
||||
|
||||
if ((tmp = switch_xml_attr(language, "module"))) {
|
||||
module_name = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
language = language->next;
|
||||
}
|
||||
|
||||
if (!language) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language %s.\n", chan_lang);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!module_name) {
|
||||
if ((module_name = switch_xml_attr(language, "say-module"))) {
|
||||
} else if ((module_name = switch_xml_attr(language, "module"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Deprecated usage of module attribute\n");
|
||||
} else {
|
||||
module_name = chan_lang;
|
||||
}
|
||||
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-prefix"))) {
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
}
|
||||
}
|
||||
|
||||
if (channel) {
|
||||
save_path = switch_channel_get_variable(channel, "sound_prefix");
|
||||
}
|
||||
|
||||
if (sound_path && channel) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", sound_path);
|
||||
const char *p = switch_channel_get_variable(channel, "sound_prefix_enforced");
|
||||
if (!switch_true(p)) {
|
||||
save_path = switch_channel_get_variable(channel, "sound_prefix");
|
||||
if (sound_path) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", sound_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((si = switch_loadable_module_get_say_interface(module_name))) {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* Neal Horman <neal at wanlink dot com>
|
||||
* Matt Klein <mklein@nmedia.net>
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Marc Olivier Chouinard <mochouinard@moctel.com>
|
||||
*
|
||||
* switch_ivr_play_say.c -- IVR Library (functions to play or say audio)
|
||||
*
|
||||
|
@ -39,8 +40,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
switch_input_args_t *args)
|
||||
{
|
||||
switch_event_t *hint_data;
|
||||
switch_xml_t cfg, xml = NULL, language, macros, macro, input, action;
|
||||
char *lname = NULL, *mname = NULL;
|
||||
switch_xml_t cfg, xml = NULL, language = NULL, macros = NULL, phrases = NULL, macro, input, action;
|
||||
switch_status_t status = SWITCH_STATUS_GENERR;
|
||||
const char *old_sound_prefix = NULL, *sound_path = NULL, *tts_engine = NULL, *tts_voice = NULL;
|
||||
const char *module_name = NULL, *chan_lang = NULL;
|
||||
|
@ -49,6 +49,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
int matches = 0;
|
||||
const char *pause_val;
|
||||
int pause = 100;
|
||||
const char *group_macro_name = NULL;
|
||||
const char *local_macro_name = macro_name;
|
||||
switch_bool_t sound_prefix_enforced = switch_true(switch_channel_get_variable(channel, "sound_prefix_enforced"));
|
||||
switch_bool_t local_sound_prefix_enforced = SWITCH_FALSE;
|
||||
|
||||
if (!macro_name) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No phrase macro specified.\n");
|
||||
|
@ -65,8 +69,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
chan_lang = lang;
|
||||
}
|
||||
|
||||
module_name = chan_lang;
|
||||
|
||||
switch_event_create(&hint_data, SWITCH_EVENT_REQUEST_PARAMS);
|
||||
switch_assert(hint_data);
|
||||
|
||||
|
@ -82,40 +84,21 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
}
|
||||
switch_channel_event_set_data(channel, hint_data);
|
||||
|
||||
if (switch_xml_locate("phrases", NULL, NULL, NULL, &xml, &cfg, hint_data, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of phrases failed.\n");
|
||||
if (switch_xml_locate_language(&xml, &cfg, hint_data, &language, &phrases, ¯os, chan_lang) != SWITCH_STATUS_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(macros = switch_xml_child(cfg, "macros"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macros tag.\n");
|
||||
goto done;
|
||||
if ((module_name = switch_xml_attr(language, "say-module"))) {
|
||||
} else if ((module_name = switch_xml_attr(language, "module"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Deprecated usage of module attribute. Use say-module instead\n");
|
||||
} else {
|
||||
module_name = chan_lang;
|
||||
}
|
||||
|
||||
if (!(language = switch_xml_child(macros, "language"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language tag.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (language) {
|
||||
if ((lname = (char *) switch_xml_attr(language, "name")) && !strcasecmp(lname, chan_lang)) {
|
||||
const char *tmp;
|
||||
|
||||
if ((tmp = switch_xml_attr(language, "module"))) {
|
||||
module_name = tmp;
|
||||
}
|
||||
break;
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-prefix"))) {
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
}
|
||||
language = language->next;
|
||||
}
|
||||
|
||||
if (!language) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find language %s.\n", chan_lang);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
|
||||
sound_path = (char *) switch_xml_attr(language, "sound_path");
|
||||
}
|
||||
|
||||
if (!(tts_engine = (char *) switch_xml_attr(language, "tts-engine"))) {
|
||||
|
@ -126,7 +109,41 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
tts_voice = (char *) switch_xml_attr(language, "tts_voice");
|
||||
}
|
||||
|
||||
if (sound_path) {
|
||||
/* If we use the new structure, check for a group name */
|
||||
if (language != macros) {
|
||||
char *p;
|
||||
char *macro_name_dup = switch_core_session_strdup(session, macro_name);
|
||||
const char *group_sound_path;
|
||||
const char *sound_prefix_enforced_str;
|
||||
|
||||
if ((p = strchr(macro_name_dup, '@'))) {
|
||||
*p++ = '\0';
|
||||
local_macro_name = macro_name_dup;
|
||||
group_macro_name = p;
|
||||
|
||||
if (!(macros = switch_xml_find_child(phrases, "macros", "name", group_macro_name))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macros group %s.\n", group_macro_name);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
/* Support override of certain language attribute */
|
||||
if ((group_sound_path = (char *) switch_xml_attr(macros, "sound-prefix")) || (group_sound_path = (char *) switch_xml_attr(macros, "sound-path")) || (group_sound_path = (char *) switch_xml_attr(macros, "sound_path"))) {
|
||||
sound_path = group_sound_path;
|
||||
}
|
||||
|
||||
if (sound_prefix_enforced == SWITCH_FALSE && (sound_prefix_enforced_str = switch_xml_attr(macros, "sound-prefix-enforced"))
|
||||
&& (local_sound_prefix_enforced = switch_true(sound_prefix_enforced_str)) == SWITCH_TRUE) {
|
||||
switch_channel_set_variable(channel, "sound_prefix_enforced", sound_prefix_enforced_str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!(macro = switch_xml_find_child(macros, "macro", "name", local_macro_name))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macro %s.\n", macro_name);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (sound_path && sound_prefix_enforced == SWITCH_FALSE) {
|
||||
char *p;
|
||||
old_sound_prefix = switch_str_nil(switch_channel_get_variable(channel, "sound_prefix"));
|
||||
p = switch_core_session_strdup(session, old_sound_prefix);
|
||||
|
@ -134,23 +151,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
switch_channel_set_variable(channel, "sound_prefix", sound_path);
|
||||
}
|
||||
|
||||
if (!(macro = switch_xml_child(language, "macro"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find any macro tags.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (macro) {
|
||||
if ((mname = (char *) switch_xml_attr(macro, "name")) && !strcasecmp(mname, macro_name)) {
|
||||
break;
|
||||
}
|
||||
macro = macro->next;
|
||||
}
|
||||
|
||||
if (!macro) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't find macro %s.\n", macro_name);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((pause_val = switch_xml_attr(macro, "pause"))) {
|
||||
int tmp = atoi(pause_val);
|
||||
if (tmp >= 0) {
|
||||
|
@ -342,6 +342,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
|||
if (old_sound_prefix) {
|
||||
switch_channel_set_variable(channel, "sound_prefix", old_sound_prefix);
|
||||
}
|
||||
if (local_sound_prefix_enforced == SWITCH_TRUE) {
|
||||
switch_channel_set_variable(channel, "sound_prefix_enforced", NULL);
|
||||
}
|
||||
|
||||
if (xml) {
|
||||
switch_xml_free(xml);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Simon Capper <skyjunky@sbcglobal.net>
|
||||
*
|
||||
* Marc Olivier Chouinard <mochouinard@moctel.com>
|
||||
*
|
||||
* switch_xml.c -- XML PARSER
|
||||
*
|
||||
|
@ -2785,6 +2785,62 @@ SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond) {
|
|||
return time_match;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language) {
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if (switch_xml_locate("languages", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_xml_t sub_macros;
|
||||
|
||||
if (switch_xml_locate("phrases", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of languages and phrases failed.\n");
|
||||
goto done;
|
||||
}
|
||||
if (!(sub_macros = switch_xml_child(*node, "macros"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find macros tag.\n");
|
||||
switch_xml_free(*root);
|
||||
*root = NULL;
|
||||
*node = NULL;
|
||||
goto done;
|
||||
}
|
||||
if (!(*language = switch_xml_find_child(sub_macros, "language", "name", str_language))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find language %s.\n", str_language);
|
||||
switch_xml_free(*root);
|
||||
*root = NULL;
|
||||
*node = NULL;
|
||||
goto done;
|
||||
}
|
||||
*macros = *language;
|
||||
} else {
|
||||
if (!(*language = switch_xml_find_child(*node, "language", "name", str_language))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find language %s.\n", str_language);
|
||||
switch_xml_free(*root);
|
||||
*root = NULL;
|
||||
goto done;
|
||||
}
|
||||
if (!(*phrases = switch_xml_child(*language, "phrases"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find phrases tag.\n");
|
||||
switch_xml_free(*root);
|
||||
*root = NULL;
|
||||
*node = NULL;
|
||||
*language = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(*macros = switch_xml_child(*phrases, "macros"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find macros tag.\n");
|
||||
switch_xml_free(*root);
|
||||
*root = NULL;
|
||||
*node = NULL;
|
||||
*language = NULL;
|
||||
*phrases = NULL;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
done:
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue