Merge branch 'master' of git.sangoma.com:smg_freeswitch
Conflicts: libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
This commit is contained in:
commit
01eb776469
|
@ -9,12 +9,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Co
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.2008.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{03207781-0D1C-4DB3-A71D-45C608F28DBD} = {03207781-0D1C-4DB3-A71D-45C608F28DBD}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
EndProjectSection
|
||||
|
|
|
@ -379,12 +379,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Co
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.2008.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{03207781-0D1C-4DB3-A71D-45C608F28DBD} = {03207781-0D1C-4DB3-A71D-45C608F28DBD}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
EndProjectSection
|
||||
|
|
|
@ -709,6 +709,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_pt", "src\mod\say\m
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ldns", "libs\win32\ldns\ldns-lib\ldns-lib.2010.vcxproj", "{23B4D303-79FC-49E0-89E2-2280E7E28940}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_callcenter", "src\mod\applications\mod_callcenter\mod_callcenter.2010.vcxproj", "{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
All|Win32 = All|Win32
|
||||
|
@ -3633,6 +3635,19 @@ Global
|
|||
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.Build.0 = Release|x64
|
||||
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x86 Setup.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|Win32.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x64.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x64.Build.0 = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x64 Setup.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x86 Setup.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Debug|x64 Setup.ActiveCfg = Debug|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Debug|x86 Setup.ActiveCfg = Debug|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x64.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x86 Setup.ActiveCfg = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -3680,6 +3695,7 @@ Global
|
|||
{2E250296-0C08-4342-9C8A-BCBDD0E7DF65} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{B889A18E-70A7-44B5-B2C9-47798D4F43B3} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{5C2B4D88-3BEA-4FE0-90DF-FA9836099D5F} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
|
||||
|
|
|
@ -106,7 +106,10 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-
|
|||
|
||||
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
|
||||
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
|
||||
if ENABLE_SRTP
|
||||
CORE_CFLAGS += -DENABLE_SRTP
|
||||
CORE_LIBS += libs/srtp/libsrtp.la
|
||||
endif
|
||||
|
||||
MOD_LINK = $(switch_srcdir)/libfreeswitch.la
|
||||
CLEANFILES = src/include/switch_version.h src/include/switch_swigable_cpp.h
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
. /etc/init.d/functions
|
||||
|
||||
PROG_NAME=freeswitch
|
||||
PID_FILE=${PID_FILE-/opt/freeswitch/run/freeswitch.pid}
|
||||
PID_FILE=${PID_FILE-/var/run/freeswitch/freeswitch.pid}
|
||||
FS_USER=${FS_USER-freeswitch}
|
||||
FS_FILE=${FS_FILE-/opt/freeswitch/bin/freeswitch}
|
||||
FS_HOME=${FS_HOME-/opt/freeswitch}
|
||||
|
|
|
@ -37,6 +37,7 @@ applications/mod_valet_parking
|
|||
#applications/mod_callcenter
|
||||
#applications/mod_fsk
|
||||
#applications/mod_ladspa
|
||||
#applications/mod_mongo
|
||||
codecs/mod_g723_1
|
||||
codecs/mod_amr
|
||||
#codecs/mod_amrwb
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
en-us-callie 1.0.14
|
||||
en-us-callie 1.0.16
|
||||
ru-RU-elena 1.0.12
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<configuration name="cepstral.conf" description="Cepstral TTS configuration">
|
||||
<settings>
|
||||
<!--
|
||||
Possible encodings:
|
||||
* utf-8
|
||||
* us-ascii
|
||||
* iso8859-1 (default)
|
||||
* iso8859-15
|
||||
-->
|
||||
<param name="encoding" value="utf-8"/>
|
||||
</settings>
|
||||
</configuration>
|
|
@ -113,7 +113,7 @@
|
|||
|
||||
<!-- Say -->
|
||||
<load module="mod_say_en"/>
|
||||
<load module="mod_say_ru"/>
|
||||
<!-- <load module="mod_say_ru"/> -->
|
||||
<!-- <load module="mod_say_zh"/> -->
|
||||
|
||||
<!-- Third party modules -->
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<configuration name="mongo.conf">
|
||||
<settings>
|
||||
<param name="host" value="127.0.0.1:27017"/>
|
||||
<param name="min-connections" value="10"/>
|
||||
<param name="max-connections" value="100"/>
|
||||
</settings>
|
||||
</configuration>
|
|
@ -24,6 +24,17 @@
|
|||
<!--Colorize the Console -->
|
||||
<param name="colorize-console" value="true"/>
|
||||
|
||||
<!-- Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default -->
|
||||
<!-- <param name="1ms-timer" value="true"/> -->
|
||||
|
||||
<!--
|
||||
Set the Switch Name for HA environments.
|
||||
When setting the switch name, it will override the system hostname for all DB and CURL requests
|
||||
allowing cluster environments such as RHCS to have identical FreeSWITCH configurations but run
|
||||
as different hostnames.
|
||||
-->
|
||||
<!-- <param name="switchname" value="freeswitch"/>-->
|
||||
|
||||
<!-- maximum number of simo db handles open -->
|
||||
<param name="max-db-handles" value="50"/>
|
||||
<!-- maximum number of seconds to wait for a new db handle before failing -->
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<include>
|
||||
<extension name="Talking Clock Time" ><!--e.g. 10:56pm-->
|
||||
<condition field="destination_number" expression="^9170$">
|
||||
<action application="say" data="en CURRENT_TIME pronounced
|
||||
${strepoch()}"/>
|
||||
<action application="hangup"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="Talking Clock Date" ><!--e.g. March 8, 2011-->
|
||||
<condition field="destination_number" expression="^9171$">
|
||||
<action application="say" data="en CURRENT_DATE pronounced
|
||||
${strepoch()}"/>
|
||||
<action application="hangup"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="Talking Clock Date and Time" ><!--e.g. March 8, 2011
|
||||
10:56pm-->
|
||||
<condition field="destination_number" expression="^9172$">
|
||||
<action application="say" data="en CURRENT_DATE_TIME pronounced
|
||||
${strepoch()}"/>
|
||||
<action application="hangup"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</include>
|
|
@ -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>
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
<include><!--This line will be ignored it's here to validate the xml and is optional -->
|
||||
<macro name="voicemail_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>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_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>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_fail_auth">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-fail_auth.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_hello">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_goodbye">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-goodbye.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_abort">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-abort.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_message_count">
|
||||
<input pattern="^(1):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action application="log" data="INFO $1 $2"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items" gender="feminine"/>
|
||||
<action function="play-file" data="voicemail/vm-$2.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-message.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^(\d+):(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items" gender="feminine"/>
|
||||
<action function="play-file" data="voicemail/vm-$2.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-messages.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_menu">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<!-- To listen to new messages -->
|
||||
<action function="play-file" data="voicemail/vm-listen_new.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To listen to saved messages -->
|
||||
<action function="play-file" data="voicemail/vm-listen_saved.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- For advanced options -->
|
||||
<action function="play-file" data="voicemail/vm-advanced.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To exit -->
|
||||
<action function="play-file" data="voicemail/vm-to_exit.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$4" method="pronounced" type="name_phonetic"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_config_menu">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<!-- To record a greeting -->
|
||||
<action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To choose greeting -->
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To record your name -->
|
||||
<action function="play-file" data="voicemail/vm-record_name2.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To change password -->
|
||||
<action function="play-file" data="voicemail/vm-change_password.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
|
||||
<!-- To return to main menu -->
|
||||
<action function="play-file" data="voicemail/vm-main_menu.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_name">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_name1.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_file_check">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-save_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-rerecord.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_urgent_check">
|
||||
<input pattern="^([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-continue.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_forward_prepend">
|
||||
<input pattern="^([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-send_message_now.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_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="voicemail_invalid_extension">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_listen_file_check">
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-save_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-return_call.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-save_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-return_call.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_choose_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_choose_greeting_fail">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_greeting">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_greeting.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_record_message">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-record_message.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_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="voicemail_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="voicemail_say_number">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_message_number">
|
||||
<input pattern="^([a-z]+):(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-$1.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-message_number.wav"/>
|
||||
<action application="log" data="INFO $1 $2"/>
|
||||
<action function="say" data="$2" method="pronounced" type="items"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_say_phone_number">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_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="voicemail_ack">
|
||||
<input pattern="^(too-small)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-too-small.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="voicemail_say_date">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action application="log" data="INFO $1"/>
|
||||
<action function="say" data="$1" method="counted" type="current_date_time"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="voicemail_disk_quota_exceeded">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="valet_announce_ext">
|
||||
<input pattern="^([^\:]+):(.*)$">
|
||||
<match>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="valet_lot_full">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="valet_lot_empty">
|
||||
<input pattern="^(.*)$">
|
||||
<match>
|
||||
<action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
</include><!--This line will be ignored it's here to validate the xml and is optional -->
|
|
@ -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>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<include> <!--This line will be ignored it's here to validate the xml and is optional -->
|
||||
<macro name="queue_position">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="ivr/ivr-you_are_number.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="ivr/ivr-in_line.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
</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>
|
||||
|
|
21
configure.in
21
configure.in
|
@ -347,6 +347,11 @@ AC_ARG_ENABLE(cpp,
|
|||
|
||||
AM_CONDITIONAL([ENABLE_CPP],[test "${enable_cpp}" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(srtp,
|
||||
[AC_HELP_STRING([--disable-srtp],[build without srtp support])],[enable_srtp="$enableval"],[enable_srtp="yes"])
|
||||
|
||||
AM_CONDITIONAL([ENABLE_SRTP],[test "${enable_srtp}" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(zrtp,
|
||||
[AS_HELP_STRING([--enable-zrtp], [Compile with zrtp Support])],,[enable_zrtp="no"])
|
||||
if test "x$enable_zrtp" = "xyes" ; then
|
||||
|
@ -583,6 +588,21 @@ if test x"$ac_cv_gcc_declaration_after_statement" = xyes; then
|
|||
fi
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
|
||||
# Tested and fixed lot of modules, but some are untested. Will be added back when the core team decide it ready
|
||||
# Untested modules : mod_osp mod_soundtouch mod_sangoma_codec mod_dingaling mod_opal mod_skypopen mod_h323 mod_khomp
|
||||
# mod_unimrcp mod_cepstral mod_erlang_event mod_snmp mod_perl mod_java mod_managed
|
||||
#
|
||||
#saved_CFLAGS="$CFLAGS"
|
||||
#AC_CACHE_CHECK([whether compiler supports -Wunused-but-set-variable], [ac_cv_gcc_unused_but_set_variable], [
|
||||
#CFLAGS="$CFLAGS -Wunused-but-set-variable"
|
||||
#AC_TRY_COMPILE([],[return 0;],[ac_cv_gcc_unused_but_set_variable=yes],[ac_cv_gcc_unused_but_set_variable=no])
|
||||
#])
|
||||
#AC_MSG_RESULT($ac_cv_gcc_unused_but_set_variable)
|
||||
#if test x"$ac_cv_gcc_unused_but_set_variable" = xyes; then
|
||||
# APR_ADDTO(SWITCH_ANSI_CFLAGS, -Wunused-but-set-variable)
|
||||
#fi
|
||||
#CFLAGS="$saved_CFLAGS"
|
||||
|
||||
AC_C_BIGENDIAN(AC_DEFINE([SWITCH_BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([SWITCH_BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
|
||||
|
||||
# Checks for integer size
|
||||
|
@ -788,6 +808,7 @@ SAC_OPENSSL
|
|||
|
||||
if test x$HAVE_OPENSSL = x1; then
|
||||
openssl_CFLAGS="$openssl_CFLAGS -DHAVE_OPENSSL";
|
||||
APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_OPENSSL)
|
||||
fi
|
||||
|
||||
AX_CHECK_JAVA
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/opt/freeswitch/conf/lang/de/demo/demo.xml
|
||||
/opt/freeswitch/conf/lang/de/de.xml
|
||||
/opt/freeswitch/conf/lang/de/vm/tts.xml
|
||||
/opt/freeswitch/conf/lang/de/vm/sounds.xml
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
opt/freeswitch/conf/lang/de/demo/demo.xml
|
||||
opt/freeswitch/conf/lang/de/de.xml
|
||||
opt/freeswitch/conf/lang/de/vm/tts.xml
|
||||
/opt/freeswitch/conf/lang/de/vm/sounds.xml
|
||||
opt/freeswitch/mod/mod_say_de.so*
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
/opt/freeswitch/conf/autoload_configs/logfile.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/memcache.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/modules.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/mongo.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/nibblebill.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/opal.conf.xml
|
||||
/opt/freeswitch/conf/autoload_configs/pocketsphinx.conf.xml
|
||||
|
|
|
@ -29,6 +29,7 @@ opt/freeswitch/conf/autoload_configs/local_stream.conf.xml
|
|||
opt/freeswitch/conf/autoload_configs/logfile.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/memcache.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/modules.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/mongo.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/nibblebill.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/opal.conf.xml
|
||||
opt/freeswitch/conf/autoload_configs/pocketsphinx.conf.xml
|
||||
|
|
121
docs/ChangeLog
121
docs/ChangeLog
|
@ -24,6 +24,7 @@ freeswitch (1.0.7)
|
|||
build: VS2010 libportaudio project improvements for DirectX builds and switch to build DirectX by default (r:e9e33f51/FS-3033)
|
||||
build: add make targets for mod_com_g729 mod_com_g729-activate mod_com_g729-install mod_com_g729-clean mod_com_g729-uninstall (r:17d52112)
|
||||
build: add support for bz2 to getlibs (r:b61fc396)
|
||||
build: Bump callie sounds to 1.0.15 (r:c8eaef60)
|
||||
codec2: working prototype, still for testing only (r:04ca0751)
|
||||
config: move limit.conf to db.conf
|
||||
config: Update VM phrase macros to voice option then action on main, config menus
|
||||
|
@ -41,6 +42,7 @@ freeswitch (1.0.7)
|
|||
config: docs for acl (r:57b410eb)
|
||||
config: add default to conf to demonstrate min-idle-cpu (r:b8b7266a)
|
||||
config: change min/max enforcements to >= instead of > (r:0d5fcf65)
|
||||
config: Add README_IMPORTANT.txt to default configuration (r:6cd5ce72)
|
||||
core: Add RTCP support (FSRTP-14)
|
||||
core: handle some errors on missing db handle conditions
|
||||
core: add ... and shutdown as a fail-safe when no modules are loaded
|
||||
|
@ -214,6 +216,35 @@ freeswitch (1.0.7)
|
|||
core: add limits to simo open sql handles (r:61cdf0da)
|
||||
core: Fix db locks affecting mod_callcenter (r:8da371c7/FS-3127)
|
||||
core: improve flow of dtmf through a bridge when timer is disabled (r:59da356d)
|
||||
core: Fix Freeswitch crash on Debian ARM (r:a80fae92/FS-3126)
|
||||
core: switch_xml: reloadxml will(should) never lock again. It will load the XML structure into a new XML structure, and just replace the currently available ROOT XML. It then the job of the last user of the switch_xml structure to free it. (r:471bd6df)
|
||||
core: switch_xml: Remove commented out mmap. With the changes in the past 2 year, mmap can't really be put back in it current state. (r:34bd0e5e)
|
||||
core: Fix jitterbuffer with SRTP enabled (r:069f5f7d/FS-3075)
|
||||
core: this will remove the reported symptom but does not change the fact that 1khz resolution is ideal for proper performance (r:5f18ec94/FS-3168)
|
||||
core: this was specific to the user channel which is not a real channel in every sense of the word as it has no running thread or any usable state changes so this new line of code in 233d3164be4412aaaf8f9f42d8042e48279a018a to wait for the state machine to stabilize before returning from originate caused an issue with user/ channels (r:88a6ac2f/FS-3170)
|
||||
core: this also fixes the incorrect usage of L16 on payload 10 which may or may not break interop with other sip devices if we do it right. also added rtp_disable_byteswap variable that can be set to false to disable byteswap when a device is encountered that is incompat (including all previous version of FS up till now) (r:e657e32f/FS-3172)
|
||||
core: dont calibrate clock when timerfd enabled (r:26f5ebd4)
|
||||
core: fix DTMF in SRTP/ZRTP (r:fd608901/FS-3165)
|
||||
core: add switch_atomic_* type and functions switch_apr.c and switch_apr.h (r:3b56c119/FS-3173)
|
||||
core: improve some defaults to tune performance if you use -heavy_timer, try not using it (r:5d783134)
|
||||
core: Fix api_hangup_hook with no args (r:484a397d/FS-3194)
|
||||
core: allow 100 microsecond tolerance on timer loop (r:6388e03d)
|
||||
core: Fix X-PREPROCESS exec to wait pid (r:dae2cb4a)
|
||||
core: Ability to use mod_say with native files; native is a special case so use the extension native e.g. en.native (r:3a2e1d03/FS-3176)
|
||||
core: Fix: Bridging a call to multiple legs and using leg_delay_start, legs that lost the race before the leg_delay_start time is up still get originated for a brief moment (r:c5daf80e/FS-3218)
|
||||
core: Have UPNP/PMP active without opening port mappings in the router/firewall (r:008f9889/FS-3208)
|
||||
core: add execute_on function so you can have execute_on_answer_1 execute_on_answer_2 execute_on_answer_3 etc (r:27c6d111)
|
||||
core: do this slightly safer so we don't have the mutex locked when we exec the app (r:ef175741)
|
||||
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)
|
||||
|
@ -250,12 +281,18 @@ freeswitch (1.0.7)
|
|||
libesl: add optional job-uuid param to bgapi in oop mod (r:e96acac3)
|
||||
libesl: fix linger support in esl client lib (r:0444626b)
|
||||
libesl: fix segfault (r:30813ca5/FS-3130)
|
||||
libesl: Don't destroy last_event pointer until it's being set to a new pointer - fixes rare segfault (r:e8474d60/ESL-57)
|
||||
libesl: Add 'make perlmod-install' to ESL (please test) (r:06c42179)
|
||||
libesl: build python esl bindings and ship them in freeswitch-python-package (r:44bfcf1d/FS-3128)
|
||||
libesl: use poll instead of select in ESL client lib because select is not your friend.... (r:ae595cd5)
|
||||
libesl: Add digit_timeout to ESL::IVR's playAndGetDigits method (r:f564d383)
|
||||
libfreetdm: implemented freetdm config nodes and ss7 initial configuration
|
||||
libfreetdm: fix codec for CAS signaling (r:b76e7f18)
|
||||
libfreetdm: freetdm: ss7- added support for incoming group blocks, started adding support for ansi (r:c219a73c)
|
||||
libg7221: A bunch of tweaks to the G.722.1 codec (r:5d548570)
|
||||
libgnutls: link to libgcrypt as well, please report any platforms this breaks, but it should be portable (r:c569fb0f/FS-1248)
|
||||
libjs: non-portable comment syntax in .s files
|
||||
libldns: select on FD > 1024 get this patch to ldns ppl (r:710fc7a7/FS-3110)
|
||||
libopenzap: Add CLI tracing
|
||||
libs: Merged OpenZAP and FreeTDM into the FreeSWITCH tree.
|
||||
libs: Add support for TLS on Windows using openssl (r:1abe3b93/MODSOFIA-92)
|
||||
|
@ -265,6 +302,7 @@ freeswitch (1.0.7)
|
|||
libsofiasip: VS2010 sofia posix problem (r:46dd24c2/SFSIP-220)
|
||||
libsofiasip: set minimum initital sip t1 timer to 1000ms to work around race condition on retry timer firing before all the things that are supposed to be handled by the timer are set. The base resolution on this timer is 500ms, so doubling up makes sure we always hit the initial retry timer on the next run, where everything should be set. The side effect was, 1/2 the time on a request that did not get immediate response, the timer would be fired and cleared, but the action (sending retry) was never done, and a new timer was not set, causing the request to just sit zombied and never retry. A better solution would be to find and correct the race condition so the timer is never set to early and we never hit this condition. (r:20c2740c)
|
||||
libsofiasip: fix bad assert (r:56404641/FS-3133)
|
||||
libsofiasip: lower stack and boost priority of sofia schedule thread (r:257bc9ff)
|
||||
libspandsp: Fixed a typo in spandsp's msvc/inttypes.h Updated sig_tone processing in spandsp to the latest, to allow moy to proceed with his signaling work.
|
||||
libspandsp: removed a saturate16 from spandsp that was causing problems fixed a typo in the MSVC inttypes.h file for spandsp
|
||||
libspandsp: Changes to the signaling tone detector to detect concurrent 2400Hz + 2600Hz tones. This passes voice immunity and other key tests, but it bounces a bit when transitions like 2400 -> 2400+2600 -> 2600 occur. Transitions between tone off and tone on are clean. (r:bc13e944)
|
||||
|
@ -272,6 +310,7 @@ freeswitch (1.0.7)
|
|||
libspandsp: Fix for T.30 processing of operator interrupts, to improve compatibility with some machines, which seem to send them when no operator is around. (r:84ee0ae6)
|
||||
libspandsp: spandsp t38 fax receiving error in win XP - regression from f029f7ef (r:761cec8f/FS-2766)
|
||||
libspandsp: Added missing error codes when an ECM FAX is abandoned with the T30_ERR message (r:ec57dc7a)
|
||||
libspandsp: Fixed a vulnerability in T.4 and T.6 processing which is similar to <a href="http://bugzilla.maptools.org/show_bug.cgi?id=2297">http://bugzilla.maptools.org/show_bug.cgi?id=2297</a> in libtiff. A really screwed up 2D T.4 image, or a maliciously constructed T.4 2D or T.6 image should potential run off the end of an image decoder buffer. (r:c6f67322)
|
||||
libstfu: add param to jb to try to recapture latency (disabled by default) (r:d59d41d7)
|
||||
mod_avmd: Initial check in - Advanced Voicemail Detect (r:10c6a30a) (by Eric Des Courtis)
|
||||
mod_avmd: Add to windows build (r:df4bd935)
|
||||
|
@ -299,11 +338,24 @@ freeswitch (1.0.7)
|
|||
mod_callcenter: IMPORTANT UPDATE, DTMF during moh created an loop to reactivate MOH but got canceled right away because of pending DTMF in the queue never been cleaned. Could cause masive disk write of debug, and can cause problem to the rest of FS stability. This patch also include basic fundation for DTMF capture support for member waiting. (r:cd1982ce)
|
||||
mod_callcenter: force loopback_bowout=false on originate. This will need to be reworked, but should fix basic issues call to an agent using loopback (r:2e399b0b)
|
||||
mod_callcenter: segfault using busy-delay-time parameter (r:c6f044d5/FS-3067)
|
||||
mod_callcenter: Fix a bug when an caller leave the queue from a BREAK Call (Transfer...), it doesn't think an agent answered. (r:51a531aa)
|
||||
mod_callcenter: Add new CLI cmd and change some to be more standard. Patch from Francois Delawarde, thanks. (r:30dd1774)
|
||||
mod_callcenter: >WARNING, some event value got removed< Adding new event time value that can then be used to calculate the Wait;Talk;Total duration of a member were on call. CC-Wait-Time CC-Talk-Time and CC-Total-Time are no longer returned. Visit the code or check the wiki for the updated variable. (r:5f233785)
|
||||
mod_callcenter: Add better support when agent doesn't answer, including creating a new variable for the delay that is different than reject or busy. Thanks to Francois Delawarde (r:26303c5c)
|
||||
mod_callcenter: Add better handle of failed agent, member channel getting a break, and debuging info upon leaving. Thanks to Fran?ois Delawarde (with some changes) (r:25cee255)
|
||||
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
|
||||
|
@ -326,6 +378,7 @@ freeswitch (1.0.7)
|
|||
mod_commands: add uuid_buglist to fetch the current media-bugs attached to a given session uuid (r:f6eab64c)
|
||||
mod_commands: add recovery_refresh app and api and use it in mod_conference to send a message to the channel telling it to sync its recovery snapshot (r:650393fb)
|
||||
mod_commands: add moh by default to uuid_broadcast when only broadcasting to A leg use aleg arg to disable this (r:d164a797)
|
||||
mod_commands: add API uuid_limit - thanks to Francois Delawarde (r:98a95016/FS-1792)
|
||||
mod_conference: Fix reporting of volume up/down (MODAPP-419)
|
||||
mod_conference: add last talking time per member to conference xml list
|
||||
mod_conference: add terminate-on-silence conference param
|
||||
|
@ -351,6 +404,13 @@ freeswitch (1.0.7)
|
|||
mod_conference: clear talk flag when you mute (r:b7419add)
|
||||
mod_conference: fix pthread mutex lock error and add some tab completion and help messages from cli (r:547d5393/FS-3095)
|
||||
mod_conference: Use the channel's sound_prefix if it's not set in the conference's config (r:0911ed74/FS-3124)
|
||||
mod_conference: Add conf_uuid chan var for djbinter (Thanks Math) (r:3c9ee25a)
|
||||
mod_conference: removes the existing conference transfer function and replaces it using the core transfer it also introduces a new tracking method where the same conference id is reserved for a particular member for the lifetime of the call allowing a user to transfer in and out of conferences and ivr and bridges etc and retain the same member id for the duration of that call (r:246b2195/FS-3095)
|
||||
mod_conference: prevent race condition on conference join/exit (r:1552ecf5)
|
||||
mod_conference: I finally tracked this down to the actual recordings generated by mod_conference. This patch delays the recording slightly to allow time for the buffer to fill up, we were riding it so closely that sometimes we would come up short and inject silence into the file to preserve time passing (r:3253bcb3/FS-3147)
|
||||
mod_conference: wait for channels to come up in paging mode (r:b8063c3d)
|
||||
mod_conference: Conference APIs for enabling/disabling enter/exit sounds for active conferences (r:31cebd4f/FS-3219)
|
||||
mod_conference: Fix pool swelling, replaced a pool strdup that could recur with a strdup/free to avoid it (r:bcd6c3a1/FS-3137)
|
||||
mod_curl: use method=post when post requested (r:c6a4ddd0/FSMOD-69)
|
||||
mod_db: fix stack corruption (MODAPP-407)
|
||||
mod_dialplan_xml: Add in the INFO log the caller id number when processing a request (Currenly only show the caller name) (r:e1df5e13)
|
||||
|
@ -360,6 +420,7 @@ freeswitch (1.0.7)
|
|||
mod_dingaling: Fix NULL pointer (r:e3eff816/FS-1103)
|
||||
mod_dingaling: fix leak in chat_send (r:eb109a85)
|
||||
mod_dingaling: use the login as message source when not in component mode. (chat_send) (r:58c28aab)
|
||||
mod_dingaling: fix mod_dingaling/iksemel/gnutls link error when using newer autotools (r:294b0779/FS-3182)
|
||||
mod_directory: Add variable directory_search_order to allow to search by first name by default is set to "first_name" (r:163ca31f)
|
||||
mod_distributor: Add mod_distributor to VS2010 - not built by default (r:bac79ba1)
|
||||
mod_dptools: add eavesdrop_enable_dtmf chan var (r:596c0012)
|
||||
|
@ -371,7 +432,14 @@ freeswitch (1.0.7)
|
|||
mod_dptools: Log error when there's no IVR menus configured when you call 'ivr' DP app (r:30034891)
|
||||
mod_dptools: reset signal_bond variable back to its original value on failed dial in att_xfer (r:330d7418)
|
||||
mod_dptools: Fix storage class for 'cause' in user_outgoing_channel() so that each call has its very own hangup cause (r:cb6f1ed6)
|
||||
mod_dptools: transfer_on_fail note I changed the variable name to auto_cause (r:45edec4c/FS-3193)
|
||||
mod_dptools: merge file_string into dptools (r:eefdb764)
|
||||
mod_dptools: change mod_dptools to use the better method of fetching user xml that does not hang onto the xml root (r:e52e44e3)
|
||||
mod_dptools: the intent for having the module and lang separate is for things where the same module can use different sets of sounds like en module and en-male or en-female lang (sound dirs) there was indeed a disconnect in the dialplan version of this app. Originally say was only available in phrase macros so I change the syntax of the say app so you can specify both the module and the lang absolte from the dp with something like he:he as the module name. (r:44304f49)
|
||||
mod_dptools: Set the default lang if not supplied (mod_say_en) (r:5382972a/FS-3215)
|
||||
mod_easyroute: Fix possible segfaults and memory leak during unload, and add new setting odbc-retries (r:7fbc47f8/FS-2973)
|
||||
mod_enum: switch mod_enum to use new portable in-tree version (r:2bbc37e3)
|
||||
mod_enum: fix race condition between ldns configure creating ldns/util.h and mod_enum (r:87884c5c)
|
||||
mod_erlang_event: Make XML fetch reply ACKs distinguishable, update freeswitch.erl (r:9d44ed04)
|
||||
mod_erlang_event: Add 3 new commands; session_event, session_noevents, session_nixevent (r:698fa045)
|
||||
mod_erlang_event: generate long node names the same as erlang does (r:9ad509c2)
|
||||
|
@ -384,6 +452,8 @@ freeswitch (1.0.7)
|
|||
mod_event_socket: Fix small mem leaks (r:e4f90584/MODEVENT-68)
|
||||
mod_event_socket: Add "-ERR" to api cmd response when failure occurs (r:58759052/FS-2827)
|
||||
mod_event_socket: clear unique headers on event_socket filters (r:436413e0)
|
||||
mod_event_socket: Unlock mutex to prevent mortuus obfirmo (r:64bc1938/FS-3156/FS-3157)
|
||||
mod_event_zmq: Intitial mod_event_zmq code (r:4d554067)
|
||||
mod_fifo: allow multiple dtmf to exit fifo, set fifo_caller_exit_key to specify which (MODAPP-420)
|
||||
mod_fifo: cancel outbound call if customer hangs up (r:cadb4d94)
|
||||
mod_fifo: add taking_calls param to fifo member add and config file (r:821488bf)
|
||||
|
@ -396,6 +466,7 @@ freeswitch (1.0.7)
|
|||
mod_fifo: Fix crash when using fifo_destroy_after_use (r:ee562c82/FS-2879)
|
||||
mod_fifo: don't seg in edge case error conditions (r:9ee13b72)
|
||||
mod_fifo: set tracking data before enabling hooks (r:34267869)
|
||||
mod_file_string: Fix segfault when using file string in conference (r:9c40e8e9/FS-3122)
|
||||
mod_freetdm: Fix for TON and NPI not passed through to channel variables on incoming calls
|
||||
mod_freetdm: add pvt data to freetdm channels fix fxs features (r:9d456900)
|
||||
mod_freetdm: export and import boost custom data (r:edb2d582)
|
||||
|
@ -447,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)
|
||||
|
@ -459,6 +531,8 @@ freeswitch (1.0.7)
|
|||
mod_json_cdr: Fix segfault in mod_json_cdr.c (r:f347698a/MODEVENT-66)
|
||||
mod_khomp: Added mod_khomp Endpoint. (r:5fea197b)
|
||||
mod_khomp: Removed alternative contexts / extensions - New struct for matchs - On calls originated from an FXS branch, the Endpoint searches for a valid extension (digits sent) after the DTMF '#' or after the timeout (option fxs-digit-timeout). That search is done in the context defined in section <fxs-options>, or if no context configured, the search is done in context defined in context-fxs. - Added "dialplan" configuration: Name of the dialplan module in use (default XML) - Group context enabled. If set, the search for a valid extension is done only in that context. - Updated documentation (r:1ef3fc9a)
|
||||
mod_ladspa: Add mod_ladspa (Audio plugin framework for linux) (r:2d3d8f8d)
|
||||
mod_ladspa: add string params to ladspa so you can connect files to audio ports (string params don't count towards number params) (r:b7891511)
|
||||
mod_lcr: Expand variables (MODAPP-418)
|
||||
mod_lcr: add enable_sip_redir parameter (r:70bf7a0a/MODAPP-427)
|
||||
mod_lcr: don't validate profiles with ${} vars since they are dynamic and we can't guess what the proper value should be (r:af33afaa)
|
||||
|
@ -466,6 +540,8 @@ freeswitch (1.0.7)
|
|||
mod_lcr: assign default profile even if testing is skipped (r:6420099c)
|
||||
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)
|
||||
|
@ -479,6 +555,7 @@ freeswitch (1.0.7)
|
|||
mod_lua: Make dbh:connected accessible from Lua - thanks Grmt (r:09e6fd3f)
|
||||
mod_lua: Added optional core: prefix to first arg passed to freeswitch.Dbh for giving direct access to sqlite db (r:a0181479)
|
||||
mod_lua: expose switch_simple_email as "email" method (r:89c5f3bf/FS-3023)
|
||||
mod_lua: Fix setInputCallback crash (r:c49c1fde/FS-3161)
|
||||
mod_managed: Added wrapper for switch_event_bind for .net (r:a5f07a80/MODLANG-165)
|
||||
mod_managed: add additional support (r:5be58aac)
|
||||
mod_managed: add mono 2.8 patch file see FS-2774 (r:6a948bd9/FS-2774)
|
||||
|
@ -495,10 +572,13 @@ freeswitch (1.0.7)
|
|||
mod_openzap: disable dtmf app and cmd line option (r:fb4b7f7a)
|
||||
mod_openzap: add enable dtmf app (r:3c95106e)
|
||||
mod_opus: add mod_opus (r:8f565277)
|
||||
mod_opus: Use libtool archives for linking, add dependencies to fix parallel builds (r:74bbd4be)
|
||||
mod_osp: initial check (Open Settlement Protocol)
|
||||
mod_osp:Changed OSP TCP port from 1080 to 5045. (r:03abefdf)
|
||||
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
|
||||
|
@ -513,9 +593,14 @@ freeswitch (1.0.7)
|
|||
mod_sangoma_codec: add G722 (r:ca8c2336)
|
||||
mod_sangoma_codec: add siren7 32kbps (r:fcaf2677)
|
||||
mod_sangoma_codec: add SIREN7 24kbps (r:3acc5fdb)
|
||||
mod_say: Fix crash for Say Number Pronounced with numbers of more than 9 digits (r:06bccf28/FS-3202)
|
||||
mod_say_en: introduce new say_string method of doing say and use it in mod_say_en as an example. try: eval ${say_string en.gsm en current_date_time pronounced ${strepoch()}} from the cli with this patch. We can do more to centralize the say things and go back and apply it to other langs, using this method you can set the desired file ext as well which I think is a bounty.... (r:d5ef86d7)
|
||||
mod_say_en: If you only tell SAY CURRENCY to say 100 it should only say 100 dollars without the "0 cents" (r:426a4e76/FS-2922)
|
||||
mod_say_es: fix grammar when saying dates and time (r:6bed19b2/MODAPP-429)
|
||||
mod_say_he: Add Hebrew say module (r:ebd9c83e/FS-3211)
|
||||
mod_say_ja: initial commit, still needs sound files (r:b2423158/FS-2755)
|
||||
mod_say_ru: Fix saying time with +1 hour of current time (r:68d74c31/MODAPP-444)
|
||||
mod_say_ru: now support say_string like mod_say_en. Now support channel variables gender,cases can be set in english and russian for example: <action application="set" data="cases=nominativus/> <action application="set" data="gender=male_h"/> <action application="say" data="ru NUMBER PRONOUNCED 1001"/> (r:8b5ecd2f)
|
||||
mod_say_zh: Number reading should now be OK for the whole range of integers for Cantonese and Mandarin
|
||||
mod_shout: bump mod_shout to use mpg123-1.13.2 to hopefully address unwanted calls to exit() and inherit other upstream fixes (r:079f3f73)
|
||||
mod_silk: Fix mod_silk compliance and performance issues (r:2ddbc457/MODCODEC-20)
|
||||
|
@ -543,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)
|
||||
|
@ -689,6 +776,20 @@ freeswitch (1.0.7)
|
|||
mod_sofia: Send BYE to endpoints that lose race even if they answered (r:8c3651fa/FS-640)
|
||||
mod_sofia: do not renegotiate codecs on hold re-invites (r:bfd0ba97)
|
||||
mod_sofia: add rtp-notimer-during-bridge (alternative to rtp-autoflush-during-bridge (r:2a35dfb5)
|
||||
mod_sofia: send another presence event on calls that were cancelled from LOSE_RACE to fix winnable race in Broadsoft SCA (r:59f6654e)
|
||||
mod_sofia: pass header in X-FS headers on attended transfer CID update to indicate specific situation to flip callee/caller id when targeting a 1 legged call (r:24a97292)
|
||||
mod_sofia: change text of error message to be more descriptive (r:4c435ec5)
|
||||
mod_sofia: Correct a problem where restarting profile would cause some profile hash entry to remain. (r:81bfe435)
|
||||
mod_sofia: New Sofia API to look up the username of a given user (r:7556ec57/FS-3187)
|
||||
mod_sofia: sip_authentication was not cleared after nonce expired -caused sofia_reg_internal.db grow bigger and bigger with time (r:c735e28a/FS-3190)
|
||||
mod_sofia: pass failure across in T.38 passthru mode (r:31273b42)
|
||||
mod_sofia: auto-aleg-full and auto-aleg-domain for from_domain field in gateway (r:fda2283b)
|
||||
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)
|
||||
|
@ -701,15 +802,22 @@ 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)
|
||||
mod_spidermonkey: Add session.ringReady() to check for CF_RING_READY (r:7386b9f8)
|
||||
mod_spy: add support for loopback endpoint (MODAPP-416)
|
||||
mod_spy: fix crash when session can't be located (r:c4154633/FS-2929)
|
||||
mod_timer_fd: external timerfd module by Timo Ter?s (r:48b11935)
|
||||
mod_timer_fd: add timerfd support to the core for now you must enable it in switch.conf.xml with the param enable-softtimer-timerfd=true later if it proves to work well we can make it on by default, please test if you have a new kernel that supports this option kernel >= 2.6.25 and libc >= 2.8 (r:10174ea6)
|
||||
mod_tts_commandline: fix core dump, temp file problem. flush can be called several times (FSMOD-35)
|
||||
mod_unimrcp: fix fortify findings for mod_unimrcp (r:336f0b4e/FSMOD-67)
|
||||
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)
|
||||
|
@ -729,19 +837,24 @@ 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)
|
||||
mod_xml_cdr: fix minor memory leaks and config bug (r:19253d83/MODEVENT-62)
|
||||
mod_xml_cdr: Fix prefix-a-leg not respected for url submission (r:ea9021a2/FS-2998)
|
||||
mod_xml_cdr: Fix delay to 5 sec from 5000 sec (r:34a38009/FS-2815)
|
||||
mod_xml_rpc: Fix crash if unauthorized XML RPC is attempted (r:9835395c/FS-184)
|
||||
scripts: added honeypot.pl and blacklist.pl which add extra SIP security options (r:b6a81ba7)
|
||||
scripts: do simple verification to make sure we are getting IP addresses from VoIP abuse blacklist (r:b0049160)
|
||||
scripts: add_user - cmd line utility that lets admin create new users very easily. (r:ec8f2c2b)
|
||||
sofia-sip: fix null derefernce segfault in soa (r:f356c5e6)
|
||||
sofia-sip: extend timeout for session expires on short timeouts to be 90% of timeout instead of 1/3 to handle devices that do not refresh in time such as polycom (r:a7f48928/SFSIP-212)
|
||||
support: update fscore_pb to work with git (r:8f67e93a)
|
||||
tools: Add fs_encode tool (r:89b17601)
|
||||
tools: Add randomize-passwords.pl script to main tree (r:5e6123ef)
|
||||
tools: Change logger.pl host flag to -H from -h (conflicted w/ -h for help); add -H/--host to usage (r:73ca862c)
|
||||
|
||||
freeswitch (1.0.6)
|
||||
|
||||
|
@ -1513,7 +1626,7 @@ freeswitch (1.0.4)
|
|||
build: use different version file for moh version (r:13093)
|
||||
build: de-couple version numbers and builds of sound files and moh files (FSBUILD-153/r:13096)
|
||||
build: use sound_version.txt and moh_version.txt to determine sound file version on windows (FSBUILD-152/r:13097)
|
||||
build: use in tree libtiff for msvc build and fix some header generation checks (r:13150)
|
||||
build: use in tree libtiff for msvc build and fix some header generation checks (r:13097)
|
||||
build: clean esl on make current (r:13204,13205)
|
||||
build: fix warning-as-error that stops MSVC from building solution (FSCORE-367/r:13301)
|
||||
build: fix MSVC build issue from r13294 (FSBUILD-159/r:13302)
|
||||
|
|
|
@ -5,6 +5,23 @@
|
|||
<prompt phrase="Pound" filename="35.wav"/>
|
||||
<prompt phrase="Star" filename="42.wav"/>
|
||||
<prompt phrase="Dot" filename="46.wav"/>
|
||||
<prompt phrase="Hyphen" filename="45.wav"/>
|
||||
<prompt phrase="Exclamation point" filename="33.wav"/>
|
||||
<prompt phrase="At" filename="64.wav"/>
|
||||
<prompt phrase="Dollar sign" filename="36.wav"/>
|
||||
<prompt phrase="Percent" filename="37.wav"/>
|
||||
<prompt phrase="Ampersand" filename="38.wav"/>
|
||||
<prompt phrase="Double quote" filename="34.wav"/>
|
||||
<prompt phrase="Single quote" filename="39.wav"/>
|
||||
<prompt phrase="Forward slash" filename="47.wav"/>
|
||||
<prompt phrase="Underscore" filename="95.wav"/>
|
||||
<prompt phrase="Backslash" filename="92.wav"/>
|
||||
<prompt phrase="Tilde" filename="126.wav"/>
|
||||
<prompt phrase="Equal sign" filename="61.wav"/>
|
||||
<prompt phrase="Colon" filename="58.wav"/>
|
||||
<prompt phrase="Semicolon" filename="59.wav"/>
|
||||
<prompt phrase="Caret" filename="94.wav"/>
|
||||
<prompt phrase="Pipe" filename="124.wav"/>
|
||||
<prompt phrase="A" filename="97.wav"/>
|
||||
<prompt phrase="B" filename="98.wav"/>
|
||||
<prompt phrase="C" filename="99.wav"/>
|
||||
|
@ -222,6 +239,8 @@
|
|||
<prompt phrase="I need to record your first and last name. This recording is used throughout the system, including in the company directory." filename="vm-tutorial_record_name.wav"/>
|
||||
<prompt phrase="Your personal identification number, or 'pin', is used to prevent others from accessing your voicemail messages. Would you like to change it now?" filename="vm-tutorial_change_pin.wav"/>
|
||||
<prompt phrase="The person you are trying to reach is not available and does not have voicemail." filename="vm-not_available_no_voicemail.wav"/>
|
||||
<prompt phrase="The PIN you entered is below the minimum length." filename="voicemail/vm-pin_below_minimum_length.wav"/>
|
||||
<prompt phrase="The minimum PIN length is..." filename="voicemail/vm-minimum_pin_length_is.wav"/>
|
||||
</voicemail>
|
||||
<directory>
|
||||
<prompt phrase="Please enter the first few letters of the persons" filename="dir-enter_person.wav"/>
|
||||
|
@ -268,6 +287,14 @@
|
|||
<prompt phrase="...has left the conference." filename="conf-has_left.wav"/>
|
||||
<prompt phrase="You are already muted." filename="conf-you_are_already_muted.wav"/>
|
||||
<prompt phrase="You are now bi-directionally muted." filename="conf-you_are_now_bidirectionally_muted.wav"/>
|
||||
<prompt phrase="Enter the number of listeners at this location, then press pound." filename="conf-number_of_listeners.wav"/>
|
||||
<prompt phrase="...listeners in this conference." filename="conf-listeners_in_conference.wav"/>
|
||||
<prompt phrase="...listener in this conference." filename="conf-listener_in_conference.wav"/>
|
||||
<prompt phrase="...members in this conference." filename="conf-members_in_conference.wav"/>
|
||||
<prompt phrase="This conference is in Q and A mode." filename="conference/conf-conference_is_in_qna_mode.wav"/>
|
||||
<prompt phrase="Q and A mode..." filename="conference/conf-qna_mode.wav"/>
|
||||
<prompt phrase="Entry sound..." filename="conference/conf-entry_sound.wav"/>
|
||||
<prompt phrase="Exit sound..." filename="conference/conf-exit_sound.wav"/>
|
||||
</conference>
|
||||
<ivr>
|
||||
<prompt phrase="Account number" filename="ivr-account_number.wav"/>
|
||||
|
@ -425,17 +452,47 @@
|
|||
<prompt phrase="Barracuda Networks" filename="ivr-barracuda_networks.wav"/>
|
||||
<prompt phrase="CudaTel Communication Server" filename="ivr-cudatel_communication_server.wav"/>
|
||||
<prompt phrase="There are no calls waiting in this queue." filename="ivr-no_calls_waiting_in_queue.wav"/>
|
||||
|
||||
<!-- The following phrases still need to be recorded -->
|
||||
<prompt phrase="You are caller number one. Of course, *every* caller is number one in our book so you may be waiting a while." filename="ivr-youre_number_one.wav"/>
|
||||
<prompt phrase="...has called emergency services" filename="ivr-has_called_emergency_services.wav"/>
|
||||
<prompt phrase="There are..." filename="ivr-there_are.wav"/>
|
||||
<prompt phrase="Enter the number of listeners at this location, then press pound." filename="conf-number_of_listeners.wav"/>
|
||||
<prompt phrase="...listeners in this conference." filename="conf-listeners_in_conference.wav"/>
|
||||
<prompt phrase="...members in this conference." filename="conf-members_in_conference.wav"/>
|
||||
<prompt phrase="Please enter the source telephone number, then press pound." filename="ivr-enter_source_telephone_number.wav"/>
|
||||
<prompt phrase="Please enter the destination telephone number, then press pound." filename="ivr-enter_destination_telephone_number.wav"/>
|
||||
<prompt phrase="Recording started." filename="ivr-recording_started.wav"/>
|
||||
<prompt phrase="Recording stopped." filename="ivr-recording_stopped.wav"/>
|
||||
<prompt phrase="Recording paused." filename="ivr-recording_paused.wav"/>
|
||||
<prompt phrase="Recording deleted." filename="ivr-recording_deleted.wav"/>
|
||||
<prompt phrase="You are no longer in queue." filename="ivr-no_longer_in_queue.wav"/>
|
||||
<prompt phrase="...withdrawn." filename="ivr-withdrawn.wav"/>
|
||||
<prompt phrase="question..." filename="ivr-question.wav"/>
|
||||
<prompt phrase="...questions." filename="ivr-questions.wav"/>
|
||||
<prompt phrase="...has been answered." filename="ivr-has_been_answered.wav"/>
|
||||
<prompt phrase="...has been removed." filename="ivr-has_been_removed.wav"/>
|
||||
<prompt phrase="No questions in queue." filename="ivr-no_questions_in_queue.wav"/>
|
||||
<prompt phrase="...is now on." filename="ivr/ivr_is_now_on.wav"/>
|
||||
<prompt phrase="...is now off." filename="ivr/ivr_is_now_off.wav"/>
|
||||
<prompt phrase="This phone is not allowed to make external calls." filename="ivr-phone_not_make_external_calls.wav"/>
|
||||
<prompt phrase="I.D. number..." filename="ivr-id_number.wav"/>
|
||||
<prompt phrase="To skip these instructions..." filename="ivr-skip_instructions.wav"/>
|
||||
<prompt phrase="Hang up the call without pressing a key to discard the recording." filename="ivr-hangup_to_discard.wav"/>
|
||||
<prompt phrase="...or press..." filename="ivr-or_press.wav"/>
|
||||
<prompt phrase="For English, press..." filename="ivr-for_english_press.wav"/>
|
||||
<prompt phrase="Your call cannot be completed as dialed." filename="ivr-call_cannot_be_completed_as_dialed.wav"/>
|
||||
<prompt phrase="Please check the number and try again." filename="ivr-please_check_number_try_again.wav"/>
|
||||
<prompt phrase="Failure reason is..." filename="ivr-failure_reason_is.wav"/>
|
||||
<prompt phrase="Unallocated number" filename="ivr-unallocated_number.wav"/>
|
||||
<prompt phrase="No user response" filename="ivr-no_user_response.wav"/>
|
||||
<prompt phrase="Invalid number format" filename="ivr-invalid_number_format.wav"/>
|
||||
<prompt phrase="Gateway down" filename="ivr-gateway_down.wav"/>
|
||||
<prompt phrase="No route to destination" filename="ivr-no_route_destination.wav"/>
|
||||
<prompt phrase="User busy" filename="ivr-user_busy.wav"/>
|
||||
<prompt phrase="Call rejected" filename="ivr-call_rejected.wav"/>
|
||||
<prompt phrase="Normal unspecified" filename="ivr-normal_unspecified.wav"/>
|
||||
<prompt phrase="Incompatible destination" filename="ivr-incompatible_destination.wav"/>
|
||||
<prompt phrase="Normal clearing" filename="ivr-normal_clearing.wav"/>
|
||||
|
||||
<!-- The following phrases still need to be recorded -->
|
||||
</ivr>
|
||||
|
||||
<misc>
|
||||
<prompt phrase="This call has been secured" filename="call_secured.wav"/>
|
||||
<prompt phrase="Followed by pound" filename="followed.wav"/>
|
||||
|
|
|
@ -219,14 +219,14 @@
|
|||
<prompt phrase="urgent" filename="vm-urgent.wav"/>
|
||||
</voicemail>
|
||||
<directory>
|
||||
<prompt phrase="Veuillez entrer les premiere lettre du" filename="dir-enter-person.wav"/>
|
||||
<prompt phrase="Veuillez entrer les premiere lettre du" filename="dir-enter_person.wav"/>
|
||||
<prompt phrase="nom de famille." filename="dir-last_name.wav"/>
|
||||
<prompt phrase="Pour chercher par" filename="dir-to_search_by.wav"/>
|
||||
<prompt phrase="prénom." filename="dir-first_name.wav"/>
|
||||
<prompt phrase="Votre recherche a retourner aucune résultat, essayer de nouveaux." filename="dir-no_match_entry.wav"/>
|
||||
<prompt phrase="résultats correspond a votre recherche." filename="dir-result_match.wav"/>
|
||||
<prompt phrase="Votre recherche retourne trop de résultat, essayer de nouveaux." filename="dir-to_many_result.wav"/>
|
||||
<prompt phrase="Fin des résultats." filename="dir-no_more_result.wav"/>
|
||||
<prompt phrase="Votre recherche retourne trop de résultat, essayer de nouveaux." filename="dir-too_many_result.wav"/>
|
||||
<prompt phrase="Fin des résultats." filename="dir-no_more_results.wav"/>
|
||||
<prompt phrase="Résultat numéro" filename="dir-result_number.wav"/>
|
||||
<prompt phrase="aux poste" filename="dir-at_extension.wav"/>
|
||||
<prompt phrase="Pour selectionner ce nom" filename="dir-to_select_entry.wav"/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright and license
|
||||
##############################################################################
|
||||
#
|
||||
# Spec file for package freeswitch-sounds-en-us-callie (version 1.0.12-8)
|
||||
# Spec file for package freeswitch-sounds-en-us-callie (version 1.0.16-8)
|
||||
#
|
||||
# Copyright (c) 2009 Patrick Laimbock
|
||||
# Some fixes and additions (c) 2011 Michal Bielicki
|
||||
|
@ -20,7 +20,7 @@
|
|||
# Set variables
|
||||
##############################################################################
|
||||
|
||||
%define version 1.0.14
|
||||
%define version 1.0.16
|
||||
%define release 1
|
||||
|
||||
%define fsname freeswitch
|
||||
|
@ -299,6 +299,8 @@ cd %{_prefix}/sounds/en/us/callie
|
|||
##############################################################################
|
||||
|
||||
%changelog
|
||||
* Sun May 22 2011 Michal Bielicki <michal.bielicki@seventhsignal.de> - 1.0.16-1
|
||||
- bump up version
|
||||
* Tue Jan 18 2011 Michal Bielicki <michal.bielicki@seventhsignal.de> - 1.0.14-1
|
||||
- bump up version
|
||||
- include script into freeswitch core
|
||||
|
|
|
@ -63,12 +63,12 @@ Vendor: http://www.freeswitch.org/
|
|||
# Source files and where to get them
|
||||
#
|
||||
######################################################################################################################
|
||||
Source0: http://files.freeswitch.org/%{name}-%{version}.tar.bz2
|
||||
Source0: http://files.freeswitch.org/%{name}-%{version}.tar.bz2
|
||||
Source1: http://files.freeswitch.org/downloads/libs/celt-0.10.0.tar.gz
|
||||
Source2: http://files.freeswitch.org/downloads/libs/flite-1.3.99-latest.tar.gz
|
||||
Source3: http://files.freeswitch.org/downloads/libs/lame-3.97.tar.gz
|
||||
Source4: http://files.freeswitch.org/downloads/libs/libshout-2.2.2.tar.gz
|
||||
Source5: http://files.freeswitch.org/downloads/libs/mpg123.tar.gz
|
||||
Source5: http://files.freeswitch.org/downloads/libs/mpg123-1.13.2.tar.gz
|
||||
Source6: http://files.freeswitch.org/downloads/libs/openldap-2.4.11.tar.gz
|
||||
Source7: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.5.99-20091212.tar.gz
|
||||
Source8: http://files.freeswitch.org/downloads/libs/soundtouch-1.3.1.tar.gz
|
||||
|
@ -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
|
||||
|
@ -775,6 +776,7 @@ fi
|
|||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/logfile.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/memcache.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/modules.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/mongo.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/nibblebill.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/opal.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/osp.conf.xml
|
||||
|
@ -1064,10 +1066,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 +1090,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 +1102,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 +1114,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
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ESL", "esl_lua.2010.vcxproj", "{86B6AB99-A261-455A-9CD6-9142A5A1652E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Debug|x64.Build.0 = Debug|x64
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Release|Win32.Build.0 = Release|Win32
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Release|x64.ActiveCfg = Release|x64
|
||||
{86B6AB99-A261-455A-9CD6-9142A5A1652E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,178 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>ESL</ProjectName>
|
||||
<ProjectGuid>{86B6AB99-A261-455A-9CD6-9142A5A1652E}</ProjectGuid>
|
||||
<RootNamespace>esl_lua.2010</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\src\mod\languages\mod_lua\lua\;$(ProjectDir)..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ESL_DECLARE_STATIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;lua51.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\$(Platform)\$(Configuration)\;$(ProjectDir)..\..\..\libs\esl\src\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\src\mod\languages\mod_lua\lua\;$(ProjectDir)..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ESL_DECLARE_STATIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;lua51.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\$(Platform)\$(Configuration)\;$(ProjectDir)..\..\..\libs\esl\src\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\src\mod\languages\mod_lua\lua\;$(ProjectDir)..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ESL_DECLARE_STATIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;lua51.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\$(Platform)\$(Configuration);$(ProjectDir)..\..\..\libs\esl\src\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\src\mod\languages\mod_lua\lua\;$(ProjectDir)..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ESL_DECLARE_STATIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;lua51.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\$(Platform)\$(Configuration);$(ProjectDir)..\..\..\libs\esl\src\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\esl_oop.cpp" />
|
||||
<ClCompile Include="esl_wrap.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\esl_oop.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_wrap.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -73,13 +73,13 @@ sub setVar($;) {
|
|||
|
||||
sub playAndGetDigits($;) {
|
||||
my $self = shift;
|
||||
my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var, $regex) = @_;
|
||||
my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var, $regex, $digit_timeout) = @_;
|
||||
|
||||
if (!$self->{_esl}->connected()) {
|
||||
return undef;
|
||||
}
|
||||
|
||||
$self->execute("play_and_get_digits", "$min $max $tries $to $term $file $invalid_file $var $regex");
|
||||
$self->execute("play_and_get_digits", "$min $max $tries $to $term $file $invalid_file $var $regex $digit_timeout");
|
||||
|
||||
return $self->getVar($var);
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ static void default_logger(const char *file, const char *func, int line, int lev
|
|||
ret = esl_vasprintf(&data, fmt, ap);
|
||||
|
||||
if (ret != -1) {
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", LEVEL_NAMES[level], file, line, func, data);
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", LEVEL_NAMES[level], fp, line, func, data);
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -294,6 +294,19 @@ if test "${HAVE_SNG_SS7}" = "yes"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
##
|
||||
# zlib (required for Sangoma SS7 Transparent IAM)
|
||||
#
|
||||
HAVE_ZLIB="no"
|
||||
AC_MSG_RESULT([${as_nl}<<>> zlib])
|
||||
AC_CHECK_LIB([z], [compress], [HAVE_ZLIB="yes"])
|
||||
AC_MSG_RESULT([checking whether zlib is installed... ${HAVE_ZLIB}])
|
||||
AM_CONDITIONAL([HAVE_ZLIB], [test "{HAVE_ZLIB]" = "yes"])
|
||||
if test "${HAVE_ZLIB}" = "yes"; then
|
||||
CFLAGS="$CFLAGS -DHAVE_ZLIB"
|
||||
fi
|
||||
|
||||
##
|
||||
# libisdn
|
||||
#
|
||||
|
|
|
@ -87,7 +87,7 @@ static struct {
|
|||
analog_option_t analog_options;
|
||||
switch_hash_t *ss7_configs;
|
||||
int sip_headers;
|
||||
uint8_t crash_on_assert;
|
||||
int crash_on_assert;
|
||||
} globals;
|
||||
|
||||
/* private data attached to each fs session */
|
||||
|
@ -130,6 +130,10 @@ struct span_config {
|
|||
int limit_calls;
|
||||
int limit_seconds;
|
||||
limit_reset_event_t limit_reset_event;
|
||||
/* digital codec and digital sampling rate are used to configure the codec
|
||||
* when bearer capability is set to unrestricted digital */
|
||||
const char *digital_codec;
|
||||
int digital_sampling_rate;
|
||||
chan_pvt_t pvts[FTDM_MAX_CHANNELS_SPAN];
|
||||
};
|
||||
|
||||
|
@ -294,13 +298,11 @@ static void cycle_foreground(ftdm_channel_t *ftdmchan, int flash, const char *bc
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *session, ftdm_channel_t *ftdmchan)
|
||||
static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *session, ftdm_channel_t *ftdmchan, ftdm_caller_data_t *caller_data)
|
||||
{
|
||||
const char *dname = NULL;
|
||||
uint32_t interval = 0, srate = 8000;
|
||||
uint32_t span_id;
|
||||
ftdm_codec_t codec;
|
||||
|
||||
tech_pvt->ftdmchan = ftdmchan;
|
||||
|
@ -321,6 +323,16 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses
|
|||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
span_id = ftdm_channel_get_span_id(ftdmchan);
|
||||
if (caller_data->bearer_capability == FTDM_BEARER_CAP_UNRESTRICTED
|
||||
&& SPAN_CONFIG[span_id].digital_codec) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Initializing digital call with codec %s at %dhz.\n",
|
||||
SPAN_CONFIG[span_id].digital_codec, SPAN_CONFIG[span_id].digital_sampling_rate);
|
||||
dname = SPAN_CONFIG[span_id].digital_codec;
|
||||
srate = SPAN_CONFIG[span_id].digital_sampling_rate;
|
||||
goto init_codecs;
|
||||
}
|
||||
|
||||
if (FTDM_SUCCESS != ftdm_channel_command(ftdmchan, FTDM_COMMAND_GET_CODEC, &codec)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to retrieve channel codec.\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
|
@ -349,6 +361,7 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses
|
|||
}
|
||||
}
|
||||
|
||||
init_codecs:
|
||||
|
||||
if (switch_core_codec_init(&tech_pvt->read_codec,
|
||||
dname,
|
||||
|
@ -720,7 +733,6 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
ftdm_size_t len;
|
||||
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
|
||||
ftdm_wait_flag_t wflags = FTDM_WRITE;
|
||||
ftdm_status_t status;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
@ -755,7 +767,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
|
||||
|
||||
wflags = FTDM_WRITE;
|
||||
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
|
||||
ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
|
||||
|
||||
if (!(wflags & FTDM_WRITE)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Dropping frame! (write not ready)\n");
|
||||
|
@ -1094,7 +1106,7 @@ static ftdm_status_t on_channel_found(ftdm_channel_t *fchan, ftdm_caller_data_t
|
|||
span_id = ftdm_channel_get_span_id(fchan);
|
||||
chan_id = ftdm_channel_get_id(fchan);
|
||||
|
||||
tech_init(hdata->tech_pvt, hdata->new_session, fchan);
|
||||
tech_init(hdata->tech_pvt, hdata->new_session, fchan, caller_data);
|
||||
|
||||
snprintf(name, sizeof(name), "FreeTDM/%u:%u/%s", span_id, chan_id, caller_data->dnis.digits);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connect outbound channel %s\n", name);
|
||||
|
@ -1299,35 +1311,83 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS");
|
||||
if (sipvar) {
|
||||
ftdm_set_string(caller_data.rdnis.digits, sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS-TON");
|
||||
if (sipvar) {
|
||||
caller_data.rdnis.type = (uint8_t)atoi(sipvar);
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_rdnis_digits", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS-Plan");
|
||||
if (sipvar) {
|
||||
caller_data.rdnis.plan = (uint8_t)atoi(sipvar);
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_rdnis_plan", 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-RDNIS-Screen");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_rdnis_screen_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS-Presentation");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_rdnis_pres_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_digits", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-NumQual");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_numqual", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-NADI");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_nadi", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-Screen");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_screen_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-Presentation");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_pres_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-Plan");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_npi", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-GN-NumInComp");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_gn_num_inc_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-Screen");
|
||||
if (sipvar) {
|
||||
caller_data.screen = (uint8_t)atoi(sipvar);
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_screen_ind", sipvar);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-Presentation");
|
||||
if (sipvar) {
|
||||
caller_data.pres = (uint8_t)atoi(sipvar);
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_pres_ind", sipvar);
|
||||
}
|
||||
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-CPC");
|
||||
if (sipvar) {
|
||||
ftdm_set_calling_party_category(sipvar, (uint8_t *)&caller_data.cpc);
|
||||
}
|
||||
|
||||
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-IAM");
|
||||
if (sipvar) {
|
||||
ftdm_usrmsg_add_var(&usrmsg, "ss7_iam", sipvar);
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_test_flag(outbound_profile, SWITCH_CPF_SCREEN)) {
|
||||
|
@ -1343,19 +1403,19 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
}
|
||||
|
||||
if ((var = channel_get_variable(session, var_event, "freetdm_bearer_layer1"))) {
|
||||
caller_data.bearer_layer1 = (uint8_t)atoi(var);
|
||||
caller_data.bearer_layer1 = (uint8_t)atoi(var);
|
||||
}
|
||||
|
||||
if ((var = channel_get_variable(session, var_event, "freetdm_screening_ind"))) {
|
||||
ftdm_set_screening_ind(var, &caller_data.screen);
|
||||
ftdm_set_screening_ind(var, &caller_data.screen);
|
||||
}
|
||||
|
||||
if ((var = channel_get_variable(session, var_event, "freetdm_presentation_ind"))) {
|
||||
ftdm_set_presentation_ind(var, &caller_data.pres);
|
||||
ftdm_set_presentation_ind(var, &caller_data.pres);
|
||||
}
|
||||
|
||||
if ((var = channel_get_variable(session, var_event, "freetdm_outbound_ton"))) {
|
||||
ftdm_set_ton(var, &caller_data.dnis.type);
|
||||
ftdm_set_ton(var, &caller_data.dnis.type);
|
||||
} else {
|
||||
caller_data.dnis.type = outbound_profile->destination_number_ton;
|
||||
}
|
||||
|
@ -1400,7 +1460,13 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
if (!strncasecmp(h->name, FREETDM_VAR_PREFIX, FREETDM_VAR_PREFIX_LEN)) {
|
||||
char *v = h->name + FREETDM_VAR_PREFIX_LEN;
|
||||
if (!zstr(v)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding outbound freetdm variable %s=%s to channel %d:%d\n", v, h->value, span_id, chan_id);
|
||||
if (!strcasecmp(v, "ss7_iam")) {
|
||||
/* Do not print the value of ss7_iam as it is very long */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding outbound freetdm variable %s to channel %d:%d\n", v, span_id, chan_id);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding outbound freetdm variable %s=%s to channel %d:%d\n", v, h->value, span_id, chan_id);
|
||||
}
|
||||
|
||||
ftdm_usrmsg_add_var(&usrmsg, v, h->value);
|
||||
}
|
||||
}
|
||||
|
@ -1503,7 +1569,7 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
tech_pvt = (private_t *) switch_core_session_alloc(session, sizeof(private_t));
|
||||
assert(tech_pvt != NULL);
|
||||
channel = switch_core_session_get_channel(session);
|
||||
if (tech_init(tech_pvt, session, sigmsg->channel) != SWITCH_STATUS_SUCCESS) {
|
||||
if (tech_init(tech_pvt, session, sigmsg->channel, channel_caller_data) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Initilization Error!\n");
|
||||
switch_core_session_destroy(&session);
|
||||
return FTDM_FAIL;
|
||||
|
@ -1565,9 +1631,11 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
switch_channel_set_variable_printf(channel, "freetdm_chan_number", "%d", chanid);
|
||||
switch_channel_set_variable_printf(channel, "freetdm_bearer_capability", "%d", channel_caller_data->bearer_capability);
|
||||
switch_channel_set_variable_printf(channel, "freetdm_bearer_layer1", "%d", channel_caller_data->bearer_layer1);
|
||||
switch_channel_set_variable_printf(channel, "freetdm_calling_party_category", ftdm_calling_party_category2str(channel_caller_data->cpc));
|
||||
switch_channel_set_variable_printf(channel, "screening_ind", ftdm_screening2str(channel_caller_data->screen));
|
||||
switch_channel_set_variable_printf(channel, "presentation_ind", ftdm_presentation2str(channel_caller_data->pres));
|
||||
|
||||
|
||||
if (globals.sip_headers) {
|
||||
switch_channel_set_variable(channel, "sip_h_X-FreeTDM-SpanName", ftdm_channel_get_span_name(sigmsg->channel));
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-SpanNumber", "%d", spanid);
|
||||
|
@ -1586,9 +1654,61 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-DNIS-Plan", "%d", channel_caller_data->dnis.plan);
|
||||
|
||||
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-NADI", "%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-CPC", "%s", ftdm_calling_party_category2str(channel_caller_data->cpc));
|
||||
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_rdnis_screen_ind");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-RDNIS-Screen", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_rdnis_pres_ind");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-RDNIS-Presentation", "%d", channel_caller_data->rdnis.plan);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_digits");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN", "%d", var_value);
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_numqual");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-NumQual", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_nadi");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-NADI", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_screen_ind");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-Screen", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_pres_ind");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-Presentation", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_npi");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-Plan", "%d", var_value);
|
||||
}
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_num_inc_ind");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-GN-NumInComp", "%d", var_value);
|
||||
}
|
||||
} /* End - var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_gn_digits"); */
|
||||
|
||||
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_iam");
|
||||
if (!ftdm_strlen_zero(var_value)) {
|
||||
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-IAM", "%s", var_value);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -1599,7 +1719,12 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
ftdm_get_current_var(curr, &var_name, &var_value);
|
||||
snprintf(name, sizeof(name), FREETDM_VAR_PREFIX "%s", var_name);
|
||||
switch_channel_set_variable_printf(channel, name, "%s", var_value);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call Variable: %s = %s\n", name, var_value);
|
||||
if (!strcasecmp(var_name, "ss7_iam")) {
|
||||
/* Do not print freetdm_ss7_iam as it is a very long variable */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call Variable: %s is present\n", name);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call Variable: %s = %s\n", name, var_value);
|
||||
}
|
||||
}
|
||||
ftdm_iterator_free(iter);
|
||||
|
||||
|
@ -2584,6 +2709,7 @@ static void parse_bri_pri_spans(switch_xml_t cfg, switch_xml_t spans)
|
|||
/* some defaults first */
|
||||
SPAN_CONFIG[span_id].limit_backend = "hash";
|
||||
SPAN_CONFIG[span_id].limit_reset_event = FTDM_LIMIT_RESET_ON_TIMEOUT;
|
||||
SPAN_CONFIG[span_id].digital_sampling_rate = 8000;
|
||||
|
||||
for (param = switch_xml_child(myspan, "param"); param; param = param->next) {
|
||||
char *var = (char *) switch_xml_attr_soft(param, "name");
|
||||
|
@ -2598,6 +2724,21 @@ static void parse_bri_pri_spans(switch_xml_t cfg, switch_xml_t spans)
|
|||
context = val;
|
||||
} else if (!strcasecmp(var, "dialplan")) {
|
||||
dialplan = val;
|
||||
} else if (!strcasecmp(var, "unrestricted-digital-codec")) {
|
||||
//switch_core_strdup(pool, val);
|
||||
const switch_codec_implementation_t *codec = NULL;
|
||||
int num_codecs;
|
||||
num_codecs = switch_loadable_module_get_codecs_sorted(&codec, 1, &val, 1);
|
||||
if (num_codecs != 1 || !codec) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
||||
"Failed finding codec %s for unrestricted digital calls\n", val);
|
||||
} else {
|
||||
SPAN_CONFIG[span_id].digital_codec = switch_core_strdup(module_pool, codec->iananame);
|
||||
SPAN_CONFIG[span_id].digital_sampling_rate = codec->samples_per_second;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||
"Unrestricted digital codec is %s at %dhz for span %d\n",
|
||||
SPAN_CONFIG[span_id].digital_codec, SPAN_CONFIG[span_id].digital_sampling_rate, span_id);
|
||||
}
|
||||
} else if (!strcasecmp(var, "call_limit_backend")) {
|
||||
SPAN_CONFIG[span_id].limit_backend = val;
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Using limit backend %s for span %d\n", SPAN_CONFIG[span_id].limit_backend, span_id);
|
||||
|
@ -3519,6 +3660,12 @@ void dump_chan(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *stre
|
|||
"physical_span_id: %u\n"
|
||||
"physical_chan_id: %u\n"
|
||||
"physical_status: %s\n"
|
||||
"physical_status_red: %d\n"
|
||||
"physical_status_yellow: %d\n"
|
||||
"physical_status_rai: %d\n"
|
||||
"physical_status_blue: %d\n"
|
||||
"physical_status_ais: %d\n"
|
||||
"physical_status_general: %d\n"
|
||||
"signaling_status: %s\n"
|
||||
"type: %s\n"
|
||||
"state: %s\n"
|
||||
|
@ -3539,7 +3686,13 @@ void dump_chan(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *stre
|
|||
phspan_id,
|
||||
phchan_id,
|
||||
alarmflag ? "alarmed" : "ok",
|
||||
ftdm_signaling_status2str(sigstatus),
|
||||
(alarmflag & FTDM_ALARM_RED) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_YELLOW) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_RAI) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_BLUE) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_AIS) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_GENERAL) ? 1 : 0,
|
||||
ftdm_signaling_status2str(sigstatus),
|
||||
chan_type,
|
||||
state,
|
||||
last_state,
|
||||
|
@ -3595,6 +3748,12 @@ void dump_chan_xml(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *
|
|||
" <physical-span-id>%u</physical-span-id>\n"
|
||||
" <physical-chan-id>%u</physical-chan-id>\n"
|
||||
" <physical-status>%s</physical-status>\n"
|
||||
" <physical-status-red>%d</physical-status-red>\n"
|
||||
" <physical-status-yellow>%d</physical-status-yellow>\n"
|
||||
" <physical-status-rai>%d</physical-status-rai>\n"
|
||||
" <physical-status-blue>%d</physical-status-blue>\n"
|
||||
" <physical-status-ais>%d</physical-status-ais>\n"
|
||||
" <physical-status-general>%d</physical-status-general>\n"
|
||||
" <signaling-status>%s</signaling-status>\n"
|
||||
" <type>%s</type>\n"
|
||||
" <state>%s</state>\n"
|
||||
|
@ -3615,7 +3774,13 @@ void dump_chan_xml(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *
|
|||
phspan_id,
|
||||
phchan_id,
|
||||
alarmflag ? "alarmed" : "ok",
|
||||
ftdm_signaling_status2str(sigstatus),
|
||||
(alarmflag & FTDM_ALARM_RED) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_YELLOW) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_RAI) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_BLUE) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_AIS) ? 1 : 0,
|
||||
(alarmflag & FTDM_ALARM_GENERAL) ? 1 : 0,
|
||||
ftdm_signaling_status2str(sigstatus),
|
||||
chan_type,
|
||||
state,
|
||||
last_state,
|
||||
|
|
|
@ -42,6 +42,74 @@
|
|||
#include <ctype.h>
|
||||
|
||||
|
||||
|
||||
|
||||
FT_DECLARE(char *) ftdm_url_encode(const char *url, char *buf, ftdm_size_t len)
|
||||
{
|
||||
/* This implementation of url_encode is slightly different compared to the
|
||||
* Freeswitch one. This is because this implementation accepts the full
|
||||
* range of values (0x00 - 0xFF) compared to the Freeswitch implementation
|
||||
* that does not accept 0x00 */
|
||||
|
||||
const char *p;
|
||||
size_t x = 0,y = 0;
|
||||
const char urlunsafe[] = "\r\n \"#%&+:;<=>?@[\\]^`{|}";
|
||||
const char hex[] = "0123456789ABCDEF";
|
||||
|
||||
if (!buf) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!url) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
len--;
|
||||
|
||||
for (p = url; y <= len; p++) {
|
||||
if (*p < ' ' || *p > '~' || strchr(urlunsafe, *p)) {
|
||||
buf[x++] = '%';
|
||||
buf[x++] = hex[(*p >> 4) & 0x0f];
|
||||
buf[x++] = hex[*p & 0x0f];
|
||||
} else {
|
||||
buf[x++] = *p;
|
||||
}
|
||||
y++;
|
||||
}
|
||||
buf[x] = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
FT_DECLARE(char *) ftdm_url_decode(char *s, ftdm_size_t *len)
|
||||
{
|
||||
/* This implementation of url_decode is slightly different compared to the
|
||||
* Freeswitch one. This is because this implementation accepts the full
|
||||
* range of values (0x00 - 0xFF) compared to the Freeswitch implementation
|
||||
* that does not accept 0x00 */
|
||||
|
||||
char *o;
|
||||
unsigned int tmp;
|
||||
ftdm_size_t mylen = 0;
|
||||
|
||||
if (ftdm_strlen_zero(s)) {
|
||||
return s;
|
||||
}
|
||||
|
||||
for (o = s; *s; s++, o++) {
|
||||
if (*s == '%' && strlen(s) > 2 && sscanf(s + 1, "%2x", &tmp) == 1) {
|
||||
*o = (char) tmp;
|
||||
s += 2;
|
||||
} else {
|
||||
*o = *s;
|
||||
}
|
||||
mylen++;
|
||||
}
|
||||
*o = '\0';
|
||||
*len = mylen;
|
||||
return s;
|
||||
}
|
||||
|
||||
FT_DECLARE(ftdm_status_t) ftdm_set_npi(const char *string, uint8_t *target)
|
||||
{
|
||||
uint8_t val;
|
||||
|
|
|
@ -310,21 +310,6 @@ FTDM_STR2ENUM(ftdm_str2channel_indication, ftdm_channel_indication2str, ftdm_cha
|
|||
|
||||
static ftdm_status_t ftdm_group_add_channels(ftdm_span_t* span, int currindex, const char* name);
|
||||
|
||||
static const char *cut_path(const char *in)
|
||||
{
|
||||
const char *p, *ret = in;
|
||||
char delims[] = "/\\";
|
||||
char *i;
|
||||
|
||||
for (i = delims; *i; i++) {
|
||||
p = in;
|
||||
while ((p = strchr(p, *i)) != 0) {
|
||||
ret = ++p;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void null_logger(const char *file, const char *func, int line, int level, const char *fmt, ...)
|
||||
{
|
||||
if (file && func && line && level && fmt) {
|
||||
|
@ -350,7 +335,6 @@ static int ftdm_log_level = FTDM_LOG_LEVEL_DEBUG;
|
|||
|
||||
static void default_logger(const char *file, const char *func, int line, int level, const char *fmt, ...)
|
||||
{
|
||||
const char *fp;
|
||||
char data[1024];
|
||||
va_list ap;
|
||||
|
||||
|
@ -360,14 +344,11 @@ static void default_logger(const char *file, const char *func, int line, int lev
|
|||
if (level > ftdm_log_level) {
|
||||
return;
|
||||
}
|
||||
|
||||
fp = cut_path(file);
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
vsnprintf(data, sizeof(data), fmt, ap);
|
||||
|
||||
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", FTDM_LEVEL_NAMES[level], file, line, func, data);
|
||||
|
||||
va_end(ap);
|
||||
|
@ -411,13 +392,13 @@ FT_DECLARE(void) ftdm_set_echocancel_call_begin(ftdm_channel_t *chan)
|
|||
if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC)) {
|
||||
if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC_DISABLED_ON_IDLE)) {
|
||||
/* If the ec is disabled on idle, we need to enable it unless is a digital call */
|
||||
if (caller_data->bearer_capability != FTDM_BEARER_CAP_64K_UNRESTRICTED) {
|
||||
if (caller_data->bearer_capability != FTDM_BEARER_CAP_UNRESTRICTED) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "Enabling ec for call in channel state %s\n", ftdm_channel_state2str(chan->state));
|
||||
ftdm_channel_command(chan, FTDM_COMMAND_ENABLE_ECHOCANCEL, NULL);
|
||||
}
|
||||
} else {
|
||||
/* If the ec is enabled on idle, we do nothing unless is a digital call that needs it disabled */
|
||||
if (caller_data->bearer_capability == FTDM_BEARER_CAP_64K_UNRESTRICTED) {
|
||||
if (caller_data->bearer_capability == FTDM_BEARER_CAP_UNRESTRICTED) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "Disabling ec for digital call in channel state %s\n", ftdm_channel_state2str(chan->state));
|
||||
ftdm_channel_command(chan, FTDM_COMMAND_DISABLE_ECHOCANCEL, NULL);
|
||||
}
|
||||
|
@ -508,13 +489,16 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_set_caller_data(ftdm_channel_t *ftdmchan,
|
|||
{
|
||||
ftdm_status_t err = FTDM_SUCCESS;
|
||||
if (!ftdmchan) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Error: trying to set caller data, but no ftdmchan!\n");
|
||||
ftdm_log(FTDM_LOG_CRIT, "trying to set caller data, but no ftdmchan!\n");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
if ((err = ftdm_set_caller_data(ftdmchan->span, caller_data)) != FTDM_SUCCESS) {
|
||||
return err;
|
||||
}
|
||||
ftdmchan->caller_data = *caller_data;
|
||||
if (ftdmchan->caller_data.bearer_capability == FTDM_BEARER_CAP_UNRESTRICTED) {
|
||||
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_DIGITAL_MEDIA);
|
||||
}
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -2628,6 +2612,7 @@ static ftdm_status_t ftdm_channel_done(ftdm_channel_t *ftdmchan)
|
|||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_MEDIA);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_ANSWERED);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_USER_HANGUP);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_DIGITAL_MEDIA);
|
||||
ftdm_mutex_lock(ftdmchan->pre_buffer_mutex);
|
||||
ftdm_buffer_destroy(&ftdmchan->pre_buffer);
|
||||
ftdmchan->pre_buffer_size = 0;
|
||||
|
@ -3566,7 +3551,7 @@ static FIO_READ_FUNCTION(ftdm_raw_read)
|
|||
|
||||
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;
|
||||
ftdm_size_t i = 0;
|
||||
unsigned char *rdata = data;
|
||||
for (i = 0; i < *datalen; i++) {
|
||||
rdata[i] = ftdmchan->rxgain_table[rdata[i]];
|
||||
|
@ -3780,6 +3765,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
|||
|
||||
handle_tone_generation(ftdmchan);
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_DIGITAL_MEDIA)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_TRANSCODE) && ftdmchan->effective_codec != ftdmchan->native_codec) {
|
||||
if (ftdmchan->native_codec == FTDM_CODEC_ULAW && ftdmchan->effective_codec == FTDM_CODEC_SLIN) {
|
||||
codec_func = fio_ulaw2slin;
|
||||
|
@ -3934,7 +3923,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
|||
ftdm_mutex_unlock(ftdmchan->pre_buffer_mutex);
|
||||
|
||||
|
||||
memset(data, 255, *datalen);
|
||||
memset(data, FTDM_SILENCE_VALUE(ftdmchan), *datalen);
|
||||
|
||||
if (ftdmchan->skip_read_frames > 0) {
|
||||
ftdmchan->skip_read_frames--;
|
||||
|
@ -3946,7 +3935,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
|||
if (ftdm_buffer_inuse(ftdmchan->pre_buffer) >= ftdmchan->pre_buffer_size) {
|
||||
ftdm_buffer_read(ftdmchan->pre_buffer, data, *datalen);
|
||||
} else {
|
||||
memset(data, 255, *datalen);
|
||||
memset(data, FTDM_SILENCE_VALUE(ftdmchan), *datalen);
|
||||
}
|
||||
}
|
||||
ftdm_mutex_unlock(ftdmchan->pre_buffer_mutex);
|
||||
|
@ -3994,6 +3983,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_write(ftdm_channel_t *ftdmchan, void *dat
|
|||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_DIGITAL_MEDIA)) {
|
||||
goto do_write;
|
||||
}
|
||||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_TRANSCODE) && ftdmchan->effective_codec != ftdmchan->native_codec) {
|
||||
if (ftdmchan->native_codec == FTDM_CODEC_ULAW && ftdmchan->effective_codec == FTDM_CODEC_SLIN) {
|
||||
|
@ -4025,6 +4018,8 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_write(ftdm_channel_t *ftdmchan, void *dat
|
|||
}
|
||||
}
|
||||
|
||||
do_write:
|
||||
|
||||
if (ftdmchan->span->sig_write) {
|
||||
status = ftdmchan->span->sig_write(ftdmchan, data, *datalen);
|
||||
if (status == FTDM_BREAK) {
|
||||
|
@ -5374,10 +5369,12 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t
|
|||
ftdm_set_flag(sigmsg->channel, FTDM_CHANNEL_CALL_STARTED);
|
||||
ftdm_call_set_call_id(sigmsg->channel, &sigmsg->channel->caller_data);
|
||||
/* when cleaning up the public API I added this because mod_freetdm.c on_fxs_signal was
|
||||
* doing it during SIGEVENT_START, but now that flags are private they can't, wonder if
|
||||
* is needed at all?
|
||||
* */
|
||||
* doing it during SIGEVENT_START, but now that flags are private they can't, wonder if
|
||||
* is needed at all? */
|
||||
ftdm_clear_flag(sigmsg->channel, FTDM_CHANNEL_HOLD);
|
||||
if (sigmsg->channel->caller_data.bearer_capability == FTDM_BEARER_CAP_UNRESTRICTED) {
|
||||
ftdm_set_flag(sigmsg->channel, FTDM_CHANNEL_DIGITAL_MEDIA);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -426,7 +426,6 @@ static void *ftdm_analog_channel_run(ftdm_thread_t *me, void *obj)
|
|||
uint32_t state_counter = 0, elapsed = 0, collecting = 0, interval = 0, last_digit = 0, indicate = 0, dial_timeout = analog_data->wait_dialtone_timeout;
|
||||
uint32_t answer_on_polarity_counter = 0;
|
||||
ftdm_sigmsg_t sig;
|
||||
ftdm_status_t status;
|
||||
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "ANALOG CHANNEL thread starting.\n");
|
||||
|
||||
|
@ -916,7 +915,7 @@ static void *ftdm_analog_channel_run(ftdm_thread_t *me, void *obj)
|
|||
}
|
||||
|
||||
if (codec_func) {
|
||||
status = codec_func(frame, sizeof(frame), &rlen);
|
||||
codec_func(frame, sizeof(frame), &rlen);
|
||||
} else {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "codec error!");
|
||||
goto done;
|
||||
|
|
|
@ -221,7 +221,6 @@ static void *ftdm_analog_em_channel_run(ftdm_thread_t *me, void *obj)
|
|||
ftdm_channel_t *closed_chan;
|
||||
uint32_t state_counter = 0, elapsed = 0, collecting = 0, interval = 0, last_digit = 0, indicate = 0, dial_timeout = 30000;
|
||||
ftdm_sigmsg_t sig;
|
||||
ftdm_status_t status;
|
||||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "ANALOG EM CHANNEL thread starting.\n");
|
||||
|
||||
|
@ -545,7 +544,7 @@ static void *ftdm_analog_em_channel_run(ftdm_thread_t *me, void *obj)
|
|||
}
|
||||
|
||||
if (codec_func) {
|
||||
status = codec_func(frame, sizeof(frame), &rlen);
|
||||
codec_func(frame, sizeof(frame), &rlen);
|
||||
} else {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "codec error!");
|
||||
goto done;
|
||||
|
|
|
@ -979,7 +979,6 @@ static L3INT ftdm_isdn_931_34(void *pvt, struct Q931_Call *call, Q931mes_Generic
|
|||
{
|
||||
Q931ie_CallingNum *callingnum = Q931GetIEPtr(gen->CallingNum, gen->buf);
|
||||
Q931ie_CalledNum *callednum = Q931GetIEPtr(gen->CalledNum, gen->buf);
|
||||
uint32_t cplen = mlen;
|
||||
int overlap_dial = 0;
|
||||
int fail_cause = 0;
|
||||
int fail = 1;
|
||||
|
@ -2128,7 +2127,7 @@ static int ftdm_isdn_q921_log(void *pvt, Q921LogLevel_t level, char *msg, L2INT
|
|||
return 0;
|
||||
}
|
||||
|
||||
static L3INT ftdm_isdn_q931_log(void *pvt, Q931LogLevel_t level, char *msg, L3INT size)
|
||||
static L3INT ftdm_isdn_q931_log(void *pvt, Q931LogLevel_t level, const char *msg, L3INT size)
|
||||
{
|
||||
ftdm_span_t *span = (ftdm_span_t *) pvt;
|
||||
|
||||
|
|
|
@ -562,14 +562,18 @@ static ftdm_status_t state_advance(ftdm_channel_t *chan)
|
|||
sig.chan_id = ftdm_channel_get_id(chan);
|
||||
sig.span_id = ftdm_channel_get_span_id(chan);
|
||||
sig.channel = chan;
|
||||
|
||||
|
||||
ftdm_channel_complete_state(chan);
|
||||
|
||||
switch (ftdm_channel_get_state(chan)) {
|
||||
case FTDM_CHANNEL_STATE_DOWN:
|
||||
{
|
||||
ftdm_channel_t *chtmp = chan;
|
||||
chan->call_data = NULL;
|
||||
|
||||
if (call) {
|
||||
pri_destroycall(isdn_data->spri.pri, call);
|
||||
chan->call_data = NULL;
|
||||
}
|
||||
|
||||
if (ftdm_channel_close(&chtmp) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_WARNING, "-- Failed to close channel %d:%d\n",
|
||||
|
@ -776,8 +780,7 @@ static ftdm_status_t state_advance(ftdm_channel_t *chan)
|
|||
|
||||
pri_hangup(isdn_data->spri.pri, call, caller_data->hangup_cause);
|
||||
// pri_destroycall(isdn_data->spri.pri, call);
|
||||
|
||||
chan->call_data = NULL;
|
||||
// chan->call_data = NULL;
|
||||
}
|
||||
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE);
|
||||
}
|
||||
|
@ -785,10 +788,10 @@ static ftdm_status_t state_advance(ftdm_channel_t *chan)
|
|||
|
||||
case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
{
|
||||
if (call) {
|
||||
pri_destroycall(isdn_data->spri.pri, call);
|
||||
chan->call_data = NULL;
|
||||
}
|
||||
// if (call) {
|
||||
// pri_destroycall(isdn_data->spri.pri, call);
|
||||
// chan->call_data = NULL;
|
||||
// }
|
||||
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_DOWN);
|
||||
}
|
||||
break;
|
||||
|
@ -854,7 +857,6 @@ static int on_hangup(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_even
|
|||
{
|
||||
ftdm_span_t *span = spri->span;
|
||||
ftdm_channel_t *chan = ftdm_span_get_channel(span, pevent->hangup.channel);
|
||||
q931_call *call = NULL;
|
||||
|
||||
if (!chan) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "-- Hangup on channel %d:%d %s but it's not in use?\n", ftdm_span_get_id(spri->span), pevent->hangup.channel);
|
||||
|
@ -863,27 +865,61 @@ static int on_hangup(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_even
|
|||
|
||||
ftdm_channel_lock(chan);
|
||||
|
||||
if (ftdm_channel_get_state(chan) >= FTDM_CHANNEL_STATE_TERMINATING) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "Ignoring remote hangup in state %s\n", ftdm_channel_get_state_str(chan));
|
||||
goto done;
|
||||
switch (event_type) {
|
||||
case LPWRAP_PRI_EVENT_HANGUP_REQ: /* DISCONNECT */
|
||||
if (ftdm_channel_get_state(chan) >= FTDM_CHANNEL_STATE_TERMINATING) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "Ignoring remote hangup in state %s\n",
|
||||
ftdm_channel_get_state_str(chan));
|
||||
goto done;
|
||||
}
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Hangup REQ on channel %d:%d\n",
|
||||
ftdm_span_get_id(spri->span), pevent->hangup.channel);
|
||||
|
||||
pri_hangup(spri->pri, pevent->hangup.call, pevent->hangup.cause);
|
||||
|
||||
chan->caller_data.hangup_cause = pevent->hangup.cause;
|
||||
ftdm_set_state(chan, FTDM_CHANNEL_STATE_TERMINATING);
|
||||
break;
|
||||
|
||||
case LPWRAP_PRI_EVENT_HANGUP_ACK: /* */
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Hangup ACK on channel %d:%d\n",
|
||||
ftdm_span_get_id(spri->span), pevent->hangup.channel);
|
||||
|
||||
pri_hangup(spri->pri, pevent->hangup.call, pevent->hangup.cause);
|
||||
|
||||
ftdm_set_state(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE);
|
||||
break;
|
||||
|
||||
case LPWRAP_PRI_EVENT_HANGUP: /* "RELEASE/RELEASE_COMPLETE/other" */
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Hangup on channel %d:%d\n",
|
||||
ftdm_span_get_id(spri->span), pevent->hangup.channel);
|
||||
|
||||
switch (ftdm_channel_get_state(chan)) {
|
||||
case FTDM_CHANNEL_STATE_DIALING:
|
||||
case FTDM_CHANNEL_STATE_RINGING:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS_MEDIA:
|
||||
case FTDM_CHANNEL_STATE_PROCEED:
|
||||
case FTDM_CHANNEL_STATE_UP:
|
||||
chan->caller_data.hangup_cause = pevent->hangup.cause;
|
||||
ftdm_set_state(chan, FTDM_CHANNEL_STATE_TERMINATING);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_HANGUP:
|
||||
chan->caller_data.hangup_cause = pevent->hangup.cause;
|
||||
ftdm_set_state(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE);
|
||||
break;
|
||||
// case FTDM_CHANNEL_STATE_TERMINATING:
|
||||
// ftdm_set_state(chan, FTDM_CHANNEL_STATE_HANGUP);
|
||||
// break;
|
||||
// case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
// ftdm_set_state(chan, FTDM_CHANNEL_STATE_DOWN);
|
||||
// break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!chan->call_data) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "Ignoring remote hangup in state %s with no call data\n", ftdm_channel_get_state_str(chan));
|
||||
goto done;
|
||||
}
|
||||
|
||||
call = (q931_call *)chan->call_data;
|
||||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Hangup on channel %d:%d\n", ftdm_span_get_id(spri->span), pevent->hangup.channel);
|
||||
|
||||
pri_release(spri->pri, call, 0);
|
||||
pri_destroycall(spri->pri, call);
|
||||
|
||||
chan->caller_data.hangup_cause = pevent->hangup.cause;
|
||||
chan->call_data = NULL;
|
||||
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_TERMINATING);
|
||||
|
||||
done:
|
||||
ftdm_channel_unlock(chan);
|
||||
return 0;
|
||||
|
@ -1654,6 +1690,7 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
|
|||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_DCHAN_UP, on_dchan_up);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_DCHAN_DOWN, on_dchan_down);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_HANGUP_REQ, on_hangup);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_HANGUP_ACK, on_hangup);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_HANGUP, on_hangup);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_INFO_RECEIVED, on_info);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_RESTART, on_restart);
|
||||
|
@ -1928,6 +1965,10 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
|
|||
assert(isdn_data != NULL);
|
||||
memset(isdn_data, 0, sizeof(*isdn_data));
|
||||
|
||||
/* set some default values */
|
||||
isdn_data->mode = PRI_CPE;
|
||||
isdn_data->ton = PRI_UNKNOWN;
|
||||
|
||||
switch (ftdm_span_get_trunk_type(span)) {
|
||||
case FTDM_TRUNK_BRI:
|
||||
case FTDM_TRUNK_BRI_PTMP:
|
||||
|
@ -1938,12 +1979,14 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
|
|||
#endif
|
||||
case FTDM_TRUNK_E1:
|
||||
ftdm_log(FTDM_LOG_NOTICE, "Setting default Layer 1 to ALAW since this is an E1/BRI/BRI PTMP trunk\n");
|
||||
isdn_data->layer1 = PRI_LAYER_1_ALAW;
|
||||
isdn_data->layer1 = PRI_LAYER_1_ALAW;
|
||||
isdn_data->dialect = PRI_SWITCH_EUROISDN_E1;
|
||||
break;
|
||||
case FTDM_TRUNK_T1:
|
||||
case FTDM_TRUNK_J1:
|
||||
ftdm_log(FTDM_LOG_NOTICE, "Setting default Layer 1 to ULAW since this is a T1/J1 trunk\n");
|
||||
isdn_data->layer1 = PRI_LAYER_1_ULAW;
|
||||
isdn_data->layer1 = PRI_LAYER_1_ULAW;
|
||||
isdn_data->dialect = PRI_SWITCH_LUCENT5E;
|
||||
break;
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_ERROR, "Invalid trunk type: '%s'\n", ftdm_span_get_trunk_type_str(span));
|
||||
|
|
|
@ -360,11 +360,15 @@ static void ft_r2_clean_call(ftdm_r2_call_t *call)
|
|||
static void ft_r2_accept_call(ftdm_channel_t *ftdmchan)
|
||||
{
|
||||
openr2_chan_t *r2chan = R2CALL(ftdmchan)->r2chan;
|
||||
// FIXME: not always accept as no charge, let the user decide that
|
||||
// also we should check the return code from openr2_chan_accept_call and handle error condition
|
||||
ftdm_r2_data_t *r2data = ftdmchan->span->signal_data;
|
||||
|
||||
// FIXME: we should check the return code from openr2_chan_accept_call and handle error condition
|
||||
// hanging up the call with protocol error as the reason, this openr2 API will fail only when there something
|
||||
// wrong at the I/O layer or the library itself
|
||||
openr2_chan_accept_call(r2chan, OR2_CALL_NO_CHARGE);
|
||||
if (r2data->charge_calls)
|
||||
openr2_chan_accept_call(r2chan, OR2_CALL_WITH_CHARGE);
|
||||
else
|
||||
openr2_chan_accept_call(r2chan, OR2_CALL_NO_CHARGE);
|
||||
}
|
||||
|
||||
static void ft_r2_answer_call(ftdm_channel_t *ftdmchan)
|
||||
|
@ -1697,6 +1701,8 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_r2_configure_span_signaling)
|
|||
r2data->category = r2conf.category;
|
||||
r2data->allow_collect_calls = r2conf.allow_collect_calls;
|
||||
r2data->flags = 0;
|
||||
r2data->charge_calls = r2conf.charge_calls;
|
||||
r2data->forced_release = r2conf.forced_release;
|
||||
spanpvt->r2context = r2data->r2context;
|
||||
|
||||
/* just the value must be freed by the hash */
|
||||
|
@ -1854,6 +1860,10 @@ static ftdm_status_t ftdm_r2_state_advance(ftdm_channel_t *ftdmchan)
|
|||
{
|
||||
if (!r2call->disconnect_rcvd) {
|
||||
openr2_call_disconnect_cause_t disconnect_cause = ftdm_r2_ftdm_cause_to_openr2_cause(ftdmchan);
|
||||
/* overwrite the hangup cause if this is an incoming call and forced_release is set */
|
||||
if (openr2_chan_get_direction(r2chan) == OR2_DIR_BACKWARD && r2data->forced_release) {
|
||||
disconnect_cause = OR2_CAUSE_FORCED_RELEASE;
|
||||
}
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Clearing call, cause = %s\n", openr2_proto_get_disconnect_string(disconnect_cause));
|
||||
/* this will disconnect the call, but need to wait for the call end before moving to DOWN */
|
||||
openr2_chan_disconnect_call(r2chan, disconnect_cause);
|
||||
|
|
|
@ -1198,9 +1198,17 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_isdn_unload)
|
|||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
#define SANGOMA_ISDN_API_USAGE_TRACE "ftdm sangoma_isdn trace <q921|q931> <span name>\n"
|
||||
#define SANGOMA_ISDN_API_USAGE_SHOW_L1_STATS "ftdm sangoma_isdn l1_stats <span name>\n"
|
||||
#define SANGOMA_ISDN_API_USAGE_SHOW_SPANS "ftdm sangoma_isdn show_spans [<span name>]\n"
|
||||
|
||||
#define SANGOMA_ISDN_API_USAGE "\t"SANGOMA_ISDN_API_USAGE_TRACE \
|
||||
"\t"SANGOMA_ISDN_API_USAGE_SHOW_L1_STATS \
|
||||
"\t"SANGOMA_ISDN_API_USAGE_SHOW_SPANS
|
||||
|
||||
static FIO_API_FUNCTION(ftdm_sangoma_isdn_api)
|
||||
{
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
ftdm_status_t status = FTDM_EINVAL;
|
||||
char *mycmd = NULL, *argv[10] = { 0 };
|
||||
int argc = 0;
|
||||
|
||||
|
@ -1222,7 +1230,7 @@ static FIO_API_FUNCTION(ftdm_sangoma_isdn_api)
|
|||
ftdm_span_t *span;
|
||||
|
||||
if (argc < 3) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Usage: ftdm sangoma_isdn trace <q921|q931> <span name>\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Usage: %s\n", SANGOMA_ISDN_API_USAGE_TRACE);
|
||||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
@ -1231,34 +1239,40 @@ static FIO_API_FUNCTION(ftdm_sangoma_isdn_api)
|
|||
status = ftdm_span_find_by_name(argv[2], &span);
|
||||
if (FTDM_SUCCESS != status) {
|
||||
stream->write_function(stream, "-ERR failed to find span by name %s\n", argv[2]);
|
||||
|
||||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(trace_opt, "q921")) {
|
||||
sngisdn_activate_trace(span, SNGISDN_TRACE_Q921);
|
||||
status = sngisdn_activate_trace(span, SNGISDN_TRACE_Q921);
|
||||
} else if (!strcasecmp(trace_opt, "q931")) {
|
||||
sngisdn_activate_trace(span, SNGISDN_TRACE_Q931);
|
||||
status = sngisdn_activate_trace(span, SNGISDN_TRACE_Q931);
|
||||
} else if (!strcasecmp(trace_opt, "disable")) {
|
||||
sngisdn_activate_trace(span, SNGISDN_TRACE_DISABLE);
|
||||
status = sngisdn_activate_trace(span, SNGISDN_TRACE_DISABLE);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR invalid trace option <q921|q931> <span name>\n");
|
||||
status = FTDM_FAIL;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[0], "l1_stats")) {
|
||||
ftdm_span_t *span;
|
||||
if (argc < 2) {
|
||||
stream->write_function(stream, "Usage: ftdm sangoma_isdn l1_stats <span name>\n");
|
||||
stream->write_function(stream, "Usage: %s\n", SANGOMA_ISDN_API_USAGE_SHOW_L1_STATS);
|
||||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
status = ftdm_span_find_by_name(argv[1], &span);
|
||||
if (FTDM_SUCCESS != status) {
|
||||
stream->write_function(stream, "-ERR failed to find span with name %s\n", argv[1]);
|
||||
/* Return SUCCESS because we do not want to print the general FTDM usage list */
|
||||
status = FTDM_SUCCESS;
|
||||
|
||||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
sngisdn_print_phy_stats(stream, span);
|
||||
status = sngisdn_show_l1_stats(stream, span);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[0], "show_spans")) {
|
||||
|
@ -1267,20 +1281,42 @@ static FIO_API_FUNCTION(ftdm_sangoma_isdn_api)
|
|||
status = ftdm_span_find_by_name(argv[1], &span);
|
||||
if (FTDM_SUCCESS != status) {
|
||||
stream->write_function(stream, "-ERR failed to find span with name %s\n", argv[1]);
|
||||
/* Return SUCCESS because we do not want to print the general FTDM usage list */
|
||||
status = FTDM_SUCCESS;
|
||||
|
||||
stream->write_function(stream, "Usage: %s\n", SANGOMA_ISDN_API_USAGE_SHOW_SPANS);
|
||||
status = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
sngisdn_print_span(stream, span);
|
||||
status = FTDM_SUCCESS;
|
||||
status = sngisdn_show_span(stream, span);
|
||||
goto done;
|
||||
}
|
||||
sngisdn_print_spans(stream);
|
||||
status = sngisdn_show_spans(stream);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[0], "check_ids")) {
|
||||
sngisdn_check_free_ids();
|
||||
status = sngisdn_check_free_ids();
|
||||
goto done;
|
||||
}
|
||||
if (!strcasecmp(argv[0], "check_mem")) {
|
||||
sngisdn_get_memory_info();
|
||||
}
|
||||
done:
|
||||
switch (status) {
|
||||
case FTDM_SUCCESS:
|
||||
stream->write_function(stream, "Command executed OK\n");
|
||||
break;
|
||||
case FTDM_EINVAL:
|
||||
stream->write_function(stream, "Invalid arguments [%s]\n", mycmd);
|
||||
stream->write_function(stream, "Usage:\n%s\n", SANGOMA_ISDN_API_USAGE);
|
||||
break;
|
||||
default:
|
||||
/* FTDM_FAIL - Do nothing since we already printed the cause of the error */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Return SUCCESS because we do not want to print the general FTDM usage list */
|
||||
status = FTDM_SUCCESS;
|
||||
|
||||
ftdm_safe_free(mycmd);
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -292,6 +292,12 @@ typedef struct ftdm_sngisdn_data {
|
|||
sngisdn_span_data_t *spans[MAX_L1_LINKS+1]; /* spans are indexed by link_id */
|
||||
}ftdm_sngisdn_data_t;
|
||||
|
||||
typedef struct ftdm2trillium
|
||||
{
|
||||
uint8_t ftdm_val;
|
||||
uint8_t trillium_val;
|
||||
}ftdm2trillium_t;
|
||||
|
||||
|
||||
/* TODO implement these 2 functions */
|
||||
#define ISDN_FUNC_TRACE_ENTER(a)
|
||||
|
@ -388,7 +394,7 @@ void sngisdn_trace_interpreted_q931(sngisdn_span_data_t *signal_data, ftdm_trace
|
|||
void sngisdn_trace_raw_q921(sngisdn_span_data_t *signal_data, ftdm_trace_dir_t dir, uint8_t *data, uint32_t data_len);
|
||||
void sngisdn_trace_raw_q931(sngisdn_span_data_t *signal_data, ftdm_trace_dir_t dir, uint8_t *data, uint32_t data_len);
|
||||
|
||||
void get_memory_info(void);
|
||||
void sngisdn_get_memory_info(void);
|
||||
|
||||
ftdm_status_t sng_isdn_activate_trace(ftdm_span_t *span, sngisdn_tracetype_t trace_opt);
|
||||
ftdm_status_t sngisdn_check_free_ids(void);
|
||||
|
@ -471,9 +477,9 @@ ftdm_status_t sngisdn_stack_start(ftdm_span_t *span);
|
|||
ftdm_status_t sngisdn_stack_stop(ftdm_span_t *span);
|
||||
ftdm_status_t sngisdn_wake_up_phy(ftdm_span_t *span);
|
||||
|
||||
void sngisdn_print_phy_stats(ftdm_stream_handle_t *stream, ftdm_span_t *span);
|
||||
void sngisdn_print_spans(ftdm_stream_handle_t *stream);
|
||||
void sngisdn_print_span(ftdm_stream_handle_t *stream, ftdm_span_t *span);
|
||||
ftdm_status_t sngisdn_show_l1_stats(ftdm_stream_handle_t *stream, ftdm_span_t *span);
|
||||
ftdm_status_t sngisdn_show_spans(ftdm_stream_handle_t *stream);
|
||||
ftdm_status_t sngisdn_show_span(ftdm_stream_handle_t *stream, ftdm_span_t *span);
|
||||
|
||||
#endif /* __FTMOD_SNG_ISDN_H__ */
|
||||
|
||||
|
|
|
@ -745,8 +745,16 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
|||
/* TODO: Fill in these timers with proper values - eventually pass them */
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t301.enb = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t301.val = 180;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.enb = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.val = 15;
|
||||
|
||||
/* It looks like ETSI is the only variant that supports Overlap */
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN) {
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.enb = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.val = 15;
|
||||
} else {
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.enb = FALSE;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t302.val = 0;
|
||||
}
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t303.enb = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t303.val = 4;
|
||||
cfg.t.cfg.s.inDLSAP.tmr.t304.enb = TRUE;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "ftmod_sangoma_isdn.h"
|
||||
static ftdm_status_t sngisdn_cause_val_requires_disconnect(ftdm_channel_t *ftdmchan, CauseDgn *causeDgn);
|
||||
static void sngisdn_process_restart_confirm(ftdm_channel_t *ftdmchan);
|
||||
static ftdm_status_t sngisdn_force_down(ftdm_channel_t *ftdmchan);
|
||||
|
||||
/* Remote side transmit a SETUP */
|
||||
void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
|
||||
|
@ -191,8 +192,7 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
|
|||
strcpy(ftdmchan->caller_data.cid_name, retrieved_str);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
if (signal_data->overlap_dial == SNGISDN_OPT_TRUE && !conEvnt->sndCmplt.eh.pres) {
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_COLLECT);
|
||||
} else {
|
||||
|
@ -831,7 +831,7 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
|
|||
if (sng_isdn_retrieve_facility_caller_name(&facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len, retrieved_str) == 0) {
|
||||
strcpy(ftdmchan->caller_data.cid_name, retrieved_str);
|
||||
} else {
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_WARNING, "Failed to retrieve Caller Name from Facility IE\n");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Failed to retrieve Caller Name from Facility IE\n");
|
||||
}
|
||||
if (signal_data->facility_timeout) {
|
||||
/* Cancel facility timeout */
|
||||
|
@ -920,36 +920,8 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
|
|||
switch(call_state) {
|
||||
/* Sere ITU-T Q931 for definition of call states */
|
||||
case 0: /* Remote switch thinks there are no calls on this channel */
|
||||
switch (ftdmchan->state) {
|
||||
case FTDM_CHANNEL_STATE_COLLECT:
|
||||
case FTDM_CHANNEL_STATE_DIALING:
|
||||
case FTDM_CHANNEL_STATE_UP:
|
||||
sngisdn_set_flag(sngisdn_info, FLAG_REMOTE_ABORT);
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_TERMINATING:
|
||||
/* We are in the process of clearing local states,
|
||||
just make sure we will not send any messages to remote switch */
|
||||
sngisdn_set_flag(sngisdn_info, FLAG_REMOTE_ABORT);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_HANGUP:
|
||||
/* This cannot happen, state_advance always sets
|
||||
ftdmchan to STATE_HANGUP_COMPLETE when in STATE_HANGUP
|
||||
and we called check_for_state_change earlier so something is very wrong here!!! */
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "How can we we in FTDM_CHANNEL_STATE_HANGUP after checking for state change?\n");
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
/* We were waiting for remote switch to send RELEASE COMPLETE
|
||||
but this will not happen, so just clear local state */
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_DOWN:
|
||||
/* If our local state is down as well, then there is nothing to do */
|
||||
break;
|
||||
default:
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Don't know how to handle incompatible state. remote call state:%d our state:%s\n", call_state, ftdm_channel_state2str(ftdmchan->state));
|
||||
break;
|
||||
if (sngisdn_force_down(ftdmchan) != FTDM_SUCCESS) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Don't know how to handle incompatible state. remote call state:%d our state:%s\n", call_state, ftdm_channel_state2str(ftdmchan->state));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1159,6 +1131,48 @@ static void sngisdn_process_restart_confirm(ftdm_channel_t *ftdmchan)
|
|||
return;
|
||||
}
|
||||
|
||||
static ftdm_status_t sngisdn_force_down(ftdm_channel_t *ftdmchan)
|
||||
{
|
||||
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*)ftdmchan->call_data;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_NOTICE, "Forcing channel to DOWN state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
switch (ftdmchan->state) {
|
||||
case FTDM_CHANNEL_STATE_DOWN:
|
||||
/* Do nothing */
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_RESET:
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_COLLECT:
|
||||
case FTDM_CHANNEL_STATE_DIALING:
|
||||
case FTDM_CHANNEL_STATE_UP:
|
||||
sngisdn_set_flag(sngisdn_info, FLAG_REMOTE_ABORT);
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_TERMINATING:
|
||||
/* We are already waiting for usr to respond to SIGEVENT stop.
|
||||
FreeTDM already scheduled a timout in case the User does respond to
|
||||
SIGEVENT_STOP, no need to do anything here */
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_HANGUP:
|
||||
/* This cannot happen, state_advance always sets
|
||||
ftdmchan to STATE_HANGUP_COMPLETE when in STATE_HANGUP
|
||||
and we called check_for_state_change earlier so something is very wrong here!!! */
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "How can we we in FTDM_CHANNEL_STATE_HANGUP after checking for state change?\n");
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
/* We were waiting for remote switch to send RELEASE COMPLETE
|
||||
but this will not happen, so just clear local state */
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
break;
|
||||
default:
|
||||
status = FTDM_FAIL;
|
||||
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
|
||||
{
|
||||
|
@ -1171,12 +1185,12 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
|
|||
|
||||
sngisdn_span_data_t *signal_data = g_sngisdn_data.dchans[dChan].spans[1];
|
||||
if (!signal_data) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Received RESTART on unconfigured span (suId:%d)\n", suId);
|
||||
ftdm_log(FTDM_LOG_CRIT, "Received RESTART CFM on unconfigured span (suId:%d)\n", suId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rstEvnt->rstInd.eh.pres || !rstEvnt->rstInd.rstClass.pres) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Receved RESTART, but Restart Indicator IE not present\n");
|
||||
if (rstEvnt->rstInd.eh.pres != PRSNT_NODEF && rstEvnt->rstInd.rstClass.pres != PRSNT_NODEF) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Received RESTART, but Restart Indicator IE not present\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1233,24 +1247,101 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
|
|||
}
|
||||
|
||||
|
||||
/* The remote side sent us a RESTART Msg. Trillium automatically acks with RESTART ACK, but
|
||||
we need to clear our call states if there is a call on this channel */
|
||||
void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
|
||||
{
|
||||
uint8_t chan_no = 0;
|
||||
int16_t suId = sngisdn_event->suId;
|
||||
int16_t dChan = sngisdn_event->dChan;
|
||||
uint8_t ces = sngisdn_event->ces;
|
||||
uint8_t evntType = sngisdn_event->evntType;
|
||||
Rst *rstEvnt = NULL;
|
||||
sngisdn_span_data_t *signal_data = NULL;
|
||||
|
||||
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
/* Function does not require any info from ssHlEvnt struct for now */
|
||||
/*Rst *rstEvnt = &sngisdn_event->event.rstEvnt;*/
|
||||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Processing RESTART CFM (suId:%u dChan:%d ces:%d %s)\n", suId, dChan, ces,
|
||||
rstEvnt = &sngisdn_event->event.rstEvnt;
|
||||
|
||||
/* TODO: readjust this when NFAS is implemented as signal_data will not always be the first
|
||||
* span for that d-channel */
|
||||
|
||||
signal_data = g_sngisdn_data.dchans[dChan].spans[1];
|
||||
|
||||
if (!signal_data) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Received RESTART IND on unconfigured span (suId:%d)\n", suId);
|
||||
return;
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Processing RESTART IND (suId:%u dChan:%d ces:%d %s)\n", suId, dChan, ces,
|
||||
(evntType == IN_LNK_DWN)?"LNK_DOWN":
|
||||
(evntType == IN_LNK_UP)?"LNK_UP":
|
||||
(evntType == IN_INDCHAN)?"b-channel":
|
||||
(evntType == IN_LNK_DWN_DM_RLS)?"NFAS service procedures":
|
||||
(evntType == IN_SWCHD_BU_DCHAN)?"NFAS switchover to backup":"Unknown");
|
||||
|
||||
if (!rstEvnt->rstInd.eh.pres || !rstEvnt->rstInd.rstClass.pres) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Received RESTART IND, but Restart Indicator IE not present\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch(rstEvnt->rstInd.rstClass.val) {
|
||||
case IN_CL_INDCHAN: /* Indicated b-channel */
|
||||
if (rstEvnt->chanId.eh.pres) {
|
||||
if (rstEvnt->chanId.intType.val == IN_IT_BASIC) {
|
||||
if (rstEvnt->chanId.infoChanSel.pres == PRSNT_NODEF) {
|
||||
chan_no = rstEvnt->chanId.infoChanSel.val;
|
||||
}
|
||||
} else if (rstEvnt->chanId.intType.val == IN_IT_OTHER) {
|
||||
if (rstEvnt->chanId.chanNmbSlotMap.pres == PRSNT_NODEF) {
|
||||
chan_no = rstEvnt->chanId.chanNmbSlotMap.val[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!chan_no) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Failed to determine channel from RESTART\n");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case IN_CL_SNGINT: /* Single interface */
|
||||
case IN_CL_ALLINT: /* All interfaces */
|
||||
/* In case restart class indicates all interfaces, we will duplicate
|
||||
this event on each span associated to this d-channel in sngisdn_rcv_rst_cfm,
|
||||
so treat it as a single interface anyway */
|
||||
break;
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_CRIT, "Invalid restart indicator class:%d\n", rstEvnt->rstInd.rstClass.val);
|
||||
return;
|
||||
}
|
||||
|
||||
if (chan_no) { /* For a single channel */
|
||||
if (chan_no > ftdm_span_get_chan_count(signal_data->ftdm_span)) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Received RESTART IND on invalid channel:%d\n", chan_no);
|
||||
} else {
|
||||
ftdm_iterator_t *chaniter = NULL;
|
||||
ftdm_iterator_t *curr = NULL;
|
||||
|
||||
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
|
||||
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
|
||||
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
|
||||
if (ftdmchan->physical_chan_id == chan_no) {
|
||||
sngisdn_force_down(ftdmchan);
|
||||
}
|
||||
}
|
||||
ftdm_iterator_free(chaniter);
|
||||
}
|
||||
} else { /* for all channels */
|
||||
ftdm_iterator_t *chaniter = NULL;
|
||||
ftdm_iterator_t *curr = NULL;
|
||||
|
||||
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
|
||||
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
|
||||
sngisdn_force_down((ftdm_channel_t*)ftdm_iterator_current(curr));
|
||||
}
|
||||
ftdm_iterator_free(chaniter);
|
||||
}
|
||||
|
||||
|
||||
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -708,7 +708,7 @@ void sngisdn_rcv_q921_ind(BdMngmt *status)
|
|||
void sngisdn_rcv_q931_ind(InMngmt *status)
|
||||
{
|
||||
if (status->t.usta.alarm.cause == 287) {
|
||||
get_memory_info();
|
||||
sngisdn_get_memory_info();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -779,7 +779,6 @@ void sngisdn_rcv_cc_ind(CcMngmt *status)
|
|||
void sngisdn_rcv_q931_trace(InMngmt *trc, Buffer *mBuf)
|
||||
{
|
||||
MsgLen mlen;
|
||||
MsgLen i;
|
||||
int16_t j;
|
||||
Buffer *tmp;
|
||||
Data *cptr;
|
||||
|
@ -802,7 +801,6 @@ void sngisdn_rcv_q931_trace(InMngmt *trc, Buffer *mBuf)
|
|||
tmp = mBuf->b_cont;
|
||||
cptr = tmp->b_rptr;
|
||||
data = *cptr++;
|
||||
i = 0;
|
||||
|
||||
for(j=0;j<mlen;j++) {
|
||||
tdata[j]= data;
|
||||
|
|
|
@ -43,10 +43,53 @@ SNGISDN_STR2ENUM(ftdm_str2ftdm_sngisdn_progind_descr, ftdm_sngisdn_progind_descr
|
|||
SNGISDN_ENUM_NAMES(SNGISDN_PROGIND_LOC_NAMES, SNGISDN_PROGIND_LOC_STRINGS)
|
||||
SNGISDN_STR2ENUM(ftdm_str2ftdm_sngisdn_progind_loc, ftdm_sngisdn_progind_loc2str, ftdm_sngisdn_progind_loc_t, SNGISDN_PROGIND_LOC_NAMES, SNGISDN_PROGIND_LOC_INVALID)
|
||||
|
||||
ftdm_status_t sngisdn_check_free_ids(void);
|
||||
static uint8_t get_trillium_val(ftdm2trillium_t *vals, uint8_t ftdm_val, uint8_t default_val);
|
||||
static uint8_t get_ftdm_val(ftdm2trillium_t *vals, uint8_t trillium_val, uint8_t default_val);
|
||||
|
||||
extern ftdm_sngisdn_data_t g_sngisdn_data;
|
||||
void get_memory_info(void);
|
||||
|
||||
ftdm2trillium_t npi_codes[] = {
|
||||
{FTDM_NPI_UNKNOWN, IN_NP_UNK},
|
||||
{FTDM_NPI_ISDN, IN_NP_ISDN},
|
||||
{FTDM_NPI_DATA, IN_NP_DATA},
|
||||
{FTDM_NPI_TELEX, IN_NP_TELEX},
|
||||
{FTDM_NPI_NATIONAL, IN_NP_NATIONAL},
|
||||
{FTDM_NPI_PRIVATE, IN_NP_PRIVATE},
|
||||
{FTDM_NPI_RESERVED, IN_NP_EXT},
|
||||
};
|
||||
|
||||
ftdm2trillium_t ton_codes[] = {
|
||||
{FTDM_TON_UNKNOWN, IN_TON_UNK},
|
||||
{FTDM_TON_INTERNATIONAL, IN_TON_INT},
|
||||
{FTDM_TON_NATIONAL, IN_TON_NAT},
|
||||
{FTDM_TON_NETWORK_SPECIFIC, IN_TON_NETSPEC},
|
||||
{FTDM_TON_SUBSCRIBER_NUMBER, IN_TON_SUB},
|
||||
{FTDM_TON_ABBREVIATED_NUMBER, IN_TON_ABB},
|
||||
{FTDM_TON_RESERVED, IN_TON_EXT},
|
||||
};
|
||||
|
||||
static uint8_t get_trillium_val(ftdm2trillium_t *vals, uint8_t ftdm_val, uint8_t default_val)
|
||||
{
|
||||
ftdm2trillium_t *val = vals;
|
||||
while(val++) {
|
||||
if (val->ftdm_val == ftdm_val) {
|
||||
return val->trillium_val;
|
||||
}
|
||||
}
|
||||
return default_val;
|
||||
}
|
||||
|
||||
static uint8_t get_ftdm_val(ftdm2trillium_t *vals, uint8_t trillium_val, uint8_t default_val)
|
||||
{
|
||||
ftdm2trillium_t *val = vals;
|
||||
while(val++) {
|
||||
if (val->trillium_val == trillium_val) {
|
||||
return val->ftdm_val;
|
||||
}
|
||||
}
|
||||
return default_val;
|
||||
}
|
||||
|
||||
|
||||
void clear_call_data(sngisdn_chan_data_t *sngisdn_info)
|
||||
{
|
||||
|
@ -259,11 +302,11 @@ ftdm_status_t get_called_num(ftdm_channel_t *ftdmchan, CdPtyNmb *cdPtyNmb)
|
|||
}
|
||||
|
||||
if (cdPtyNmb->nmbPlanId.pres == PRSNT_NODEF) {
|
||||
caller_data->dnis.plan = cdPtyNmb->nmbPlanId.val;
|
||||
caller_data->dnis.plan = get_ftdm_val(npi_codes, cdPtyNmb->nmbPlanId.val, IN_NP_UNK);
|
||||
}
|
||||
|
||||
if (cdPtyNmb->typeNmb0.pres == PRSNT_NODEF) {
|
||||
caller_data->dnis.type = cdPtyNmb->typeNmb0.val;
|
||||
caller_data->dnis.type = get_ftdm_val(ton_codes, cdPtyNmb->typeNmb0.val, IN_TON_UNK);
|
||||
}
|
||||
|
||||
if (cdPtyNmb->nmbDigits.pres == PRSNT_NODEF) {
|
||||
|
@ -283,11 +326,11 @@ ftdm_status_t get_redir_num(ftdm_channel_t *ftdmchan, RedirNmb *redirNmb)
|
|||
}
|
||||
|
||||
if (redirNmb->nmbPlanId.pres == PRSNT_NODEF) {
|
||||
caller_data->rdnis.plan = redirNmb->nmbPlanId.val;
|
||||
caller_data->rdnis.plan = get_ftdm_val(npi_codes, redirNmb->nmbPlanId.val, IN_NP_UNK);
|
||||
}
|
||||
|
||||
if (redirNmb->typeNmb.pres == PRSNT_NODEF) {
|
||||
caller_data->rdnis.type = redirNmb->typeNmb.val;
|
||||
caller_data->rdnis.type = get_ftdm_val(ton_codes, redirNmb->typeNmb.val, IN_TON_UNK);
|
||||
}
|
||||
|
||||
if (redirNmb->nmbDigits.pres == PRSNT_NODEF) {
|
||||
|
@ -382,11 +425,13 @@ ftdm_status_t get_facility_ie_str(ftdm_channel_t *ftdmchan, uint8_t *data, uint8
|
|||
ftdm_status_t get_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd)
|
||||
{
|
||||
uint8_t val;
|
||||
|
||||
if (!progInd->eh.pres) {
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
if (progInd->progDesc.pres) {
|
||||
/* TODO: use get_ftdm_val function and table here */
|
||||
switch (progInd->progDesc.val) {
|
||||
case IN_PD_NOTETEISDN:
|
||||
val = SNGISDN_PROGIND_DESCR_NETE_ISDN;
|
||||
|
@ -464,19 +509,11 @@ ftdm_status_t set_calling_num(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
|
|||
cgPtyNmb->presInd0.val = caller_data->pres;
|
||||
|
||||
cgPtyNmb->nmbPlanId.pres = PRSNT_NODEF;
|
||||
if (caller_data->cid_num.plan >= FTDM_NPI_INVALID) {
|
||||
cgPtyNmb->nmbPlanId.val = FTDM_NPI_UNKNOWN;
|
||||
} else {
|
||||
cgPtyNmb->nmbPlanId.val = caller_data->cid_num.plan;
|
||||
}
|
||||
cgPtyNmb->nmbPlanId.val = get_trillium_val(npi_codes, caller_data->cid_num.plan, IN_NP_UNK);
|
||||
|
||||
cgPtyNmb->typeNmb1.pres = PRSNT_NODEF;
|
||||
|
||||
if (caller_data->cid_num.type >= FTDM_TON_INVALID) {
|
||||
cgPtyNmb->typeNmb1.val = FTDM_TON_UNKNOWN;
|
||||
} else {
|
||||
cgPtyNmb->typeNmb1.val = caller_data->cid_num.type;
|
||||
}
|
||||
cgPtyNmb->typeNmb1.val = get_trillium_val(ton_codes, caller_data->cid_num.type, IN_TON_UNK);
|
||||
|
||||
cgPtyNmb->nmbDigits.pres = PRSNT_NODEF;
|
||||
cgPtyNmb->nmbDigits.len = len;
|
||||
|
@ -510,7 +547,7 @@ ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
|
|||
|
||||
val = FTDM_SCREENING_INVALID;
|
||||
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.cg_pty2.screening_ind");
|
||||
if ((string != NULL) && (*string)) {
|
||||
if (!ftdm_strlen_zero(string)) {
|
||||
val = ftdm_str2ftdm_screening(string);
|
||||
}
|
||||
|
||||
|
@ -527,7 +564,7 @@ ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
|
|||
|
||||
val = FTDM_PRES_INVALID;
|
||||
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.cg_pty2.presentation_ind");
|
||||
if ((string != NULL) && (*string)) {
|
||||
if (!ftdm_strlen_zero(string)) {
|
||||
val = ftdm_str2ftdm_presentation(string);
|
||||
}
|
||||
|
||||
|
@ -542,14 +579,14 @@ ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
|
|||
|
||||
val = FTDM_NPI_INVALID;
|
||||
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.cg_pty2.npi");
|
||||
if ((string != NULL) && (*string)) {
|
||||
if (!ftdm_strlen_zero(string)) {
|
||||
val = ftdm_str2ftdm_npi(string);
|
||||
}
|
||||
|
||||
if (val == FTDM_NPI_INVALID) {
|
||||
cgPtyNmb->nmbPlanId.val = caller_data->cid_num.plan;
|
||||
} else {
|
||||
cgPtyNmb->nmbPlanId.val = val;
|
||||
cgPtyNmb->nmbPlanId.val = get_trillium_val(npi_codes, val, IN_NP_UNK);
|
||||
}
|
||||
|
||||
cgPtyNmb->typeNmb1.pres = PRSNT_NODEF;
|
||||
|
@ -557,14 +594,14 @@ ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
|
|||
/* Type of Number */
|
||||
val = FTDM_TON_INVALID;
|
||||
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.cg_pty2.ton");
|
||||
if ((string != NULL) && (*string)) {
|
||||
if (!ftdm_strlen_zero(string)) {
|
||||
val = ftdm_str2ftdm_ton(string);
|
||||
}
|
||||
|
||||
if (val == FTDM_TON_INVALID) {
|
||||
cgPtyNmb->typeNmb1.val = caller_data->cid_num.type;
|
||||
} else {
|
||||
cgPtyNmb->typeNmb1.val = val;
|
||||
cgPtyNmb->typeNmb1.val = get_trillium_val(ton_codes, val, IN_TON_UNK);
|
||||
}
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
@ -577,21 +614,14 @@ ftdm_status_t set_called_num(ftdm_channel_t *ftdmchan, CdPtyNmb *cdPtyNmb)
|
|||
if (!len) {
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
cdPtyNmb->eh.pres = PRSNT_NODEF;
|
||||
|
||||
cdPtyNmb->nmbPlanId.pres = PRSNT_NODEF;
|
||||
if (caller_data->dnis.plan >= FTDM_NPI_INVALID) {
|
||||
cdPtyNmb->nmbPlanId.val = FTDM_NPI_UNKNOWN;
|
||||
} else {
|
||||
cdPtyNmb->nmbPlanId.val = caller_data->dnis.plan;
|
||||
}
|
||||
|
||||
cdPtyNmb->typeNmb0.pres = PRSNT_NODEF;
|
||||
if (caller_data->dnis.type >= FTDM_TON_INVALID) {
|
||||
cdPtyNmb->typeNmb0.val = FTDM_TON_UNKNOWN;
|
||||
} else {
|
||||
cdPtyNmb->typeNmb0.val = caller_data->dnis.type;
|
||||
}
|
||||
cdPtyNmb->eh.pres = PRSNT_NODEF;
|
||||
|
||||
cdPtyNmb->nmbPlanId.pres = PRSNT_NODEF;
|
||||
cdPtyNmb->nmbPlanId.val = get_trillium_val(npi_codes, caller_data->dnis.plan, IN_NP_UNK);
|
||||
|
||||
cdPtyNmb->typeNmb0.pres = PRSNT_NODEF;
|
||||
cdPtyNmb->typeNmb0.val = get_trillium_val(ton_codes, caller_data->dnis.type, IN_TON_UNK);
|
||||
|
||||
cdPtyNmb->nmbDigits.pres = PRSNT_NODEF;
|
||||
cdPtyNmb->nmbDigits.len = len;
|
||||
|
@ -612,18 +642,10 @@ ftdm_status_t set_redir_num(ftdm_channel_t *ftdmchan, RedirNmb *redirNmb)
|
|||
redirNmb->eh.pres = PRSNT_NODEF;
|
||||
|
||||
redirNmb->nmbPlanId.pres = PRSNT_NODEF;
|
||||
if (caller_data->rdnis.plan >= FTDM_NPI_INVALID) {
|
||||
redirNmb->nmbPlanId.val = FTDM_NPI_UNKNOWN;
|
||||
} else {
|
||||
redirNmb->nmbPlanId.val = caller_data->rdnis.plan;
|
||||
}
|
||||
redirNmb->nmbPlanId.val = get_trillium_val(npi_codes, caller_data->rdnis.plan, IN_NP_UNK);
|
||||
|
||||
redirNmb->typeNmb.pres = PRSNT_NODEF;
|
||||
if (caller_data->rdnis.type >= FTDM_TON_INVALID) {
|
||||
redirNmb->typeNmb.val = FTDM_TON_UNKNOWN;
|
||||
} else {
|
||||
redirNmb->typeNmb.val = caller_data->rdnis.type;
|
||||
}
|
||||
redirNmb->typeNmb.val = get_trillium_val(ton_codes, caller_data->rdnis.type, IN_TON_UNK);
|
||||
|
||||
redirNmb->nmbDigits.pres = PRSNT_NODEF;
|
||||
redirNmb->nmbDigits.len = len;
|
||||
|
@ -743,7 +765,7 @@ ftdm_status_t set_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd, ftdm_s
|
|||
int loc = prog_ind.loc;
|
||||
|
||||
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.prog_ind.descr");
|
||||
if (str && *str) {
|
||||
if (!ftdm_strlen_zero(str)) {
|
||||
/* User wants to override progress indicator */
|
||||
descr = ftdm_str2ftdm_sngisdn_progind_descr(str);
|
||||
}
|
||||
|
@ -754,7 +776,7 @@ ftdm_status_t set_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd, ftdm_s
|
|||
}
|
||||
|
||||
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.prog_ind.loc");
|
||||
if (str && *str) {
|
||||
if (!ftdm_strlen_zero(str)) {
|
||||
loc = ftdm_str2ftdm_sngisdn_progind_loc(str);
|
||||
}
|
||||
if (loc == SNGISDN_PROGIND_LOC_INVALID) {
|
||||
|
@ -1062,25 +1084,27 @@ ftdm_status_t sngisdn_check_free_ids(void)
|
|||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
void get_memory_info(void)
|
||||
void sngisdn_get_memory_info(void)
|
||||
{
|
||||
U32 availmen = 0;
|
||||
SRegInfoShow(S_REG, &availmen);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
uint8_t sngisdn_get_infoTranCap_from_user(ftdm_bearer_cap_t bearer_capability)
|
||||
{
|
||||
switch(bearer_capability) {
|
||||
case FTDM_BEARER_CAP_SPEECH:
|
||||
return IN_ITC_SPEECH;
|
||||
case FTDM_BEARER_CAP_64K_UNRESTRICTED:
|
||||
case FTDM_BEARER_CAP_UNRESTRICTED:
|
||||
return IN_ITC_UNRDIG;
|
||||
case FTDM_BEARER_CAP_3_1KHZ_AUDIO:
|
||||
return IN_ITC_A31KHZ;
|
||||
case FTDM_BEARER_CAP_INVALID:
|
||||
return IN_ITC_SPEECH;
|
||||
/* Do not put a default case here, so we can see compile warnings if we have unhandled cases */
|
||||
default:
|
||||
return IN_ITC_SPEECH;
|
||||
}
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
}
|
||||
|
@ -1096,7 +1120,8 @@ uint8_t sngisdn_get_usrInfoLyr1Prot_from_user(ftdm_user_layer1_prot_t layer1_pro
|
|||
return IN_UIL1_G711ALAW;
|
||||
case FTDM_USER_LAYER1_PROT_INVALID:
|
||||
return IN_UIL1_G711ULAW;
|
||||
/* Do not put a default case here, so we can see compile warnings if we have unhandled cases */
|
||||
default:
|
||||
return IN_UIL1_G711ULAW;
|
||||
}
|
||||
return IN_UIL1_G711ULAW;
|
||||
}
|
||||
|
@ -1105,9 +1130,9 @@ ftdm_bearer_cap_t sngisdn_get_infoTranCap_from_stack(uint8_t bearer_capability)
|
|||
{
|
||||
switch(bearer_capability) {
|
||||
case IN_ITC_SPEECH:
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
case IN_ITC_UNRDIG:
|
||||
return FTDM_BEARER_CAP_64K_UNRESTRICTED;
|
||||
return FTDM_BEARER_CAP_UNRESTRICTED;
|
||||
case IN_ITC_A31KHZ:
|
||||
return FTDM_BEARER_CAP_3_1KHZ_AUDIO;
|
||||
default:
|
||||
|
@ -1131,7 +1156,7 @@ ftdm_user_layer1_prot_t sngisdn_get_usrInfoLyr1Prot_from_stack(uint8_t layer1_pr
|
|||
return FTDM_USER_LAYER1_PROT_ULAW;
|
||||
}
|
||||
|
||||
void sngisdn_print_phy_stats(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
||||
ftdm_status_t sngisdn_show_l1_stats(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
||||
{
|
||||
L1Mngmt sts;
|
||||
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*)span->signal_data;
|
||||
|
@ -1169,11 +1194,11 @@ void sngisdn_print_phy_stats(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
|||
stream->write_function(stream, " TX Errors Details");
|
||||
stream->write_function(stream, "\n---------------------------------------------------------------------\n");
|
||||
stream->write_function(stream, "Aborted:\t%u\tFifo:\t\t%u\tCarrier:\t%u\n", sts.t.sts.tx_aborted_errors, sts.t.sts.tx_fifo_errors, sts.t.sts.tx_carrier_errors);
|
||||
return;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void sngisdn_print_span(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
||||
ftdm_status_t sngisdn_show_span(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
||||
{
|
||||
ftdm_signaling_status_t sigstatus;
|
||||
ftdm_alarm_flag_t alarmbits;
|
||||
|
@ -1188,18 +1213,18 @@ void sngisdn_print_span(ftdm_stream_handle_t *stream, ftdm_span_t *span)
|
|||
stream->write_function(stream, "span:%s physical:%s signalling:%s\n",
|
||||
span->name, alarmbits ? "ALARMED" : "OK",
|
||||
ftdm_signaling_status2str(sigstatus));
|
||||
return;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
void sngisdn_print_spans(ftdm_stream_handle_t *stream)
|
||||
ftdm_status_t sngisdn_show_spans(ftdm_stream_handle_t *stream)
|
||||
{
|
||||
int i;
|
||||
for(i=1;i<=MAX_L1_LINKS;i++) {
|
||||
if (g_sngisdn_data.spans[i]) {
|
||||
sngisdn_print_span(stream, g_sngisdn_data.spans[i]->ftdm_span);
|
||||
sngisdn_show_span(stream, g_sngisdn_data.spans[i]->ftdm_span);
|
||||
}
|
||||
}
|
||||
return;
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
ftdm_status_t sngisdn_add_var(sngisdn_chan_data_t *sngisdn_info, const char* var, const char* val)
|
||||
|
|
|
@ -334,11 +334,12 @@ uint32_t sngisdn_decode_ie(char *str, uint32_t *str_len, uint8_t current_codeset
|
|||
switch(ieId) {
|
||||
case PROT_Q931_IE_BEARER_CAP:
|
||||
{
|
||||
uint8_t codingStandard, infTransferCap, transferMode, infTransferRate, usrL1Prot;
|
||||
uint8_t codingStandard, infTransferCap, infTransferRate, usrL1Prot;
|
||||
/*uint8_t transferMode;*/
|
||||
|
||||
codingStandard = get_bits(OCTET(3),6,7);
|
||||
infTransferCap = get_bits(OCTET(3),1,5);
|
||||
transferMode = get_bits(OCTET(4),6,7);
|
||||
/*transferMode = get_bits(OCTET(4),6,7);*/
|
||||
infTransferRate = get_bits(OCTET(4),1,5);
|
||||
usrL1Prot = get_bits(OCTET(5),1,5);
|
||||
|
||||
|
@ -404,8 +405,9 @@ uint32_t sngisdn_decode_ie(char *str, uint32_t *str_len, uint8_t current_codeset
|
|||
uint8_t infoChannelSelection=0;
|
||||
uint8_t prefExclusive=0;
|
||||
uint8_t ifaceIdPresent=0;
|
||||
uint8_t ifaceIdentifier = 0; /* octet_3_1 */
|
||||
uint8_t chanType=0, numberMap=0, codingStandard=0;
|
||||
/* uint8_t ifaceIdentifier = 0; */ /* octet_3_1 */
|
||||
uint8_t chanType=0, numberMap=0;
|
||||
/* uint8_t codingStandard=0; */
|
||||
uint8_t channelNo = 0;
|
||||
|
||||
infoChannelSelection = get_bits(OCTET(3),1,2);
|
||||
|
@ -413,15 +415,15 @@ uint32_t sngisdn_decode_ie(char *str, uint32_t *str_len, uint8_t current_codeset
|
|||
ifaceIdPresent = get_bits(OCTET(3),7,7);
|
||||
|
||||
if (ifaceIdPresent) {
|
||||
ifaceIdentifier= get_bits(OCTET(4),1,7);
|
||||
/*ifaceIdentifier= get_bits(OCTET(4),1,7);*/
|
||||
chanType = get_bits(OCTET(5),1,4);
|
||||
numberMap = get_bits(OCTET(5),5,5);
|
||||
codingStandard = get_bits(OCTET(5),6,7);
|
||||
/*codingStandard = get_bits(OCTET(5),6,7);*/
|
||||
channelNo = get_bits(OCTET(6),1,7);
|
||||
} else {
|
||||
chanType = get_bits(OCTET(4),1,4);
|
||||
numberMap = get_bits(OCTET(4),5,5);
|
||||
codingStandard = get_bits(OCTET(4),6,7);
|
||||
/*codingStandard = get_bits(OCTET(4),6,7);*/
|
||||
channelNo = get_bits(OCTET(5),1,7);
|
||||
}
|
||||
|
||||
|
@ -755,7 +757,7 @@ void print_hex_dump(char* str, uint32_t *str_len, uint8_t* data, uint32_t index_
|
|||
{
|
||||
uint32_t k;
|
||||
*str_len += sprintf(&str[*str_len], " [ ");
|
||||
for(k=index_start; k <= index_end; k++) {
|
||||
for(k=index_start; k < index_end; k++) {
|
||||
if (k && !(k%32)) {
|
||||
*str_len += sprintf(&str[*str_len], "\n ");
|
||||
}
|
||||
|
|
|
@ -33,12 +33,14 @@
|
|||
|
||||
/* INCLUDE ********************************************************************/
|
||||
#include "ftmod_sangoma_ss7_main.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* DEFINES ********************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* PROTOTYPES *****************************************************************/
|
||||
|
@ -79,14 +81,14 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
/******************************************************************************/
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt)
|
||||
{
|
||||
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
sngss7_chan_data_t *sngss7_info = NULL;
|
||||
ftdm_channel_t *ftdmchan = NULL;
|
||||
char nadi[2];
|
||||
|
||||
|
||||
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
memset(nadi, '\0', sizeof(nadi));
|
||||
|
||||
/* get the ftdmchan and ss7_chan_data from the circuit */
|
||||
|
@ -185,17 +187,11 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
SS7_INFO_CHAN(ftdmchan,"No Called party (DNIS) information in IAM!%s\n", " ");
|
||||
}
|
||||
|
||||
/* fill in rdnis information*/
|
||||
if (siConEvnt->redirgNum.eh.pres) {
|
||||
if (siConEvnt->redirgNum.addrSig.pres) {
|
||||
/* fill in the rdnis digits */
|
||||
copy_tknStr_from_sngss7(siConEvnt->redirgNum.addrSig,
|
||||
ftdmchan->caller_data.rdnis.digits,
|
||||
siConEvnt->cgPtyNum.oddEven);
|
||||
}
|
||||
} else {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"No RDNIS party information in IAM!%s\n", " ");
|
||||
}
|
||||
copy_redirgNum_from_sngss7(ftdmchan, &siConEvnt->redirgNum);
|
||||
|
||||
copy_genNmb_from_sngss7(ftdmchan, &siConEvnt->genNmb);
|
||||
|
||||
copy_cgPtyCat_from_sngss7(ftdmchan, &siConEvnt->cgPtyCat);
|
||||
|
||||
/* fill in the TMR/bearer capability */
|
||||
if (siConEvnt->txMedReq.eh.pres) {
|
||||
|
@ -214,6 +210,10 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
sprintf(nadi, "%d", siConEvnt->cdPtyNum.natAddrInd.val);
|
||||
sngss7_add_var(sngss7_info, "ss7_cld_nadi", nadi);
|
||||
|
||||
if (sngss7_info->circuit->transparent_iam) {
|
||||
sngss7_save_iam(ftdmchan, siConEvnt);
|
||||
}
|
||||
|
||||
/* check if a COT test is requested */
|
||||
if ((siConEvnt->natConInd.eh.pres) &&
|
||||
(siConEvnt->natConInd.contChkInd.pres) &&
|
||||
|
@ -237,7 +237,6 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
siConEvnt->cgPtyNum.natAddrInd.val,
|
||||
ftdmchan->caller_data.dnis.digits,
|
||||
siConEvnt->cdPtyNum.natAddrInd.val);
|
||||
|
||||
} /* if (channel is usable */
|
||||
|
||||
break;
|
||||
|
@ -490,6 +489,47 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
case (SUBDIRNUM):
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx SUB-DIR\n", sngss7_info->circuit->cic);
|
||||
break;
|
||||
#ifdef SANGOMA_SPIROU
|
||||
case (CHARGE_ACK):
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx TXA\n", sngss7_info->circuit->cic);
|
||||
break;
|
||||
case (CHARGE_UNIT):
|
||||
{
|
||||
uint32_t charging_unit = 0;
|
||||
uint32_t msg_num = 0;
|
||||
char val[3];
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx ITX\n", sngss7_info->circuit->cic);
|
||||
|
||||
memset(val, '\0', sizeof(val));
|
||||
|
||||
if (siCnStEvnt->chargUnitNum.eh.pres == PRSNT_NODEF &&
|
||||
siCnStEvnt->chargUnitNum.chargUnitNum.pres == PRSNT_NODEF) {
|
||||
|
||||
charging_unit = siCnStEvnt->chargUnitNum.chargUnitNum.val;
|
||||
}
|
||||
|
||||
if (siCnStEvnt->msgNum.eh.pres == PRSNT_NODEF &&
|
||||
siCnStEvnt->msgNum.msgNum.pres == PRSNT_NODEF) {
|
||||
|
||||
msg_num = siCnStEvnt->msgNum.msgNum.val;
|
||||
}
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_INFO, "Charging Unit:%d Msg Num:%d\n", charging_unit, msg_num);
|
||||
|
||||
sprintf(val, "%d", charging_unit);
|
||||
sngss7_add_var(sngss7_info, "ss7_itx_charge_unit", val);
|
||||
|
||||
sprintf(val, "%d", msg_num);
|
||||
sngss7_add_var(sngss7_info, "ss7_itx_msg_num", val);
|
||||
|
||||
if (sngss7_info->circuit->itx_auto_reply) {
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_INFO, "Auto-reply with TXA msg\n");
|
||||
ft_to_sngss7_txa (ftdmchan);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
/**************************************************************************/
|
||||
default:
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Unknown Msg\n", sngss7_info->circuit->cic);
|
||||
|
@ -532,7 +572,7 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
|
||||
/* go to UP */
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_UP);
|
||||
|
||||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
case FTDM_CHANNEL_STATE_DIALING:
|
||||
|
@ -609,6 +649,7 @@ ftdm_channel_command(ftdmchan, FTDM_COMMAND_DISABLE_LOOP, NULL);
|
|||
break;
|
||||
/**************************************************************************/
|
||||
case FTDM_CHANNEL_STATE_RING:
|
||||
case FTDM_CHANNEL_STATE_RINGING:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS_MEDIA:
|
||||
case FTDM_CHANNEL_STATE_UP:
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
static sng_isup_event_interface_t sng_event;
|
||||
static ftdm_io_interface_t g_ftdm_sngss7_interface;
|
||||
ftdm_sngss7_data_t g_ftdm_sngss7_data;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* PROTOTYPES *****************************************************************/
|
||||
|
@ -509,11 +510,6 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
|||
|
||||
SS7_DEBUG_CHAN(ftdmchan, "ftmod_sangoma_ss7 processing state %s\n", ftdm_channel_state2str (ftdmchan->state));
|
||||
|
||||
#if 0
|
||||
/* clear the state change flag...since we might be setting a new state */
|
||||
ftdm_channel_complete_state(ftdmchan);
|
||||
#endif
|
||||
|
||||
/*check what state we are supposed to be in */
|
||||
switch (ftdmchan->state) {
|
||||
/**************************************************************************/
|
||||
|
|
|
@ -60,6 +60,13 @@
|
|||
|
||||
#define MAX_SIZEOF_SUBADDR_IE 24 /* as per Q931 4.5.9 */
|
||||
|
||||
typedef struct ftdm2trillium
|
||||
{
|
||||
uint8_t ftdm_val;
|
||||
uint8_t trillium_val;
|
||||
}ftdm2trillium_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
SNGSS7_CON_IND_EVENT = 0,
|
||||
SNGSS7_CON_CFM_EVENT,
|
||||
|
@ -320,8 +327,19 @@ typedef struct sng_isup_ckt {
|
|||
uint32_t clg_nadi;
|
||||
uint32_t cld_nadi;
|
||||
uint8_t rdnis_nadi;
|
||||
|
||||
/* Generic Number defaults */
|
||||
uint8_t gn_nmbqual; /* Number Qualifier */
|
||||
uint8_t gn_nadi; /* Nature of Address indicator */
|
||||
uint8_t gn_screen_ind; /* Screening Indicator */
|
||||
uint8_t gn_pres_ind; /* Presentation Indicator */
|
||||
uint8_t gn_npi; /* Numbering Plan Indicator */
|
||||
uint8_t gn_num_inc_ind; /* Number Incomplete Indicator */
|
||||
/* END - Generic Number defaults */
|
||||
|
||||
uint32_t min_digits;
|
||||
uint8_t itx_auto_reply;
|
||||
uint8_t transparent_iam;
|
||||
void *obj;
|
||||
uint16_t t3;
|
||||
uint16_t t12;
|
||||
|
@ -389,6 +407,7 @@ typedef struct sng_ss7_cfg {
|
|||
uint32_t procId;
|
||||
char license[MAX_PATH];
|
||||
char signature[MAX_PATH];
|
||||
uint32_t transparent_iam_max_size;
|
||||
uint32_t flags;
|
||||
sng_relay_t relay[MAX_RELAY_CHANNELS+1];
|
||||
sng_mtp1_link_t mtp1Link[MAX_MTP_LINKS+1];
|
||||
|
@ -728,6 +747,9 @@ void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan);
|
|||
void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan);
|
||||
void ft_to_sngss7_cgb(ftdm_channel_t * ftdmchan);
|
||||
void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan);
|
||||
void ft_to_sngss7_itx (ftdm_channel_t * ftdmchan);
|
||||
void ft_to_sngss7_txa (ftdm_channel_t * ftdmchan);
|
||||
|
||||
|
||||
/* in ftmod_sangoma_ss7_in.c */
|
||||
void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt);
|
||||
|
@ -745,6 +767,10 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
|
|||
void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiSuspEvnt *siSuspEvnt);
|
||||
void sngss7_ssp_sta_cfm(uint32_t infId);
|
||||
|
||||
ftdm_status_t sngss7_bufferzero_iam(SiConEvnt *siConEvnt);
|
||||
ftdm_status_t sngss7_retrieve_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt);
|
||||
ftdm_status_t sngss7_save_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt);
|
||||
|
||||
/* in ftmod_sangoma_ss7_handle.c */
|
||||
ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt);
|
||||
ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCnStEvnt *siCnStEvnt, uint8_t evntType);
|
||||
|
@ -785,12 +811,21 @@ int ftmod_ss7_parse_xml(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *spa
|
|||
ftdm_status_t ftdm_sngss7_handle_cli_cmd(ftdm_stream_handle_t *stream, const char *data);
|
||||
|
||||
/* in ftmod_sangoma_ss7_support.c */
|
||||
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);
|
||||
ftdm_status_t copy_cgPtyNum_from_sngss7(ftdm_channel_t *ftdmchan, SiCgPtyNum *cgPtyNum);
|
||||
ftdm_status_t copy_cgPtyNum_to_sngss7(ftdm_channel_t *ftdmchan, SiCgPtyNum *cgPtyNum);
|
||||
ftdm_status_t copy_cdPtyNum_from_sngss7(ftdm_channel_t *ftdmchan, SiCdPtyNum *cdPtyNum);
|
||||
ftdm_status_t copy_cdPtyNum_to_sngss7(ftdm_channel_t *ftdmchan, SiCdPtyNum *cdPtyNum);
|
||||
ftdm_status_t copy_redirgNum_to_sngss7(ftdm_channel_t *ftdmchan, SiRedirNum *redirgNum);
|
||||
|
||||
ftdm_status_t copy_redirgNum_from_sngss7(ftdm_channel_t *ftdmchan, SiRedirNum *redirgNum);
|
||||
ftdm_status_t copy_genNmb_to_sngss7(ftdm_channel_t *ftdmchan, SiGenNum *genNmb);
|
||||
ftdm_status_t copy_genNmb_from_sngss7(ftdm_channel_t *ftdmchan, SiGenNum *genNmb);
|
||||
ftdm_status_t copy_cgPtyCat_to_sngss7(ftdm_channel_t *ftdmchan, SiCgPtyCat *cgPtyCat);
|
||||
ftdm_status_t copy_cgPtyCat_from_sngss7(ftdm_channel_t *ftdmchan, SiCgPtyCat *cgPtyCat);
|
||||
ftdm_status_t copy_accTrnspt_to_sngss7(ftdm_channel_t *ftdmchan, SiAccTrnspt *accTrnspt);
|
||||
ftdm_status_t copy_natConInd_to_sngss7(ftdm_channel_t *ftdmchan, SiNatConInd *natConInd);
|
||||
ftdm_status_t copy_fwdCallInd_to_sngss7(ftdm_channel_t *ftdmchan, SiFwdCallInd *fwdCallInd);
|
||||
ftdm_status_t copy_txMedReq_to_sngss7(ftdm_channel_t *ftdmchan, SiTxMedReq *txMedReq);
|
||||
ftdm_status_t copy_usrServInfoA_to_sngss7(ftdm_channel_t *ftdmchan, SiUsrServInfo *usrServInfoA);
|
||||
|
||||
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);
|
||||
|
|
|
@ -36,10 +36,8 @@
|
|||
/******************************************************************************/
|
||||
|
||||
/* DEFINES ********************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
/* PROTOTYPES *****************************************************************/
|
||||
void ft_to_sngss7_iam(ftdm_channel_t * ftdmchan);
|
||||
|
@ -66,243 +64,74 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan);
|
|||
|
||||
void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan);
|
||||
void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan);
|
||||
/******************************************************************************/
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
||||
{
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;;
|
||||
const char *clg_nadi = NULL;
|
||||
const char *cld_nadi = NULL;
|
||||
const char *clg_subAddr = NULL;
|
||||
const char *cld_subAddr = NULL;
|
||||
char subAddrIE[MAX_SIZEOF_SUBADDR_IE];
|
||||
{
|
||||
SiConEvnt iam;
|
||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;;
|
||||
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
||||
sngss7_info->suInstId = get_unique_id ();
|
||||
sngss7_info->spInstId = 0;
|
||||
sngss7_info->spId = 1;
|
||||
|
||||
memset (&iam, 0x0, sizeof (iam));
|
||||
|
||||
/* copy down the nature of connection indicators */
|
||||
iam.natConInd.eh.pres = PRSNT_NODEF;
|
||||
iam.natConInd.satInd.pres = PRSNT_NODEF;
|
||||
iam.natConInd.satInd.val = 0; /* no satellite circuit */
|
||||
iam.natConInd.contChkInd.pres = PRSNT_NODEF;
|
||||
iam.natConInd.contChkInd.val = CONTCHK_NOTREQ;
|
||||
iam.natConInd.echoCntrlDevInd.pres = PRSNT_NODEF;
|
||||
iam.natConInd.echoCntrlDevInd.val = ECHOCDEV_INCL;
|
||||
|
||||
/* copy down the forward call indicators */
|
||||
iam.fwdCallInd.eh.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.natIntCallInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.natIntCallInd.val = 0x00;
|
||||
iam.fwdCallInd.end2EndMethInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.end2EndMethInd.val = E2EMTH_NOMETH;
|
||||
iam.fwdCallInd.intInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.intInd.val = INTIND_NOINTW;
|
||||
iam.fwdCallInd.end2EndInfoInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.end2EndInfoInd.val = E2EINF_NOINFO;
|
||||
iam.fwdCallInd.isdnUsrPrtInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnUsrPrtInd.val = ISUP_USED;
|
||||
iam.fwdCallInd.isdnUsrPrtPrfInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnUsrPrtPrfInd.val = PREF_PREFAW;
|
||||
iam.fwdCallInd.isdnAccInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnAccInd.val = ISDNACC_ISDN;
|
||||
iam.fwdCallInd.sccpMethInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.sccpMethInd.val = SCCPMTH_NOIND;
|
||||
|
||||
/* copy down the calling number information */
|
||||
iam.cgPtyCat.eh.pres = PRSNT_NODEF;
|
||||
iam.cgPtyCat.cgPtyCat.pres = PRSNT_NODEF;
|
||||
iam.cgPtyCat.cgPtyCat.val = CAT_ORD; /* ordinary suscriber */
|
||||
|
||||
/* copy down the transmission medium requirements */
|
||||
iam.txMedReq.eh.pres = PRSNT_NODEF;
|
||||
iam.txMedReq.trMedReq.pres = PRSNT_NODEF;
|
||||
iam.txMedReq.trMedReq.val = ftdmchan->caller_data.bearer_capability;
|
||||
|
||||
if ((g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].switchType == LSI_SW_ANS88) ||
|
||||
(g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].switchType == LSI_SW_ANS92) ||
|
||||
(g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].switchType == LSI_SW_ANS95)) {
|
||||
|
||||
/* include only if we're running ANSI */
|
||||
iam.fwdCallInd.transCallNInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.transCallNInd.val = 0x0;
|
||||
|
||||
iam.usrServInfoA.eh.pres = PRSNT_NODEF;
|
||||
|
||||
iam.usrServInfoA.infoTranCap.pres = PRSNT_NODEF;
|
||||
switch (ftdmchan->caller_data.bearer_capability) {
|
||||
/**********************************************************************/
|
||||
case (FTDM_BEARER_CAP_SPEECH):
|
||||
iam.usrServInfoA.infoTranCap.val = 0x0; /* speech as per ATIS-1000113.3.2005 */
|
||||
break;
|
||||
/**********************************************************************/
|
||||
case (FTDM_BEARER_CAP_64K_UNRESTRICTED):
|
||||
iam.usrServInfoA.infoTranCap.val = 0x8; /* unrestricted digital as per ATIS-1000113.3.2005 */
|
||||
break;
|
||||
/**********************************************************************/
|
||||
case (FTDM_BEARER_CAP_3_1KHZ_AUDIO):
|
||||
iam.usrServInfoA.infoTranCap.val = 0x10; /* 3.1kHz audio as per ATIS-1000113.3.2005 */
|
||||
break;
|
||||
/**********************************************************************/
|
||||
default:
|
||||
SS7_ERROR_CHAN(ftdmchan, "Unknown Bearer capability falling back to speech%s\n", " ");
|
||||
iam.usrServInfoA.infoTranCap.val = 0x0; /* speech as per ATIS-1000113.3.2005 */
|
||||
break;
|
||||
/**********************************************************************/
|
||||
} /* switch (ftdmchan->caller_data.bearer_capability) */
|
||||
|
||||
iam.usrServInfoA.cdeStand.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.cdeStand.val = 0x0; /* ITU-T standardized coding */
|
||||
iam.usrServInfoA.tranMode.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.tranMode.val = 0x0; /* circuit mode */
|
||||
iam.usrServInfoA.infoTranRate0.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.infoTranRate0.val = 0x10; /* 64kbps origination to destination */
|
||||
iam.usrServInfoA.infoTranRate1.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.infoTranRate1.val = 0x10; /* 64kbps destination to origination */
|
||||
iam.usrServInfoA.chanStruct.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.chanStruct.val = 0x1; /* 8kHz integrity */
|
||||
iam.usrServInfoA.config.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.config.val = 0x0; /* point to point configuration */
|
||||
iam.usrServInfoA.establish.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.establish.val = 0x0; /* on demand */
|
||||
iam.usrServInfoA.symmetry.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.symmetry.val = 0x0; /* bi-directional symmetric */
|
||||
iam.usrServInfoA.usrInfLyr1Prot.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.usrInfLyr1Prot.val = 0x2; /* G.711 ulaw */
|
||||
iam.usrServInfoA.rateMultiplier.pres = PRSNT_NODEF;
|
||||
iam.usrServInfoA.rateMultiplier.val = 0x1; /* 1x rate multipler */
|
||||
} /* if ANSI */
|
||||
|
||||
/* copy down the called number information */
|
||||
copy_cdPtyNum_to_sngss7 (&ftdmchan->caller_data, &iam.cdPtyNum);
|
||||
|
||||
/* 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 */
|
||||
clg_nadi = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_clg_nadi");
|
||||
if ((clg_nadi != NULL) && (*clg_nadi)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Found user supplied Calling NADI value \"%s\"\n", clg_nadi);
|
||||
iam.cgPtyNum.natAddrInd.val = atoi(clg_nadi);
|
||||
if (sngss7_info->circuit->transparent_iam &&
|
||||
sngss7_retrieve_iam(ftdmchan, &iam) == FTDM_SUCCESS) {
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx IAM (Transparent)\n", sngss7_info->circuit->cic);
|
||||
} else {
|
||||
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);
|
||||
iam.cdPtyNum.natAddrInd.val = atoi(cld_nadi);
|
||||
} else {
|
||||
iam.cdPtyNum.natAddrInd.val = g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].cld_nadi;
|
||||
SS7_DEBUG_CHAN(ftdmchan,"No user supplied NADI value found for CLD, using \"%d\"\n", iam.cdPtyNum.natAddrInd.val);
|
||||
}
|
||||
/* Nature of Connection Indicators */
|
||||
copy_natConInd_to_sngss7(ftdmchan, &iam.natConInd);
|
||||
|
||||
/* check if the user would like us to send a clg_sub-address */
|
||||
clg_subAddr = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_clg_subaddr");
|
||||
if ((clg_subAddr != NULL) && (*clg_subAddr)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Found user supplied Calling Sub-Address value \"%s\"\n", clg_subAddr);
|
||||
/* Forward Call Indicators */
|
||||
copy_fwdCallInd_to_sngss7(ftdmchan, &iam.fwdCallInd);
|
||||
|
||||
/* Transmission medium requirements */
|
||||
copy_txMedReq_to_sngss7(ftdmchan, &iam.txMedReq);
|
||||
|
||||
/* User Service Info A */
|
||||
copy_usrServInfoA_to_sngss7(ftdmchan, &iam.usrServInfoA);
|
||||
|
||||
/* clean out the subAddrIE */
|
||||
memset(subAddrIE, 0x0, sizeof(subAddrIE));
|
||||
|
||||
/* check the first character in the sub-address to see what type of encoding to use */
|
||||
switch (clg_subAddr[0]) {
|
||||
case '0': /* NSAP */
|
||||
encode_subAddrIE_nsap(&clg_subAddr[1], subAddrIE, SNG_CALLING);
|
||||
break;
|
||||
case '1': /* national variant */
|
||||
encode_subAddrIE_nat(&clg_subAddr[1], subAddrIE, SNG_CALLING);
|
||||
break;
|
||||
default:
|
||||
SS7_ERROR_CHAN(ftdmchan,"Invalid Calling Sub-Address encoding requested: %c\n", clg_subAddr[0]);
|
||||
break;
|
||||
} /* switch (cld_subAddr[0]) */
|
||||
|
||||
|
||||
/* if subaddIE is still empty don't copy it in */
|
||||
if (subAddrIE[0] != '0') {
|
||||
/* check if the clg_subAddr has already been added */
|
||||
if (iam.accTrnspt.eh.pres == PRSNT_NODEF) {
|
||||
/* append the subAddrIE */
|
||||
memcpy(&iam.accTrnspt.infoElmts.val[iam.accTrnspt.infoElmts.len], subAddrIE, (subAddrIE[1] + 2));
|
||||
iam.accTrnspt.infoElmts.len = iam.accTrnspt.infoElmts.len +subAddrIE[1] + 2;
|
||||
} else {
|
||||
/* fill in from the beginning */
|
||||
iam.accTrnspt.eh.pres = PRSNT_NODEF;
|
||||
iam.accTrnspt.infoElmts.pres = PRSNT_NODEF;
|
||||
memcpy(iam.accTrnspt.infoElmts.val, subAddrIE, (subAddrIE[1] + 2));
|
||||
iam.accTrnspt.infoElmts.len = subAddrIE[1] + 2;
|
||||
} /* if (iam.accTrnspt.eh.pres */
|
||||
} /* 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)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Found user supplied Called Sub-Address value \"%s\"\n", cld_subAddr);
|
||||
/* Called Number information */
|
||||
copy_cdPtyNum_to_sngss7(ftdmchan, &iam.cdPtyNum);
|
||||
|
||||
/* clean out the subAddrIE */
|
||||
memset(subAddrIE, 0x0, sizeof(subAddrIE));
|
||||
/* Calling Number information */
|
||||
copy_cgPtyNum_to_sngss7(ftdmchan, &iam.cgPtyNum);
|
||||
|
||||
/* check the first character in the sub-address to see what type of encoding to use */
|
||||
switch (cld_subAddr[0]) {
|
||||
case '0': /* NSAP */
|
||||
encode_subAddrIE_nsap(&cld_subAddr[1], subAddrIE, SNG_CALLED);
|
||||
break;
|
||||
case '1': /* national variant */
|
||||
encode_subAddrIE_nat(&cld_subAddr[1], subAddrIE, SNG_CALLED);
|
||||
break;
|
||||
default:
|
||||
SS7_ERROR_CHAN(ftdmchan,"Invalid Called Sub-Address encoding requested: %c\n", cld_subAddr[0]);
|
||||
break;
|
||||
} /* switch (cld_subAddr[0]) */
|
||||
/* Generic Number information */
|
||||
copy_genNmb_to_sngss7(ftdmchan, &iam.genNmb);
|
||||
|
||||
/* if subaddIE is still empty don't copy it in */
|
||||
if (subAddrIE[0] != '0') {
|
||||
/* check if the cld_subAddr has already been added */
|
||||
if (iam.accTrnspt.eh.pres == PRSNT_NODEF) {
|
||||
/* append the subAddrIE */
|
||||
memcpy(&iam.accTrnspt.infoElmts.val[iam.accTrnspt.infoElmts.len], subAddrIE, (subAddrIE[1] + 2));
|
||||
iam.accTrnspt.infoElmts.len = iam.accTrnspt.infoElmts.len +subAddrIE[1] + 2;
|
||||
} else {
|
||||
/* fill in from the beginning */
|
||||
iam.accTrnspt.eh.pres = PRSNT_NODEF;
|
||||
iam.accTrnspt.infoElmts.pres = PRSNT_NODEF;
|
||||
memcpy(iam.accTrnspt.infoElmts.val, subAddrIE, (subAddrIE[1] + 2));
|
||||
iam.accTrnspt.infoElmts.len = subAddrIE[1] + 2;
|
||||
} /* if (iam.accTrnspt.eh.pres */
|
||||
} /* if (subAddrIE[0] != '0') */
|
||||
} /* if ((cld_subAddr != NULL) && (*cld_subAddr)) */
|
||||
/* Calling Party's Category */
|
||||
copy_cgPtyCat_to_sngss7(ftdmchan, &iam.cgPtyCat);
|
||||
|
||||
/* Redirecting Number */
|
||||
copy_redirgNum_to_sngss7(ftdmchan, &iam.redirgNum);
|
||||
|
||||
/* Access Transport */
|
||||
copy_accTrnspt_to_sngss7(ftdmchan, &iam.accTrnspt);
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx IAM clg = \"%s\" (NADI=%d), cld = \"%s\" (NADI=%d)\n",
|
||||
sngss7_info->circuit->cic,
|
||||
ftdmchan->caller_data.cid_num.digits,
|
||||
iam.cgPtyNum.natAddrInd.val,
|
||||
ftdmchan->caller_data.dnis.digits,
|
||||
iam.cdPtyNum.natAddrInd.val);
|
||||
}
|
||||
|
||||
sng_cc_con_request (sngss7_info->spId,
|
||||
sngss7_info->suInstId,
|
||||
sngss7_info->spInstId,
|
||||
sngss7_info->circuit->id,
|
||||
&iam,
|
||||
sngss7_info->circuit->id,
|
||||
&iam,
|
||||
0);
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx IAM clg = \"%s\" (NADI=%d), cld = \"%s\" (NADI=%d)\n",
|
||||
sngss7_info->circuit->cic,
|
||||
ftdmchan->caller_data.cid_num.digits,
|
||||
iam.cgPtyNum.natAddrInd.val,
|
||||
ftdmchan->caller_data.dnis.digits,
|
||||
iam.cdPtyNum.natAddrInd.val);
|
||||
|
||||
|
||||
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
|
||||
{
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
@ -339,7 +168,7 @@ void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
|
|||
acm.bckCallInd.echoCtrlDevInd.val = 0x1;
|
||||
break;
|
||||
/**********************************************************************/
|
||||
case (FTDM_BEARER_CAP_64K_UNRESTRICTED):
|
||||
case (FTDM_BEARER_CAP_UNRESTRICTED):
|
||||
acm.bckCallInd.echoCtrlDevInd.val = 0x0;
|
||||
break;
|
||||
/**********************************************************************/
|
||||
|
@ -382,7 +211,6 @@ void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
|
|||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ft_to_sngss7_anm (ftdm_channel_t * ftdmchan)
|
||||
{
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
@ -892,6 +720,69 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
|
|||
return;
|
||||
}
|
||||
|
||||
/* French SPIROU send Charge Unit */
|
||||
/* No one calls this function yet, but it has been implemented to complement TXA messages */
|
||||
void ft_to_sngss7_itx (ftdm_channel_t * ftdmchan)
|
||||
{
|
||||
#ifndef SANGOMA_SPIROU
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "ITX message not supported!, please update your libsng_ss7\n");
|
||||
#else
|
||||
const char* var = NULL;
|
||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||
SiCnStEvnt itx;
|
||||
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
||||
memset (&itx, 0x0, sizeof (itx));
|
||||
|
||||
itx.msgNum.eh.pres = PRSNT_NODEF;
|
||||
itx.msgNum.msgNum.pres = PRSNT_NODEF;
|
||||
var = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_itx_msg_num");
|
||||
if (!ftdm_strlen_zero(var)) {
|
||||
itx.msgNum.msgNum.val = atoi(var);
|
||||
} else {
|
||||
itx.msgNum.msgNum.val = 0x1;
|
||||
}
|
||||
|
||||
itx.chargUnitNum.eh.pres = PRSNT_NODEF;
|
||||
itx.chargUnitNum.chargUnitNum.pres = PRSNT_NODEF;
|
||||
var = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "ss7_itx_charge_unit");
|
||||
if (!ftdm_strlen_zero(var)) {
|
||||
itx.chargUnitNum.chargUnitNum.val = atoi(var);
|
||||
} else {
|
||||
itx.chargUnitNum.chargUnitNum.val = 0x1;
|
||||
}
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_INFO, "ITX Charging Unit:%d Msg Num:%d\n", itx.chargUnitNum.chargUnitNum.val, itx.msgNum.msgNum.val);
|
||||
sng_cc_con_status (1, sngss7_info->suInstId, sngss7_info->spInstId, sngss7_info->circuit->id, &itx, CHARGE_UNIT);
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx ITX\n", sngss7_info->circuit->cic);
|
||||
#endif
|
||||
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
/* French SPIROU send Charging Acknowledgement */
|
||||
void ft_to_sngss7_txa (ftdm_channel_t * ftdmchan)
|
||||
{
|
||||
#ifndef SANGOMA_SPIROU
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "TXA message not supported!, please update your libsng_ss7\n");
|
||||
#else
|
||||
SiCnStEvnt txa;
|
||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||
|
||||
memset (&txa, 0x0, sizeof(txa));
|
||||
|
||||
sng_cc_con_status(1, sngss7_info->suInstId, sngss7_info->spInstId, sngss7_info->circuit->id, &txa, CHARGE_ACK);
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx TXA\n", sngss7_info->circuit->cic);
|
||||
#endif
|
||||
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/* For Emacs:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -124,6 +124,8 @@ typedef struct sng_ccSpan
|
|||
uint32_t cld_nadi;
|
||||
uint32_t rdnis_nadi;
|
||||
uint32_t min_digits;
|
||||
uint8_t itx_auto_reply;
|
||||
uint8_t transparent_iam;
|
||||
uint32_t t3;
|
||||
uint32_t t12;
|
||||
uint32_t t13;
|
||||
|
@ -465,6 +467,9 @@ static int ftmod_ss7_parse_sng_gen(ftdm_conf_node_t *sng_gen)
|
|||
SS7_DEBUG("Found license file = %s\n", g_ftdm_sngss7_data.cfg.license);
|
||||
SS7_DEBUG("Found signature file = %s\n", g_ftdm_sngss7_data.cfg.signature);
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "transparent_iam_max_size")) {
|
||||
g_ftdm_sngss7_data.cfg.transparent_iam_max_size = atoi(parm->val);
|
||||
SS7_DEBUG("Found a transparent_iam max size = %d\n", g_ftdm_sngss7_data.cfg.transparent_iam_max_size);
|
||||
} else {
|
||||
/**********************************************************************/
|
||||
SS7_ERROR("Found an invalid parameter \"%s\"!\n", parm->val);
|
||||
|
@ -1892,7 +1897,16 @@ static int ftmod_ss7_parse_cc_span(ftdm_conf_node_t *cc_span)
|
|||
sng_ccSpan.typeCntrl = sng_cic_cntrl_type_map[ret].tril_type;
|
||||
SS7_DEBUG("Found an ccSpan typeCntrl = %s\n", sng_cic_cntrl_type_map[ret].sng_type);
|
||||
}
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(parm->var, "itx_auto_reply")) {
|
||||
sng_ccSpan.itx_auto_reply = ftdm_true(parm->val);
|
||||
SS7_DEBUG("Found itx_auto_reply %d\n", sng_ccSpan.itx_auto_reply);
|
||||
} else if (!strcasecmp(parm->var, "transparent_iam")) {
|
||||
#ifndef HAVE_ZLIB
|
||||
SS7_CRIT("Cannot enable transparent IAM becauze zlib not installed\n");
|
||||
#else
|
||||
sng_ccSpan.transparent_iam = ftdm_true(parm->val);
|
||||
SS7_DEBUG("Found transparent_iam %d\n", sng_ccSpan.transparent_iam);
|
||||
#endif
|
||||
} else if (!strcasecmp(parm->var, "cicbase")) {
|
||||
/**********************************************************************/
|
||||
sng_ccSpan.cicbase = atoi(parm->val);
|
||||
|
@ -2904,15 +2918,17 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
|
|||
g_ftdm_sngss7_data.cfg.isupCkt[x].cic = 0;
|
||||
}
|
||||
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].infId = ccSpan->isupInf;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].typeCntrl = ccSpan->typeCntrl;
|
||||
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;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].infId = ccSpan->isupInf;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].typeCntrl = ccSpan->typeCntrl;
|
||||
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;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].itx_auto_reply = ccSpan->itx_auto_reply;
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].transparent_iam = ccSpan->transparent_iam;
|
||||
|
||||
if (ccSpan->t3 == 0) {
|
||||
g_ftdm_sngss7_data.cfg.isupCkt[x].t3 = 1200;
|
||||
|
|
|
@ -950,7 +950,6 @@ static void wanpipe_read_stats(ftdm_channel_t *ftdmchan, wp_tdm_api_rx_hdr_t *rx
|
|||
static FIO_READ_FUNCTION(wanpipe_read)
|
||||
{
|
||||
int rx_len = 0;
|
||||
int myerrno = 0;
|
||||
wp_tdm_api_rx_hdr_t hdrframe;
|
||||
|
||||
memset(&hdrframe, 0, sizeof(hdrframe));
|
||||
|
@ -964,7 +963,6 @@ static FIO_READ_FUNCTION(wanpipe_read)
|
|||
}
|
||||
|
||||
if (rx_len < 0) {
|
||||
myerrno = errno;
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "%s", strerror(errno));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Failed to read from sangoma device: %s (%d)\n", strerror(errno), rx_len);
|
||||
return FTDM_FAIL;
|
||||
|
@ -1269,7 +1267,7 @@ static FIO_GET_ALARMS_FUNCTION(wanpipe_get_alarms)
|
|||
ftdm_channel_command(ftdmchan, FTDM_COMMAND_GET_LINK_STATUS, &sangoma_status);
|
||||
ftdmchan->alarm_flags = sangoma_status == FTDM_HW_LINK_DISCONNECTED ? FTDM_ALARM_RED : FTDM_ALARM_NONE;
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Link status is %d\n", sangoma_status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (alarms) {
|
||||
|
@ -1293,6 +1291,7 @@ static __inline__ ftdm_status_t wanpipe_channel_process_event(ftdm_channel_t *fc
|
|||
switch(tdm_api->wp_tdm_cmd.event.wp_tdm_api_event_type) {
|
||||
case WP_API_EVENT_LINK_STATUS:
|
||||
{
|
||||
if (FTDM_IS_DIGITAL_CHANNEL(fchan)) {
|
||||
switch(tdm_api->wp_tdm_cmd.event.wp_tdm_api_event_link_status) {
|
||||
case WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED:
|
||||
/* *event_id = FTDM_OOB_ALARM_CLEAR; */
|
||||
|
@ -1305,6 +1304,22 @@ static __inline__ ftdm_status_t wanpipe_channel_process_event(ftdm_channel_t *fc
|
|||
};
|
||||
/* The WP_API_EVENT_ALARM event should be used to clear alarms */
|
||||
*event_id = FTDM_OOB_NOOP;
|
||||
} else {
|
||||
switch(tdm_api->wp_tdm_cmd.event.wp_tdm_api_event_link_status) {
|
||||
case WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED:
|
||||
/* *event_id = FTDM_OOB_ALARM_CLEAR; */
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_DEBUG, "Using analog link connected event as alarm clear\n");
|
||||
*event_id = FTDM_OOB_ALARM_CLEAR;
|
||||
fchan->alarm_flags = FTDM_ALARM_NONE;
|
||||
break;
|
||||
default:
|
||||
/* *event_id = FTDM_OOB_ALARM_TRAP; */
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_DEBUG, "Using analog link disconnected event as alarm trap\n");
|
||||
*event_id = FTDM_OOB_ALARM_TRAP;
|
||||
fchan->alarm_flags = FTDM_ALARM_RED;
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -241,12 +241,12 @@ FTDM_STR2ENUM_P(ftdm_str2ftdm_ton, ftdm_ton2str, ftdm_ton_t)
|
|||
/*! Numbering Plan Identification (NPI) */
|
||||
typedef enum {
|
||||
FTDM_NPI_UNKNOWN = 0,
|
||||
FTDM_NPI_ISDN = 1,
|
||||
FTDM_NPI_DATA = 3,
|
||||
FTDM_NPI_TELEX = 4,
|
||||
FTDM_NPI_NATIONAL = 8,
|
||||
FTDM_NPI_PRIVATE = 9,
|
||||
FTDM_NPI_RESERVED = 10,
|
||||
FTDM_NPI_ISDN,
|
||||
FTDM_NPI_DATA,
|
||||
FTDM_NPI_TELEX,
|
||||
FTDM_NPI_NATIONAL,
|
||||
FTDM_NPI_PRIVATE,
|
||||
FTDM_NPI_RESERVED,
|
||||
FTDM_NPI_INVALID
|
||||
} ftdm_npi_t;
|
||||
#define NPI_STRINGS "unknown", "ISDN", "data", "telex", "national", "private", "reserved", "invalid"
|
||||
|
@ -276,12 +276,16 @@ FTDM_STR2ENUM_P(ftdm_str2ftdm_screening, ftdm_screening2str, ftdm_screening_t)
|
|||
|
||||
/*! \brief bearer capability */
|
||||
typedef enum {
|
||||
FTDM_BEARER_CAP_SPEECH = 0x00,
|
||||
FTDM_BEARER_CAP_64K_UNRESTRICTED = 0x02,
|
||||
FTDM_BEARER_CAP_3_1KHZ_AUDIO = 0x03,
|
||||
FTDM_BEARER_CAP_SPEECH = 0x00, /* Speech */
|
||||
FTDM_BEARER_CAP_UNRESTRICTED, /* Unrestricted Digital */
|
||||
FTDM_BEARER_CAP_RESTRICTED, /* Restricted Digital */
|
||||
FTDM_BEARER_CAP_3_1KHZ_AUDIO, /* 3.1 Khz Audio */
|
||||
FTDM_BEARER_CAP_7KHZ_AUDIO, /* 7 Khz Audio or Unrestricted digital w tones */
|
||||
FTDM_BEARER_CAP_15KHZ_AUDIO, /* 15 Khz Audio */
|
||||
FTDM_BEARER_CAP_VIDEO, /* Video */
|
||||
FTDM_BEARER_CAP_INVALID
|
||||
} ftdm_bearer_cap_t;
|
||||
#define BEARER_CAP_STRINGS "speech", "unrestricted-digital-information", "3.1-Khz-audio", "invalid"
|
||||
#define BEARER_CAP_STRINGS "speech", "unrestricted-digital-information", "restricted-digital-information", "3.1-Khz-audio", "7-Khz-audio", "15-Khz-audio", "video", "invalid"
|
||||
FTDM_STR2ENUM_P(ftdm_str2ftdm_bearer_cap, ftdm_bearer_cap2str, ftdm_bearer_cap_t)
|
||||
|
||||
/*! \brief user information layer 1 protocol */
|
||||
|
@ -298,6 +302,11 @@ FTDM_STR2ENUM_P(ftdm_str2ftdm_usr_layer1_prot, ftdm_user_layer1_prot2str, ftdm_u
|
|||
typedef enum {
|
||||
FTDM_CPC_UNKNOWN,
|
||||
FTDM_CPC_OPERATOR,
|
||||
FTDM_CPC_OPERATOR_FRENCH,
|
||||
FTDM_CPC_OPERATOR_ENGLISH,
|
||||
FTDM_CPC_OPERATOR_GERMAN,
|
||||
FTDM_CPC_OPERATOR_RUSSIAN,
|
||||
FTDM_CPC_OPERATOR_SPANISH,
|
||||
FTDM_CPC_ORDINARY,
|
||||
FTDM_CPC_PRIORITY,
|
||||
FTDM_CPC_DATA,
|
||||
|
@ -305,12 +314,14 @@ typedef enum {
|
|||
FTDM_CPC_PAYPHONE,
|
||||
FTDM_CPC_INVALID
|
||||
} ftdm_calling_party_category_t;
|
||||
#define CALLING_PARTY_CATEGORY_STRINGS "unknown", "operator", "ordinary", "priority", "data-call", "test-call", "payphone", "invalid"
|
||||
#define CALLING_PARTY_CATEGORY_STRINGS "unknown", "operator", "operator-french", "operator-english", "operator-german", "operator-russian", "operator-spanish", "ordinary", "priority", "data-call", "test-call", "payphone", "invalid"
|
||||
FTDM_STR2ENUM_P(ftdm_str2ftdm_calling_party_category, ftdm_calling_party_category2str, ftdm_calling_party_category_t)
|
||||
|
||||
/*! \brief Digit limit used in DNIS/ANI */
|
||||
#define FTDM_DIGITS_LIMIT 25
|
||||
|
||||
#define FTDM_SILENCE_VALUE(fchan) (fchan)->native_codec == FTDM_CODEC_ULAW ? 255 : (fchan)->native_codec == FTDM_CODEC_ALAW ? 0xD5 : 0x00
|
||||
|
||||
/*! \brief Number abstraction */
|
||||
typedef struct {
|
||||
char digits[FTDM_DIGITS_LIMIT];
|
||||
|
|
|
@ -131,5 +131,24 @@ FT_DECLARE(ftdm_status_t) ftdm_is_number(const char *number);
|
|||
*/
|
||||
FT_DECLARE(ftdm_status_t) ftdm_set_calling_party_category(const char *string, uint8_t *target);
|
||||
|
||||
/*!
|
||||
* \brief URL encode a buffer
|
||||
*
|
||||
* \param url buffer to convert
|
||||
* \param buf target to save converted string to
|
||||
* \param len size of buffer
|
||||
*
|
||||
* \retval pointer to converted string
|
||||
*/
|
||||
FT_DECLARE(char *) ftdm_url_encode(const char *url, char *buf, ftdm_size_t len);
|
||||
|
||||
/*!
|
||||
* \param s buffer to convert
|
||||
* \param len size of buffer
|
||||
*
|
||||
* \retval pointer to converted string
|
||||
*/
|
||||
FT_DECLARE(char *) ftdm_url_decode(char *s, ftdm_size_t *len);
|
||||
|
||||
#endif /* __FTDM_CALL_UTILS_H__ */
|
||||
|
||||
|
|
|
@ -249,6 +249,8 @@ typedef enum {
|
|||
#define FTDM_CHANNEL_IND_ACK_PENDING (1ULL << 34)
|
||||
/*!< There is someone blocking in the channel waiting for state completion */
|
||||
#define FTDM_CHANNEL_BLOCKING (1ULL << 35)
|
||||
/*!< Media is digital */
|
||||
#define FTDM_CHANNEL_DIGITAL_MEDIA (1ULL << 36)
|
||||
|
||||
#include "ftdm_state.h"
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
|
|||
TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cmd)
|
||||
{
|
||||
char *data = NULL, *cur = NULL, *end = NULL;
|
||||
int var = 0, LOOPING = 0;
|
||||
int LOOPING = 0;
|
||||
|
||||
if (!cmd) {
|
||||
return -1;
|
||||
|
@ -287,7 +287,6 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
|||
cur = data;
|
||||
|
||||
while (*cur) {
|
||||
var = 0;
|
||||
if (*cur == ' ' || *cur == '\r' || *cur == '\n') {
|
||||
cur++;
|
||||
continue;
|
||||
|
@ -298,7 +297,6 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
|||
}
|
||||
|
||||
if (*(cur + 1) == '=') {
|
||||
var = 1;
|
||||
switch(*cur) {
|
||||
case 'c':
|
||||
ts->channels = atoi(cur + 2);
|
||||
|
|
|
@ -242,7 +242,7 @@ static void default_logger(char *file, const char *func, int line, int level, ch
|
|||
|
||||
vsnprintf(data, sizeof(data), fmt, ap);
|
||||
|
||||
fprintf(globals.log_stream, "%s:%d %s() %s", file, line, func, data);
|
||||
fprintf(globals.log_stream, "%s:%d %s() %s", fp, line, func, data);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
|
@ -997,9 +997,9 @@ static int on_commands(void *user_data, ikspak *pak)
|
|||
uint8_t is_result = strcasecmp(type, "result") ? 0 : 1;
|
||||
uint8_t is_error = strcasecmp(type, "error") ? 0 : 1;
|
||||
iks *xml, *xsession, *xerror = NULL, *xredir = NULL;
|
||||
struct iks_tag* tmp;
|
||||
|
||||
xml = iks_child (pak->x);
|
||||
tmp = (struct iks_tag*) xml;
|
||||
|
||||
if (is_error) {
|
||||
if ((xerror = working_find(xml, "error"))) {
|
||||
char *code = iks_find_attrib(xerror, "code");
|
||||
|
|
|
@ -321,7 +321,7 @@ static char *my_strdup (const char *s)
|
|||
TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cmd)
|
||||
{
|
||||
char *data = NULL, *cur = NULL, *end = NULL;
|
||||
int var = 0, LOOPING = 0;
|
||||
int LOOPING = 0;
|
||||
|
||||
if (!cmd) {
|
||||
return -1;
|
||||
|
@ -335,7 +335,6 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
|||
cur = data;
|
||||
|
||||
while (*cur) {
|
||||
var = 0;
|
||||
if (*cur == ' ' || *cur == '\r' || *cur == '\n') {
|
||||
cur++;
|
||||
continue;
|
||||
|
@ -346,7 +345,6 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
|||
}
|
||||
|
||||
if (*(cur + 1) == '=') {
|
||||
var = 1;
|
||||
switch(*cur) {
|
||||
case 'c':
|
||||
ts->channels = atoi(cur + 2);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Tue Mar 22 15:01:49 CDT 2011
|
||||
Wed Apr 27 11:49:37 CDT 2011
|
||||
|
|
|
@ -182,7 +182,7 @@ int time_d(char const **ss,
|
|||
issize_t msg_date_d(char const **ss, msg_time_t *date)
|
||||
{
|
||||
char const *s = *ss;
|
||||
char const *wkday;
|
||||
//char const *wkday;
|
||||
char const *tz;
|
||||
unsigned long day, year, hour, min, sec;
|
||||
int mon;
|
||||
|
@ -190,7 +190,8 @@ issize_t msg_date_d(char const **ss, msg_time_t *date)
|
|||
if (!IS_TOKEN(*s) || !date)
|
||||
return -1;
|
||||
|
||||
wkday = s; skip_token(&s); if (*s == ',') s++;
|
||||
//wkday = s;
|
||||
skip_token(&s); if (*s == ',') s++;
|
||||
while (IS_LWS(*s)) s++;
|
||||
|
||||
if (is_digit(*s)) {
|
||||
|
|
|
@ -550,7 +550,7 @@ int nea_server_shutdown(nea_server_t *nes,
|
|||
int retry_after)
|
||||
{
|
||||
nea_sub_t *s;
|
||||
int status = 200;
|
||||
// int status = 200;
|
||||
int in_callback;
|
||||
|
||||
if (nes == NULL)
|
||||
|
@ -576,8 +576,8 @@ int nea_server_shutdown(nea_server_t *nes,
|
|||
TAG_IF(!retry_after, NEATAG_REASON("deactivated")),
|
||||
TAG_IF(retry_after, NEATAG_RETRY_AFTER(retry_after)),
|
||||
TAG_END());
|
||||
else
|
||||
status = 180;
|
||||
//else
|
||||
//status = 180;
|
||||
}
|
||||
|
||||
nes->nes_in_callback = in_callback;
|
||||
|
|
|
@ -2307,7 +2307,7 @@ int agent_init_via(nta_agent_t *self, tport_t *primaries, int use_maddr)
|
|||
|
||||
/* Set via fields for the tports */
|
||||
for (tp = primaries; tp; tp = tport_next(tp)) {
|
||||
int maddr, first_via;
|
||||
int maddr;
|
||||
tp_name_t tpn[1];
|
||||
char const *comp = NULL;
|
||||
|
||||
|
@ -2339,8 +2339,6 @@ int agent_init_via(nta_agent_t *self, tport_t *primaries, int use_maddr)
|
|||
|
||||
if (tport_has_tls(tp)) self->sa_tport_tls = 1;
|
||||
|
||||
first_via = 1;
|
||||
|
||||
ai = tport_get_address(tp);
|
||||
|
||||
for (; ai; ai = ai->ai_next) {
|
||||
|
|
|
@ -1879,14 +1879,14 @@ int nua_registration_process_request(nua_registration_t *list,
|
|||
nta_incoming_t *irq,
|
||||
sip_t const *sip)
|
||||
{
|
||||
sip_call_id_t *i;
|
||||
//sip_call_id_t *i;
|
||||
nua_registration_t *nr;
|
||||
|
||||
if (!outbound_targeted_request(sip))
|
||||
return 0;
|
||||
|
||||
/* Process by outbound... */
|
||||
i = sip->sip_call_id;
|
||||
//i = sip->sip_call_id;
|
||||
|
||||
for (nr = list; nr; nr = nr->nr_next) {
|
||||
outbound_t *ob = nr->nr_ob;
|
||||
|
|
|
@ -1743,7 +1743,7 @@ static int nua_prack_client_request(nua_client_request_t *cr,
|
|||
nua_client_request_t *cri;
|
||||
int offer_sent = 0, answer_sent = 0, retval;
|
||||
int status = 0; char const *phrase = "PRACK Sent";
|
||||
uint32_t rseq = 0;
|
||||
//uint32_t rseq = 0;
|
||||
|
||||
if (du == NULL) /* Call terminated */
|
||||
return nua_client_return(cr, SIP_481_NO_TRANSACTION, msg);
|
||||
|
@ -1754,8 +1754,8 @@ static int nua_prack_client_request(nua_client_request_t *cr,
|
|||
|
||||
cri = du->du_cr;
|
||||
|
||||
if (sip->sip_rack)
|
||||
rseq = sip->sip_rack->ra_response;
|
||||
// if (sip->sip_rack)
|
||||
// rseq = sip->sip_rack->ra_response;
|
||||
|
||||
if (cri->cr_offer_recv && !cri->cr_answer_sent) {
|
||||
if (nh->nh_soa == NULL)
|
||||
|
|
|
@ -1883,12 +1883,11 @@ static char *next(char **message, const char *sep, const char *strip)
|
|||
|
||||
static int parsing_error(sdp_parser_t *p, char const *fmt, ...)
|
||||
{
|
||||
int n;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
memset(p->pr_error, 0, sizeof(p->pr_error));
|
||||
n = vsnprintf(p->pr_error, sizeof(p->pr_error), fmt, ap);
|
||||
vsnprintf(p->pr_error, sizeof(p->pr_error), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
p->pr_ok = 0;
|
||||
|
|
|
@ -685,9 +685,8 @@ static void printing_error(sdp_printer_t *p, const char *fmt, ...)
|
|||
va_list ap;
|
||||
|
||||
if (p->pr_ok) {
|
||||
int n;
|
||||
va_start(ap, fmt);
|
||||
n = vsnprintf(p->pr_buffer, p->pr_bsiz, fmt, ap);
|
||||
vsnprintf(p->pr_buffer, p->pr_bsiz, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
|
|
@ -1010,7 +1010,6 @@ int soa_sdp_mode_set(sdp_session_t const *user,
|
|||
int retval = 0, i, j;
|
||||
int hold_all;
|
||||
int inactive_all;
|
||||
int inactive = 0;
|
||||
char const *hold_media = NULL;
|
||||
sdp_mode_t send_mode, recv_mode;
|
||||
|
||||
|
@ -1029,7 +1028,6 @@ int soa_sdp_mode_set(sdp_session_t const *user,
|
|||
|
||||
for (sm = session->sdp_media; sm; sm = sm->m_next, rm = rm_next, i++) {
|
||||
rm_next = rm ? rm->m_next : NULL;
|
||||
inactive = 0;
|
||||
|
||||
if (sm->m_rejected)
|
||||
continue;
|
||||
|
|
|
@ -3636,6 +3636,10 @@ sres_decode_msg(sres_resolver_t *res,
|
|||
m_get_domain(name, sizeof(name), m, 0); /* Query domain */
|
||||
qtype = m_get_uint16(m); /* Query type */
|
||||
qclass = m_get_uint16(m); /* Query class */
|
||||
if (qtype && qclass) {
|
||||
/* XXX: never mind these useless check, this is done to make compiler happy about unused value */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (m->m_error) {
|
||||
|
|
|
@ -673,12 +673,12 @@ static stun_request_t *stun_request_create(stun_discovery_t *sd)
|
|||
|
||||
void stun_request_destroy(stun_request_t *req)
|
||||
{
|
||||
stun_handle_t *sh;
|
||||
//stun_handle_t *sh;
|
||||
assert(req);
|
||||
|
||||
enter;
|
||||
|
||||
sh = req->sr_handle;
|
||||
//sh = req->sr_handle;
|
||||
|
||||
if (x_is_inserted(req, sr))
|
||||
x_remove(req, sr);
|
||||
|
@ -1140,14 +1140,14 @@ static stun_discovery_t *stun_discovery_create(stun_handle_t *sh,
|
|||
|
||||
static int stun_discovery_destroy(stun_discovery_t *sd)
|
||||
{
|
||||
stun_handle_t *sh;
|
||||
//stun_handle_t *sh;
|
||||
|
||||
enter;
|
||||
|
||||
if (!sd)
|
||||
return errno = EFAULT, -1;
|
||||
|
||||
sh = sd->sd_handle;
|
||||
//sh = sd->sd_handle;
|
||||
|
||||
if (sd->sd_timer)
|
||||
su_timer_destroy(sd->sd_timer), sd->sd_timer = NULL;
|
||||
|
@ -1883,7 +1883,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon
|
|||
stun_discovery_t *sd = req->sr_discovery;
|
||||
stun_request_t *new;
|
||||
stun_handle_t *sh = req->sr_handle;
|
||||
su_localinfo_t *li;
|
||||
//su_localinfo_t *li;
|
||||
su_sockaddr_t *sa;
|
||||
su_timer_t *sockfdy_timer = NULL;
|
||||
su_socket_t sockfdy = sd->sd_socket2;
|
||||
|
@ -1954,7 +1954,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon
|
|||
/* Rock, we come from sockfdx */
|
||||
process_binding_request(req, binding_response);
|
||||
|
||||
li = &req->sr_localinfo;
|
||||
//li = &req->sr_localinfo;
|
||||
sa = req->sr_local_addr;
|
||||
stun_free_message(binding_response);
|
||||
|
||||
|
@ -1981,7 +1981,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon
|
|||
|
||||
static int action_bind(stun_request_t *req, stun_msg_t *binding_response)
|
||||
{
|
||||
su_localinfo_t *li = NULL;
|
||||
//su_localinfo_t *li = NULL;
|
||||
su_sockaddr_t *sa = NULL;
|
||||
stun_discovery_t *sd = req->sr_discovery;
|
||||
stun_handle_t *sh = req->sr_handle;
|
||||
|
@ -1992,7 +1992,7 @@ static int action_bind(stun_request_t *req, stun_msg_t *binding_response)
|
|||
|
||||
process_binding_request(req, binding_response);
|
||||
|
||||
li = &req->sr_localinfo;
|
||||
//li = &req->sr_localinfo;
|
||||
sa = req->sr_local_addr;
|
||||
|
||||
memcpy(sd->sd_addr_seen_outside, sa, sizeof(su_sockaddr_t));
|
||||
|
@ -3039,7 +3039,7 @@ int stun_process_request(su_socket_t s, stun_msg_t *req,
|
|||
su_sockaddr_t mod_addr[1] = {{ 0 }}, src_addr[1] = {{ 0 }}, chg_addr[1] = {{ 0 }};
|
||||
stun_attr_t *tmp, m_attr[1], s_attr[1], c_attr[1], **p;
|
||||
su_sockaddr_t to_addr;
|
||||
int c, i;
|
||||
int i;
|
||||
|
||||
tmp = stun_get_attr(req->stun_attr, RESPONSE_ADDRESS);
|
||||
|
||||
|
@ -3071,20 +3071,20 @@ int stun_process_request(su_socket_t s, stun_msg_t *req,
|
|||
/* SOURCE-ADDRESS depends on CHANGE_REQUEST */
|
||||
tmp = stun_get_attr(req->stun_attr, CHANGE_REQUEST);
|
||||
if (!tmp) {
|
||||
c = 0;
|
||||
//c = 0;
|
||||
}
|
||||
else {
|
||||
switch (((stun_attr_changerequest_t *) tmp->pattr)->value) {
|
||||
case STUN_CR_CHANGE_IP:
|
||||
c = 1;
|
||||
//c = 1;
|
||||
break;
|
||||
|
||||
case STUN_CR_CHANGE_PORT:
|
||||
c = 2;
|
||||
//c = 2;
|
||||
break;
|
||||
|
||||
case STUN_CR_CHANGE_IP | STUN_CR_CHANGE_PORT: /* bitwise or */
|
||||
c = 3;
|
||||
//c = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -163,7 +163,10 @@ stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic,
|
|||
query = sres_query(self->stun_sres, priv_sres_cb, self,
|
||||
sres_type_srv,
|
||||
srvname);
|
||||
}
|
||||
if (query) {
|
||||
/* TODO Just so compiler doesn't give error */
|
||||
}
|
||||
}
|
||||
else {
|
||||
su_free(NULL, self), self = NULL;
|
||||
}
|
||||
|
|
|
@ -429,13 +429,13 @@ void *sub_alloc(su_home_t *home,
|
|||
|
||||
if (sub == NULL || 3 * sub->sub_used > 2 * sub->sub_n) {
|
||||
/* Resize the hash table */
|
||||
size_t i, n, n2, used;
|
||||
size_t i, n, n2;
|
||||
su_block_t *b2;
|
||||
|
||||
if (sub)
|
||||
n = home->suh_blocks->sub_n, n2 = 4 * n + 3, used = sub->sub_used;
|
||||
n = home->suh_blocks->sub_n, n2 = 4 * n + 3; //, used = sub->sub_used;
|
||||
else
|
||||
n = 0, n2 = SUB_N, used = 0;
|
||||
n = 0, n2 = SUB_N; //, used = 0;
|
||||
|
||||
#if 0
|
||||
printf("su_alloc(home = %p): realloc block hash of size %d\n", home, n2);
|
||||
|
|
|
@ -194,7 +194,8 @@ static void li_sort(su_localinfo_t *i, su_localinfo_t **rresult);
|
|||
int su_getlocalinfo(su_localinfo_t const *hints,
|
||||
su_localinfo_t **return_localinfo)
|
||||
{
|
||||
int error = 0, ip4 = 0, ip6 = 0;
|
||||
int error = 0, ip4 = 0;
|
||||
int ip6 = 0;
|
||||
su_localinfo_t *result = NULL, **rr = &result;
|
||||
su_localinfo_t hh[1] = {{ 0 }};
|
||||
|
||||
|
@ -231,7 +232,11 @@ int su_getlocalinfo(su_localinfo_t const *hints,
|
|||
break;
|
||||
|
||||
case 0:
|
||||
ip6 = ip4 = 1;
|
||||
ip4 = 1;
|
||||
#if SU_HAVE_IN6
|
||||
ip6 = 1;
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -260,6 +265,9 @@ int su_getlocalinfo(su_localinfo_t const *hints,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (ip6) {
|
||||
/* Required to make compiler happy */
|
||||
}
|
||||
if (!result)
|
||||
error = ELI_NOADDRESS;
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ size_t su_memspn(const void *mem, size_t memlen,
|
|||
* of bytes not in @a reject.
|
||||
*
|
||||
* @param mem pointer to memory area
|
||||
* @param memlen size of @a mem in bytes
|
||||
* @param memlen size of @a mem in bytes
|
||||
* @param reject pointer to table containing bytes to reject
|
||||
* @param rejectlen size of @a reject table
|
||||
*
|
||||
|
|
|
@ -1595,7 +1595,7 @@ int tport_bind_server(tport_master_t *mr,
|
|||
{
|
||||
char hostname[TPORT_HOSTPORTSIZE];
|
||||
char const *canon = NULL, *host, *service;
|
||||
int error = 0, not_supported, family = 0;
|
||||
int error = 0, family = 0;
|
||||
tport_primary_t *pri = NULL, **tbf;
|
||||
su_addrinfo_t *ai, *res = NULL;
|
||||
unsigned port, port0, port1, old;
|
||||
|
@ -1691,8 +1691,6 @@ int tport_bind_server(tport_master_t *mr,
|
|||
break;
|
||||
}
|
||||
|
||||
not_supported = 0;
|
||||
|
||||
if (port0 == 0 && port == 0) {
|
||||
port = port1 = ntohs(su->su_port);
|
||||
assert(public != tport_type_server || port != 0);
|
||||
|
|
|
@ -170,10 +170,10 @@ void tport_stun_bind_cb(tport_primary_t *pri,
|
|||
stun_action_t action,
|
||||
stun_state_t event)
|
||||
{
|
||||
tport_master_t *mr;
|
||||
//tport_master_t *mr;
|
||||
SU_DEBUG_3(("%s: %s\n", __func__, stun_str_state(event)));
|
||||
|
||||
mr = pri->pri_master;
|
||||
//mr = pri->pri_master;
|
||||
|
||||
if (event == stun_discovery_done) {
|
||||
tport_stun_bind_done(pri, sh, sd);
|
||||
|
|
|
@ -567,7 +567,7 @@ static
|
|||
int _url_d(url_t *url, char *s)
|
||||
{
|
||||
size_t n, p;
|
||||
char *s0, rest_c, *host, *user;
|
||||
char rest_c, *host, *user;
|
||||
int have_authority = 1;
|
||||
|
||||
memset(url, 0, sizeof(*url));
|
||||
|
@ -578,8 +578,6 @@ int _url_d(url_t *url, char *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
s0 = s;
|
||||
|
||||
n = strcspn(s, ":/?#");
|
||||
|
||||
if (n && s[n] == ':') {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Mon Jun 7 20:09:38 EDT 2010
|
||||
Wed May 4 10:03:23 CDT 2011
|
||||
|
|
|
@ -165,10 +165,10 @@ SPAN_DECLARE(int) plc_fillin(plc_state_t *s, int16_t amp[], int len)
|
|||
float old_weight;
|
||||
float new_weight;
|
||||
float gain;
|
||||
int16_t *orig_amp;
|
||||
//int16_t *orig_amp;
|
||||
int orig_len;
|
||||
|
||||
orig_amp = amp;
|
||||
//orig_amp = amp;
|
||||
orig_len = len;
|
||||
if (s->missing_samples == 0)
|
||||
{
|
||||
|
|
|
@ -799,7 +799,11 @@ SPAN_DECLARE(int) t38_core_send_indicator(t38_core_state_t *s, int indicator)
|
|||
return len;
|
||||
}
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Tx %5d: indicator %s\n", s->tx_seq_no, t38_indicator_to_str(indicator));
|
||||
s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, transmissions);
|
||||
if (s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, transmissions) < 0)
|
||||
{
|
||||
span_log(&s->logging, SPAN_LOG_PROTOCOL_WARNING, "Tx Packet Handler Failure\n");
|
||||
return -1;
|
||||
}
|
||||
s->tx_seq_no = (s->tx_seq_no + 1) & 0xFFFF;
|
||||
delay = modem_startup_time[indicator].training;
|
||||
if (s->allow_for_tep)
|
||||
|
@ -837,7 +841,11 @@ SPAN_DECLARE(int) t38_core_send_data(t38_core_state_t *s, int data_type, int fie
|
|||
span_log(&s->logging, SPAN_LOG_FLOW, "T.38 data len is %d\n", len);
|
||||
return len;
|
||||
}
|
||||
s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, s->category_control[category]);
|
||||
if (s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, s->category_control[category]) < 0)
|
||||
{
|
||||
span_log(&s->logging, SPAN_LOG_PROTOCOL_WARNING, "Tx Packet Handler Failure\n");
|
||||
return -1;
|
||||
}
|
||||
s->tx_seq_no = (s->tx_seq_no + 1) & 0xFFFF;
|
||||
return 0;
|
||||
}
|
||||
|
@ -853,7 +861,11 @@ SPAN_DECLARE(int) t38_core_send_data_multi_field(t38_core_state_t *s, int data_t
|
|||
span_log(&s->logging, SPAN_LOG_FLOW, "T.38 data len is %d\n", len);
|
||||
return len;
|
||||
}
|
||||
s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, s->category_control[category]);
|
||||
if (s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, s->category_control[category]) < 0)
|
||||
{
|
||||
span_log(&s->logging, SPAN_LOG_PROTOCOL_WARNING, "Tx Packet Handler Failure\n");
|
||||
return -1;
|
||||
}
|
||||
s->tx_seq_no = (s->tx_seq_no + 1) & 0xFFFF;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -63,10 +63,18 @@
|
|||
#include "spandsp/v17rx.h"
|
||||
#include "spandsp/t4_rx.h"
|
||||
#include "spandsp/t4_tx.h"
|
||||
#if defined(SPANDSP_SUPPORT_T85)
|
||||
#if defined(SPANDSP_SUPPORT_T42) || defined(SPANDSP_SUPPORT_T43) | defined(SPANDSP_SUPPORT_T85)
|
||||
#include "spandsp/t81_t82_arith_coding.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T85)
|
||||
#include "spandsp/t85.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T42)
|
||||
#include "spandsp/t42.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T43)
|
||||
#include "spandsp/t43.h"
|
||||
#endif
|
||||
#include "spandsp/t4_t6_decode.h"
|
||||
#include "spandsp/t4_t6_encode.h"
|
||||
#include "spandsp/t30_fcf.h"
|
||||
|
@ -78,10 +86,18 @@
|
|||
#include "spandsp/t38_terminal.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#if defined(SPANDSP_SUPPORT_T85)
|
||||
#if defined(SPANDSP_SUPPORT_T42) || defined(SPANDSP_SUPPORT_T43) | defined(SPANDSP_SUPPORT_T85)
|
||||
#include "spandsp/private/t81_t82_arith_coding.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T85)
|
||||
#include "spandsp/private/t85.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T42)
|
||||
#include "spandsp/private/t42.h"
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T43)
|
||||
#include "spandsp/private/t43.h"
|
||||
#endif
|
||||
#include "spandsp/private/t4_t6_decode.h"
|
||||
#include "spandsp/private/t4_t6_encode.h"
|
||||
#include "spandsp/private/t4_rx.h"
|
||||
|
@ -629,7 +645,9 @@ static int set_no_signal(t38_terminal_state_t *s)
|
|||
|
||||
if ((s->t38_fe.chunking_modes & T38_CHUNKING_SEND_REGULAR_INDICATORS))
|
||||
{
|
||||
t38_core_send_indicator(&s->t38_fe.t38, 0x100 | T38_IND_NO_SIGNAL);
|
||||
if ((delay = t38_core_send_indicator(&s->t38_fe.t38, 0x100 | T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
s->t38_fe.timed_step = T38_TIMED_STEP_NO_SIGNAL;
|
||||
#if 0
|
||||
if ((s->t38_fe.chunking_modes & T38_CHUNKING_SEND_2S_REGULAR_INDICATORS))
|
||||
|
@ -641,7 +659,9 @@ static int set_no_signal(t38_terminal_state_t *s)
|
|||
return s->t38_fe.ms_per_tx_chunk*1000;
|
||||
}
|
||||
/*endif*/
|
||||
delay = t38_core_send_indicator(&s->t38_fe.t38, T38_IND_NO_SIGNAL);
|
||||
if ((delay = t38_core_send_indicator(&s->t38_fe.t38, T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
s->t38_fe.timed_step = T38_TIMED_STEP_NONE;
|
||||
return delay;
|
||||
}
|
||||
|
@ -649,7 +669,11 @@ static int set_no_signal(t38_terminal_state_t *s)
|
|||
|
||||
static int stream_no_signal(t38_terminal_state_t *s)
|
||||
{
|
||||
t38_core_send_indicator(&s->t38_fe.t38, 0x100 | T38_IND_NO_SIGNAL);
|
||||
int delay;
|
||||
|
||||
if ((delay = t38_core_send_indicator(&s->t38_fe.t38, 0x100 | T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
#if 0
|
||||
if (s->t38_fe.timeout_tx_samples && s->t38_fe.next_tx_samples >= s->t38_fe.timeout_tx_samples)
|
||||
s->t38_fe.timed_step = T38_TIMED_STEP_NONE;
|
||||
|
@ -663,6 +687,7 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
{
|
||||
t38_terminal_front_end_state_t *fe;
|
||||
uint8_t buf[MAX_OCTETS_PER_UNPACED_CHUNK + 50];
|
||||
int res;
|
||||
int delay;
|
||||
int len;
|
||||
|
||||
|
@ -674,9 +699,15 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
case T38_TIMED_STEP_NON_ECM_MODEM:
|
||||
/* Create a 75ms silence */
|
||||
if (fe->t38.current_tx_indicator != T38_IND_NO_SIGNAL)
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL);
|
||||
{
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
}
|
||||
else
|
||||
{
|
||||
delay = 75000;
|
||||
}
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_2;
|
||||
#if 0
|
||||
|
@ -690,7 +721,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
#if 0
|
||||
if ((s->t38_fe.chunking_modes & T38_CHUNKING_SEND_REGULAR_INDICATORS))
|
||||
{
|
||||
delay = t38_core_send_indicator(&fe->t38, 0x100 | fe->next_tx_indicator);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, 0x100 | fe->next_tx_indicator)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
if (fe->next_tx_samples >= fe->timeout_tx_samples)
|
||||
fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_3;
|
||||
/*endif*/
|
||||
|
@ -698,7 +731,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
}
|
||||
/*endif*/
|
||||
#endif
|
||||
delay = t38_core_send_indicator(&fe->t38, fe->next_tx_indicator);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, fe->next_tx_indicator)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_3;
|
||||
break;
|
||||
case T38_TIMED_STEP_NON_ECM_MODEM_3:
|
||||
|
@ -731,7 +766,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
else
|
||||
{
|
||||
/* If we are sending quickly there seems no point in doing any padding */
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA_END);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA_END)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
|
||||
delay = 0;
|
||||
break;
|
||||
|
@ -739,7 +776,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
/*endif*/
|
||||
}
|
||||
/*endif*/
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
delay = bits_to_us(s, 8*len);
|
||||
break;
|
||||
case T38_TIMED_STEP_NON_ECM_MODEM_4:
|
||||
|
@ -750,7 +789,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
{
|
||||
len += fe->non_ecm_trailer_bytes;
|
||||
memset(buf, 0, len);
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA_END);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA_END)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
|
||||
/* Allow a bit more time than the data will take to play out, to ensure the far ATA does not
|
||||
cut things short. */
|
||||
|
@ -763,7 +804,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
|
|||
}
|
||||
/*endif*/
|
||||
memset(buf, 0, len);
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, T38_PACKET_CATEGORY_IMAGE_DATA)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
delay = bits_to_us(s, 8*len);
|
||||
break;
|
||||
case T38_TIMED_STEP_NON_ECM_MODEM_5:
|
||||
|
@ -785,6 +828,7 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
t38_data_field_t data_fields[2];
|
||||
int category;
|
||||
int previous;
|
||||
int res;
|
||||
int delay;
|
||||
int i;
|
||||
|
||||
|
@ -796,9 +840,15 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
case T38_TIMED_STEP_HDLC_MODEM:
|
||||
/* Create a 75ms silence */
|
||||
if (fe->t38.current_tx_indicator != T38_IND_NO_SIGNAL)
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL);
|
||||
{
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
}
|
||||
else
|
||||
{
|
||||
delay = 75000;
|
||||
}
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_2;
|
||||
#if 0
|
||||
|
@ -814,7 +864,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
#if 0
|
||||
if ((s->t38_fe.chunking_modes & T38_CHUNKING_SEND_REGULAR_INDICATORS))
|
||||
{
|
||||
delay = t38_core_send_indicator(&fe->t38, 0x100 | fe->next_tx_indicator);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, 0x100 | fe->next_tx_indicator)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
if (fe->next_tx_samples >= fe->timeout_tx_samples)
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
|
||||
/*endif*/
|
||||
|
@ -822,8 +874,10 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
}
|
||||
/*endif*/
|
||||
#endif
|
||||
delay = t38_core_send_indicator(&fe->t38, fe->next_tx_indicator)
|
||||
+ t38_core_send_flags_delay(&fe->t38, fe->next_tx_indicator);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, fe->next_tx_indicator)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
delay += t38_core_send_flags_delay(&fe->t38, fe->next_tx_indicator);
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
|
||||
break;
|
||||
case T38_TIMED_STEP_HDLC_MODEM_3:
|
||||
|
@ -852,7 +906,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
data_fields[1].field = NULL;
|
||||
data_fields[1].field_len = 0;
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA_END : T38_PACKET_CATEGORY_IMAGE_DATA_END;
|
||||
t38_core_send_data_multi_field(&fe->t38, fe->current_tx_data_type, data_fields, 2, category);
|
||||
if ((res = t38_core_send_data_multi_field(&fe->t38, fe->current_tx_data_type, data_fields, 2, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
|
||||
/* We add a bit of extra time here, as with some implementations
|
||||
the carrier falling too abruptly causes data loss. */
|
||||
|
@ -868,7 +924,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
data_fields[1].field = NULL;
|
||||
data_fields[1].field_len = 0;
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA : T38_PACKET_CATEGORY_IMAGE_DATA;
|
||||
t38_core_send_data_multi_field(&fe->t38, fe->current_tx_data_type, data_fields, 2, category);
|
||||
if ((res = t38_core_send_data_multi_field(&fe->t38, fe->current_tx_data_type, data_fields, 2, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
|
||||
delay = bits_to_us(s, i*8 + fe->hdlc_tx.extra_bits);
|
||||
}
|
||||
|
@ -877,14 +935,18 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
}
|
||||
/*endif*/
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA : T38_PACKET_CATEGORY_IMAGE_DATA;
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_HDLC_DATA, &fe->hdlc_tx.buf[fe->hdlc_tx.ptr], i, category);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_HDLC_DATA, &fe->hdlc_tx.buf[fe->hdlc_tx.ptr], i, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = fe->octets_per_data_packet;
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA : T38_PACKET_CATEGORY_IMAGE_DATA;
|
||||
t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_HDLC_DATA, &fe->hdlc_tx.buf[fe->hdlc_tx.ptr], i, category);
|
||||
if ((res = t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_HDLC_DATA, &fe->hdlc_tx.buf[fe->hdlc_tx.ptr], i, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->hdlc_tx.ptr += i;
|
||||
}
|
||||
/*endif*/
|
||||
|
@ -901,7 +963,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
{
|
||||
/* End of transmission */
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA_END : T38_PACKET_CATEGORY_IMAGE_DATA_END;
|
||||
t38_core_send_data(&fe->t38, previous, T38_FIELD_HDLC_FCS_OK_SIG_END, NULL, 0, category);
|
||||
if ((res = t38_core_send_data(&fe->t38, previous, T38_FIELD_HDLC_FCS_OK_SIG_END, NULL, 0, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
|
||||
/* We add a bit of extra time here, as with some implementations
|
||||
the carrier falling too abruptly causes data loss. */
|
||||
|
@ -922,7 +986,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
|
|||
/*endif*/
|
||||
/* Finish the current frame off, and prepare for the next one. */
|
||||
category = (s->t38_fe.current_tx_data_type == T38_DATA_V21) ? T38_PACKET_CATEGORY_CONTROL_DATA : T38_PACKET_CATEGORY_IMAGE_DATA;
|
||||
t38_core_send_data(&fe->t38, previous, T38_FIELD_HDLC_FCS_OK, NULL, 0, category);
|
||||
if ((res = t38_core_send_data(&fe->t38, previous, T38_FIELD_HDLC_FCS_OK, NULL, 0, category)) < 0)
|
||||
return res;
|
||||
/*endif*/
|
||||
fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
|
||||
/* We should now wait enough time for everything to clear through an analogue modem at the far end. */
|
||||
delay = bits_to_us(s, fe->hdlc_tx.extra_bits);
|
||||
|
@ -955,14 +1021,18 @@ static int stream_ced(t38_terminal_state_t *s)
|
|||
of silence, starting the delay with a no signal indication makes sense.
|
||||
We do need a 200ms delay, as that is a specification requirement. */
|
||||
fe->timed_step = T38_TIMED_STEP_CED_2;
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
delay = 200000;
|
||||
fe->next_tx_samples = fe->samples;
|
||||
break;
|
||||
case T38_TIMED_STEP_CED_2:
|
||||
/* Initial 200ms delay over. Send the CED indicator */
|
||||
fe->timed_step = T38_TIMED_STEP_CED_3;
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_CED);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_CED)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
fe->current_tx_data_type = T38_DATA_NONE;
|
||||
break;
|
||||
case T38_TIMED_STEP_CED_3:
|
||||
|
@ -994,7 +1064,9 @@ static int stream_cng(t38_terminal_state_t *s)
|
|||
be sending 200ms of silence, according to T.30, starting that delay with
|
||||
a no signal indication makes sense. */
|
||||
fe->timed_step = T38_TIMED_STEP_CNG_2;
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_NO_SIGNAL)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
delay = 200000;
|
||||
fe->next_tx_samples = fe->samples;
|
||||
break;
|
||||
|
@ -1003,7 +1075,9 @@ static int stream_cng(t38_terminal_state_t *s)
|
|||
coming the other way interrupts it, or a long timeout controlled by the T.30 engine
|
||||
expires. */
|
||||
fe->timed_step = T38_TIMED_STEP_NONE;
|
||||
delay = t38_core_send_indicator(&fe->t38, T38_IND_CNG);
|
||||
if ((delay = t38_core_send_indicator(&fe->t38, T38_IND_CNG)) < 0)
|
||||
return delay;
|
||||
/*endif*/
|
||||
fe->current_tx_data_type = T38_DATA_NONE;
|
||||
return delay;
|
||||
}
|
||||
|
@ -1067,6 +1141,12 @@ SPAN_DECLARE(int) t38_terminal_send_timeout(t38_terminal_state_t *s, int samples
|
|||
break;
|
||||
}
|
||||
/*endswitch*/
|
||||
if (delay < 0)
|
||||
{
|
||||
t30_terminate(&s->t30);
|
||||
return TRUE;
|
||||
}
|
||||
/*endif*/
|
||||
fe->next_tx_samples += us_to_samples(delay);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ static inline char *strndup_lite(const char *s, size_t n)
|
|||
#define sqliteMalloc(x) zmalloc(x)//sqlite3Malloc(x,1)
|
||||
#define sqliteMallocRaw(x) malloc(x)//sqlite3MallocRaw(x,1)
|
||||
#define sqliteRealloc(x,y) realloc(x, y)//sqlite3Realloc(x,y)
|
||||
#define sqliteStrDup(x) strdup(x)//sqlite3StrDup(x)
|
||||
#define sqliteStrDup(x) (x?strdup(x):NULL)//sqlite3StrDup(x)
|
||||
#define sqliteStrNDup(x,y) strndup_lite(x,y) //sqlite3StrNDup(x,y)
|
||||
#define sqliteReallocOrFree(x,y) sqlite3ReallocOrFree(x,y)
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ struct stfu_instance {
|
|||
uint32_t miss_count;
|
||||
uint32_t max_plc;
|
||||
uint32_t qlen;
|
||||
uint32_t most_qlen;
|
||||
uint32_t max_qlen;
|
||||
uint32_t orig_qlen;
|
||||
uint32_t packet_count;
|
||||
|
@ -136,6 +137,11 @@ int32_t stfu_n_get_drift(stfu_instance_t *i)
|
|||
return i->ts_drift;
|
||||
}
|
||||
|
||||
int32_t stfu_n_get_most_qlen(stfu_instance_t *i)
|
||||
{
|
||||
return i->most_qlen;
|
||||
}
|
||||
|
||||
void stfu_global_set_logger(stfu_logger_t logger)
|
||||
{
|
||||
if (logger) {
|
||||
|
@ -253,6 +259,10 @@ stfu_status_t stfu_n_resize(stfu_instance_t *i, uint32_t qlen)
|
|||
s = stfu_n_resize_aqueue(&i->b_queue, qlen);
|
||||
s = stfu_n_resize_aqueue(&i->c_queue, qlen);
|
||||
|
||||
if (qlen > i->most_qlen) {
|
||||
i->most_qlen = qlen;
|
||||
}
|
||||
|
||||
i->qlen = qlen;
|
||||
i->max_plc = 5;
|
||||
i->last_frame = NULL;
|
||||
|
@ -506,9 +516,9 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint32_t pt, void
|
|||
i->diff_total += i->diff;
|
||||
|
||||
if ((i->period_packet_in_count > i->period_time)) {
|
||||
uint32_t avg;
|
||||
//uint32_t avg;
|
||||
|
||||
avg = i->diff_total / least1(i->period_packet_in_count);
|
||||
//avg = i->diff_total / least1(i->period_packet_in_count);
|
||||
|
||||
i->period_packet_in_count = 0;
|
||||
|
||||
|
@ -904,7 +914,7 @@ static void default_logger(const char *file, const char *func, int line, int lev
|
|||
ret = stfu_vasprintf(&data, fmt, ap);
|
||||
|
||||
if (ret != -1) {
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", LEVEL_NAMES[level], file, line, func, data);
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", LEVEL_NAMES[level], fp, line, func, data);
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,6 +188,7 @@ stfu_status_t stfu_n_sync(stfu_instance_t *i, uint32_t packets);
|
|||
void stfu_n_call_me(stfu_instance_t *i, stfu_n_call_me_t callback, void *udata);
|
||||
void stfu_n_debug(stfu_instance_t *i, const char *name);
|
||||
int32_t stfu_n_get_drift(stfu_instance_t *i);
|
||||
int32_t stfu_n_get_most_qlen(stfu_instance_t *i);
|
||||
|
||||
#define stfu_im_done(i) stfu_n_add_data(i, 0, NULL, 0, 0, 1)
|
||||
#define stfu_n_eat(i,t,p,d,l,tt) stfu_n_add_data(i, t, p, d, l, tt, 0)
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
--
|
||||
-- sound_test.lua
|
||||
--
|
||||
-- accepts two args and then rolls through the sound files
|
||||
-- arg 1: type
|
||||
-- arg 2: rate
|
||||
--
|
||||
--[[ Use a dialplan entry like this:
|
||||
|
||||
<extension name="sound file tester">
|
||||
<condition field="destination_number" expression="^((8|16|32|48)000)(.*)$">
|
||||
<action application="lua" data="sound_test.lua $3 $1"/>
|
||||
<action application="hangup"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
Note the syntax of the destination number: <rate><type>
|
||||
Rate can be 8000, 16000, 32000, or 48000
|
||||
Type can be ivr, conference, voicemail, misc, digits, etc.
|
||||
|
||||
Using the extension listed above you could call it with mod_portaudio from fs_cli:
|
||||
|
||||
pa call 16000ivr
|
||||
pa call 8000conference
|
||||
pa call 32000conference
|
||||
|
||||
etc.
|
||||
|
||||
]]
|
||||
|
||||
-- Create tables that hold our rates and types
|
||||
|
||||
tbl_types = {
|
||||
['ascii'] = 1,
|
||||
['base256'] = 1,
|
||||
['conference'] = 1,
|
||||
['currency'] = 1,
|
||||
['digits'] = 1,
|
||||
['directory'] = 1,
|
||||
['ivr'] = 1,
|
||||
['misc'] = 1,
|
||||
['phonetic-ascii'] = 1,
|
||||
['time'] = 1,
|
||||
['voicemail'] = 1,
|
||||
['zrtp'] = 1
|
||||
};
|
||||
|
||||
tbl_rates = {['8000'] = 1 ,['16000'] = 1, ['32000'] = 1, ['48000'] = 1};
|
||||
|
||||
stype = argv[1];
|
||||
srate = argv[2];
|
||||
|
||||
freeswitch.consoleLog("INFO","Args: Type = " .. argv[1] .. ', Rate = ' .. argv[2] .. "\n");
|
||||
|
||||
if ( tbl_types[stype] == nil ) then
|
||||
freeswitch.consoleLog("ERR","Type '" .. stype .. "' is not valid.\n");
|
||||
elseif ( tbl_rates[srate] == nil ) then
|
||||
freeswitch.consoleLog("ERR","Rate '" .. srate .. "' is not valid.\n");
|
||||
else
|
||||
-- Looks good, let's play some sound files
|
||||
sound_base = session:getVariable('sounds_dir') .. '/en/us/callie/' .. stype .. '/' .. srate;
|
||||
input_file = '/tmp/filez.txt';
|
||||
res = os.execute('ls -1 ' .. sound_base .. ' > ' .. input_file);
|
||||
freeswitch.consoleLog("INFO","Result of system call: " .. res .. "\n");
|
||||
if ( res == 0 ) then
|
||||
for fname in io.lines(input_file) do
|
||||
freeswitch.consoleLog("NOTICE","Playing file: " .. fname .. "\n");
|
||||
session:streamFile(sound_base .. '/' .. fname);
|
||||
session:sleep(100);
|
||||
end
|
||||
else
|
||||
freeswitch.consoleLog("ERR","Result of system call: " .. res .. "\n");
|
||||
end
|
||||
end
|
|
@ -240,6 +240,7 @@ struct switch_runtime {
|
|||
uint32_t debug_level;
|
||||
uint32_t runlevel;
|
||||
uint32_t tipping_point;
|
||||
uint32_t microseconds_per_tick;
|
||||
int32_t timer_affinity;
|
||||
switch_profile_timer_t *profile_timer;
|
||||
double profile_time;
|
||||
|
@ -248,9 +249,12 @@ struct switch_runtime {
|
|||
int max_sql_buffer_len;
|
||||
switch_dbtype_t odbc_dbtype;
|
||||
char hostname[256];
|
||||
char *switchname;
|
||||
int multiple_registrations;
|
||||
uint32_t max_db_handles;
|
||||
uint32_t db_handle_timeout;
|
||||
int curl_count;
|
||||
int ssl_count;
|
||||
};
|
||||
|
||||
extern struct switch_runtime runtime;
|
||||
|
|
|
@ -56,6 +56,15 @@
|
|||
#include <switch.h>
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
typedef struct profile_node_s {
|
||||
char *var;
|
||||
char *val;
|
||||
struct profile_node_s *next;
|
||||
} profile_node_t;
|
||||
|
||||
|
||||
|
||||
/*! \brief Call Specific Data
|
||||
*/
|
||||
struct switch_caller_profile {
|
||||
|
@ -110,6 +119,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
switch_memory_pool_t *pool;
|
||||
struct switch_caller_profile *next;
|
||||
switch_call_direction_t direction;
|
||||
profile_node_t *soft;
|
||||
};
|
||||
|
||||
/*! \brief An Abstract Representation of a dialplan Application */
|
||||
|
|
|
@ -49,6 +49,7 @@ SWITCH_BEGIN_EXTERN_C struct switch_channel_timetable {
|
|||
switch_time_t hungup;
|
||||
switch_time_t transferred;
|
||||
switch_time_t resurrected;
|
||||
switch_time_t bridged;
|
||||
struct switch_channel_timetable *next;
|
||||
};
|
||||
|
||||
|
@ -597,7 +598,7 @@ SWITCH_DECLARE(int) switch_channel_test_app_flag_key(const char *app, switch_cha
|
|||
#define switch_channel_clear_app_flag(_c, _f) switch_channel_clear_app_flag_key(__FILE__, _c, _f)
|
||||
#define switch_channel_test_app_flag(_c, _f) switch_channel_test_app_flag_key(__FILE__, _c, _f)
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_bridge_time(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_set_hangup_time(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(switch_call_direction_t) switch_channel_direction(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_channel_get_session(switch_channel_t *channel);
|
||||
|
|
|
@ -57,6 +57,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
struct switch_app_log {
|
||||
char *app;
|
||||
char *arg;
|
||||
switch_time_t stamp;
|
||||
struct switch_app_log *next;
|
||||
};
|
||||
|
||||
|
@ -434,6 +435,9 @@ SWITCH_DECLARE(void) switch_core_session_rwunlock(_In_ switch_core_session_t *se
|
|||
*/
|
||||
SWITCH_DECLARE(int) switch_core_add_state_handler(_In_ const switch_state_handler_table_t *state_handler);
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_curl_count(int *val);
|
||||
SWITCH_DECLARE(int) switch_core_ssl_count(int *val);
|
||||
|
||||
/*!
|
||||
\brief Remove a global state handler
|
||||
\param state_handler the state handler to remove
|
||||
|
@ -762,6 +766,7 @@ SWITCH_DECLARE(char *) switch_core_get_variable(_In_z_ const char *varname);
|
|||
SWITCH_DECLARE(char *) switch_core_get_variable_dup(_In_z_ const char *varname);
|
||||
SWITCH_DECLARE(char *) switch_core_get_variable_pdup(_In_z_ const char *varname, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(const char *) switch_core_get_hostname(void);
|
||||
SWITCH_DECLARE(const char *) switch_core_get_switchname(void);
|
||||
|
||||
/*!
|
||||
\brief Add a global variable to the core
|
||||
|
@ -2205,6 +2210,7 @@ SWITCH_DECLARE(switch_bool_t) switch_cache_db_test_reactive(switch_cache_db_hand
|
|||
SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute(switch_cache_db_handle_t *dbh, const char *sql, uint32_t retries);
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_cache_db_handle_t *dbh, char *sql, uint32_t retries);
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_set_signal_handlers(void);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_debug_level(void);
|
||||
SWITCH_DECLARE(void) switch_cache_db_flush_handles(void);
|
||||
SWITCH_DECLARE(const char *) switch_core_banner(void);
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* switch_curl.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SWITCH_CURL_H
|
||||
#define __SWITCH_CURL_H
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <switch_ssl.h>
|
||||
|
||||
static inline void switch_curl_init(void)
|
||||
{
|
||||
int curl_count = switch_core_curl_count(NULL);
|
||||
|
||||
if (curl_count == 0) {
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
#if defined(HAVE_OPENSSL)
|
||||
switch_ssl_init_ssl_locks();
|
||||
#endif
|
||||
}
|
||||
|
||||
curl_count++;
|
||||
switch_core_curl_count(&curl_count);
|
||||
}
|
||||
|
||||
static inline void switch_curl_destroy()
|
||||
{
|
||||
int curl_count = switch_core_curl_count(NULL);
|
||||
|
||||
curl_count--;
|
||||
|
||||
if (curl_count == 0) {
|
||||
|
||||
#if defined(HAVE_OPENSSL)
|
||||
switch_ssl_destroy_ssl_locks();
|
||||
#endif
|
||||
curl_global_cleanup();
|
||||
}
|
||||
switch_core_curl_count(&curl_count);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
|
||||
*/
|
||||
|
|
@ -285,7 +285,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_free_subclass_detailed(const char *
|
|||
SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, char **str, switch_bool_t encode);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_serialize_json(switch_event_t *event, char **str);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_create_json(switch_event_t **event, const char *json);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_create_brackets(char *data, char a, char b, char c, switch_event_t **event, char **new_data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_create_brackets(char *data, char a, char b, char c, switch_event_t **event, char **new_data, switch_bool_t dup);
|
||||
|
||||
#ifndef SWIG
|
||||
/*!
|
||||
|
|
|
@ -223,15 +223,15 @@ typedef intptr_t switch_ssize_t;
|
|||
#ifdef WIN32
|
||||
|
||||
#ifdef WIN64
|
||||
#define SWITCH_SSIZE_T_FMT "I64d"
|
||||
#define SWITCH_SIZE_T_FMT "I64d"
|
||||
#define SWITCH_SSIZE_T_FMT "lld"
|
||||
#define SWITCH_SIZE_T_FMT "lld"
|
||||
#else
|
||||
#define SWITCH_SSIZE_T_FMT "d"
|
||||
#define SWITCH_SIZE_T_FMT "d"
|
||||
#endif
|
||||
|
||||
#define SWITCH_INT64_T_FMT "I64d"
|
||||
#define SWITCH_UINT64_T_FMT "I64u"
|
||||
#define SWITCH_INT64_T_FMT "lld"
|
||||
#define SWITCH_UINT64_T_FMT "llu"
|
||||
|
||||
#ifndef TIME_T_FMT
|
||||
#define TIME_T_FMT SWITCH_INT64_T_FMT
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* switch_ssl.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SWITCH_SSL_H
|
||||
#define __SWITCH_SSL_H
|
||||
|
||||
#if defined(HAVE_OPENSSL)
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
static switch_mutex_t **ssl_mutexes;
|
||||
static switch_memory_pool_t *ssl_pool = NULL;
|
||||
|
||||
|
||||
static inline void switch_ssl_ssl_lock_callback(int mode, int type, char *file, int line)
|
||||
{
|
||||
if (mode & CRYPTO_LOCK) {
|
||||
switch_mutex_lock(ssl_mutexes[type]);
|
||||
}
|
||||
else {
|
||||
switch_mutex_unlock(ssl_mutexes[type]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned long switch_ssl_ssl_thread_id(void)
|
||||
{
|
||||
return (unsigned long) switch_thread_self();
|
||||
}
|
||||
|
||||
static inline void switch_ssl_init_ssl_locks(void)
|
||||
{
|
||||
|
||||
int ssl_count = switch_core_ssl_count(NULL);
|
||||
int i, num;
|
||||
|
||||
if (ssl_count == 0) {
|
||||
num = CRYPTO_num_locks();
|
||||
|
||||
ssl_mutexes = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(switch_mutex_t*));
|
||||
switch_assert(ssl_mutexes != NULL);
|
||||
|
||||
switch_core_new_memory_pool(&ssl_pool);
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
switch_mutex_init(&(ssl_mutexes[i]), SWITCH_MUTEX_NESTED, ssl_pool);
|
||||
switch_assert(ssl_mutexes[i] != NULL);
|
||||
}
|
||||
|
||||
CRYPTO_set_id_callback(switch_ssl_ssl_thread_id);
|
||||
CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))switch_ssl_ssl_lock_callback);
|
||||
}
|
||||
|
||||
ssl_count++;
|
||||
switch_core_ssl_count(&ssl_count);
|
||||
}
|
||||
|
||||
static inline void switch_ssl_destroy_ssl_locks()
|
||||
{
|
||||
int i;
|
||||
int ssl_count = switch_core_ssl_count(NULL);
|
||||
|
||||
ssl_count--;
|
||||
|
||||
if (ssl_count == 0) {
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
for (i = 0; i < CRYPTO_num_locks(); i++) {
|
||||
switch_mutex_destroy(ssl_mutexes[i]);
|
||||
}
|
||||
|
||||
OPENSSL_free(ssl_mutexes);
|
||||
}
|
||||
|
||||
switch_core_ssl_count(&ssl_count);
|
||||
|
||||
}
|
||||
#else
|
||||
static inline void switch_ssl_init_ssl_locks(void) { return; }
|
||||
static inline void switch_ssl_destroy_ssl_locks(void) { return; }
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -136,6 +136,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE "execute_on_media"
|
||||
#define SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE "api_on_answer"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_RING_VARIABLE "execute_on_ring"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_TONE_DETECT_VARIABLE "execute_on_tone_detect"
|
||||
#define SWITCH_CALL_TIMEOUT_VARIABLE "call_timeout"
|
||||
#define SWITCH_HOLDING_UUID_VARIABLE "holding_uuid"
|
||||
#define SWITCH_SOFT_HOLDING_UUID_VARIABLE "soft_holding_uuid"
|
||||
|
@ -488,6 +489,7 @@ typedef struct {
|
|||
switch_size_t dtmf_packet_count;
|
||||
switch_size_t cng_packet_count;
|
||||
switch_size_t flush_packet_count;
|
||||
switch_size_t largest_jb_size;
|
||||
} switch_rtp_numbers_t;
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue