Merge remote branch 'fsorig/master'

Conflicts:
	src/mod/applications/mod_commands/mod_commands.c
	src/mod/endpoints/mod_portaudio/mod_portaudio.c
	src/mod/endpoints/mod_portaudio/pablio.c
This commit is contained in:
System Administrator 2011-05-26 00:13:12 -04:00
commit 7eaef23955
671 changed files with 140614 additions and 18658 deletions

23
.gitignore vendored
View File

@ -42,6 +42,12 @@ configure.lineno
config.log
config.status
core.*
*.2010.log
*.Build.CppClean.log
*.tlog
*.unsuccessfulbuild
*.cache
*.lastbuildstate
/w32/Library/lastversion
/w32/Library/tmpVersion.Bat
@ -83,6 +89,7 @@ core.*
/build/config/missing
/build/freeswitch.pc
/build/getlib.sh
/build/getg729.sh
/build/getsounds.sh
/build/Makefile
/build/Makefile.in
@ -104,6 +111,7 @@ core.*
/libs/freetdm/testtones
/libs/fsg729-*-installer
/libs/g729/
/libs/libcodec2/compile
/libs/libcodec2/config.guess
/libs/libcodec2/config.sub
/libs/libcodec2/configure
@ -118,6 +126,7 @@ core.*
/libs/libcodec2/src/Makefile.in
/libs/libcodec2/unittest/Makefile
/libs/libcodec2/unittest/Makefile.in
/libs/mpg123-1.13.2/
/scripts/fsxs
/scripts/gentls_cert
@ -147,3 +156,17 @@ core.*
/src/mod/say/mod_say_th/Makefile
/src/mod/say/mod_say_zh/Makefile
BuildLog.htm
/w32/Console/Debug/
/w32/Console/Release/
/w32/Library/Debug/
/w32/Library/Release/
Freeswitch.2010.sdf
/Win32/
/x64/
src/mod/codecs/mod_celt/*/*/mod_celt.log
src/mod/endpoints/mod_skinny/*/*/mod_skinny_2010.log
src/mod/formats/mod_shout/*/*/mod_shout.log

View File

@ -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
@ -230,12 +232,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_teletone",
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.2008.vcproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.2008.vcproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
ProjectSection(ProjectDependencies) = postProject
{23B4D303-79FC-49E0-89E2-2280E7E28940} = {23B4D303-79FC-49E0-89E2-2280E7E28940}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey\mod_spidermonkey_odbc.2008.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
@ -664,6 +664,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_directory", "src\mod\ap
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ldns", "libs\win32\ldns\ldns-lib\ldns-lib.2008.vcproj", "{23B4D303-79FC-49E0-89E2-2280E7E28940}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -1139,17 +1141,6 @@ Global
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.Build.0 = Release|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.ActiveCfg = Release|x64
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|Win32.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.Build.0 = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.Build.0 = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.Build.0 = Release|x64
@ -2137,6 +2128,15 @@ Global
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Debug|x64.ActiveCfg = Debug|Win32
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Release|Win32.ActiveCfg = Release|Win32
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Release|x64.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.Build.0 = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -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
@ -602,12 +604,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_teletone",
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.2008.vcproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.2008.vcproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
ProjectSection(ProjectDependencies) = postProject
{23B4D303-79FC-49E0-89E2-2280E7E28940} = {23B4D303-79FC-49E0-89E2-2280E7E28940}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey\mod_spidermonkey_odbc.2008.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
@ -983,11 +983,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz music", "libs\win32\S
{1F0A8A77-E661-418F-BB92-82172AE43803} = {1F0A8A77-E661-418F-BB92-82172AE43803}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_file_string", "src\mod\formats\mod_file_string\mod_file_string.2008.vcproj", "{70564D74-199A-4452-9C60-19ED5F242F0D}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_nibblebill", "src\mod\applications\mod_nibblebill\mod_nibblebill.2008.vcproj", "{3C977801-FE88-48F2-83D3-FA2EBFF6688E}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
@ -1135,6 +1130,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openssl", "libs\win32\opens
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_directory", "src\mod\applications\mod_directory\mod_directory.2008.vcproj", "{42E721FD-43D6-4B04-A34B-42567199FFB8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ldns", "libs\win32\ldns\ldns-lib\ldns-lib.2008.vcproj", "{23B4D303-79FC-49E0-89E2-2280E7E28940}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -1604,17 +1601,6 @@ Global
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.ActiveCfg = Release|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.Build.0 = Release|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|Win32.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.ActiveCfg = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.Build.0 = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.Build.0 = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.Build.0 = Release|x64
@ -2501,17 +2487,6 @@ Global
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Debug|x64.ActiveCfg = Debug|x64
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|Win32.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|Win32.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.Build.0 = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.ActiveCfg = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.Build.0 = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.ActiveCfg = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.Build.0 = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.ActiveCfg = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.Build.0 = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.Build.0 = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|Win32.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.Build.0 = Release|x64
@ -2856,6 +2831,17 @@ Global
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Debug|x64.ActiveCfg = Debug|x64
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Release|Win32.ActiveCfg = Release|Win32
{42E721FD-43D6-4B04-A34B-42567199FFB8}.Release|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.Build.0 = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.Build.0 = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.ActiveCfg = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.Build.0 = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2913,7 +2899,6 @@ Global
{2CA40887-1622-46A1-A7F9-17FD7E7E545B} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{6FF941AC-82C5-429F-AA4C-AD2FB9E5DA52} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{38FE0559-9910-43A8-9E45-3E5004C27692} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{70564D74-199A-4452-9C60-19ED5F242F0D} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{1A1FF289-4FD6-4285-A422-D31DD67A4723} = {CBD81696-EFB4-4D2F-8451-1B8DAA86155A}
{EC3E5C7F-EE09-47E2-80FE-546363D14A98} = {B8F5B47B-8568-46EB-B320-64C17D2A98BC}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
@ -2948,7 +2933,6 @@ Global
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{0A18A071-125E-442F-AFF7-A3F68ABECF99} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
@ -2977,6 +2961,7 @@ Global
{9778F1C0-09BC-4698-8EBC-BD982247209A} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{B376D494-D7DD-4B2A-99E2-52916D5A8CD8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{23B4D303-79FC-49E0-89E2-2280E7E28940} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{4F92B672-DADB-4047-8D6A-4BB3796733FD} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{2DEE4895-1134-439C-B688-52203E57D878} = {C120A020-773F-4EA3-923F-B67AF28B750D}

View File

@ -54,6 +54,9 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsqlite", "libs\win32\sqlite\sqlite.2010.vcxproj", "{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcre", "libs\win32\pcre\libpcre.2010.vcxproj", "{8D04B550-D240-4A44-8A18-35DA3F7038D9}"
ProjectSection(ProjectDependencies) = postProject
{1CED5987-A529-46DC-B30F-870D85FF9C94} = {1CED5987-A529-46DC-B30F-870D85FF9C94}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapr", "libs\win32\apr\libapr.2010.vcxproj", "{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}"
EndProject
@ -85,8 +88,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_core_db",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_teletone", "src\mod\languages\mod_spidermonkey\mod_spidermonkey_teletone.2010.vcxproj", "{8F992C49-6C51-412F-B2A3-34EAB708EB65}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.2010.vcxproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.2010.vcxproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey\mod_spidermonkey_odbc.2010.vcxproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
@ -251,8 +252,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16khz music", "libs\win32\S
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz music", "libs\win32\Sound_Files\32khzmusic.2010.vcxproj", "{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_file_string", "src\mod\formats\mod_file_string\mod_file_string.2010.vcxproj", "{70564D74-199A-4452-9C60-19ED5F242F0D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_nibblebill", "src\mod\applications\mod_nibblebill\mod_nibblebill.2010.vcxproj", "{3C977801-FE88-48F2-83D3-FA2EBFF6688E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_ru", "src\mod\say\mod_say_ru\mod_say_ru.2010.vcxproj", "{0382E8FD-CFDC-41C0-8B03-792C7C84FC31}"
@ -317,6 +316,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openssl", "libs\win32\opens
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_directory", "src\mod\applications\mod_directory\mod_directory.2010.vcxproj", "{B889A18E-70A7-44B5-B2C9-47798D4F43B3}"
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}") = "libpcre Generate pcre_chartables.c", "libs\win32\pcre\pcre_chartables.c.2010.vcxproj", "{1CED5987-A529-46DC-B30F-870D85FF9C94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -781,17 +784,6 @@ Global
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.Build.0 = Release|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.ActiveCfg = Release|x64
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|Win32.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.ActiveCfg = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.Build.0 = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.Build.0 = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.ActiveCfg = Release|x64
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.Build.0 = Release|x64
@ -1645,17 +1637,6 @@ Global
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Debug|x64.ActiveCfg = Debug|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|Win32.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64.ActiveCfg = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|Win32.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.Build.0 = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.ActiveCfg = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.Build.0 = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.ActiveCfg = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.Build.0 = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.ActiveCfg = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.Build.0 = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.Build.0 = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|Win32.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.Build.0 = Release|x64
@ -1990,6 +1971,24 @@ Global
{B889A18E-70A7-44B5-B2C9-47798D4F43B3}.Debug|x64.ActiveCfg = Debug|Win32
{B889A18E-70A7-44B5-B2C9-47798D4F43B3}.Release|Win32.ActiveCfg = Release|Win32
{B889A18E-70A7-44B5-B2C9-47798D4F43B3}.Release|x64.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.Build.0 = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.ActiveCfg = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.ActiveCfg = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.Build.0 = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.ActiveCfg = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.ActiveCfg = Debug|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -631,8 +631,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16khz music", "libs\win32\S
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz music", "libs\win32\Sound_Files\32khzmusic.2010.vcxproj", "{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_file_string", "src\mod\formats\mod_file_string\mod_file_string.2010.vcxproj", "{70564D74-199A-4452-9C60-19ED5F242F0D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_nibblebill", "src\mod\applications\mod_nibblebill\mod_nibblebill.2010.vcxproj", "{3C977801-FE88-48F2-83D3-FA2EBFF6688E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_ru", "src\mod\say\mod_say_ru\mod_say_ru.2010.vcxproj", "{0382E8FD-CFDC-41C0-8B03-792C7C84FC31}"
@ -709,6 +707,10 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup", "w32\Setup\Setup.wi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_pt", "src\mod\say\mod_say_pt\mod_say_pt.2010.vcxproj", "{7C22BDFF-CC09-400C-8A09-660733980028}"
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
@ -1480,15 +1482,11 @@ Global
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64 Setup.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x86 Setup.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.ActiveCfg = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.Build.0 = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64 Setup.ActiveCfg = Debug|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x86 Setup.ActiveCfg = Debug|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.Build.0 = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64 Setup.ActiveCfg = Release|x64
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x86 Setup.ActiveCfg = Release|Win32
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.ActiveCfg = Release|x64
@ -2973,24 +2971,6 @@ Global
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64.ActiveCfg = Release|x64
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64 Setup.ActiveCfg = Release|x64
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x86 Setup.ActiveCfg = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|Win32.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.Build.0 = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64 Setup.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64 Setup.Build.0 = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x86 Setup.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.ActiveCfg = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|Win32.Build.0 = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.ActiveCfg = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64.Build.0 = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x64 Setup.ActiveCfg = Debug|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Debug|x86 Setup.ActiveCfg = Debug|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.ActiveCfg = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|Win32.Build.0 = Release|Win32
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64.Build.0 = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x64 Setup.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.Release|x86 Setup.ActiveCfg = Release|Win32
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|Win32.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.ActiveCfg = Release|x64
{3C977801-FE88-48F2-83D3-FA2EBFF6688E}.All|x64.Build.0 = Release|x64
@ -3638,6 +3618,36 @@ Global
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x64.Build.0 = Release|x64
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x64 Setup.ActiveCfg = Release|x64
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x86 Setup.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.Build.0 = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64 Setup.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x86 Setup.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.Build.0 = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.ActiveCfg = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.Build.0 = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64 Setup.ActiveCfg = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x86 Setup.ActiveCfg = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.ActiveCfg = Release|x64
{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
@ -3685,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}
@ -3696,7 +3707,6 @@ Global
{2CA40887-1622-46A1-A7F9-17FD7E7E545B} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{6FF941AC-82C5-429F-AA4C-AD2FB9E5DA52} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{38FE0559-9910-43A8-9E45-3E5004C27692} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{70564D74-199A-4452-9C60-19ED5F242F0D} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{CBD81696-EFB4-4D2F-8451-1B8DAA86155A} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{62F27B1A-C919-4A70-8478-51F178F3B18F} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{89385C74-5860-4174-9CAF-A39E7C48909C} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
@ -3742,6 +3752,7 @@ Global
{56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{E4D29906-8B73-4F8A-B5F4-CA8BFA648F5A} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{23B4D303-79FC-49E0-89E2-2280E7E28940} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{EC3E5C7F-EE09-47E2-80FE-546363D14A98} = {B8F5B47B-8568-46EB-B320-64C17D2A98BC}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF} = {0C808854-54D1-4230-BFF5-77B5FD905000}

View File

@ -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

View File

@ -12,4 +12,5 @@ m4_include([build/config/sched_setaffinity.m4])
m4_include([libs/apr/build/apr_common.m4])
m4_include([libs/sofia-sip/m4/sac-pkg-config.m4])
m4_include([libs/sofia-sip/m4/sac-openssl.m4])
m4_include([libs/iksemel/build/libgnutls.m4])
m4_include([build/config/libcurl.m4])

View File

@ -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}

View File

@ -27,6 +27,7 @@ INSTALL=@INSTALL@
GETLIB=@GETLIB@
LIBTOOL=@LIBTOOL@
AR=@AR@
LIBGNUTLS_LIBS=@LIBGNUTLS_LIBS@
LTINSTALL=$(LIBTOOL) --quiet --mode=install $(INSTALL)
LTUNINSTALL=$(LIBTOOL) --mode=uninstall rm -f
CCLD = $(CC)

View File

@ -36,6 +36,8 @@ applications/mod_valet_parking
#applications/mod_snipe_hunt
#applications/mod_callcenter
#applications/mod_fsk
#applications/mod_ladspa
#applications/mod_mongo
codecs/mod_g723_1
codecs/mod_amr
#codecs/mod_amrwb
@ -75,6 +77,7 @@ endpoints/mod_loopback
#asr_tts/mod_tts_commandline
#event_handlers/mod_event_multicast
event_handlers/mod_event_socket
#event_handlers/mod_event_zmq
event_handlers/mod_cdr_csv
event_handlers/mod_cdr_sqlite
#event_handlers/mod_cdr_pg_csv
@ -86,7 +89,6 @@ formats/mod_sndfile
#formats/mod_shout
formats/mod_local_stream
formats/mod_tone_stream
formats/mod_file_string
#formats/mod_portaudio_stream
#formats/mod_shell_stream
#languages/mod_python
@ -107,10 +109,12 @@ say/mod_say_en
#say/mod_say_it
#say/mod_say_nl
#say/mod_say_pt
say/mod_say_ru
#say/mod_say_ru
#say/mod_say_zh
#say/mod_say_hu
#say/mod_say_th
#say/mod_say_he
#timers/mod_timerfd
## Experimental Modules (don't cry if they're broken)
#../../contrib/mod/xml_int/mod_xml_odbc

View File

@ -1,3 +1,3 @@
en-us-callie 1.0.14
en-us-callie 1.0.16
ru-RU-elena 1.0.12

35
conf/README_IMPORTANT.txt Normal file
View File

@ -0,0 +1,35 @@
-= PLEASE READ THIS BEFORE YOU PUT A FreeSWITCH BOX INTO PRODUCTION =-
This configuration, generally known as the "default configuration" for FreeSWITCH, is *NOT* designed to be put into a production environment without some important modifications. Please keep in mind that the default configuration is designed to demonstrate what FreeSWITCH *can* do, not what it *should* do in your specific scenario.
*** SECURING YOUR SERVER ***
By default, FreeSWITCH starts up and does a NATPMP and UPnP request to your router. If your router supports either of these protocols then FreeSWITCH does two things:
#1 - It gets the external IP address, which it uses for SIP communications
#2 - It causes there to be a "pinhole" opened up in the router allowing inbound communications to your FreeSWITCH server
Please re-read #2. Now, please re-read #2 again. If you do not want a pinhole coming through your router then DO NOT USE the "auto-nat" tools. The way to disable the auto-nat (that is, UPnP/NATPMP) checking is to start FreeSWITCH with the "-nonat" flag. Easy enough.
If you are planning on putting a system into production then you had better pay attention to security in other areas as well. If you are behind a firewall then make sure your firewall is actually protecting you. If you have your server on a public-facing Internet connection then we recommend a few things:
#1 - Consider using iptables (Linux/Unix)
#2 - Consider using fail2ban (see http://wiki.freeswitch.org/wiki/Fail2ban)
*** SECURING YOUR USERS ***
By default, the static XML files have 20 "directory users" in conf/directory/10xx.xml, numbered 1000-1019. Also, the default dialplan has routing for calls to those same extension numbers. (NOTE: the directory and the dialplan are 100% separate concepts. Check out chapters 3-5 of the awesome FreeSWITCH book for details.)
The default users all have *very* simple passwords for SIP credentials and voicemail. If you put those into a production system then you are either brave, ignorant, or stupid. Please don't be any of those three things! You have a few choices for handling your users:
#1 - Delete the static XML files and use mod_xml_curl for dynamic users from a back-end database
#2 - Manually edit the static XML user directory files and modify the passwords
#3 - Run the handy randomize-passwords.pl script found in scripts/perl/ subdirectory under the main FreeSWITCH source directory
*** GETTING HELP ***
FreeSWITCH has a thriving on-line community - we welcome you to join us!
IRC: #freeswitch on irc.freenode.net
Mailing List: freeswitch-users on lists.freeswitch.org
You can also get professional FreeSWITCH assistance by visiting http://www.freeswitchsolutions.com or sending an email to consulting@freeswitch.org.
Happy FreeSWITCHing!

View File

@ -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>

View File

@ -22,6 +22,7 @@
<!-- <load module="mod_cdr_sqlite"/> -->
<!-- <load module="mod_event_multicast"/> -->
<load module="mod_event_socket"/>
<!-- <load module="mod_event_zmq"/> -->
<!-- <load module="mod_zeroconf"/> -->
<!-- <load module="mod_erlang_event"/> -->
<!-- <load module="mod_snmp"/> -->
@ -64,6 +65,9 @@
<!-- SNOM Module -->
<!--<load module="mod_snom"/>-->
<!-- This one only works on Linux for now -->
<!--<load module="mod_ladspa"/>-->
<!-- Dialplan Interfaces -->
<!-- <load module="mod_dialplan_directory"/> -->
<load module="mod_dialplan_xml"/>
@ -89,9 +93,9 @@
<!--For local streams (play all the files in a directory)-->
<load module="mod_local_stream"/>
<load module="mod_tone_stream"/>
<load module="mod_file_string"/>
<!-- Timers -->
<!-- <load module="mod_timerfd"/> -->
<!-- Languages -->
<load module="mod_spidermonkey"/>
@ -109,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 -->

View File

@ -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>

View File

@ -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 -->

View File

@ -33,7 +33,7 @@
<param name="ff-key" value="6"/>
<param name="rew-key" value="4"/>
<param name="skip-greet-key" value="#"/>
<param name="previous-message-key" value="1"/>-->
<param name="previous-message-key" value="1"/>
<param name="next-message-key" value="3"/>
<param name="skip-info-key" value="*"/>
<param name="repeat-message-key" value="0"/>

View File

@ -0,0 +1,77 @@
<include>
<X-PRE-PROCESS cmd="set" data="AT_EPENT1=0 0 0 -1 -1 0 -1 0 -1 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_EPENT2=1 1 1 -1 -1 1 -1 1 -1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CPENT1=0 -1 -1 0 -1 0 0 0 -1 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CPENT2=1 -1 -1 1 -1 1 1 1 -1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CMAJ1=0 -1 0 0 -1 0 -1 0 0 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CMAJ2=1 -1 1 1 -1 1 -1 1 1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_BBLUES=1 -1 1 -1 -1 1 -1 1 1 1 -1 -1"/>
<X-PRE-PROCESS cmd="set" data="ATGPENT2=-1 1 -1 1 -1 1 -1 -1 1 -1 1 -1"/>
<extension name="101">
<condition field="destination_number" expression="^101$">
<!-- AUTOTALENT DEFAULTS -->
<!--
<action application="set" data="AT_TUNE=440"/>
<action application="set" data="AT_FIXED=0"/>
<action application="set" data="AT_PULL=0"/>
<action application="set" data="AT_A=0"/>
<action application="set" data="AT_Bb=-1"/>
<action application="set" data="AT_B=0"/>
<action application="set" data="AT_C=0"/>
<action application="set" data="AT_Db=-1"/>
<action application="set" data="AT_D=0"/>
<action application="set" data="AT_Eb=-1"/>
<action application="set" data="AT_E=0"/>
<action application="set" data="AT_F=0"/>
<action application="set" data="AT_Gb=-1"/>
<action application="set" data="AT_G=0"/>
<action application="set" data="AT_Ab=-1"/>
<action application="set" data="AT_AMOUNT=1"/>
<action application="set" data="AT_SMOOTH=0"/>
<action application="set" data="AT_SHIFT=0"/>
<action application="set" data="AT_OUTSCALE=0"/>
<action application="set" data="AT_LFODEPTH=0"/>
<action application="set" data="AT_LFORATE=5"/>
<action application="set" data="AT_LFOSHAPE=0"/>
<action application="set" data="AT_LFOSYMM=0"/>
<action application="set" data="AT_LFOQUANT=0"/>
<action application="set" data="AT_FCORR=0"/>
<action application="set" data="AT_FWARP=0"/>
<action application="set" data="AT_MIX=1"/>
-->
<action application="set" data="AT_TUNE=440"/>
<action application="set" data="AT_FIXED=0"/>
<action application="set" data="AT_PULL=0"/>
<action application="set" data="AT_AMOUNT=1"/>
<action application="set" data="AT_SMOOTH=0"/>
<action application="set" data="AT_SHIFT=1"/>
<action application="set" data="AT_OUTSCALE=0"/>
<action application="set" data="AT_LFODEPTH=0"/>
<action application="set" data="AT_LFORATE=5"/>
<action application="set" data="AT_LFOSHAPE=0"/>
<action application="set" data="AT_LFOSYMM=0"/>
<action application="set" data="AT_LFOQUANT=0"/>
<action application="set" data="AT_FCORR=0"/>
<action application="set" data="AT_FWARP=0"/>
<action application="set" data="AT_MIX=1"/>
<!-- you have to download the ladspa package and the desired plugins from their desired site -->
<action application="set"><![CDATA[ladspa_params=${AT_TUNE} ${AT_FIXED} ${AT_PULL} ${AT_EPENT2} ${AT_AMOUNT} ${AT_SMOOTH} ${AT_SHIFT} ${AT_OUTSCALE} ${AT_LFODEPTH} ${AT_LFORATE} ${AT_LFOSHAPE} ${AT_LFOSYMM} ${AT_LFOQUANT} ${AT_FCORR} ${AT_FWARP} ${AT_MIX}]]></action>
<action application="ladspa_run" data="r|autotalent||${ladspa_params}"/>
<action application="ladspa_run" data="r|tap_chorusflanger||"/>
<action application="ladspa_run" data="r|phasers_1217.so|autoPhaser|"/>
<action application="bridge" data="sofia/internal/888@conference.freeswitch.org"/>
</condition>
</extension>
</include>

View File

@ -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>

View File

@ -52,13 +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"/>
</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>

View File

@ -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>

407
conf/lang/de/vm/sounds.xml Normal file
View File

@ -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 -->

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="Windows-1252"?>
<include><!--This line will be ignored it's here to validate the xml and is optional -->
<macro name="demo_ivr_count">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
<input pattern="(.*)">
<match>
<!-- string together several existing sound files to create one long greeting -->
<action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
<action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
<action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
<!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
<!-- Menu option 1: Call FreeSWITCH conference-->
<action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
<action function="play-file" data="silence_stream://1500"/>
<action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/1.wav"/>
<!-- Menu option 2: Do FreeSWITCH echo test -->
<action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/2.wav"/>
<!-- Menu option 3: Listen to Music on Hold -->
<action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/3.wav"/>
<!-- Menu option 4: Register for ClueCon -->
<action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
<action function="play-file" data="digits/4.wav"/>
<!-- Menu option 5: Listen to screaming monkeys -->
<action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/5.wav"/>
<!-- Menu option 6: Hear a sample submenu -->
<action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/6.wav"/>
<!-- Menu option 9: Repeat these options -->
<action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/9.wav"/>
<action function="play-file" data="silence_stream://2000"/>
</match>
</input>
</macro>
<!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
<!-- The short version has all the options but not the initial greeting -->
<macro name="demo_ivr_main_menu_short" pause="100">
<input pattern="(.*)">
<match>
<!-- Menu option 1: Call FreeSWITCH conference-->
<action function="play-file" data="silence_stream://1000"/>
<action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/1.wav"/>
<!-- Menu option 2: Do FreeSWITCH echo test -->
<action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/2.wav"/>
<!-- Menu option 3: Listen to Music on Hold -->
<action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/3.wav"/>
<!-- Menu option 4: Hear a sample submenu -->
<action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/4.wav"/>
<!-- Menu option 5: Listen to screaming monkeys -->
<action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/5.wav"/>
<!-- Menu option 9: Repeat these options -->
<action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/9.wav"/>
<action function="play-file" data="silence_stream://2000"/>
</match>
</input>
</macro>
<!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
<macro name="demo_ivr_sub_menu">
<input pattern="(.*)">
<match>
<action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
<action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
<!-- Menu option *: Return to top menu -->
<action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/star.wav"/>
</match>
</input>
</macro>
<!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
<!-- The short version has all the options but not the initial greeting -->
<macro name="demo_ivr_sub_menu_short">
<input pattern="(.*)">
<match>
<!-- Menu option *: Return to top menu -->
<action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
<action function="play-file" data="ivr/ivr-please.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="play-file" data="digits/star.wav"/>
</match>
</input>
</macro>
</include><!--This line will be ignored it's here to validate the xml and is optional -->

View File

@ -0,0 +1,71 @@
<include><!--This line will be ignored it's here to validate the xml and is optional -->
<macro name="msgcount">
<input pattern="(.*)">
<match>
<action function="execute" data="sleep(1000)"/>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
<!-- or -->
<!--<action function="speak-text" data="you have $1 messages"/>-->
</match>
</input>
</macro>
<macro name="saydate">
<input pattern="(.*)">
<match>
<action function="say" data="$1" method="pronounced" type="current_date_time"/>
</match>
</input>
</macro>
<macro name="timespec">
<input pattern="(.*)">
<match>
<action function="say" data="$1" method="pronounced" type="time_measurement"/>
</match>
</input>
</macro>
<macro name="ip-addr">
<input pattern="(.*)">
<match>
<action function="say" data="$1" method="iterated" type="ip_address"/>
<action function="say" data="$1" method="pronounced" type="ip_address"/>
</match>
</input>
</macro>
<macro name="spell">
<input pattern="(.*)">
<match>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="spell-phonetic">
<input pattern="(.*)">
<match>
<action function="say" data="$1" method="pronounced" type="name_phonetic"/>
</match>
</input>
</macro>
<macro name="tts-timeleft">
<!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
<!-- If the function "break" is encountered all parsing will cease -->
<input pattern="(\d+):(\d+)">
<match>
<action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
<action function="break"/>
</match>
<nomatch>
<action function="speak-text" data="That input was invalid."/>
</nomatch>
</input>
<input pattern="(\d+) min (\d+) sec">
<match>
<action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
</match>
<nomatch>
<action function="speak-text" data="That input was invalid."/>
</nomatch>
</input>
</macro>
</include><!--This line will be ignored it's here to validate the xml and is optional -->

121
conf/lang/he/dir/sounds.xml Normal file
View File

@ -0,0 +1,121 @@
<include><!--This line will be ignored it's here to validate the xml and is optional -->
<macro name="directory_intro">
<input pattern="^(last_name)" break_on_match="false">
<match>
<action function="play-file" data="directory/dir-enter_person.wav"/>
<action function="play-file" data="directory/dir-last_name.wav"/>
</match>
</input>
<input pattern="^(first_name)" break_on_match="false">
<match>
<action function="play-file" data="directory/dir-enter_person.wav"/>
<action function="play-file" data="directory/dir-first_name.wav"/>
</match>
</input>
<input pattern="^(last_name):([0-9#*])$" break_on_match="false">
<match>
<action function="play-file" data="directory/dir-to_search_by.wav"/>
<action function="play-file" data="directory/dir-first_name.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^(first_name):([0-9#*])$" break_on_match="false">
<match>
<action function="play-file" data="directory/dir-to_search_by.wav"/>
<action function="play-file" data="directory/dir-last_name.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="directory_min_search_digits">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="directory/dir-specify_mininum.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
</match>
</input>
</macro>
<macro name="directory_result_count">
<input pattern="^0$" break_on_match="true">
<match>
<action function="play-file" data="directory/dir-no_matching_results.wav"/>
</match>
</input>
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="directory/dir-result_match.wav"/>
</match>
</input>
</macro>
<macro name="directory_result_count_too_large">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="directory/dir-too_many_result.wav"/>
</match>
</input>
</macro>
<macro name="directory_result_last">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="directory/dir-no_more_results.wav"/>
</match>
</input>
</macro>
<macro name="directory_result_item">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="directory/dir-result_number.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
</match>
</input>
</macro>
<macro name="directory_result_at">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="directory/dir-at_extension.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="directory_result_menu">
<input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
<match>
<action function="play-file" data="directory/dir-to_select_entry.wav"/>
<action function="play-file" data="directory/dir-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="directory/dir-for_next.wav"/>
<action function="play-file" data="directory/dir-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="directory/dir-for_prev.wav"/>
<action function="play-file" data="directory/dir-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="directory/dir-start_new_search.wav"/>
<action function="play-file" data="directory/dir-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="directory_result_say_name">
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
</include><!--This line will be ignored it's here to validate the xml and is optional -->

11
conf/lang/he/he.xml Normal file
View File

@ -0,0 +1,11 @@
<include>
<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>

404
conf/lang/he/vm/sounds.xml Normal file
View File

@ -0,0 +1,404 @@
<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 function="say" data="$1" method="pronounced" type="items"/>
<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"/>
<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 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 function="say" data="$1" method="pronounced" 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 -->

View File

@ -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>

View File

@ -47,8 +47,8 @@
Sometimes, in extremely rare edge cases, the Sofia SIP stack may stop
responding. These options allow you to enable and control a watchdog
on the Sofia SIP stack so that if it stops responding for the
specified number of milliseconds, it will cause FreeSWITCH to shut
down immediately. This is useful if you run in an HA environment and
specified number of milliseconds, it will cause FreeSWITCH to crash
immediately. This is useful if you run in an HA environment and
need to ensure automated recovery from such a condition. Note that if
your server is idle a lot, the watchdog may fire due to not receiving
any SIP messages. Thus, if you expect your system to be idle, you
@ -57,6 +57,8 @@
globally for all profiles. So, if you run in an HA environment with a
master and slave, you should use the CLI to make sure the watchdog is
only enabled on the master.
If such crash occurs, FreeSWITCH will dump core if allowed. The
stacktrace will include function watchdog_triggered_abort().
-->
<param name="watchdog-enabled" value="no"/>
<param name="watchdog-step-timeout" value="30000"/>

View File

@ -199,15 +199,32 @@
<X-PRE-PROCESS cmd="set" data="default_areacode=918"/>
<X-PRE-PROCESS cmd="set" data="default_country=US"/>
<X-PRE-PROCESS cmd="set" data="uk-ring=%(400,200,400,450);%(400,2200,400,450)"/>
<X-PRE-PROCESS cmd="set" data="us-ring=%(2000,4000,440.0,480.0)"/>
<X-PRE-PROCESS cmd="set" data="fr-ring=%(1500,3500,440.0,0.0)"/>
<X-PRE-PROCESS cmd="set" data="rs-ring=%(1000,4000,425.0,0.0)"/>
<X-PRE-PROCESS cmd="set" data="ru-ring=%(800,3200,425,0)"/>
<X-PRE-PROCESS cmd="set" data="de-ring=%(1000,4000,425,0)"/>
<X-PRE-PROCESS cmd="set" data="dz-ring=%(1500,3500,425.0,0.0)"/>
<X-PRE-PROCESS cmd="set" data="pl-ring=%(1000,4000,425,0)"/>
<X-PRE-PROCESS cmd="set" data="il-ring=%(1000,2000,425.0,0)"/>
<X-PRE-PROCESS cmd="set" data="be-ring=%(1000,3000,425)"/>
<X-PRE-PROCESS cmd="set" data="ca-ring=%(2000,4000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="cn-ring=%(1000,4000,450)"/>
<X-PRE-PROCESS cmd="set" data="cy-ring=%(1500,3000,425)"/>
<X-PRE-PROCESS cmd="set" data="cz-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="de-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="dk-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="dz-ring=%(1500,3500,425)"/>
<X-PRE-PROCESS cmd="set" data="eg-ring=%(2000,1000,475,375)"/>
<X-PRE-PROCESS cmd="set" data="fi-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="fr-ring=%(1500,3500,440)"/>
<X-PRE-PROCESS cmd="set" data="hk-ring=%(400,200,440,480);%(400,3000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="hu-ring=%(1250,3750,425)"/>
<X-PRE-PROCESS cmd="set" data="il-ring=%(1000,3000,400)"/>
<X-PRE-PROCESS cmd="set" data="in-ring=%(400,200,425,375);%(400,2000,425,375)"/>
<X-PRE-PROCESS cmd="set" data="jp-ring=%(1000,2000,420,380)"/>
<X-PRE-PROCESS cmd="set" data="ko-ring=%(1000,2000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="pk-ring=%(1000,2000,400)"/>
<X-PRE-PROCESS cmd="set" data="pl-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="ro-ring=%(1850,4150,475,425)"/>
<X-PRE-PROCESS cmd="set" data="rs-ring=%(1000,4000,425)"/>
<X-PRE-PROCESS cmd="set" data="ru-ring=%(800,3200,425)"/>
<X-PRE-PROCESS cmd="set" data="sa-ring=%(1200,4600,425)"/>
<X-PRE-PROCESS cmd="set" data="tr-ring=%(2000,4000,450)"/>
<X-PRE-PROCESS cmd="set" data="uk-ring=%(400,200,400,450);%(400,2000,400,450)"/>
<X-PRE-PROCESS cmd="set" data="us-ring=%(2000,4000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="bong-ring=v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)"/>
<X-PRE-PROCESS cmd="set" data="sit=%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)"/>
<!--

View File

@ -144,6 +144,8 @@ if test "${enable_optimizer}" = "yes" ; then
AX_CC_MAXOPT
fi
AX_PATH_LIBGNUTLS()
# set defaults for use on all platforms
SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src"
SWITCH_AM_CXXFLAGS="-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src"
@ -345,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
@ -461,7 +468,7 @@ AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs])
AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs timerfd_create])
AC_CHECK_FUNCS([sched_setscheduler setpriority setrlimit setgroups initgroups])
AC_CHECK_FUNCS([wcsncmp setgroups asprintf setenv pselect gettimeofday localtime_r gmtime_r strcasecmp stricmp _stricmp])
@ -581,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
@ -786,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
@ -922,7 +945,6 @@ AC_CONFIG_FILES([Makefile
build/Makefile
src/Makefile
src/mod/Makefile
src/mod/applications/mod_enum/Makefile
src/mod/applications/mod_expr/Makefile
src/mod/applications/mod_fax/Makefile
src/mod/applications/mod_spandsp/Makefile

12
debian/changelog vendored
View File

@ -1,3 +1,15 @@
freeswitch (1.0.head-git.master.20110402.1-1) unstable; urgency=low
* Added Hebrew lang package
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Sat, 02 Apr 2011 03:12:02 +0200
freeswitch (1.0.head-git.master.20110330.1-1) unstable; urgency=low
* removed mod_file_string since it has been merged into dptoolsa
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Wed, 30 Mar 2011 11:39:02 +0200
freeswitch (1.0.head~git.master.20101222.1-1) unstable; urgency=low
* cleaning work

16
debian/control vendored
View File

@ -6,7 +6,8 @@ Uploaders: Michal Bielicki <michal.bielicki@seventhsignal.pl>, Gabriel Gunderson
Build-Depends: debhelper (>= 7), wget, automake (>=1.9), autoconf, libtool,
unixodbc-dev, libasound2-dev, libcurl3-openssl-dev|libcurl4-openssl-dev,
libssl-dev, ncurses-dev, libogg-dev, libvorbis-dev, libperl-dev, libgdbm-dev,
libdb-dev, libgnutls-dev, libtiff4-dev, python-dev, libx11-dev, uuid-dev
libdb-dev, libgnutls-dev, libtiff4-dev, python-dev, libx11-dev, uuid-dev,
libc6-dev
Homepage: http://freeswitch.org/
Standards-Version: 3.9.1
Vcs-Git: git://git.freeswitch.org/freeswitch.git
@ -249,6 +250,19 @@ Description: Russian language files for FreeSWITCH
This package contains the mod_say_ru module and available language
configuration files.
Package: freeswitch-lang-he
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
Description: Hebrew language files for FreeSWITCH
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to a
soft-switch. It can be used as a simple switching engine, a PBX, a media
gateway or a media server to host IVR applications using simple scripts or XML
to control the callflow.
.
This package contains the mod_say_he module and available language
configuration files.
Package: freeswitch-freetdm
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch

View File

@ -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

View File

@ -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*

5
debian/freeswitch-lang-he.conffiles vendored Normal file
View File

@ -0,0 +1,5 @@
/opt/freeswitch/conf/lang/he/demo/demo-ivr.xml
/opt/freeswitch/conf/lang/he/demo/demo.xml
/opt/freeswitch/conf/lang/he/dir/sounds.xml
/opt/freeswitch/conf/lang/he/he.xml
/opt/freeswitch/conf/lang/he/vm/sounds.xml

6
debian/freeswitch-lang-he.install vendored Normal file
View File

@ -0,0 +1,6 @@
opt/freeswitch/conf/lang/he/demo/demo-ivr.xml
opt/freeswitch/conf/lang/he/demo/demo.xml
opt/freeswitch/conf/lang/he/dir/sounds.xml
opt/freeswitch/conf/lang/he/he.xml
opt/freeswitch/conf/lang/he/vm/sounds.xml
opt/freeswitch/mod/mod_say_he.so*

View File

@ -1,3 +1,5 @@
opt/freeswitch/conf/autoload_configs/python.conf.xml
opt/freeswitch/mod/mod_python.so*
usr/lib/python2.*/*-packages/freeswitch.py*
usr/lib/python2.*/*-packages/ESL.py*
usr/lib/python2.*/*-packages/_ESL.so*

View File

@ -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

View File

@ -55,12 +55,12 @@ do_setlimits() {
ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
# ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
# ulimit -q unlimited
# ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
# ulimit -x unlimited
ulimit -s 240
ulimit -l unlimited
return 0

View File

@ -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
@ -129,7 +130,6 @@ opt/freeswitch/mod/mod_esf.so*
opt/freeswitch/mod/mod_event_*.so*
opt/freeswitch/mod/mod_expr.so*
opt/freeswitch/mod/mod_fifo.so*
opt/freeswitch/mod/mod_file_string.so*
opt/freeswitch/mod/mod_flite.so*
opt/freeswitch/mod/mod_fsv.so*
opt/freeswitch/mod/mod_hash.so*
@ -161,6 +161,7 @@ opt/freeswitch/mod/mod_speex.so*
opt/freeswitch/mod/mod_spy.so*
opt/freeswitch/mod/mod_syslog.so*
opt/freeswitch/mod/mod_theora.so*
opt/freeswitch/mod/mod_timerfd.so*
opt/freeswitch/mod/mod_tone_stream.so*
opt/freeswitch/mod/mod_tts_commandline.so*
opt/freeswitch/mod/mod_valet_parking.so*

11
debian/rules vendored
View File

@ -24,13 +24,15 @@ export DIALPLANS_MODULES= dialplans/mod_dialplan_asterisk dialplans/mod_dialplan
export ENDPOINTS_MODULES= endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia endpoints/mod_loopback \
../../libs/freetdm/mod_freetdm endpoints/mod_skypopen endpoints/mod_skinny
export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv
export FORMATS_MODULES= formats/mod_file_string formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
export FORMATS_MODULES= formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
formats/mod_shout formats/mod_sndfile formats/mod_tone_stream
export LANGUAGES_MODULES=languages/mod_spidermonkey languages/mod_perl languages/mod_lua languages/mod_python
export LOGGERS_MODULES=loggers/mod_console loggers/mod_logfile loggers/mod_syslog
export SAY_MODULES=say/mod_say_en say/mod_say_it say/mod_say_de say/mod_say_fr say/mod_say_es say/mod_say_nl say/mod_say_ru
export SAY_MODULES=say/mod_say_en say/mod_say_it say/mod_say_de say/mod_say_fr say/mod_say_es say/mod_say_nl say/mod_say_ru say/mod_say_he
export XML_INT_MODULES=xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr
export MYMODULES= $(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(XML_INT_MODULES)
export TIMER_MODULES=timers/mod_timerfd
export MYMODULES= $(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(XML_INT_MODULES) $(TIMER_MODULES)
export MODULES=$(MYMODULES)
@ -187,7 +189,7 @@ build-stamp: config.status
dh_testdir
$(MAKE)
cd libs/esl && $(MAKE) pymod && cd -
touch $@
clean: # .pc/applied-patches
@ -208,6 +210,7 @@ install: build
dh_installdirs -A
VERBOSE=1 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
cd libs/esl && VERBOSE=1 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp pymod-install && cd -
# Build architecture-independent files here.

View File

@ -21,6 +21,10 @@ freeswitch (1.0.7)
build: fix warnings on windows x64 builds src and mods projects - only libsofia included on the libs side (r:45ecbc2f)
build: Patch debian init.d script to set ulimit values (r:0eb33e57/FS-2844)
build: add plc to core (r:b7c80a84)
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
@ -36,6 +40,13 @@ freeswitch (1.0.7)
config: fix single domain assumption in default config to be more portable *cough* bkw *cough* (r:f987903e)
config: Bump Doxygen.conf version to 1.0.6... belatedly (r:cfeae1ba)
config: docs for acl (r:57b410eb)
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)
config: Talking clock dialplan example (Thanks AviMarcus) (r:ffb4a3ae)
config: fix talking clock regexes (need ^ and $ so they don't match only 917x) (r:8529ba33)
config: Update phrase_en.xml to reflect 1.0.16 sounds version (r:7499dfb2)
config: bump en sounds version to 1.0.16 (r:50ce2cae)
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
@ -183,13 +194,85 @@ freeswitch (1.0.7)
core: add record_restart_time_limit_on_dtmf var (r:7a1dcb69)
core: fix unreachable condition with a null args to make any key stop playback/record etc without dequing and remove hard-coded flush digits in play_and_get_digits be sure to flush it yourself before using (r:976859bb)
core: Fix a lock on reloadxml when stderr write is blocked. Also remove an error parsing print since reason generated were wrong and duplicate. (r:2d6161e8)
core: fix || where it should be or in sql stmt that may cause stray records in the calls table
core: Add CS_NONE and correct variable name (r:3fd7b8f2)
core: Fix SQL issue (r:04bb74fc/FS-3050,FS-3051)
core: fix race with media bug exiting from write frame while read frame is trying to use it (r:1341a75a)
core: fix regression in rtp stack trying to avoid broken clients who send the wrong payload type, we were eating the stun packets in jingle calls (r:0bce777a)
core: Add capability to specify core-db-name in switch.conf.xml to have sqlite in a different location. This is important for everyone with relatively 'high' sip registration since the addition of sip registration to the core require sqlite db to be moved to a faster location (Ramdisk for example). Useful for everyone who moved their sqlite db for sofia to ramdisk because of performance issue. (r:500e9acd)
core: Index column name wrong on table registrations. (This wont create the index for people who already have the table) (r:1096e673)
core: allow uuid bridge on unaswered channels as long as there is media available on at least one (r:4f93ea25)
core: add multiple-registrations flag to the core similar to mod_sofia (r:b36a7c0b)
core: tolerate dtmf where there is no start packet and only end packets (r:097caed4)
core: Fix RTP auto flush during bridge w/Windows causing packet loss (r:f8d326de/FS-3057)
core: possible ill placed assert() before a NULL check in soa_static.c (r:91a5e776/FS-2803)
core: prevent crash on double call to asr_close (r:4f5ca9e8/FS-3077)
core: fix bug in switch_itodtmf (r:b53a6848)
core: use strdup instead of core_session_strdup in hangup hook (r:3a10d6a1)
core: fix jb + no timer situations (r:61d3c56f)
core: Add events PLAYBACK_START and PLAYBACK_STOP, plus some minor improvments for RECORD_STOP (r:bc397ab6/FS-2971)
core: Fix event queue from needlessly filling up (r:2044a749/FS-3105)
core: Fix issue that was preventing the sqlite handles from being recycled properly (r:11451c10/FS-3106)
core: clear timestamp when generating a fake empty frame to fix edge-case sending the same timestamp over and over (r:08496cd7)
core: wait for state change to avoid race (r:f33e9c6e/FS-2966)
core: Fix freeswitch.session in Lua, etc. (r:0ba25358/FS-3119)
core: try to reduce contention by not creating handles with the global mutex locked (r:b3a2fa1c)
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)
core: Fix edge case segfault on fifo member answer call (r:bf107c6f/FS-3269)
core: Fix intercept application (r:f8835a81/FS-3271)
core: add bridged timestamp and hangup_complete_with_xml=true to add xml_cdr to the body of hangup_complete events (r:bd471fc6)
core: Modify freeswitch to use a configurable switchname instead of a hostname (r:00b53a91/FS-3277)
core: add option to disable srtp with --disable-srtp (r:a6b336e4)
core: record_session: Will auto create recursive destination folder if it doesn't already exist (Doesn't create folder when used with local cache feature) (r:c4b78a49)
core: add largest_jb_size (r:1772fcb0)
core: improve curl + openssl threading (r:7064487d/FS-2936)
core: reset offset_pos on seek to 0 (r:e375d1d2)
core: fix edge case between fail_on_single_reject and group_confirm (r:fae95433/FS-3303)
core: add prefix chars to playback_terminators + means include the term in the string and x means include the char and return SWITCH_STATUS_RESTART eg #+* only includes the * if you type it but not the # (r:38b3f43d)
core: add additional format YYYYMMDDHHMMSS to strepoch (r:38f06a3b)
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)
fs_cli: skip blocking writes on fs_cli to avoid backing up event socket (r:2ec2a9b0)
fs_cli: let ctl-c work until you are connected (r:986f258d)
fs_cli: add -i --interrupt to fs_cli to allow control-c to exit the program (r:e7b3c3b1)
lang: Improve French phrase files (FSCONFIG-23)
lang: Update langs - Add pt_PT, update es to have es_ES and es_MX, update mod_say_es and add mod_say_pt (FS-2937) (r:c81a9448/FS-2937)
libapr: Fix issue where after a bridge with a member, uuid of Agent is set to single quote character ' (r:3fee704d/FS-2738)
libdingaling: fix race on shutdown causing crash (FSMOD-47)
libdingaling: Fix crash in new GV interface when exceeding 24 calls (r:be00609a/FS-2171)
libdingaling: fix crash when GV call ends (r:687140b5/FS-3139)
libesl: Fix potential race condition (ESL-36)
libesl: Add /uuid command to fs_cli to filter logs by uuid
libesl: Increase buffer in fs_cli for Win (r:d1d6be88/FSCORE-611)
@ -209,12 +292,23 @@ freeswitch (1.0.7)
libesl: Noevent/Noevents disparity (r:d29d83d7/ESL-53)
libesl: FS-2957 esl lib on windows fails to build (r:5254df04/FS-2957)
libesl: Small fix on ESL that cause event_id to be set wrong on headers that had value failure. (r:eb88304a)
libesl: added python eslmod installation to esl Makefiles (r:b83a30ca)
libesl: null terminate buffer after reading from the socket to prevent cross-over to old data that confuses the parser and throws off framing (r:e8a10558/ESL-56)
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)
@ -223,6 +317,9 @@ freeswitch (1.0.7)
libsofiasip: Fix T.38 bug in sofia_glue (r:2843f1ad/MODSOFIA-94)
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)
libsofiasip: Fix for issue reported on the mailing list with a Chinese locale and windows. This commit removes a hidden char that should not have been there anyway. (r:7adaceb8)
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)
@ -230,6 +327,10 @@ 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 http://bugzilla.maptools.org/show_bug.cgi?id=2297 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)
libspandsp: Changed T.38 terminal handling, so errors from the user's packet transmit routine properly filter up the chain, cause termination of the FAX session, and are reported to the caller. (r:c890fbfa)
libstfu: add param to jb to try to recapture latency (disabled by default) (r:d59d41d7)
libsqlite: fix issue on mailing list mod_crd_sqlite entry limit and sqlite segfaults on triggers (r:1badec17)
mod_avmd: Initial check in - Advanced Voicemail Detect (r:10c6a30a) (by Eric Des Courtis)
mod_avmd: Add to windows build (r:df4bd935)
mod_avmd: Fix mem leak (r:cd951384/FS-2839)
@ -253,11 +354,29 @@ freeswitch (1.0.7)
mod_callcenter: Make callcenter_config agent get return the value of the item requested. Also added queue param max-wait-time-with-no-agent-time-reached: If the max-wai-time-with-no-agent is already reached for the queue, then new caller can wait for x amount of second before it kicked out of the queue rather than get rejected automatically. (r:81a03869)
mod_callcenter: Add new event socket agent-offering. Plus some documentation and better handling of bad agent type -- FS-2869 (r:80174cf3/FS-2869)
mod_callcenter: Add error response for queue load and queue reload (FS-2988) (r:49a5effc/FS-2988)
mod_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_callcenter: Display an warning when MOH is invalid and resume wait with silence. (r:37b14c9a/FS-2740)
mod_callcenter: Fix member been switch as abandoned when he was pickup by an agent (r:9ff8f53f/FS-3281)
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
@ -280,6 +399,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
@ -297,6 +417,24 @@ freeswitch (1.0.7)
mod_conference: Add energy level to conference_add_event_member_data (r:8d6d52e0)
mod_conference: if more digits than the length of the correct pin the remaining digits are accounted for next retry (r:b88cd345/FS-3000)
mod_conference: Fix unexpected behavior with endconf and auto-outcalls and pre_answer (r:6f58e6aa/FS-2771)
mod_conference: Added conference UUID to xml_list (r:10d696eb)
mod_conference: Added to the Auto OutCall support to specify the conf profile to be used using variable : conference_auto_outcall_profile (r:67edc7c3)
mod_conference: don't switch to CS_SOFT_EXECUTE before setting the current extension (r:4b5bcba0)
mod_conference: play files saying vol level in conf in lieu of making a function of say modules to return file_string urls (we need that) (r:94b680fb)
mod_conference: fire auto gain level events (r:d8ef36ed)
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_conference: remove auto gain events (r:7ba849b3)
mod_conference: add custom exit sound to match enter sound on conf (r:3d475876)
mod_conference: don't play default when playing a custom one (r:c7b36157)
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)
@ -306,6 +444,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)
@ -315,7 +454,18 @@ freeswitch (1.0.7)
mod_dptools: add bind_digit_action application (r:9537197b)
mod_dptools: emit event when user presses DTMFs (r:37298f56)
mod_dptools: Log error when there's no IVR menus configured when you call 'ivr' DP app (r:30034891)
mod_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_enum: fix ms resolution with new query-timeout-ms, query-timeout still works as expected (r:88f4828c/FS-3282)
mod_enum: fix ldns_lookup not respecting query-timeout (r:1d490df9/FS-3282)
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)
@ -327,6 +477,11 @@ freeswitch (1.0.7)
mod_event_socket: fix up other users of switch_event_xmlize() to use SWITCH_EVENT_NONE (r:d6eb7562)
mod_event_socket: Fix small mem leaks (r:e4f90584/MODEVENT-68)
mod_event_socket: Add "-ERR" to api cmd response when failure occurs (r:58759052/FS-2827)
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_socket: (and mod_erlang_event) make empty apply-inbound-acl config line not deny all (r:8ae9ab5d/FS-3034)
mod_event_zmq: Intitial mod_event_zmq code (r:4d554067)
mod_event_zmq: Update download file from 2.1.3 to 2.1.4 (2.1.3 tar file is gone from zmq server) (r:0b780702)
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)
@ -339,6 +494,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)
@ -372,6 +528,8 @@ freeswitch (1.0.7)
mod_freetdm: created cmake files for freetdm (r:fc55997b)
mod_freetdm: ss7 - added support to control mtp2, mtp3, and isup timers via freetdm.conf.xml (r:4455d581)
mod_freetdm: made ftmod_r2 use FTDM_SPAN_USE_SIGNALS_QUEUE and properly send FTDM_SIGEVENT_SIGSTATUS_CHANGED (r:af5f0a4a)
mod_freetdm: add specific alarm status in dump (r:7c971707)
mod_freetdm: make ananlog alarm (r:23d86585)
mod_fsk: add mod_fsk (r:fcc912a9)
mod_gsmopen: copy from branch
mod_gsmopen: fix FS-2793, compilation stops (r:355c0dbb/FS-2793)
@ -390,18 +548,22 @@ 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)
mod_h323: fix race condition on destroying signaling thread in h323 library (r:c22aac0e)
mod_java: fix eventConsumer issue and add flush() method (r:7fd3aff6)
mod_java: Allow user defined java methods to be called at startup and shutdown of JVM (r:1339e218/MODLANG-117)
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)
@ -409,26 +571,35 @@ 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_lcr: fix "as xml" for larger number of arguments (r:3dca2ebb/FS-3283)
mod_lcr: fix malformed XML when has embedded %s (r:5fa9619f/FS-3284)
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)
mod_loopback: pass indication when in app mode on mod_loopback (r:c423e209)
mod_loopback: fix voicemail failure (r:1a1881e8/FS-2795)
mod_loopback: pass ring_ready like we do with pre_answer (r:9d087d45)
mod_loopback: refactor mod_loopback timeout handling (r:43442e4f)
mod_lua: Add switch_core_sqldb functionality from inside Lua script (r:26f2e095/FS-1384)
mod_lua: Made 2nd arg to freeswitch.Dbh:query (cb func) optional (r:87db11af)
mod_lua: Added SAF_ROUTING_EXEC flag to lua app, so it can be run inline (r:7d5ca1c0)
mod_lua: spelling error in -ERR return code encounterd -> encountered (r:86e7cdc5/FS-2949)
mod_lua: Make dbh:connected accessible from Lua - thanks Grmt (r:09e6fd3f)
mod_lua: Added optional core: prefix to first arg passed to freeswitch.Dbh for giving direct access to sqlite db (r:a0181479)
mod_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)
mod_mongo: New mod, initial commit; module for MongoDB (http://www.mongodb.org/) (r:dc6ca6f8/FS-3278)
mod_mp4v: MP4V-ES passthru for washibechi on IRC
mod_mp4: New module. Supports playback of MP4 files. Depends on libmp4v2 <http://code.google.com/p/mp4v2/> (originally compiled against v1.6.1)
mod_nibblebill: free allocated mem at shutdown; free properly if using custom_sql
mod_nibblebill: Add SAF_SUPPORT_NOMEDIA to nibblebill
mod_nibblebill: fix compile issues in latest HEAD (r:b073e82b/FSMOD-51)
mod_nibblebill: remove on_reporting hook (r:897e6573/FS-2890)
mod_openzap: custom data (r:5d4db94d)
mod_openzap: more ss7 custom data (r:c93e392d)
mod_openzap: handle loop requests (r:23766e36)
@ -436,9 +607,17 @@ freeswitch (1.0.7)
mod_openzap: callwaiting disable (r:e1b60b4c)
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_radius_cdr: Add 'Freeswitch-Direction' av pair (r:a5170df0)
mod_radius_cdr: Add 'Freeswitch-Other-Leg-Id' av pair (r:18d29b46)
mod_radius_cdr: log errors with the call's uuid (r:fee49b16)
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
@ -453,10 +632,17 @@ 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_de: method PRONOUNCED - grammatical fixes, thank you Christian Benke (r:5d46ddbc/FS-3195)
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)
mod_skinny: Add the missing api files
mod_skinny: add example dialplan and directory config (r:1bfcc17e)
@ -478,13 +664,20 @@ freeswitch (1.0.7)
mod_skinny: allow configuration of softkeys via xml (r:f5a6831f)
mod_skinny: allow skinny-default-soft-key-set-set per device (r:07c3c94d)
mod_skinny: Rename skinny-default-soft-key-set-set to skinny-soft-key-set-set (r:ba3a6ad6)
mod_skinny: centralized registration (r:e7a8189b)
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_skypopen: adding installer and Skype client configuration directories (to be announced :) ) (r:25ebf715)
mod_skypopen: refining INTERACTIVE INSTALLER for Linux (to be announced :) ) (r:aa7f47ac)
mod_snapshot: fix bad codepaths in mod_snapshot (r:844ac220)
mod_sndfile: Add support for .alaw and .ulaw to mod_sndfile (r:facf09b8/MODFORM-41)
mod_sndfile: return break in mod_sndfile when seek returns failure (r:564dc7e4)
mod_snmp: initial checkin of mod_snmp (r:6e2b1bd3)
mod_snmp: fix segfault when getting channel list (r:b6b4e6b5/FS-3114)
mod_snmp: fix segv when snmpwalking ringing channels, fix segv in snmp getBulkRequest (r:9c4c1e81/FS-3120)
mod_sofia: Send SIP MESSAGE to unregistered users by prefixing sip: to user@domain
mod_sofia: fix callee being updated with callee information
mod_sofia: set appearance-index in update statement for SLA
@ -605,6 +798,48 @@ freeswitch (1.0.7)
mod_sofia: Places ;fs_path= within the contact string <...> when using NDLB-connectile-dysfunction-2.0, instead of just appending to the end of the contact string. (r:afc02747/FS-2989)
mod_sofia: Fix handling SUBSCRIBE to &quot;park+&quot; fifo, the NOTIFY data was not being generated from mod_fifo data. (r:3dd9d5c0/FS-3007)
mod_sofia: fsctl pause improvements (r:008e527c/FS-3012)
mod_sofia: only pass publish on when you have a subscription (r:85913b70)
mod_sofia: sip_codec_negotiation to override inbound-codec-negotiation setting (r:74a0cfd1/FS-3027)
mod_sofia: fix uuid_jitterbuffer edge case debugging a non-existant jb causing a seg (r:88d410d3)
mod_sofia: tell rtp stack about what remote payload type to expect when the receiving end follows the stupid SHOULD as WONT and sends a different dynamic payload number than the one in the offer (r:c565501f)
mod_sofia: rip off the fs_ args on message like we do in SEND_MESSAGE (r:b7fd81de)
mod_sofia: use the correct URI on endpoints behind nat (r:5f2857b8)
mod_sofia: put transport in the request uri on outbound registers if register_transport is set and proxy does not already contain a transport param (r:4b62ff79)
mod_sofia: pass custom headers backwards over sofia (r:13dc6058)
mod_sofia: fix profile SIP INFO dtmf not working (r:4c4ca08d)
mod_sofia: Fix SIP INFO DTMF (r:39ff78bf/FS-3078)
mod_sofia: contact-params should not be set if the string is empty (r:06988e1a/FS-3084)
mod_sofia: segfault with sofia_contact when invalid parameters are given (r:4e60f14a/FS-3072)
mod_sofia: Fix minupnpd nat_map updated IP not getting set in SIP profiles (r:e7acd4d1/FS-3054)
mod_sofia: add sip_execute_on_image variable similar to execute_on_answer etc so you can run t38_gateway or rxfax etc when you get a T.38 re-invite but no CNG tone or you want to ignore the tone and only react when getting a T.38 re-invite (r:53fc3f7f)
mod_sofia: add sip_jitter_buffer_during_bridge which you can set to true to keep a jitter buffer on both ends of the call when you are NormT (r:01073a79)
mod_sofia: fix race condition in sofia recover for atom processors (r:3eeb4995/FS-3117)
mod_sofia: improve codec ordering in ep_codec_string (r:8fe24a29/FS-3121)
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_sofia: Fix segfault when no channel is present and need to print err msg (r:ce5c8462/FS-3236)
mod_sofia: don't nat map on loopback addrs (r:e70af1f8)
mod_sofia: Add reporting chan vars: sip_bye_content_type and sip_bye_payload (r:2d856f8f/FS-3276)
mod_sofia: Add "tel:" patch - thanks jaybinks (r:154731a7)
mod_sofia: fix rare t38 gateway issue (r:123eaa52)
mod_sofia: fix sofia presence with dial does not maintain version number correctly (r:3ebd173c/FS-3307)
mod_sofia: fix One way audio problem from B-leg of the call on Session Refresh and HOLD if B-leg is using a dynamic payload type (r:66d16d17/FS-3270)
mod_sofia: chat API issue: dup_dest was being overwritten by switch_split_user_domain (r:765908f3/FS-3152)
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)
@ -617,16 +852,28 @@ 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_spandsp: Fire event when fax finishes indicating result (r:a57336ba/FS-3004)
mod_spandsp: Prevent hung chans on fax errors (r:789a9ce8/FS-3213)
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)
mod_valet_parking: add valet_announce_slot variable (r:293d7254)
mod_voicemail: Fix vm_prefs profile lock (MODAPP-417)
mod_voicemail: add 'vm-enabled' param (default true)
mod_voicemail: fix vm msg being deleted when pressing key to forward to email (MODAPP-403)
@ -640,18 +887,27 @@ freeswitch (1.0.7)
mod_voicemail: Set email address from within directory (r:83ce26b2/FS-2972)
mod_voicemail: add events for record/change greeting and record name (r:54421f59)
mod_voicemail: let vmain-key and operator-key be set empty (r:de49305a)
mod_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)
tools: Add sound_test.lua utility script (lets you listen to all the sound files in a particular rate/type combo (r:1a71dbf2)
freeswitch (1.0.6)
@ -1423,7 +1679,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)

View File

@ -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,10 +452,48 @@
<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"/>
<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="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 -->
<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="This conference is full. Please contact the conference moderator." filename="conf-conference_is_full.wav"/>
</ivr>
<misc>
<prompt phrase="This call has been secured" filename="call_secured.wav"/>
<prompt phrase="Followed by pound" filename="followed.wav"/>

View File

@ -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"/>

View File

@ -316,16 +316,20 @@
<currency>
<prompt phrase="и" filename="and.wav"/>
<prompt phrase="Цент" filename="cent.wav"/>
<prompt phrase="Цента" filename="centa.wav"/>
<prompt phrase="центральный" filename="central.wav"/>
<prompt phrase="Центов в минуту" filename="cents-per-minute.wav"/>
<prompt phrase="Центов" filename="centov.wav"/>
<prompt phrase="Центы" filename="cents.wav"/>
<prompt phrase="Доллар" filename="dollar.wav"/>
<prompt phrase="Долларов" filename="dollars.wav"/>
<prompt phrase="Доллара" filename="dollara.wav"/>
<prompt phrase="Доллары" filename="dollari.wav"/>
<prompt phrase="Минус" filename="minus.wav"/>
<prompt phrase="Отрицательный" filename="negative.wav"/>
<prompt phrase="Копеек" filename="kopeck-i.wav"/>
<prompt phrase="Копейки" filename="kopeck-i.wav"/>
<prompt phrase="Копейка" filename="kopeck.wav"/>
<prompt phrase="Копейки" filename="kopecks.wav"/>
<prompt phrase="Копеек" filename="kopecks.wav"/>
<prompt phrase="Рубль" filename="ruble.wav"/>
<prompt phrase="Рубля" filename="ruble-a.wav"/>
<prompt phrase="Рублей" filename="rubles.wav"/>
@ -395,6 +399,7 @@
<prompt phrase="срочное сообщение сохранено" filename="vm-urgent-saved.wav"/> <!--urgent saved -->
<prompt phrase="сохранено" filename="vm-saved.wav"/> <!--saved -->
<prompt phrase="сохранённых" filename="vm-savedx.wav"/> <!--saved -->
<prompt phrase="сохранное" filename="vm-save.wav"/> <!--saved -->
<prompt phrase="сообщение" filename="vm-message.wav"/> <!--message -->
<prompt phrase="сообщений" filename="vm-messagex.wav"/> <!--messages -->
<prompt phrase="сообщения" filename="vm-messages.wav"/> <!-- message -->
@ -431,26 +436,39 @@
<prompt phrase="пожалуйста, введите добавочный номер для отправки сообщения" filename="vm-forward_enter_ext.wav"/> <!--please, enter the extention to forward this message to -->
<prompt phrase="Неправильный добавочный номер" filename="vm-that_was_an_invalid_ext.wav"/> <!-- -->
<prompt phrase="Почтовый ящик переполнен. Пожалуйста перезвоните позже" filename="vm-mailbox_full.wav"/> <!-- That mailbox is full. Please try your call again later. -->
<!-- Дописать-->
<prompt phrase="Ваш персональный номер, он же пин, используется для предотвращения доступа другими к вашим голосовым сообщениям. Хотите сменить его сейчас?" filename="vm-tutorial_change_pin.wav"/><!--Your personal identification number, or 'pin', is used to prevent others from accessing your voicemail messages. Would you like to change it now? -->
<prompt phrase="Вызываемый абонент сейчас недоступен и не имеет голосовой почты" filename="vm-not_available_no_voicemail.wav"/> <!-- The person you are trying to reach is not available and does not have voicemail.-->
<prompt phrase="Добро пожаловать в Вашу новую голосовую почту. Для того, что бы прослушать инструкцию и настроить вашу голосовую почту, нажмите 1. Чтобы пропустить этот шаг, нажмите 2" filename="vm-tutorial_yes_no.wav"/><!-- Welcome to your new voicemail. To listen to a tutorial and setup your voice mail box, press 1. To skip, press 2.-->
<prompt phrase="Необходимо записать Ваше имя и фамилию. Эта запись используется системой, включая справочник организации" filename="vm-tutorial_record_name.wav"/><!--I need to record your first and last name. This recording is used throughout the system, including in the company directory.-->
<!-- Дописать-->
</voicemail>
<directory>
<!-- The following phrases still need to be recorded -->
<prompt phrase="Пожалуйста, введите первые буквы имени абонента" filename="dir-enter-person.wav"/> <!--Please enter the first few letters of the persons-->
<prompt phrase="Пожалуйста, введите первые буквы имени абонента" filename="dir-enter_person.wav"/> <!--Please enter the first few letters of the persons-->
<prompt phrase="Фамилии" filename="dir-last_name.wav"/> <!--last name.-->
<prompt phrase="Искать по ..." filename="dir-to_search_by.wav"/><!--To search by-->
<prompt phrase="Имени" filename="dir-first_name.wav"/><!--first name.-->
<prompt phrase="По Вашему запросу ничего не найдено, попробуйте еще раз" filename="dir-no_match_entry.wav"/><!--Your search matched no results, try again.-->
<prompt phrase="По Вашему запросу ничего не найдено" filename="dir-no_match_entry.wav"/><!--Your search matched no results.-->
<prompt phrase="результаты Вашего запроса" filename="dir-result_match.wav"/><!--results matched your search.-->
<prompt phrase="По Вашему запросу найдено слишком много вариантов, пожалуйста, попробуйте уточнить запрос" filename="dir-to_many_result.wav"/><!--Your search returned too many results, please try again.-->
<prompt phrase="нет больше вариантов" filename="dir-no_more_result.wav"/><!--No more results.-->
<prompt phrase="По Вашему запросу найдено слишком много вариантов, пожалуйста, попробуйте уточнить запрос" filename="dir-too_many_result.wav"/><!--Your search returned too many results, please try again.-->
<prompt phrase="нет больше вариантов" filename="dir-no_more_results.wav"/><!--No more results.-->
<prompt phrase="Номер варианта" filename="dir-result_number.wav"/><!--Result number.-->
<prompt phrase="добавочный номер" filename="dir-at_extension.wav"/><!--at extension-->
<prompt phrase="Для выбора этой записи" filename="dir-to_select_entry.wav"/><!--To select this entry-->
<prompt phrase="Для выбора следующей записи" filename="dir-for_next.wav"/><!--For the next entry-->
<prompt phrase="Для выбора предыдущей записи" filename="dir-for_prev.wav"/><!--For the previous entry-->
<prompt phrase="Для начала нового поиска" filename="dir-to_make_new_search.wav"/><!--To start a new search-->
<prompt phrase="Вам необходимо указать минимум ..." filename="dir-specify_mininum_first.wav"/><!--You need to specify a minimum of-->
<prompt phrase="букв имени абонента, попробуйте снова" filename="dir-letters_of_person_name.wav"/><!--letters of the person name, try again.-->
<prompt phrase="Для начала нового поиска" filename="dir-start_new_search.wav"/><!--To start a new search-->
<prompt phrase="Вам необходимо указать минимум ..." filename="dir-specify_mininum.wav"/><!--You need to specify a minimum of-->
<prompt phrase="букв имени абонента" filename="dir-letters_of_person_name.wav"/><!--letters of the person name.-->
<prompt phrase="нажмите" filename="dir-press.wav"/> <!--press vm-press.wav-->
<prompt phrase="Попробуйте снова" filename="dir-please_try_again.wav"/>^<!-- Please try again. ivr-please_try_again.wav-->
<!--дописать-->
<prompt phrase="Пожалуйста, введите первые буквы имени или фамилии абонента" filename="dir-enter_person_first_or_last.wav"/><!-- Please enter the first few letters of the person's first or last name-->
<prompt phrase="нет результатов по запросу." filename="dir-no_matching_results.wav"/><!-- There were no matching results.-->
<!--дописать-->
</directory>
@ -460,7 +478,7 @@
<prompt phrase="Ваш микрофон отключен" filename="conf-muted.wav"/> <!-- You are now muted. -->
<prompt phrase="Ваш микрофон включён" filename="conf-unmuted.wav"/> <!-- You are now unmuted. -->
<prompt phrase="Вы единственный участник конференции" filename="conf-alone.wav"/> <!-- You are currently the only person in this conference. -->
<prompt phrase="NULL" filename="conf-perpetual.wav" type="tone"/> <!-- -->
<prompt phrase="NULL" filename="conf-perpetual.wav" type="music"/>
<prompt phrase="NULL" filename="conf-enter.wav" type="tone"/> <!-- -->
<prompt phrase="NULL" filename="conf-exit.wav" type="tone"/> <!-- -->
<prompt phrase="Вы были отключены от конференции" filename="conf-kicked.wav"/> <!-- You have been kicked from this conference. -->
@ -471,6 +489,15 @@
<prompt phrase="Неправильный пин-код, попробуйте снова" filename="conf-bad-pin.wav"/> <!-- Invalid pin number, try again. -->
<prompt phrase="До свидания" filename="conf-goodbye.wav"/> <!-- goodbye -->
<prompt phrase="Добро пожаловать в конференцию" filename="conf-welcome.wav"/> <!--Welcome to the conference. -->
<!-- дописать -->
<prompt phrase="Пожалуйста, введите номер конференции, завершив нажатием на клавишу решетка" filename="conf-enter_conf_number.wav"/> <!-- Please enter the conference number, followed by the pound key -->
<prompt phrase="Ваш микрофон уже выключен." filename="conf-you_are_already_muted.wav"/> <!-- You are already muted. -->
<prompt phrase="Звук и микрофон сейчас выключены." filename="conf-you_are_now_bidirectionally_muted.wav"/> <!-- You are now bi-directionally muted. -->
<prompt phrase="...Вошёл в конференцию." filename="conf-has_joined.wav"/> <!-- ...has entered the conference. -->
<prompt phrase="Введите ПИН код конференции, завершив нажатием на клавишу решётка." filename="conf-enter_conf_pin.wav"/> <!-- Enter the conference PIN number, followed by the pound key. -->
<prompt phrase="...Покинул конференцию." filename="conf-has_left.wav"/> <!-- ...has left the conference. -->
<!-- дописать -->
</conference>
<ivr>
<prompt phrase="Номер счета" filename="ivr-account_number.wav"/> <!-- Account number -->
@ -479,11 +506,11 @@
<prompt phrase="Пожалуйста, введите добавочный номер абонента завершив нажатием на клавишу решётка" filename="ivr-enter_ext.wav"/> <!-- Please enter an extension followed by the pound sign-->
<prompt phrase="Для этого абонента" filename="ivr-for_this_person.wav"/> <!-- For this person -->
<prompt phrase="Пожалуйста, оставайтесь на линии, идет соединение" filename="ivr-hold_connect_call.wav"/> <!-- Please hold while I connect your call -->
<prompt phrase="Извините" filename="ivr-im_sorry.wav"/> <!-- I'm sorry -->
<prompt phrase="Пожалуйста" filename="ivr-please.wav"/> <!-- Please -->
<prompt phrase="Пожалуйста, перезвоните нам в …" filename="ivr-please_return_our_call_at.wav"/> <!-- Please return our call at -->
<prompt phrase="относительно номера ссылки" filename="ivr-regarding_reference_number.wav"/> <!-- Regarding reference number -->
<prompt phrase="Это пример голосового подменю" filename="ivr-sample_submenu.wav"/> <!-- This is a sample IVR submenu... -->
<prompt phrase="Извините" filename="ivr-im_sorry.wav"/> <!-- I'm sorry -->
<prompt phrase="Пожалуйста" filename="ivr-please.wav"/><!-- Please -->
<prompt phrase="Пожалуйста, перезвоните нам в …" filename="ivr-please_return_our_call_at.wav"/><!-- Please return our call at -->
<prompt phrase="относительно номера ссылки" filename="ivr-regarding_reference_number.wav"/><!-- Regarding reference number -->
<prompt phrase="Это пример голосового подменю" filename="ivr-sample_submenu.wav"/><!-- This is a sample IVR submenu... -->
<prompt phrase="Пожалуйста, представьтесь после сигнала" filename="ivr-say_name.wav"/> <!-- Please say your name after the tone -->
<prompt phrase="Перенаправить на голосовую почту" filename="ivr-send_to_voicemail.wav"/> <!-- Send this caller to voicemail -->
<prompt phrase="Для разговора с представителем по обслуживанию клиентов" filename="ivr-speak_to_a_customer_service_representative.wav"/> <!-- To speak to a customer service representative -->
@ -508,7 +535,7 @@
<prompt phrase="Вызов" filename="ivr-call.wav"/> <!-- call -->
<prompt phrase="Вы можете" filename="ivr-you_may.wav"/> <!-- You may -->
<prompt phrase="Здравствуйте" filename="ivr-hello.wav"/> <!-- hello -->
<prompt phrase="Используя клавиатуру телефона…" filename="ivr-use_telephone_keypad.wav"/> <!-- Using your telephone keypad... -->
<prompt phrase="Используя клавиатуру телефона…" filename="ivr-using_telephone_keypad.wav"/> <!-- Using your telephone keypad... переименовать ivr-use_telephone_keypad.wav -->
<prompt phrase="Пожалуйста, назовите имя сотрудника, которому пытаетесь дозвониться" filename="ivr-spell_name.wav"/> <!-- please spell the name of the person you are trying to reach. -->
<prompt phrase="Сначала фамилия" filename="ivr-last_name_first.wav"/> <!--Last name firs -->
<prompt phrase="Сначала имя" filename="ivr-first_name_first.wav"/> <!--First name first -->
@ -545,7 +572,7 @@
<prompt phrase="Меньше чем..." filename="ivr-less_than.wav" attr="Needs_to_be_recorded!"/><!-- "Less than..."-->
<prompt phrase="Начать запись" filename="ivr-begin_recording.wav " attr="Needs_to_be_recorded!"/><!--"Begin recording." -->
<prompt phrase="Переадресация звонков была отменена" filename="ivr-call_forwarding_has_been_cancelled.wav" attr="Needs_to_be_recorded!"/><!--"Call forwarding has been cancelled." -->
<prompt phrase="Переадресация звонков была настроена" filename="ivr-call_forwarding_has_been_set.wav " attr="Needs_to_be_recorded!"/><!--"Call forwarding has been set." -->
<prompt phrase="Переадресация звонков была настроена" filename="ivr-call_forwarding_has_been_set.wav" attr="Needs_to_be_recorded!"/><!--"Call forwarding has been set." -->
<prompt phrase="Пожалуйста, введите номер телефона" filename="ivr-please_enter_the_phone_number.wav" attr="Needs_to_be_recorded!"/><!--"Please enter the phone number." -->
<prompt phrase="Пожалуйста, назовите свое имя и цель Вашего звонка" filename="ivr-please_state_your_name_and_reason_for_calling.wav " attr="Needs_to_be_recorded!"/><!--"Please state your name and the reason for your call." -->
<prompt phrase="Что бы принять звонок нажмите 1, чтобы отклонить звонок нажмите 2. Для отправки голосовой почты нажмите 3" filename="ivr-accept_reject_voicemail.wav" attr="Needs_to_be_recorded!"/><!--"To accept, press 1. To reject, press 2. To send to voicemail, press 3." -->
@ -554,17 +581,66 @@
<prompt phrase="Пожалуйста, оставайтесь на линии. Ваш звонок будет принят немедленно" filename="ivr-stay_on_line_call_answered_momentarily.wav" attr="Needs_to_be_recorded!"/><!--"Please stay on the line. You call will be answered momentarily." -->
<prompt phrase="Ваш звонок был переведен" filename="ivr-call_being_transferred.wav" attr="Needs_to_be_recorded!"/><!--"Your call is being transferred." filename="ivr-call_being_transferred.wav" -->
<prompt phrase="Пожалуйста, наслаждайтесь музыкой, пока Ваш вонок переводится" filename="ivr-enjoy_music_while_transfer.wav" attr="Needs_to_be_recorded!"/> <!--"Please enjoy the music while your call is being transferred." -->
<!-- Дописать -->
<prompt phrase="...покинул здание." filename="ivr-has_left_the_building.wav"/> <!-- ...has left the building. -->
<prompt phrase="Добро пожаловать в..." filename="ivr-welcome_to.wav"/> <!-- Welcome to... -->
<prompt phrase="У вас есть звонок от..." filename="ivr-call_from.wav"/> <!-- You have a call from... -->
<prompt phrase="Подождите, пожалуйста." filename="ivr-one_moment_please.wav"/> <!-- One moment please. -->
<prompt phrase="Режим не беспокоить был отменён." filename="ivr-dnd_cancelled.wav"/> <!-- Do not disturb has been cancelled. -->
<prompt phrase="Доброе утро." filename="ivr-good_morning.wav"/> <!-- Good morning. -->
<prompt phrase="Если нет, нажмите..." filename="ivr-if_not_press.wav"/> <!-- If not, press... -->
<prompt phrase="Для справочника, нажмите..." filename="ivr-for_directory_press.wav"/> <!-- For a directory, press... -->
<prompt phrase="Добрый вечер." filename="ivr-good_evening.wav"/> <!-- Good evening. -->
<prompt phrase="Нажмите любую другую цифру..." filename="ivr-any_other_digit.wav"/> <!-- Press any other digit... -->
<prompt phrase="Введите первые буквы имени абонента." filename="ivr-enter_letters_first_or_last_name.wav"/> <!-- Enter the first few letters of the person's first or last name. dir-enter_person.wav -->
<prompt phrase="Пожалуйста введите..." filename="ivr-please_enter_the.wav"/> <!-- Please enter the... -->
<prompt phrase="Пожалуйста, введите первые буквы фамилии абонента" filename="ivr-enter_letters_last_name.wav"/> <!-- Enter the first few letters of the person's last name. -->
<prompt phrase="Вы вошли..." filename="ivr-you_entered.wav"/> <!-- You entered... -->
<prompt phrase="для..." filename="ivr-for.wav"/> <!-- For... не нужно -->
<prompt phrase="Внутренний номер..." filename="ivr-extension_number.wav"/> <!-- Extension number... -->
<prompt phrase="Остаток на счёте составляет..." filename="ivr-account_balance_is.wav"/> <!-- The account balance is... -->
<prompt phrase="Когда закончите нажмите клавишу решётка." filename="ivr-finished_pound_hash_key.wav"/> <!-- When you are finished, press the pound or hash key. -->
<prompt phrase="...вызвал аварийные службы" filename="ivr-has_called_emergency_services.wav"/> <!-- ...has called emergency services -->
<prompt phrase="Пожалуйста, укажите ваше имя и причину вашего звонка." filename="ivr-please_state_your_name_and_reason_for_calling.wav"/> <!-- Please state your name and the reason for your call. -->
<prompt phrase="Если это правильно, нажмите..." filename="ivr-if_correct_press.wav"/> <!-- If this is correct, press... -->
<prompt phrase="Добро пожаловать." filename="ivr-welcome.wav"/> <!-- Welcome. -->
<prompt phrase="Пожалуйста введите номер очереди,завершив нажатием на клавишу решетка." filename="ivr-enter_queue_number.wav"/> <!-- Please enter the queue number, followed by the pound or hash sign. -->
<prompt phrase="...завершив нажатием на клавишу решетка." filename="ivr-followed_by_pound.wav"/> <!-- ...followed by the pound or hash key. -->
<prompt phrase="Этот телефон не предназначен для совершения внешних звонков." filename="ivr-phone_is_unassigned.wav"/> <!-- This phone is unassigned and may not be used to make external calls. -->
<prompt phrase="Номер." filename="ivr-number.wav"/> <!-- Number. -->
<prompt phrase="Нету вызовов ожидающих в этой очереди." filename="ivr-no_calls_waiting_in_queue.wav"/> <!-- There are no calls waiting in this queue. -->
<prompt phrase="...Файлы..." filename="ivr-files-.wav"/> <!-- ...files... -->
<prompt phrase="...файл..." filename="ivr-file.wav"/> <!-- ...file... -->
<prompt phrase="Нажмите один для ДА. Нажмите два для НЕТ." filename="ivr-one_yes_two_no.wav"/> <!-- Press one for yes. Press two for no. -->
<prompt phrase="Это меню не содержит никаких элементов. Пожалуйста, обратитесь к администратору." filename="ivr-no_menu_items.wav"/> <!-- This menu has no items. Please contact the administrator. -->
<prompt phrase="Поздравляем! Этот телефон настроен правильно и теперь могут быть установлен пользователю." filename="ivr-phone_is_configured_properly.wav"/> <!-- Congratulations! This phone is configured properly and may now be assigned to a user. -->
<prompt phrase="Этот телефон не правильно настроен." filename="ivr-phone_not_configured.wav"/> <!-- This phone is not configured properly. -->
<prompt phrase="Добрый день." filename="ivr-good_afternoon.wav"/> <!-- Good afternoon. -->
<prompt phrase="Спасибо за звонок. Если вы знаете внутренний номер телефона, пожалуйста, введите его сейчас или набрать девять для каталога." filename="ivr-generic_greeting.wav"/> <!-- Thank you for calling. If you know your party's extension, please enter it now, or dial nine for a directory. -->
<prompt phrase="Спасибо." filename="ivr-Thank_you.wav"/> <!-- Thank you. -->
<prompt phrase="Если это правильно нажмите один. Если нет, нажмите 2" filename="ivr-if_correct_one_if_not_two.wav"/> <!-- If this is correct, press 1. If not, press 2. -->
<!-- Дописать -->
</ivr>
<misc>
<prompt phrase="Этот звонок шифруется" filename="call_secured.wav"/> <!-- This call has been secured -->
<prompt phrase="завершаемый нажатием на клавишу решетка" filename="vm-followed_by.wav"/> <!-- Followed by pound -->
<prompt phrase="завершаемый нажатием на клавишу решетка" filename="followed.wav"/> <!-- Followed by pound -->
<prompt phrase="Если вы этот человек" filename="if_you_are_this_person.wav"/> <!-- If you are this person -->
<prompt phrase="Если вы хотите" filename="if_you_would_like_to.wav"/> <!-- If you would like to -->
<prompt phrase="Предоставьте номер ссылки" filename="provide_reference_number.wav"/> <!-- Provide reference number -->
<prompt phrase="Пожалуйста, введите добавочный номер на который хотите перевести звонок" filename="transfer1.wav"/> <!-- Please enter extension you want to transfer to -->
<prompt phrase="Перевод" filename="transfer2.wav"/> <!-- Transfer -->
<prompt phrase="Мы пытаемся связаться" filename="we_are_trying_to_reach.wav"/> <!-- We are trying to reach -->
<prompt phrase="Мы пытаемся связаться..." filename="we_are_trying_to_reach.wav"/> <!-- We are trying to reach -->
<prompt phrase="Произошла ошибка, пожалуйста обратитесь к администратору" filename="error.wav"/> <!-- An error has occurred please contact the administrator -->
<!-- Записать-->
<prompt phrase="Ваш звонок будет завершен через" filename="misc-your_call_will_be_terminated_in.wav"/>
<prompt phrase="Ваш звонок был завершён" filename="misc-your_call_has_been_terminated.wav"/>
<!-- Записать-->
</misc>
<base256>
<!-- base256 prompts for SAS -->

View File

@ -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

View File

@ -31,9 +31,11 @@
%define build_sng_isdn 0
%define build_sng_ss7 0
%define build_sng_tc 0
%define build_py26_esl 0
%{?with_sang_tc:%define build_sng_tc 1 }
%{?with_sang_isdn:%define build_sng_isdn 1 }
%{?with_sang_ss7:%define build_sng_ss7 1 }
%{?with_py26_esl:%define build_py26_esl 1 }
######################################################################################################################
#
@ -61,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
@ -121,6 +123,10 @@ BuildRequires: e2fsprogs-devel
BuildRequires: libtheora-devel
BuildRequires: libxml2-devel
BuildRequires: bison
%if %{build_py26_esl}
BuildRequires: python26-devel
Requires: python26
%endif
Requires: alsa-lib
Requires: libogg
Requires: libvorbis
@ -271,25 +277,36 @@ English language phrases module and directory structure for say module and voice
%package lang-ru
Summary: Provides russian language dependand modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/LibrariesRequires: %{name} = %{version}-%{release}
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description lang-ru
Russian language phrases module and directory structure for say module and voicemail
%package lang-fr
Summary: Provides french language dependand modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/LibrariesRequires: %{name} = %{version}-%{release}
Summary: Provides french language dependend modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description lang-fr
French language phrases module and directory structure for say module and voicemail
%package lang-de
Summary: Provides german language dependand modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/LibrariesRequires: %{name} = %{version}-%{release}
Summary: Provides german language dependend modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description lang-de
German language phrases module and directory structure for say module and voicemail
%package lang-he
Summary: Provides hebrew language dependend modules and speech config for the FreeSWITCH Open Source telephone platform.
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description lang-he
Hebrew language phrases module and directory structure for say module and voicemail
%package freetdm
Summary: Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH
@ -467,7 +484,7 @@ EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_sqlite
# File and Audio Format Handlers
#
######################################################################################################################
FORMATS_MODULES="formats/mod_file_string formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
FORMATS_MODULES="formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
formats/mod_shout formats/mod_sndfile formats/mod_tone_stream"
######################################################################################################################
@ -493,7 +510,7 @@ PASSTHRU_CODEC_MODULES="codecs/mod_amr codecs/mod_amrwb codecs/mod_g723_1 codecs
# Phrase engine language modules
#
######################################################################################################################
SAY_MODULES="say/mod_say_de say/mod_say_en say/mod_say_fr say/mod_say_ru"
SAY_MODULES="say/mod_say_de say/mod_say_en say/mod_say_fr say/mod_say_he say/mod_say_ru"
######################################################################################################################
#
# Timers
@ -568,6 +585,7 @@ fi
cd libs/esl
%{__make} pymod
######################################################################################################################
#
# Install it and create some required dirs and links
@ -585,6 +603,16 @@ cd libs/esl
#install the esl stuff
cd libs/esl
%{__make} DESTDIR=%{buildroot} pymod-install
%if %{build_py26_esl}
#install esl for python 26
%{__make} clean
sed -i s/python\ /python26\ /g python/Makefile
%{__make} pymod
%{__mkdir} -p %{buildroot}/usr/lib/python2.6/site-packages
%{__make} DESTDIR=%{buildroot} pymod-install
%endif
cd ../..
%ifos linux
@ -724,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
@ -747,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
@ -874,7 +904,6 @@ fi
%{prefix}/mod/mod_event_socket.so*
%{prefix}/mod/mod_expr.so*
%{prefix}/mod/mod_fifo.so*
%{prefix}/mod/mod_file_string.so*
%{prefix}/mod/mod_flite.so*
%{prefix}/mod/mod_fsv.so*
%{prefix}/mod/mod_hash.so*
@ -1037,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
@ -1058,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
@ -1069,18 +1102,35 @@ 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
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/dir/*.xml
%{prefix}/mod/mod_say_ru.so*
%files lang-he
%defattr(-, freeswitch, daemon)
%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
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/he/dir/*.xml
%{prefix}/mod/mod_say_he.so*
######################################################################################################################
#
# Changelog
#
######################################################################################################################
%changelog
* Fri Apr 01 2011 - michal.bielicki@seventhsignal.de
- added hebrew language stuff
* Wed Mar 30 2011 - michal.bielicki@seventhsignal.de
- removed mod_file_string since it has been merged into dptools
* Wed Feb 16 2011 - michal.bielicki@seventhsignal.de
- added mod_skinny
- added sangoma libraries

39
libs/.gitignore vendored
View File

@ -263,6 +263,19 @@
/js/nsprpub/pr/tests/dll/Makefile
/js/src/jsautocfg.h
/js/src/perlconnect/Makefile.PL
/ldns/Makefile
/ldns/doc/ldns_manpages
/ldns/include/
/ldns/ldns/config.h
/ldns/ldns/net.h
/ldns/ldns/util.h
/ldns/lib
/ldns/libtool
/ldns/linktest
/ldns/linktest.dSYM/
/ldns/packaging/ldns-config
/ldns/packaging/libldns.pc
/ldns-1.6.9/
/libdingaling/Makefile
/libdingaling/Makefile.in
/libdingaling/aclocal.m4
@ -346,6 +359,7 @@
/libg722_1/tests/Makefile
/libg722_1/tests/Makefile.in
/libg722_1/tests/regression_tests.sh
/libg722_1/g722_1.pc
/libsndfile/Cfg/compile
/libsndfile/Cfg/config.guess
/libsndfile/Cfg/config.sub
@ -1104,3 +1118,28 @@
/tiff-3.8.2/a.out.dSYM/
/tiff-3.8.2/tiff-Makefile.tgz
/unimrcp/a.out.dSYM/
/esl/fs_cli.dSYM/
/esl/ivrd.dSYM/
/esl/testclient.dSYM/
/esl/testserver.dSYM/
/openssl-1.0.0a/
/esl/Debug/
/esl/Release/
/freetdm/msvc/Release/
/freetdm/msvc/Debug/
/spandsp/src/msvc/All/BuildLog make_at_dictionary.htm
/spandsp/src/msvc/All/BuildLog make_modem_filter.htm
BuildLog*.htm
/win32/tmp*.bat
/speex/win32/VS2008/libspeex/*/*/libspeex.log
/speex/win32/VS2008/libspeexdsp/*/*/libspeexdsp.log
/win32/celt/*/*/libcelt.log
/win32/libg722_1/*/*/libg722_1.log
/win32/libshout/*/*/libshout.log
openssl_manifest.rc
libeay32_manifest.rc
ssleay32_manifest.rc

View File

@ -34,10 +34,10 @@ testclient: $(MYLIB) testclient.c
fs_cli: $(MYLIB) fs_cli.c
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs $(LIBS) -ledit
%.o: %.c
%.o: %.c $(HEADERS)
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
%.o: %.cpp
%.o: %.cpp $(HEADERS)
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
clean:
@ -92,6 +92,9 @@ javamod: $(MYLIB)
managedmod: $(MYLIB)
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C managed
perlmod-install: perlmod
$(MAKE) -C perl install
phpmod-install: phpmod
$(MAKE) -C php install

View File

@ -571,7 +571,7 @@ COLORS[] = { ESL_SEQ_DEFAULT_COLOR, ESL_SEQ_FRED, ESL_SEQ_FRED,
ESL_SEQ_FRED, ESL_SEQ_FMAGEN, ESL_SEQ_FCYAN, ESL_SEQ_FGREEN, ESL_SEQ_FYELLOW };
static int usage(char *name){
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [profile]\n\n", name);
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [-t <timeout_ms>] [profile]\n\n", name);
printf(" -?,-h --help Usage Information\n");
printf(" -H, --host=hostname Host to connect\n");
printf(" -P, --port=port Port to connect (1 - 65535)\n");
@ -583,7 +583,8 @@ static int usage(char *name){
printf(" -q, --quiet Disable logging\n");
printf(" -r, --retry Retry connection on failure\n");
printf(" -R, --reconnect Reconnect if disconnected\n");
printf(" -d, --debug=level Debug Level (0 - 7)\n\n");
printf(" -d, --debug=level Debug Level (0 - 7)\n");
printf(" -t, --timeout Timeout for API commands (in miliseconds)\n\n");
return 1;
}
@ -839,9 +840,9 @@ static const char *basic_gets(int *cnt)
}
Sleep(20);
}
#endif
return command_buf;
#endif
}
#endif
@ -1032,6 +1033,7 @@ int main(int argc, char *argv[])
{"retry", 0, 0, 'r'},
{"interrupt", 0, 0, 'i'},
{"reconnect", 0, 0, 'R'},
{"timeout", 1, 0, 't'},
{0, 0, 0, 0}
};
@ -1050,7 +1052,7 @@ int main(int argc, char *argv[])
char argv_command[1024] = "";
char argv_loglevel[128] = "";
int argv_quiet = 0;
int loops = 2, reconnect = 0;
int loops = 2, reconnect = 0, timeout = 0;
strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
@ -1075,7 +1077,7 @@ int main(int argc, char *argv[])
for(;;) {
int option_index = 0;
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:qrRhi?", options, &option_index);
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhi?", options, &option_index);
if (opt == -1) break;
switch (opt)
{
@ -1128,6 +1130,9 @@ int main(int argc, char *argv[])
case 'R':
reconnect = 1;
break;
case 't':
timeout = atoi(optarg);
break;
case 'h':
case '?':
print_banner(stdout);
@ -1284,7 +1289,17 @@ int main(int argc, char *argv[])
const char *err = NULL;
snprintf(cmd_str, sizeof(cmd_str), "api %s\n\n", argv_command);
esl_send_recv(&handle, cmd_str);
if (timeout) {
esl_status_t status = esl_send_recv_timed(&handle, cmd_str, timeout);
if (status != ESL_SUCCESS) {
printf("Request timed out.\n");
esl_disconnect(&handle);
return -2;
}
} else {
esl_send_recv(&handle, cmd_str);
}
if (handle.last_sr_event) {
if (handle.last_sr_event->body) {
printf("%s\n", handle.last_sr_event->body);

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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);

View File

@ -1,4 +1,5 @@
PERL=$(shell which perl)
PERL_SITEDIR=$(shell perl -MConfig -e 'print $$Config{sitelibexp}')
PERL_LIBDIR=-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE
PERL_LIBS=$(shell perl -MConfig -e 'print $$Config{libs}')
LOCAL_CFLAGS=-w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL
@ -30,3 +31,8 @@ swigclean:
reswig: swigclean esl_wrap.cpp perlxsi.c
install: ESL.so
install -m 755 ESL.so $(PERL_SITEDIR)
install -m 755 ESL.pm $(PERL_SITEDIR)
install -d -m 755 ESL $(PERL_SITEDIR)/ESL
install -m 755 ESL/* $(PERL_SITEDIR)/ESL

View File

@ -18,6 +18,7 @@ FreeSWITCH Logger Utility
USAGE:
-h --help This help
-H --host Choose host
-p --port <port> Choose port
-P -pass <pass> Choose password
-f --file <file> Output file
@ -42,12 +43,12 @@ sub parse(\$\$$) {
}
for($i = 0; $i < $argc; $i++) {
if ($ARGV[$i] =~ /^\-help$|^\-\-help$/) {
if ($ARGV[$i] =~ /^\-h$|^\-\-help$/) {
print $USAGE;
exit;
}
if (! (parse($i, $host, '^-h$|^--host$') ||
if (! (parse($i, $host, '^-H$|^--host$') ||
parse($i, $port, '^-p$|^--port$') ||
parse($i, $pass, '^-P$|^--pass$') ||
parse($i, $file, '^-f$|^--file$') ||

View File

@ -31,6 +31,24 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Use select on windows and poll everywhere else.
Select is the devil. Especially if you are doing a lot of small socket connections.
If your FD number is bigger than 1024 you will silently create memory corruption.
If you have build errors on your platform because you don't have poll find a way to detect it and #define ESL_USE_SELECT and #undef ESL_USE_POLL
All of this will be upgraded to autoheadache eventually.
*/
/* TBD for win32 figure out how to tell if you have WSAPoll (vista or higher) and use it when available by #defining ESL_USE_WSAPOLL (see below) */
#ifdef _MSC_VER
#define FD_SETSIZE 8192
#define ESL_USE_SELECT
#else
#define ESL_USE_POLL
#endif
#include <esl.h>
#ifndef WIN32
#define closesocket(x) close(x)
@ -42,6 +60,10 @@
#pragma warning (default:6386)
#endif
#ifdef ESL_USE_POLL
#include <poll.h>
#endif
/* Written by Marc Espie, public domain */
#define ESL_CTYPE_NUM_CHARS 256
@ -301,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);
}
@ -614,6 +636,143 @@ ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_list
}
/* USE WSAPoll on vista or higher */
#ifdef ESL_USE_WSAPOLL
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags)
{
}
#endif
#ifdef ESL_USE_SELECT
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 6262 ) /* warning C6262: Function uses '98348' bytes of stack: exceeds /analyze:stacksize'16384'. Consider moving some data to heap */
#endif
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags)
{
int s = 0, r = 0;
fd_set rfds;
fd_set wfds;
fd_set efds;
struct timeval tv;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
FD_ZERO(&efds);
/* Wouldn't you rather know?? */
assert(sock <= FD_SETSIZE);
if ((flags & ESL_POLL_READ)) {
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(sock, &rfds);
#pragma warning( pop )
#else
FD_SET(sock, &rfds);
#endif
}
if ((flags & ESL_POLL_WRITE)) {
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(sock, &wfds);
#pragma warning( pop )
#else
FD_SET(sock, &wfds);
#endif
}
if ((flags & ESL_POLL_ERROR)) {
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(sock, &efds);
#pragma warning( pop )
#else
FD_SET(sock, &efds);
#endif
}
tv.tv_sec = ms / 1000;
tv.tv_usec = (ms % 1000) * ms;
s = select(sock + 1, (flags & ESL_POLL_READ) ? &rfds : NULL, (flags & ESL_POLL_WRITE) ? &wfds : NULL, (flags & ESL_POLL_ERROR) ? &efds : NULL, &tv);
if (s < 0) {
r = s;
} else if (s > 0) {
if ((flags & ESL_POLL_READ) && FD_ISSET(sock, &rfds)) {
r |= ESL_POLL_READ;
}
if ((flags & ESL_POLL_WRITE) && FD_ISSET(sock, &wfds)) {
r |= ESL_POLL_WRITE;
}
if ((flags & ESL_POLL_ERROR) && FD_ISSET(sock, &efds)) {
r |= ESL_POLL_ERROR;
}
}
return r;
}
#ifdef WIN32
#pragma warning( pop )
#endif
#endif
#ifdef ESL_USE_POLL
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags)
{
struct pollfd pfds[2] = { { 0 } };
int s = 0, r = 0;
pfds[0].fd = sock;
if ((flags & ESL_POLL_READ)) {
pfds[0].events |= POLLIN;
}
if ((flags & ESL_POLL_WRITE)) {
pfds[0].events |= POLLOUT;
}
if ((flags & ESL_POLL_ERROR)) {
pfds[0].events |= POLLERR;
}
s = poll(pfds, 1, ms);
if (s < 0) {
r = s;
} else if (s > 0) {
if ((pfds[0].revents & POLLIN)) {
r |= ESL_POLL_READ;
}
if ((pfds[0].revents & POLLOUT)) {
r |= ESL_POLL_WRITE;
}
if ((pfds[0].revents & POLLERR)) {
r |= ESL_POLL_ERROR;
}
}
return r;
}
#endif
ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char *host, esl_port_t port, const char *user, const char *password, uint32_t timeout)
{
char sendbuf[256];
@ -681,30 +840,17 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char *
rval = connect(handle->sock, (struct sockaddr*)&handle->sockaddr, sizeof(handle->sockaddr));
if (timeout) {
fd_set wfds;
struct timeval tv;
int r;
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
FD_ZERO(&wfds);
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(handle->sock, &wfds);
#pragma warning( pop )
#else
FD_SET(handle->sock, &wfds);
#endif
r = select(handle->sock + 1, NULL, &wfds, NULL, &tv);
r = esl_wait_sock(handle->sock, timeout, ESL_POLL_WRITE);
if (r <= 0) {
snprintf(handle->err, sizeof(handle->err), "Connection timed out");
goto fail;
}
if (!FD_ISSET(handle->sock, &wfds)) {
if (!(r & ESL_POLL_WRITE)) {
snprintf(handle->err, sizeof(handle->err), "Connection timed out");
goto fail;
}
@ -823,9 +969,7 @@ ESL_DECLARE(esl_status_t) esl_disconnect(esl_handle_t *handle)
ESL_DECLARE(esl_status_t) esl_recv_event_timed(esl_handle_t *handle, uint32_t ms, int check_q, esl_event_t **save_event)
{
fd_set rfds, efds;
struct timeval tv = { 0 };
int max, activity;
int activity;
esl_status_t status = ESL_SUCCESS;
if (!ms) {
@ -845,55 +989,24 @@ ESL_DECLARE(esl_status_t) esl_recv_event_timed(esl_handle_t *handle, uint32_t ms
esl_mutex_unlock(handle->mutex);
}
tv.tv_usec = ms * 1000;
FD_ZERO(&rfds);
FD_ZERO(&efds);
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(handle->sock, &rfds);
FD_SET(handle->sock, &efds);
#pragma warning( pop )
#else
FD_SET(handle->sock, &rfds);
FD_SET(handle->sock, &efds);
#endif
max = handle->sock + 1;
activity = esl_wait_sock(handle->sock, ms, ESL_POLL_READ|ESL_POLL_ERROR);
if ((activity = select(max, &rfds, NULL, &efds, &tv)) < 0) {
if (activity < 0) {
handle->connected = 0;
return ESL_FAIL;
}
if (activity == 0 || !FD_ISSET(handle->sock, &rfds) || (esl_mutex_trylock(handle->mutex) != ESL_SUCCESS)) {
if (activity == 0 || !(activity & ESL_POLL_READ) || (esl_mutex_trylock(handle->mutex) != ESL_SUCCESS)) {
return ESL_BREAK;
}
tv.tv_usec = 0;
activity = esl_wait_sock(handle->sock, ms, ESL_POLL_READ|ESL_POLL_ERROR);
FD_ZERO(&rfds);
FD_ZERO(&efds);
#ifdef WIN32
#pragma warning( push )
#pragma warning( disable : 4127 )
FD_SET(handle->sock, &rfds);
FD_SET(handle->sock, &efds);
#pragma warning( pop )
#else
FD_SET(handle->sock, &rfds);
FD_SET(handle->sock, &efds);
#endif
activity = select(max, &rfds, NULL, &efds, &tv);
if (activity < 0) {
handle->connected = 0;
status = ESL_FAIL;
} else if (activity > 0 && FD_ISSET(handle->sock, &rfds)) {
} else if (activity > 0 && (activity & ESL_POLL_READ)) {
if (esl_recv_event(handle, check_q, save_event)) {
status = ESL_FAIL;
}
@ -912,6 +1025,51 @@ static esl_ssize_t handle_recv(esl_handle_t *handle, void *data, esl_size_t data
return recv(handle->sock, data, datalen, 0);
}
static int add_array(esl_event_t *event, const char *var, const char *val)
{
char *data;
char **array;
int idx;
int max = 0;
int len;
const char *p;
int i;
if (strlen(val) < 8) {
return -1;
}
p = val + 7;
while((p = strstr(p, "::"))) {
max++;
p += 2;
}
if (!max) {
return -2;
}
data = strdup(val + 7);
len = (sizeof(char *) * max) + 1;
array = malloc(len);
memset(array, 0, len);
idx = esl_separate_string_string(data, "::", array, max);
for(i = 0; i < max; i++) {
esl_event_add_header_string(event, ESL_STACK_PUSH, var, array[i]);
}
free(array);
free(data);
return 0;
}
ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_event_t **save_event)
{
char *c;
@ -934,7 +1092,6 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
goto fail;
}
esl_event_safe_destroy(&handle->last_event);
esl_event_safe_destroy(&handle->last_ievent);
if (check_q && handle->race_event) {
@ -976,7 +1133,11 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
if (hname && hval) {
esl_url_decode(hval);
esl_log(ESL_LOG_DEBUG, "RECV HEADER [%s] = [%s]\n", hname, hval);
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
if (!strncmp(hval, "ARRAY::", 7)) {
add_array(revent, hname, hval);
} else {
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
}
}
p = e;
@ -1053,6 +1214,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
*save_event = revent;
revent = NULL;
} else {
esl_event_safe_destroy(&handle->last_event);
handle->last_event = revent;
}
@ -1104,7 +1266,12 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
esl_event_del_header(handle->last_ievent, "event-name");
esl_name_event(hval, &handle->last_ievent->event_id);
}
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
if (!strncmp(hval, "ARRAY::", 7)) {
add_array(handle->last_ievent, hname, hval);
} else {
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
}
}
beg = c + 1;
@ -1258,5 +1425,23 @@ ESL_DECLARE(esl_status_t) esl_send_recv_timed(esl_handle_t *handle, const char *
}
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen)
{
unsigned int count = 0;
char *d;
size_t dlen = strlen(delim);
array[count++] = buf;
while (count < arraylen && array[count - 1]) {
if ((d = strstr(array[count - 1], delim))) {
*d = '\0';
d += dlen;
array[count++] = d;
} else
break;
}
return count;
}

View File

@ -235,8 +235,7 @@ static unsigned int esl_ci_hashfunc_default(const char *char_key, esl_ssize_t *k
return hash;
}
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name)
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name)
{
esl_event_header_t *hp;
esl_ssize_t hlen = -1;
@ -244,18 +243,39 @@ ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_n
esl_assert(event);
if (!header_name) return NULL;
if (!header_name)
return NULL;
hash = esl_ci_hashfunc_default(header_name, &hlen);
for (hp = event->headers; hp; hp = hp->next) {
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name) ) {
return hp->value;
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name)) {
return hp;
}
}
return NULL;
}
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx)
{
esl_event_header_t *hp;
if ((hp = esl_event_get_header_ptr(event, header_name))) {
if (idx > -1) {
if (idx < hp->idx) {
return hp->array[idx];
} else {
return NULL;
}
}
return hp->value;
}
return NULL;
}
ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
{
return (event ? event->body : NULL);
@ -264,7 +284,7 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const char *header_name, const char *val)
{
esl_event_header_t *hp, *lp = NULL, *tp;
esl_status_t status = ESL_FAIL;
esl_status_t status = ESL_FALSE;
int x = 0;
esl_ssize_t hlen = -1;
unsigned long hash = 0;
@ -273,12 +293,12 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
while (tp) {
hp = tp;
tp = tp->next;
x++;
esl_assert(x < 1000);
esl_assert(x < 1000000);
hash = esl_ci_hashfunc_default(header_name, &hlen);
if (hp->name && (!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
if ((!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
if (lp) {
lp->next = hp->next;
} else {
@ -288,10 +308,27 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
event->last_header = lp;
}
FREE(hp->name);
FREE(hp->value);
memset(hp, 0, sizeof(*hp));
FREE(hp);
if (hp->idx) {
int i = 0;
hp->value = NULL;
for (i = 0; i < hp->idx; i++) {
FREE(hp->array[i]);
}
FREE(hp->array);
}
FREE(hp->value);
memset(hp, 0, sizeof(*hp));
#ifdef ESL_EVENT_RECYCLE
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, hp) != ESL_SUCCESS) {
FREE(hp);
}
#else
FREE(hp);
#endif
status = ESL_SUCCESS;
} else {
lp = hp;
@ -303,36 +340,122 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t stack, const char *header_name, char *data)
{
esl_event_header_t *header;
esl_event_header_t *header = NULL;
esl_ssize_t hlen = -1;
int exists = 0;
header = ALLOC(sizeof(*header));
esl_assert(header);
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT) || esl_test_flag(event, ESL_EF_CONTAINS_ARRAYS)) {
if ((event->flags & ESL_UNIQ_HEADERS)) {
esl_event_del_header(event, header_name);
if ((header = esl_event_get_header_ptr(event, header_name))) {
if (!(stack & ESL_STACK_PUSH) && !(stack & ESL_STACK_UNSHIFT) && header->idx) {
stack |= ESL_STACK_PUSH;
}
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
exists++;
stack &= ~(ESL_STACK_TOP | ESL_STACK_BOTTOM);
} else {
header = NULL;
}
}
}
memset(header, 0, sizeof(*header));
if (!header) {
header->name = DUP(header_name);
header->value = data;
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
#ifdef ESL_EVENT_RECYCLE
void *pop;
if (esl_queue_trypop(EVENT_HEADER_RECYCLE_QUEUE, &pop) == ESL_SUCCESS) {
header = (esl_event_header_t *) pop;
} else {
#endif
header = ALLOC(sizeof(*header));
esl_assert(header);
#ifdef ESL_EVENT_RECYCLE
}
#endif
if (stack == ESL_STACK_TOP) {
header->next = event->headers;
event->headers = header;
if (!event->last_header) {
if (esl_test_flag(event, ESL_EF_UNIQ_HEADERS)) {
esl_event_del_header(event, header_name);
}
memset(header, 0, sizeof(*header));
header->name = DUP(header_name);
}
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
char **m = NULL;
esl_size_t len = 0;
char *hv;
int i = 0, j = 0;
esl_set_flag(event, ESL_EF_CONTAINS_ARRAYS);
if (header->value && !header->idx) {
m = malloc(sizeof(char *));
esl_assert(m);
m[0] = header->value;
header->value = NULL;
header->array = m;
header->idx++;
m = NULL;
}
i = header->idx + 1;
m = realloc(header->array, sizeof(char *) * i);
esl_assert(m);
if ((stack & ESL_STACK_PUSH)) {
m[header->idx] = data;
} else if ((stack & ESL_STACK_UNSHIFT)) {
for (j = header->idx; j > 0; j--) {
m[j] = m[j-1];
}
m[0] = data;
}
header->idx++;
header->array = m;
for(j = 0; j < header->idx; j++) {
len += strlen(header->array[j]) + 2;
}
if (len) {
len += 8;
hv = realloc(header->value, len);
esl_assert(hv);
header->value = hv;
esl_snprintf(header->value, len, "ARRAY::");
for(j = 0; j < header->idx; j++) {
esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "::", header->array[j]);
}
}
} else {
header->value = data;
}
if (!exists) {
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
if ((stack & ESL_STACK_TOP)) {
header->next = event->headers;
event->headers = header;
if (!event->last_header) {
event->last_header = header;
}
} else {
if (event->last_header) {
event->last_header->next = header;
} else {
event->headers = header;
header->next = NULL;
}
event->last_header = header;
}
} else {
if (event->last_header) {
event->last_header->next = header;
} else {
event->headers = header;
header->next = NULL;
}
event->last_header = header;
}
return ESL_SUCCESS;
@ -386,48 +509,98 @@ ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt
}
}
ESL_DECLARE(void) esl_event_destroy(esl_event_t **event)
{
esl_event_t *ep = *event, *this_event;
esl_event_header_t *hp, *this_header;
esl_event_t *ep = *event;
esl_event_header_t *hp, *this;
for (ep = *event ; ep ;) {
this_event = ep;
ep = ep->next;
for (hp = this_event->headers; hp;) {
this_header = hp;
if (ep) {
for (hp = ep->headers; hp;) {
this = hp;
hp = hp->next;
FREE(this_header->name);
FREE(this_header->value);
memset(this_header, 0, sizeof(*this_header));
FREE(this_header);
FREE(this->name);
if (this->idx) {
int i = 0;
this->value = NULL;
for (i = 0; i < this->idx; i++) {
FREE(this->array[i]);
}
FREE(this->array);
}
FREE(this->value);
#ifdef ESL_EVENT_RECYCLE
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, this) != ESL_SUCCESS) {
FREE(this);
}
#else
FREE(this);
#endif
}
FREE(this_event->body);
FREE(this_event->subclass_name);
memset(this_event, 0, sizeof(*this_event));
FREE(this_event);
FREE(ep->body);
FREE(ep->subclass_name);
#ifdef ESL_EVENT_RECYCLE
if (esl_queue_trypush(EVENT_RECYCLE_QUEUE, ep) != ESL_SUCCESS) {
FREE(ep);
}
#else
FREE(ep);
#endif
}
*event = NULL;
}
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge)
{
esl_event_header_t *hp;
esl_assert(tomerge && event);
for (hp = tomerge->headers; hp; hp = hp->next) {
if (hp->idx) {
int i;
for(i = 0; i < hp->idx; i++) {
esl_event_add_header_string(event, ESL_STACK_PUSH, hp->name, hp->array[i]);
}
} else {
esl_event_add_header_string(event, ESL_STACK_BOTTOM, hp->name, hp->value);
}
}
}
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
{
esl_event_header_t *hp;
if (esl_event_create_subclass(event, ESL_EVENT_CLONE, todup->subclass_name) != ESL_SUCCESS) {
return ESL_FAIL;
return ESL_GENERR;
}
(*event)->event_id = todup->event_id;
(*event)->event_user_data = todup->event_user_data;
(*event)->bind_user_data = todup->bind_user_data;
(*event)->flags = todup->flags;
for (hp = todup->headers; hp; hp = hp->next) {
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
if (todup->subclass_name && !strcmp(hp->name, "Event-Subclass")) {
continue;
}
if (hp->idx) {
int i;
for (i = 0; i < hp->idx; i++) {
esl_event_add_header_string(*event, ESL_STACK_PUSH, hp->name, hp->array[i]);
}
} else {
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
}
}
if (todup->body) {
@ -439,97 +612,26 @@ ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
{
esl_event_t *new_event;
cJSON *cj, *cjp;
if (!(cj = cJSON_Parse(json))) {
return ESL_FAIL;
}
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
cJSON_Delete(cj);
return ESL_FAIL;
}
for (cjp = cj->child; cjp; cjp = cjp->next) {
char *name = cjp->string;
char *value = cjp->valuestring;
if (name && value) {
if (!strcasecmp(name, "_body")) {
esl_event_add_body(new_event, value);
} else {
if (!strcasecmp(name, "event-name")) {
esl_event_del_header(new_event, "event-name");
}
esl_name_event(value, &new_event->event_id);
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
}
}
}
cJSON_Delete(cj);
*event = new_event;
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
{
esl_event_header_t *hp;
cJSON *cj;
*str = NULL;
cj = cJSON_CreateObject();
for (hp = event->headers; hp; hp = hp->next) {
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
}
if (event->body) {
int blen = (int) strlen(event->body);
char tmp[25];
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
}
*str = cJSON_Print(cj);
cJSON_Delete(cj);
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, esl_bool_t encode)
{
size_t len = 0;
esl_size_t len = 0;
esl_event_header_t *hp;
size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
esl_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
char *buf;
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialized copy */
int clen = 0;
if (!event || !event->headers)
return ESL_FAIL;
*str = NULL;
dlen = blocksize * 2;
if (!(buf = malloc(dlen))) {
return ESL_FAIL;
abort();
}
/* go ahead and give ourselves some space to work with, should save a few reallocs */
if (!(encode_buf = malloc(encode_len))) {
esl_safe_free(buf);
return ESL_FAIL;
abort();
}
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "hit serialized!.\n"); */
@ -542,38 +644,39 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
* destroying loop.
*/
if (!strcasecmp(hp->name, "content-length")) {
clen++;
if (hp->idx) {
int i;
new_len = 0;
for(i = 0; i < hp->idx; i++) {
new_len += (strlen(hp->array[i]) * 3) + 1;
}
} else {
new_len = (strlen(hp->value) * 3) + 1;
}
new_len = (strlen(hp->value) * 3) + 1;
if (encode_len < new_len) {
char *tmp;
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "Allocing %d was %d.\n", ((strlen(hp->value) * 3) + 1), encode_len); */
/* we can use realloc for initial alloc as well, if encode_buf is zero it treats it as a malloc */
/* keep track of the size of our allocation */
encode_len = new_len;
if (!(tmp = realloc(encode_buf, encode_len))) {
/* oh boy, ram's gone, give back what little we grabbed and bail */
esl_safe_free(buf);
esl_safe_free(encode_buf);
return ESL_FAIL;
abort();
}
encode_buf = tmp;
}
/* handle any bad things in the string like newlines : etc that screw up the serialized format */
if (encode) {
esl_url_encode(hp->value, encode_buf, encode_len);
} else {
esl_snprintf(encode_buf, encode_len, "%s", hp->value);
esl_snprintf(encode_buf, encode_len, "[%s]", hp->value);
}
llen = strlen(hp->name) + strlen(encode_buf) + 8;
if ((len + llen) > dlen) {
@ -582,14 +685,11 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
if ((m = realloc(buf, dlen))) {
buf = m;
} else {
/* we seem to be out of memory trying to resize the serialize string, give back what we already have and give up */
esl_safe_free(buf);
esl_safe_free(encode_buf);
return ESL_FAIL;
abort();
}
}
snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
esl_snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
len = strlen(buf);
}
@ -612,29 +712,115 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
if ((m = realloc(buf, dlen))) {
buf = m;
} else {
esl_safe_free(buf);
return ESL_FAIL;
abort();
}
}
if (blen) {
if (clen) {
snprintf(buf + len, dlen - len, "\n%s", event->body);
} else {
snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body);
}
esl_snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", blen, event->body);
} else {
esl_snprintf(buf + len, dlen - len, "\n");
}
} else {
snprintf(buf + len, dlen - len, "\n");
esl_snprintf(buf + len, dlen - len, "\n");
}
*str = buf;
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
{
esl_event_t *new_event;
cJSON *cj, *cjp;
if (!(cj = cJSON_Parse(json))) {
return ESL_FALSE;
}
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
cJSON_Delete(cj);
return ESL_FALSE;
}
for (cjp = cj->child; cjp; cjp = cjp->next) {
char *name = cjp->string;
char *value = cjp->valuestring;
if (name && value) {
if (!strcasecmp(name, "_body")) {
esl_event_add_body(new_event, value, ESL_VA_NONE);
} else {
if (!strcasecmp(name, "event-name")) {
esl_event_del_header(new_event, "event-name");
esl_name_event(value, &new_event->event_id);
}
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
}
} else if (name) {
if (cjp->type == cJSON_Array) {
int i, x = cJSON_GetArraySize(cjp);
for (i = 0; i < x; i++) {
cJSON *item = cJSON_GetArrayItem(cjp, i);
if (item && item->type == cJSON_String && item->valuestring) {
esl_event_add_header_string(new_event, ESL_STACK_PUSH, name, item->valuestring);
}
}
}
}
}
cJSON_Delete(cj);
*event = new_event;
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
{
esl_event_header_t *hp;
cJSON *cj;
*str = NULL;
cj = cJSON_CreateObject();
for (hp = event->headers; hp; hp = hp->next) {
if (hp->idx) {
cJSON *a = cJSON_CreateArray();
int i;
for(i = 0; i < hp->idx; i++) {
cJSON_AddItemToArray(a, cJSON_CreateString(hp->array[i]));
}
cJSON_AddItemToObject(cj, hp->name, a);
} else {
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
}
}
if (event->body) {
int blen = (int) strlen(event->body);
char tmp[25];
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
}
*str = cJSON_Print(cj);
cJSON_Delete(cj);
return ESL_SUCCESS;
}
/* For Emacs:
* Local Variables:

View File

@ -42,10 +42,16 @@ extern "C" {
#define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
#define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
#define ESL_VA_NONE "%s", ""
typedef struct esl_event_header esl_event_header_t;
typedef struct esl_event esl_event_t;
typedef enum {
ESL_POLL_READ = (1 << 0),
ESL_POLL_WRITE = (1 << 1),
ESL_POLL_ERROR = (1 << 2)
} esl_poll_t;
typedef enum {
ESL_EVENT_TYPE_PLAIN,
@ -257,7 +263,8 @@ typedef enum {
ESL_SUCCESS,
ESL_FAIL,
ESL_BREAK,
ESL_DISCONNECTED
ESL_DISCONNECTED,
ESL_GENERR
} esl_status_t;
#define BUF_CHUNK 65536 * 50
@ -304,6 +311,10 @@ typedef struct {
int destroyed;
} esl_handle_t;
#define esl_test_flag(obj, flag) ((obj)->flags & flag)
#define esl_set_flag(obj, flag) (obj)->flags |= (flag)
#define esl_clear_flag(obj, flag) (obj)->flags &= ~(flag)
/*! \brief Used internally for truth test */
typedef enum {
ESL_TRUE = 1,
@ -446,6 +457,10 @@ ESL_DECLARE(esl_status_t) esl_filter(esl_handle_t *handle, const char *header, c
*/
ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etype, const char *value);
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags);
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen);
#define esl_recv(_h) esl_recv_event(_h, 0, NULL)
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, 0, NULL)

View File

@ -42,7 +42,9 @@ extern "C" {
typedef enum {
ESL_STACK_BOTTOM,
ESL_STACK_TOP
ESL_STACK_TOP,
ESL_STACK_PUSH,
ESL_STACK_UNSHIFT
} esl_stack_t;
typedef enum {
@ -141,6 +143,10 @@ typedef enum {
char *name;
/*! the header value */
char *value;
/*! array space */
char **array;
/*! array index */
int idx;
/*! hash of the header name */
unsigned long hash;
struct esl_event_header *next;
@ -174,7 +180,8 @@ struct esl_event {
};
typedef enum {
ESL_UNIQ_HEADERS = (1 << 0)
ESL_EF_UNIQ_HEADERS = (1 << 0),
ESL_EF_CONTAINS_ARRAYS = (1 << 1)
} esl_event_flag_t;
@ -203,7 +210,11 @@ ESL_DECLARE(esl_status_t) esl_event_set_priority(esl_event_t *event, esl_priorit
\param header_name the name of the header to read
\return the value of the requested header
*/
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name);
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name);
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx);
#define esl_event_get_header(_e, _h) esl_event_get_header_idx(_e, _h, -1)
/*!
\brief Retrieve the body value from an event
@ -250,6 +261,7 @@ ESL_DECLARE(void) esl_event_destroy(esl_event_t **event);
\return ESL_SUCCESS if the event was duplicated
*/
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup);
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge);
/*!
\brief Render the name of an event id enumeration

View File

@ -29,3 +29,8 @@ testtones
!/sample/boost/Makefile
!/sample/dso/Makefile
freetdm.2010.sdf
/mod_freetdm/Win32/
/msvc/Win32/
/src/ftmod/*/Win32/
/src/ftmod/*/x64/

View File

@ -20,6 +20,9 @@ cpu_reset_alarm_threshold => 70
; cpu_alarm_action => warn,reject
cpu_alarm_action => warn
; Where to dump DTMF debug files (see per span debugdtmf=yes option)
debugdtmf_directory=/full/path/to/dtmf/directory
; spans are defined with [span <span type> <span name>]
; the span type can either be zt, wanpipe or pika
; the span name can be any unique string

View File

@ -1,4 +1,13 @@
[defaults]
; User space interval at which data will be delivered
codec_ms => 20
; wink and flash interval
wink_ms => 150
flash_ms => 750
; size of the driver queue of elements of MTU size
; typical case is 10 elements of 80 bytes each (10ms of ulaw/alaw)
; don't mess with this if you don't know what you're doing
; txqueue_size => 10
; rxqueue_size => 10

View File

@ -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
#

Binary file not shown.

View File

@ -10,6 +10,7 @@ example #1a - Making an outbound call:
To make an outbound call:
ftdm_usrmsg_t usrmsg;
memset(&usrmsg, 0, sizeof(usrmsg));
/* Attach variable to usrmsg */
ftdm_usrmsg_add_var(&usrmsg, "isdn.prog_ind.descr", "inband-info-available");
@ -22,6 +23,7 @@ When using ftmod_sangoma_isdn, user want to specify progress indicator inside PR
ftdm_usrmsg_t usrmsg;
memset(&usrmsg, 0, sizeof(usrmsg));
/* Attach variable to usrmsg */
ftdm_usrmsg_add_var(&usrmsg, "isdn.prog_ind.descr", "inband-info-available");
@ -40,6 +42,8 @@ When using ftmod_sangoma_isdn, user wants to transmit a custom Facility IE, insi
uint8_t *my_facility_ie = ftdm_calloc(1, 200); /*memory has to be allocated using ftdm_calloc !! */
unsigned my_facility_ie_len = 0;
memset(&usrmsg, 0, sizeof(usrmsg));
/* Fill my_facility_ie with custom data here */
my_facility_ie[my_facility_ie_len++] = 0x1C; /* Q.931 Facility IE ID */
my_facility_ie[my_facility_ie_len++] = 0x03; /* Length of facility IE */
@ -49,7 +53,7 @@ When using ftmod_sangoma_isdn, user wants to transmit a custom Facility IE, insi
ftdm_usrmsg_set_raw_data(&usrmsg, my_facility_ie, my_facility_ie_len);
ftdm_channel_call_indicate(ftdmchan, FTDM_CHANNEL_INDICATE_FACILITY, &usrmsg);
ftdm_channel_call_indicate_ex(ftdmchan, FTDM_CHANNEL_INDICATE_FACILITY, &usrmsg);
/* FreeTDM will automatically free my_facility_ie */

View File

@ -29,36 +29,116 @@ then
exit 1
fi
arch=$(uname -m)
# defs
LIBSNG_ISDN_URL=ftp://ftp.sangoma.com/linux/libsng_isdn
LIBSNG_ISDN_NAME=libsng_isdn-7-current
LIBSNG_SS7_URL=ftp://ftp.sangoma.com/linux/libsng_ss7
LIBSNG_SS7_NAME=libsng_ss7-3-current
LIBSNG_ISDN_DIR="$LIBSNG_ISDN_NAME.$arch"
LIBSNG_SS7_DIR="$LIBSNG_SS7_NAME.$arch"
# download and decompress a tarball
# $1 = prefix_url, such as ftp://ftp.sangoma.com/foo/bar
# $2 = package name, such as libsng_isdn-7.0.0.x86_64
function download() {
wget $1/$2.tgz
if [ $? = 0 ]
then
tardir=$(tar -tf $2.tgz | head -n1 | sed 's,\/,,g')
tar -xvzf $2.tgz || echo "FAILED to decompress $2.tgz"
if [ "$tardir" != "$2" ]
then
mv $tardir $2 || echo "FAILED to move $tardir to $2"
fi
echo "SUCCESSFULLY downloaded $2"
else
echo "FAILED to download $1/$2.tgz"
fi
}
# download and build libsng-ss7
fullname="$LIBSNG_ISDN_NAME.$arch"
if [ -d $fullname ]
then
echo "skipping isdn download since $fullname directory already exists ... remove if you want this step to be performed"
else
download $LIBSNG_ISDN_URL $fullname
fi
cd $LIBSNG_ISDN_DIR
make DESTDIR=$INSTALLPREFIX install || echo "Failed to build libsng-isdn"
cd ..
# download and build libsng-ss7
fullname="$LIBSNG_SS7_NAME.$arch"
if [ -d $fullname ]
then
echo "skipping ss7 download since $fullname directory already exists ... remove if you want this step to be performed"
else
download $LIBSNG_SS7_URL $fullname
fi
cd $LIBSNG_SS7_DIR
make DESTDIR=$INSTALLPREFIX install || echo "Failed to build libsng-ss7"
cd ..
if [ ! -d $INSTALLPREFIX ]
then
mkdir -p $INSTALLPREFIX || exit 1
fi
make clean
make mod_freetdm-clean
if [ $NODOCS = "NO" ]
if [ ! -d $INSTALLPREFIX/bin-releases ]
then
make dox || exit 1
mkdir -p $INSTALLPREFIX/bin-releases || exit 1
fi
# attempt to compile freetdm
echo "Build freetdm and mod_freetdm now..."
make all mod_freetdm || exit 1
echo "freetdm built OK"
major=$(echo "$VERSION" | cut -d. -f1)
minor=$(echo "$VERSION" | cut -d. -f2)
micro=$(echo "$VERSION" | cut -d. -f3)
release="freetdm-$VERSION"
echo "Creating $release ($major.$minor.$micro) at $INSTALLPREFIX/$release (directory will be removed if exists already) ... press any key to continue"
read
# ABI compatibility check
if [ -x /usr/local/bin/ftdm_abi_check.py ]; then
/usr/local/bin/ftdm_abi_check.py --release_path=$(pwd) --archive_path=$INSTALLPREFIX/bin-releases --version=$VERSION
mkdir -p $INSTALLPREFIX/$release
if [ $? -ne 0 ]; then
echo "ABI compabitility test failed, not creating release. Either increment the major version number or fix the interface."
exit 1
fi
else
echo -ne "\n\nWARNING: /usr/local/bin/ftdm_abi_check.py not found, skipping ABI compatibility test\n\n"
fi
if [ $NODOCS = "NO" ]
then
make dox || exit 1
fi
echo "Creating $release ($major.$minor.$micro) at $INSTALLPREFIX/$release (directory will be removed if exists already) ... "
mkdir -p $INSTALLPREFIX/$release $INSTALLPREFIX/bin-releases/$major/$release
cp -r ./* $INSTALLPREFIX/bin-releases/$major/$release
cp -r ./.libs $INSTALLPREFIX/bin-releases/$major/$release
make clean
make mod_freetdm-clean
cp -r ./* $INSTALLPREFIX/$release
find $INSTALLPREFIX/ -name .libs -exec rm -rf {} \;
find $INSTALLPREFIX/ -name .deps -exec rm -rf {} \;
find $INSTALLPREFIX/ -name *.so -exec rm -rf {} \;
find $INSTALLPREFIX/ -name *.lo -exec rm -rf {} \;
# copy ABI compatibility reports to release
if [ -d compat_reports ]; then
mv ./compat_reports $INSTALLPREFIX/$release
fi
rm -rf $INSTALLPREFIX/$release/{$LIBSNG_ISDN_DIR,$LIBSNG_SS7_DIR,*.tgz}
rm -rf $INSTALLPREFIX/bin-releases/$major/$release/{$LIBSNG_ISDN_DIR,$LIBSNG_SS7_DIR,*.tgz}
tar -C $INSTALLPREFIX -czf $INSTALLPREFIX/$release.tar.gz $release/

View File

@ -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);
@ -1264,6 +1276,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
caller_data.ani.plan = (uint8_t)atoi(sipvar);
}
/* Used by ftmod_sangoma_ss7 only */
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-ANI-NADI");
if (sipvar) {
ftdm_usrmsg_add_var(&usrmsg, "ss7_clg_nadi", sipvar);
}
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-ANI2");
if (sipvar) {
ftdm_set_string(caller_data.aniII, sipvar);
@ -1284,29 +1302,91 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
caller_data.dnis.plan = (uint8_t)atoi(sipvar);
}
/* Used by ftmod_sangoma_ss7 only */
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-DNIS-NADI");
if (sipvar) {
ftdm_usrmsg_add_var(&usrmsg, "ss7_clg_nadi", sipvar);
}
sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-RDNIS");
if (sipvar) {
ftdm_set_string(caller_data.rdnis.digits, sipvar);
}
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);
}
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);
}
}
@ -1323,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;
}
@ -1380,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);
}
}
@ -1483,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;
@ -1545,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);
@ -1566,8 +1654,60 @@ 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);
@ -1579,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);
@ -2564,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");
@ -2578,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);
@ -3499,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"
@ -3519,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,
@ -3575,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"
@ -3595,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,
@ -3615,14 +3800,15 @@ void dump_chan_xml(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *
"--------------------------------------------------------------------------------\n" \
"ftdm list\n" \
"ftdm start|stop <span_name|span_id>\n" \
"ftdm restart <span_id|span_name> <chan_id>\n" \
"ftdm restart <span_id|span_name> [<chan_id>]\n" \
"ftdm dump <span_id|span_name> [<chan_id>]\n" \
"ftdm sigstatus get|set [<span_id|span_name>] [<channel>] [<sigstatus>]\n" \
"ftdm trace <path> <span_id|span_name> [<chan_id>]\n" \
"ftdm notrace <span_id|span_name> [<chan_id>]\n" \
"ftdm q931_pcap <span_id> on|off [pcapfilename without suffix]\n" \
"ftdm gains <txgain> <rxgain> <span_id> [<chan_id>]\n" \
"ftdm gains <rxgain> <txgain> <span_id> [<chan_id>]\n" \
"ftdm dtmf on|off <span_id> [<chan_id>]\n" \
"ftdm queuesize <rxsize> <txsize> <span_id> [<chan_id>]\n" \
"--------------------------------------------------------------------------------\n"
SWITCH_STANDARD_API(ft_function)
{
@ -3817,7 +4003,7 @@ SWITCH_STANDARD_API(ft_function)
"dial_regex: %s\n"
"fail_dial_regex: %s\n"
"hold_music: %s\n"
"analog_options %s\n",
"analog_options: %s\n",
j,
ftdm_span_get_name(SPAN_CONFIG[j].span),
SPAN_CONFIG[j].type,
@ -3843,7 +4029,7 @@ SWITCH_STANDARD_API(ft_function)
"dial_regex: %s\n"
"fail_dial_regex: %s\n"
"hold_music: %s\n"
"analog_options %s\n",
"analog_options: %s\n",
j,
ftdm_span_get_name(SPAN_CONFIG[j].span),
SPAN_CONFIG[j].type,
@ -4059,7 +4245,7 @@ SWITCH_STANDARD_API(ft_function)
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 4) {
stream->write_function(stream, "-ERR Usage: ft gains <txgain> <rxgain> <span_id> [<chan_id>]\n");
stream->write_function(stream, "-ERR Usage: ftdm gains <rxgain> <txgain> <span_id> [<chan_id>]\n");
goto end;
}
ftdm_span_find_by_name(argv[3], &span);
@ -4094,12 +4280,57 @@ SWITCH_STANDARD_API(ft_function)
}
}
stream->write_function(stream, "+OK gains set to Rx %f and Tx %f\n", rxgain, txgain);
} else if (!strcasecmp(argv[0], "restart")) {
} else if (!strcasecmp(argv[0], "queuesize")) {
unsigned int i = 0;
uint32_t rxsize = 10;
uint32_t txsize = 10;
uint32_t chan_id = 0;
uint32_t ccount = 0;
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 3) {
stream->write_function(stream, "-ERR Usage: ftdm restart <span_id> <chan_id>\n");
if (argc < 4) {
stream->write_function(stream, "-ERR Usage: ftdm queuesize <rxsize> <txsize> <span_id> [<chan_id>]\n");
goto end;
}
ftdm_span_find_by_name(argv[3], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
goto end;
}
if (argc > 4) {
chan_id = atoi(argv[4]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
goto end;
}
}
i = sscanf(argv[1], "%u", &rxsize);
i += sscanf(argv[2], "%u", &txsize);
if (i != 2) {
stream->write_function(stream, "-ERR invalid queue sizes provided\n");
goto end;
}
if (chan_id) {
chan = ftdm_span_get_channel(span, chan_id);
ftdm_channel_command(chan, FTDM_COMMAND_SET_RX_QUEUE_SIZE, &rxsize);
ftdm_channel_command(chan, FTDM_COMMAND_SET_TX_QUEUE_SIZE, &txsize);
} else {
ccount = ftdm_span_get_chan_count(span);
for (i = 1; i < ccount; i++) {
chan = ftdm_span_get_channel(span, i);
ftdm_channel_command(chan, FTDM_COMMAND_SET_RX_QUEUE_SIZE, &rxsize);
ftdm_channel_command(chan, FTDM_COMMAND_SET_TX_QUEUE_SIZE, &txsize);
}
}
stream->write_function(stream, "+OK queue sizes set to Rx %d and Tx %d\n", rxsize, txsize);
} else if (!strcasecmp(argv[0], "restart")) {
uint32_t chan_id = 0;
uint32_t ccount = 0;
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 2) {
stream->write_function(stream, "-ERR Usage: ftdm restart <span_id> [<chan_id>]\n");
goto end;
}
ftdm_span_find_by_name(argv[1], &span);
@ -4107,15 +4338,32 @@ SWITCH_STANDARD_API(ft_function)
stream->write_function(stream, "-ERR invalid span\n");
goto end;
}
chan_id = atoi(argv[2]);
chan = ftdm_span_get_channel(span, chan_id);
if (!chan) {
stream->write_function(stream, "-ERR Could not find chan\n");
goto end;
if (argc > 2) {
chan_id = atoi(argv[2]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
goto end;
}
}
stream->write_function(stream, "Resetting channel %s:%s\n", argv[2], argv[3]);
ftdm_channel_reset(chan);
if (chan_id) {
chan = ftdm_span_get_channel(span, chan_id);
if (!chan) {
stream->write_function(stream, "-ERR Could not find chan\n");
goto end;
}
stream->write_function(stream, "Resetting channel %s:%s\n", argv[1], argv[2]);
ftdm_channel_reset(chan);
} else {
uint32_t i = 0;
ccount = ftdm_span_get_chan_count(span);
for (i = 1; i < ccount; i++) {
chan = ftdm_span_get_channel(span, i);
stream->write_function(stream, "Resetting channel %s:%d\n", argv[1], i);
ftdm_channel_reset(chan);
}
}
} else {
char *rply = ftdm_api_execute(cmd);
@ -4235,7 +4483,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load)
SWITCH_ADD_API(commands_api_interface, "ftdm", "FreeTDM commands", ft_function, FT_SYNTAX);
switch_console_set_complete("add ftdm start");
switch_console_set_complete("add ftdm stop");
switch_console_set_complete("add ftdm retart");
switch_console_set_complete("add ftdm restart");
switch_console_set_complete("add ftdm dump");
switch_console_set_complete("add ftdm sigstatus get");
switch_console_set_complete("add ftdm sigstatus set");
@ -4243,6 +4491,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load)
switch_console_set_complete("add ftdm notrace");
switch_console_set_complete("add ftdm q931_pcap");
switch_console_set_complete("add ftdm gains");
switch_console_set_complete("add ftdm queuesize");
switch_console_set_complete("add ftdm dtmf on");
switch_console_set_complete("add ftdm dtmf off");
switch_console_set_complete("add ftdm core state");

View File

@ -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;

View File

@ -244,6 +244,7 @@ static struct {
ftdm_caller_data_t *call_ids[MAX_CALLIDS+1];
ftdm_mutex_t *call_id_mutex;
uint32_t last_call_id;
char dtmfdebug_directory[1024];
} globals;
enum ftdm_enum_cpu_alarm_action_flags
@ -309,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) {
@ -349,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;
@ -359,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);
@ -410,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);
}
@ -507,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;
}
@ -2310,7 +2295,9 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_indicate(const char *file, const ch
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_IND_ACK_PENDING);
}
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OUTBOUND)) {
if (indication != FTDM_CHANNEL_INDICATE_FACILITY &&
ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OUTBOUND)) {
ftdm_log_chan_ex(ftdmchan, file, func, line, FTDM_LOG_LEVEL_WARNING, "Cannot indicate %s in outgoing channel in state %s\n",
ftdm_channel_indication2str(indication), ftdm_channel_state2str(ftdmchan->state));
status = FTDM_EINVAL;
@ -2525,20 +2512,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_set_sig_status(ftdm_channel_t *fchan, ftd
ftdm_channel_lock(fchan);
if (ftdm_test_flag(fchan, FTDM_CHANNEL_IN_ALARM)) {
ftdm_log_chan_msg(fchan, FTDM_LOG_WARNING, "You can not set the signaling status of an alarmed channel\n");
res = FTDM_EINVAL;
goto done;
}
if (sigstatus == FTDM_SIG_STATE_DOWN) {
ftdm_log_chan_msg(fchan, FTDM_LOG_WARNING, "You can not set the signaling status to DOWN, valid states are UP or SUSPENDED\n");
res = FTDM_EINVAL;
goto done;
}
res = fchan->span->set_channel_sig_status(fchan, sigstatus);
done:
ftdm_channel_unlock(fchan);
@ -2638,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;
@ -3469,7 +3444,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
if (!ftdmchan->dtmfdbg.file) {
struct tm currtime;
time_t currsec;
char dfile[512];
char dfile[1024];
currsec = time(NULL);
@ -3480,10 +3455,18 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
localtime_r(&currsec, &currtime);
#endif
snprintf(dfile, sizeof(dfile), "dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s",
ftdmchan->span_id, ftdmchan->chan_id,
currtime.tm_year-100, currtime.tm_mon+1, currtime.tm_mday,
currtime.tm_hour, currtime.tm_min, currtime.tm_sec, ftdmchan->native_codec == FTDM_CODEC_ULAW ? "ulaw" : ftdmchan->native_codec == FTDM_CODEC_ALAW ? "alaw" : "sln");
if (ftdm_strlen_zero(globals.dtmfdebug_directory)) {
snprintf(dfile, sizeof(dfile), "dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s",
ftdmchan->span_id, ftdmchan->chan_id,
currtime.tm_year-100, currtime.tm_mon+1, currtime.tm_mday,
currtime.tm_hour, currtime.tm_min, currtime.tm_sec, ftdmchan->native_codec == FTDM_CODEC_ULAW ? "ulaw" : ftdmchan->native_codec == FTDM_CODEC_ALAW ? "alaw" : "sln");
} else {
snprintf(dfile, sizeof(dfile), "%s/dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s",
globals.dtmfdebug_directory,
ftdmchan->span_id, ftdmchan->chan_id,
currtime.tm_year-100, currtime.tm_mon+1, currtime.tm_mday,
currtime.tm_hour, currtime.tm_min, currtime.tm_sec, ftdmchan->native_codec == FTDM_CODEC_ULAW ? "ulaw" : ftdmchan->native_codec == FTDM_CODEC_ALAW ? "alaw" : "sln");
}
ftdmchan->dtmfdbg.file = fopen(dfile, "wb");
if (!ftdmchan->dtmfdbg.file) {
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "failed to open debug dtmf file %s\n", dfile);
@ -3565,6 +3548,16 @@ static FIO_WRITE_FUNCTION(ftdm_raw_write)
static FIO_READ_FUNCTION(ftdm_raw_read)
{
ftdm_status_t status = ftdmchan->fio->read(ftdmchan, data, datalen);
if (status == FTDM_SUCCESS && ftdm_test_flag(ftdmchan, FTDM_CHANNEL_USE_RX_GAIN)
&& (ftdmchan->native_codec == FTDM_CODEC_ALAW || ftdmchan->native_codec == FTDM_CODEC_ULAW)) {
ftdm_size_t i = 0;
unsigned char *rdata = data;
for (i = 0; i < *datalen; i++) {
rdata[i] = ftdmchan->rxgain_table[rdata[i]];
}
}
if (status == FTDM_SUCCESS && ftdmchan->fds[FTDM_READ_TRACE_INDEX] > -1) {
ftdm_size_t dlen = *datalen;
if ((ftdm_size_t)write(ftdmchan->fds[FTDM_READ_TRACE_INDEX], data, (int)dlen) != dlen) {
@ -3732,7 +3725,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
ftdm_status_t status = FTDM_FAIL;
fio_codec_t codec_func = NULL;
ftdm_size_t max = *datalen;
unsigned i = 0;
ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, "ftdmchan is null\n");
ftdm_assert_return(ftdmchan->fio != NULL, FTDM_FAIL, "No I/O module attached to ftdmchan\n");
@ -3771,15 +3763,12 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
goto done;
}
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_USE_RX_GAIN)
&& (ftdmchan->native_codec == FTDM_CODEC_ALAW || ftdmchan->native_codec == FTDM_CODEC_ULAW)) {
unsigned char *rdata = data;
for (i = 0; i < *datalen; i++) {
rdata[i] = ftdmchan->rxgain_table[rdata[i]];
}
}
handle_tone_generation(ftdmchan);
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_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) {
@ -4697,6 +4692,9 @@ static ftdm_status_t load_config(void)
globals.cpu_monitor.alarm_action_flags |= FTDM_CPU_ALARM_ACTION_WARN;
}
}
} else if (!strncasecmp(var, "debugdtmf_directory", sizeof("debugdtmf_directory")-1)) {
ftdm_set_string(globals.dtmfdebug_directory, val);
ftdm_log(FTDM_LOG_DEBUG, "Debug DTMF directory set to '%s'\n", globals.dtmfdebug_directory);
} else if (!strncasecmp(var, "cpu_monitoring_interval", sizeof("cpu_monitoring_interval")-1)) {
if (atoi(val) > 0) {
globals.cpu_monitor.interval = atoi(val);
@ -5371,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;
@ -6057,9 +6057,12 @@ FT_DECLARE(ftdm_status_t) ftdm_sigmsg_get_raw_data_detached(ftdm_sigmsg_t *sigms
if (!sigmsg || !sigmsg->raw.len) {
return FTDM_FAIL;
}
*data = sigmsg->raw.data;
*datalen = sigmsg->raw.len;
*datalen = sigmsg->raw.len;
sigmsg->raw.data = NULL;
sigmsg->raw.len = 0;
return FTDM_SUCCESS;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
@ -943,12 +979,12 @@ static int on_proceeding(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_
if (chan) {
/* Open channel if inband information is available */
if ((pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) && !ftdm_test_flag(chan, FTDM_CHANNEL_OPEN)) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, opening B-Channel %d:%d\n",
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, B-Channel %d:%d\n",
ftdm_channel_get_span_id(chan),
ftdm_channel_get_id(chan));
if (ftdm_channel_open_chan(chan) != FTDM_SUCCESS) {
if (!ftdm_test_flag(chan, FTDM_CHANNEL_OPEN) && (ftdm_channel_open_chan(chan) != FTDM_SUCCESS)) {
ftdm_caller_data_t *caller_data = ftdm_channel_get_caller_data(chan);
ftdm_log(FTDM_LOG_ERROR, "-- Error opening channel %d:%d\n",
@ -985,12 +1021,12 @@ static int on_progress(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_ev
if (chan) {
/* Open channel if inband information is available */
if ((pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) && !ftdm_test_flag(chan, FTDM_CHANNEL_OPEN)) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, opening B-Channel %d:%d\n",
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, B-Channel %d:%d\n",
ftdm_channel_get_span_id(chan),
ftdm_channel_get_id(chan));
if (ftdm_channel_open_chan(chan) != FTDM_SUCCESS) {
if (!ftdm_test_flag(chan, FTDM_CHANNEL_OPEN) && (ftdm_channel_open_chan(chan) != FTDM_SUCCESS)) {
ftdm_caller_data_t *caller_data = ftdm_channel_get_caller_data(chan);
ftdm_log(FTDM_LOG_ERROR, "-- Error opening channel %d:%d\n",
@ -1028,8 +1064,6 @@ static int on_ringing(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_eve
ftdm_channel_t *chan = ftdm_span_get_channel(span, pevent->ringing.channel);
if (chan) {
ftdm_log(FTDM_LOG_DEBUG, "-- Ringing on channel %d:%d\n", ftdm_span_get_id(span), pevent->ringing.channel);
/* we may get on_ringing even when we're already in FTDM_CHANNEL_STATE_PROGRESS_MEDIA */
// if (ftdm_channel_get_state(chan) == FTDM_CHANNEL_STATE_PROGRESS_MEDIA) {
// /* dont try to move to STATE_PROGRESS to avoid annoying veto warning */
@ -1037,12 +1071,12 @@ static int on_ringing(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_eve
// }
/* Open channel if inband information is available */
if ((pevent->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE) && !ftdm_test_flag(chan, FTDM_CHANNEL_OPEN)) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, opening B-Channel %d:%d\n",
if ((pevent->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, B-Channel %d:%d\n",
ftdm_channel_get_span_id(chan),
ftdm_channel_get_id(chan));
if (ftdm_channel_open_chan(chan) != FTDM_SUCCESS) {
if (!ftdm_test_flag(chan, FTDM_CHANNEL_OPEN) && (ftdm_channel_open_chan(chan) != FTDM_SUCCESS)) {
ftdm_caller_data_t *caller_data = ftdm_channel_get_caller_data(chan);
ftdm_log(FTDM_LOG_ERROR, "-- Error opening channel %d:%d\n",
@ -1053,9 +1087,13 @@ static int on_ringing(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_eve
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_TERMINATING);
goto out;
}
ftdm_log(FTDM_LOG_DEBUG, "-- Ringing on channel %d:%d with media\n", ftdm_span_get_id(span), pevent->proceeding.channel);
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
} else {
// ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_PROGRESS);
ftdm_log(FTDM_LOG_DEBUG, "-- Ringing on channel %d:%d\n", ftdm_span_get_id(span), pevent->proceeding.channel);
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_RINGING);
}
// ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_PROGRESS);
ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_RINGING);
} else {
ftdm_log(FTDM_LOG_DEBUG, "-- Ringing on channel %d:%d but it's not in the span?\n",
ftdm_span_get_id(span), pevent->ringing.channel);
@ -1652,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);
@ -1926,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:
@ -1936,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));

View File

@ -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)
@ -520,6 +524,28 @@ static FIO_CHANNEL_SET_SIG_STATUS_FUNCTION(ftdm_r2_set_channel_sig_status)
openr2_chan_t *r2chan = R2CALL(ftdmchan)->r2chan;
openr2_cas_signal_t rxcas, txcas;
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_IN_ALARM)) {
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG,
"Received request to change sig status of alarmed channel to %s", ftdm_signaling_status2str(status));
switch (status) {
case FTDM_SIG_STATE_SUSPENDED:
openr2_chan_set_blocked(r2chan);
/* Need to send sig status change to SUSPENDED once out of alarm */
R2CALL(ftdmchan)->localsuspend_on_alarm = 1;
break;
case FTDM_SIG_STATE_UP:
openr2_chan_set_blocked(r2chan);
/* DO NOT send sig status change to SUSPENDED once out of alarm */
R2CALL(ftdmchan)->localsuspend_on_alarm = 0;
break;
default:
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Cannot set signaling status to unknown value '%d'\n", status);
return FTDM_FAIL;
}
return FTDM_SUCCESS;
}
/* get the current rx and tx cas bits */
openr2_chan_get_cas(r2chan, &rxcas, &txcas);
@ -1675,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 */
@ -1832,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);

View File

@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;C:\Program Files\sangoma\sng_isdn\include&quot;;../../include;&quot;C:\Program Files\Sangoma\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"

View File

@ -134,7 +134,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -157,7 +157,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>

View File

@ -996,11 +996,15 @@ static ftdm_status_t ftdm_sangoma_isdn_start(ftdm_span_t *span)
ftdm_clear_flag(span, FTDM_SPAN_STOP_THREAD);
ftdm_clear_flag(span, FTDM_SPAN_IN_THREAD);
if (signal_data->raw_trace_q921 == SNGISDN_OPT_TRUE) {
if (signal_data->trace_q921 == SNGISDN_OPT_TRUE ||
signal_data->raw_trace_q921 == SNGISDN_OPT_TRUE) {
sngisdn_activate_trace(span, SNGISDN_TRACE_Q921);
}
if (signal_data->raw_trace_q931 == SNGISDN_OPT_TRUE) {
if (signal_data->trace_q931 == SNGISDN_OPT_TRUE ||
signal_data->raw_trace_q931 == SNGISDN_OPT_TRUE) {
sngisdn_activate_trace(span, SNGISDN_TRACE_Q931);
}
@ -1195,9 +1199,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;
@ -1219,7 +1231,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;
}
@ -1228,34 +1240,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")) {
@ -1264,20 +1282,39 @@ 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;
}
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;
}

View File

@ -213,6 +213,8 @@ typedef struct sngisdn_span_data {
int8_t facility_timeout;
uint8_t num_local_numbers;
uint8_t ignore_cause_value;
uint8_t trace_q931; /* TODO: combine with trace_flags */
uint8_t trace_q921; /* TODO: combine with trace_flags */
uint8_t raw_trace_q931; /* TODO: combine with trace_flags */
uint8_t raw_trace_q921; /* TODO: combine with trace_flags */
uint8_t timer_t3;
@ -290,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)
@ -469,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__ */

View File

@ -333,7 +333,8 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
parse_yesno(var, val, &signal_data->setup_arb);
} else if (!strcasecmp(var, "facility")) {
parse_yesno(var, val, &signal_data->facility);
} else if (!strcasecmp(var, "min_digits")) {
} else if (!strcasecmp(var, "min-digits") ||
!strcasecmp(var, "min_digits")) {
signal_data->min_digits = atoi(val);
} else if (!strcasecmp(var, "outbound-called-ton")) {
ftdm_set_ton(val, &span->default_caller_data.dnis.type);
@ -347,11 +348,11 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
ftdm_set_ton(val, &span->default_caller_data.rdnis.type);
} else if (!strcasecmp(var, "outbound-rdnis-npi")) {
ftdm_set_npi(val, &span->default_caller_data.rdnis.plan);
} else if (!strcasecmp(var, "outbound-bearer_cap") ||
!strcasecmp(var, "outbound-bc-transfer-cap")) {
} else if (!strcasecmp(var, "outbound-bc-transfer-cap") ||
!strcasecmp(var, "outbound-bearer_cap")) {
ftdm_set_bearer_capability(val, (uint8_t*)&span->default_caller_data.bearer_capability);
} else if (!strcasecmp(var, "outbound-bearer_layer1") ||
!strcasecmp(var, "outbound-bc-user-layer1")) {
} else if (!strcasecmp(var, "outbound-bc-user-layer1") ||
!strcasecmp(var, "outbound-bearer_layer1")) {
ftdm_set_bearer_layer1(val, (uint8_t*)&span->default_caller_data.bearer_layer1);
} else if (!strcasecmp(var, "channel-restart-on-link-up")) {
parse_yesno(var, val, &signal_data->restart_opt);
@ -368,6 +369,10 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
parse_yesno(var, val, &signal_data->facility_ie_decode);
} else if (!strcasecmp(var, "ignore-cause-value")) {
parse_yesno(var, val, &signal_data->ignore_cause_value);
} else if (!strcasecmp(var, "q931-trace")) {
parse_yesno(var, val, &signal_data->trace_q931);
} else if (!strcasecmp(var, "q921-trace")) {
parse_yesno(var, val, &signal_data->trace_q921);
} else if (!strcasecmp(var, "q931-raw-trace")) {
parse_yesno(var, val, &signal_data->raw_trace_q931);
} else if (!strcasecmp(var, "q921-raw-trace")) {

View File

@ -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;

View File

@ -662,7 +662,7 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
}
break;
case FTDM_CHANNEL_STATE_RESET:
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Processing SETUP but channel in RESET state, ignoring\n");
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Processing RELEASE but channel in RESET state, ignoring\n");
break;
default:
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Received RELEASE in an invalid state (%s)\n",
@ -807,17 +807,10 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
if (signal_data->facility_ie_decode == SNGISDN_OPT_FALSE) {
/* If Facility decoding is disabled, we do not care about current call state, just pass event up to user */
ftdm_sigmsg_t sigev;
if (facEvnt->facElmt.facStr.pres) {
get_facility_ie_str(ftdmchan, &facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len-2);
sngisdn_send_signal(sngisdn_info, FTDM_SIGEVENT_FACILITY);
}
memset(&sigev, 0, sizeof(sigev));
sigev.chan_id = ftdmchan->chan_id;
sigev.span_id = ftdmchan->span_id;
sigev.channel = ftdmchan;
sigev.event_id = FTDM_SIGEVENT_FACILITY;
ftdm_span_send_signal(ftdmchan->span, &sigev);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
@ -838,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 */

View File

@ -60,7 +60,7 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
}
ftdm_log_chan(sngisdn_info->ftdmchan, FTDM_LOG_INFO, "Outgoing call: Called No:[%s] Calling No:[%s]\n", ftdmchan->caller_data.dnis.digits, ftdmchan->caller_data.cid_num.digits);
set_chan_id_ie(ftdmchan, &conEvnt.chanId);
set_chan_id_ie(ftdmchan, &conEvnt.chanId);
set_bear_cap_ie(ftdmchan, &conEvnt.bearCap[0]);
set_called_num(ftdmchan, &conEvnt.cdPtyNmb);
set_calling_num(ftdmchan, &conEvnt.cgPtyNmb);
@ -125,8 +125,11 @@ void sngisdn_snd_con_complete(ftdm_channel_t *ftdmchan)
}
memset(&cnStEvnt, 0, sizeof(cnStEvnt));
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
/* Indicate channel ID only in first response */
if (!ftdm_test_flag(sngisdn_info, FLAG_SENT_CHAN_ID)) {
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
}
ftdm_log_chan(ftdmchan, FTDM_LOG_INFO, "Sending CONNECT COMPL (suId:%d suInstId:%u spInstId:%u dchan:%d ces:%d)\n", signal_data->cc_id, sngisdn_info->suInstId, sngisdn_info->spInstId, signal_data->dchan_id, sngisdn_info->ces);
@ -152,7 +155,10 @@ void sngisdn_snd_proceed(ftdm_channel_t *ftdmchan, ftdm_sngisdn_progind_t prog_i
memset(&cnStEvnt, 0, sizeof(cnStEvnt));
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
/* Indicate channel ID only in first response */
if (!ftdm_test_flag(sngisdn_info, FLAG_SENT_CHAN_ID)) {
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
}
set_prog_ind_ie(ftdmchan, &cnStEvnt.progInd, prog_ind);
set_facility_ie(ftdmchan, &cnStEvnt.facilityStr);
@ -238,7 +244,10 @@ void sngisdn_snd_connect(ftdm_channel_t *ftdmchan)
memset(&cnStEvnt, 0, sizeof(cnStEvnt));
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
/* Indicate channel ID only in first response */
if (!ftdm_test_flag(sngisdn_info, FLAG_SENT_CHAN_ID)) {
set_chan_id_ie(ftdmchan, &cnStEvnt.chanId);
}
set_prog_ind_ie(ftdmchan, &cnStEvnt.progInd, prog_ind);
set_facility_ie(ftdmchan, &cnStEvnt.facilityStr);

View File

@ -677,20 +677,20 @@ void sngisdn_rcv_q921_ind(BdMngmt *status)
}
switch (status->t.usta.alarm.category) {
case (LCM_CATEGORY_INTERFACE):
ftdm_log(FTDM_LOG_INFO, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LCM_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LCM_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
case (LCM_CATEGORY_PROTOCOL):
ftdm_log(FTDM_LOG_DEBUG, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LLD_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LLD_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
break;
default:
ftdm_log(FTDM_LOG_INFO, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LLD_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LLD_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LLD_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LLD_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
switch (status->t.usta.alarm.event) {
case ENTR_CONG: /* Entering Congestion */
ftdm_log(FTDM_LOG_WARNING, "s%d: Entering Congestion\n", ftdmspan->span_id);
@ -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;

View File

@ -43,11 +43,55 @@ 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)
{
uint32_t cc_id = ((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->cc_id;
@ -259,11 +303,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 +327,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) {
@ -370,7 +414,7 @@ ftdm_status_t get_facility_ie_str(ftdm_channel_t *ftdmchan, uint8_t *data, uint8
my_data[1] = data_len;
memcpy(&my_data[2], data, data_len);
sngisdn_add_raw_data((sngisdn_chan_data_t*)ftdmchan->call_data, data, data_len+2);
sngisdn_add_raw_data((sngisdn_chan_data_t*)ftdmchan->call_data, my_data, data_len+2);
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Raw Facility IE copied available\n");
} else {
@ -382,11 +426,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 +510,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 +548,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 +565,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 +580,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 +595,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 +615,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 +643,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 +766,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 +777,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) {
@ -830,10 +853,6 @@ ftdm_status_t set_chan_id_ie(ftdm_channel_t *ftdmchan, ChanId *chanId)
return FTDM_SUCCESS;
}
if (ftdm_test_flag(sngisdn_info, FLAG_SENT_CHAN_ID)) {
/* Indicate channel ID only in first response */
return FTDM_SUCCESS;
}
ftdm_set_flag(sngisdn_info, FLAG_SENT_CHAN_ID);
chanId->eh.pres = PRSNT_NODEF;
@ -1073,18 +1092,20 @@ void get_memory_info(void)
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;
}
@ -1100,7 +1121,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;
}
@ -1109,9 +1131,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:
@ -1135,7 +1157,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;
@ -1173,11 +1195,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;
@ -1192,18 +1214,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)

View File

@ -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);
}

View File

@ -207,9 +207,10 @@ int ft_to_sngss7_cfg_all(void)
/* go through all the relays channels and configure it */
x = 1;
while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) {
while (x < (MAX_RELAY_CHANNELS)) {
/* check if this relay channel has been configured already */
if (!(g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.relay[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED))) {
/* send the specific configuration */
if (ftmod_ss7_relay_chan_config(x)) {
@ -223,13 +224,13 @@ int ft_to_sngss7_cfg_all(void)
g_ftdm_sngss7_data.cfg.relay[x].flags |= SNGSS7_CONFIGURED;
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.relay[x].id != 0) */
} /* while (x < (MAX_RELAY_CHANNELS)) */
x = 1;
while (x < (MAX_MTP_LINKS + 1)) {
while (x < (MAX_MTP_LINKS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.mtp1Link[x].flags & SNGSS7_CONFIGURED) &&
(g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0)) {
if ((g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtp1Link[x].flags & SNGSS7_CONFIGURED))) {
/* configure mtp1 */
if (ftmod_ss7_mtp1_psap_config(x)) {
@ -243,13 +244,13 @@ int ft_to_sngss7_cfg_all(void)
g_ftdm_sngss7_data.cfg.mtp1Link[x].flags |= SNGSS7_CONFIGURED;
}
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtp1Link[x].id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
x = 1;
while (x < (MAX_MTP_LINKS + 1)) {
while (x < (MAX_MTP_LINKS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.mtp2Link[x].flags & SNGSS7_CONFIGURED) &&
(g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0)) {
if ((g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtp2Link[x].flags & SNGSS7_CONFIGURED))) {
/* configure mtp2 */
if (ftmod_ss7_mtp2_dlsap_config(x)) {
@ -263,13 +264,13 @@ int ft_to_sngss7_cfg_all(void)
g_ftdm_sngss7_data.cfg.mtp2Link[x].flags |= SNGSS7_CONFIGURED;
}
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
x = 1;
while (x < (MAX_MTP_LINKS + 1)) {
while (x < (MAX_MTP_LINKS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.mtp3Link[x].flags & SNGSS7_CONFIGURED) &&
(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0)) {
if ((g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtp3Link[x].flags & SNGSS7_CONFIGURED))) {
/* configure mtp3 */
if (ftmod_ss7_mtp3_dlsap_config(x)) {
@ -284,12 +285,13 @@ int ft_to_sngss7_cfg_all(void)
}
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
x = 1;
while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) {
while (x < (MAX_NSAPS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.nsap[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_CONFIGURED))) {
ret = ftmod_ss7_mtp3_nsap_config(x);
if (ret) {
@ -312,12 +314,13 @@ int ft_to_sngss7_cfg_all(void)
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) */
} /* while (x < (MAX_NSAPS)) */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
while (x < (MAX_MTP_LINKSETS+1)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_CONFIGURED))) {
if (ftmod_ss7_mtp3_linkset_config(x)) {
SS7_CRITICAL("MTP3 LINKSET %d configuration FAILED!\n", x);
@ -331,12 +334,13 @@ int ft_to_sngss7_cfg_all(void)
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) */
} /* while (x < (MAX_MTP_LINKSETS+1)) */
x = 1;
while ((g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0)) {
while (x < (MAX_MTP_ROUTES+1)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.mtpRoute[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtpRoute[x].flags & SNGSS7_CONFIGURED))) {
if (ftmod_ss7_mtp3_route_config(x)) {
SS7_CRITICAL("MTP3 ROUTE %d configuration FAILED!\n", x);
@ -350,12 +354,13 @@ int ft_to_sngss7_cfg_all(void)
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0) */
} /* while (x < (MAX_MTP_ROUTES+1)) */
x = 1;
while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
while (x < (MAX_ISAPS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.isap[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_CONFIGURED))) {
if (ftmod_ss7_isup_isap_config(x)) {
SS7_CRITICAL("ISUP ISAP %d configuration FAILED!\n", x);
@ -369,13 +374,14 @@ int ft_to_sngss7_cfg_all(void)
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) */
} /* while (x < (MAX_ISAPS)) */
if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_ISUP)) {
x = 1;
while (g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) {
while (x < (MAX_ISUP_INFS)) {
/* check if this link has been configured already */
if (!(g_ftdm_sngss7_data.cfg.isupIntf[x].flags & SNGSS7_CONFIGURED)) {
if ((g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.isupIntf[x].flags & SNGSS7_CONFIGURED))) {
if (ftmod_ss7_isup_intf_config(x)) {
SS7_CRITICAL("ISUP INTF %d configuration FAILED!\n", x);
@ -391,12 +397,14 @@ int ft_to_sngss7_cfg_all(void)
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) */
} /* while (x < (MAX_ISUP_INFS)) */
} /* if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_ISUP)) */
x = (g_ftdm_sngss7_data.cfg.procId * 1000) + 1;
while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) {
/* check if this link has been configured already */
if ((g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.isupCkt[x].flags & SNGSS7_CONFIGURED))) {
if (ftmod_ss7_isup_ckt_config(x)) {
SS7_CRITICAL("ISUP CKT %d configuration FAILED!\n", x);
@ -405,10 +413,9 @@ int ft_to_sngss7_cfg_all(void)
SS7_INFO("ISUP CKT %d configuration DONE!\n", x);
}
} /* if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) */
/* set the SNGSS7_CONFIGURED flag */
g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= SNGSS7_CONFIGURED;
/* set the SNGSS7_CONFIGURED flag */
g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= SNGSS7_CONFIGURED;
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) */

View File

@ -724,6 +724,9 @@ static ftdm_status_t handle_print_usuage(ftdm_stream_handle_t *stream)
stream->write_function(stream, "ftdm ss7 lpo link X\n");
stream->write_function(stream, "ftdm ss7 lpr link X\n");
stream->write_function(stream, "\n");
stream->write_function(stream, "Ftmod_sangoma_ss7 Relay status:\n");
stream->write_function(stream, "ftdm ss7 show status relay X\n");
stream->write_function(stream, "\n");
return FTDM_SUCCESS;
}
@ -967,12 +970,14 @@ static ftdm_status_t handle_show_inreset(ftdm_stream_handle_t *stream, int span,
/******************************************************************************/
static ftdm_status_t handle_show_flags(ftdm_stream_handle_t *stream, int span, int chan, int verbose)
{
int x;
int bit;
sngss7_chan_data_t *ss7_info;
ftdm_channel_t *ftdmchan;
int lspan;
int lchan;
sngss7_chan_data_t *ss7_info;
ftdm_channel_t *ftdmchan;
int x;
int bit;
int lspan;
int lchan;
const char *text;
int flag;
x = (g_ftdm_sngss7_data.cfg.procId * 1000) + 1;
while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
@ -1001,11 +1006,20 @@ static ftdm_status_t handle_show_flags(ftdm_stream_handle_t *stream, int span, i
ss7_info->circuit->cic);
for (bit = 0; bit < 33; bit++) {
stream->write_function(stream, "|");
if (ss7_info->ckt_flags & ( 0x1 << bit)) {
stream->write_function(stream, "%2d=1", bit);
} else {
stream->write_function(stream, "%2d=0", bit);
stream->write_function(stream, "|");
flag = bit;
text = ftmod_ss7_ckt_flag2str(flag);
stream->write_function(stream, "%s",text);
}
}
for (bit = 0; bit < 33; bit++) {
if (ss7_info->blk_flags & ( 0x1 << bit)) {
stream->write_function(stream, "|");
flag = bit;
text = ftmod_ss7_blk_flag2str(flag);
stream->write_function(stream, "%s",text);
}
}
@ -1170,7 +1184,8 @@ static ftdm_status_t handle_show_status(ftdm_stream_handle_t *stream, int span,
ftdm_channel_state2str(ftdmchan->state));
if ((sngss7_test_ckt_blk_flag(ss7_info, FLAG_CKT_MN_BLOCK_TX)) ||
(sngss7_test_ckt_blk_flag(ss7_info, FLAG_GRP_MN_BLOCK_TX))) {
(sngss7_test_ckt_blk_flag(ss7_info, FLAG_GRP_MN_BLOCK_TX)) ||
(sngss7_test_ckt_blk_flag(ss7_info, FLAG_CKT_LC_BLOCK_RX))) {
stream->write_function(stream, "l_mn=Y|");
}else {
stream->write_function(stream, "l_mn=N|");
@ -1195,8 +1210,8 @@ static ftdm_status_t handle_show_status(ftdm_stream_handle_t *stream, int span,
stream->write_function(stream, "r_hw=N|");
}
if (sngss7_test_ckt_flag(ss7_info, FLAG_RELAY_DOWN)) {
stream->write_function(stream, "relay=Y");
if (sngss7_test_ckt_blk_flag(ss7_info, FLAG_RELAY_DOWN)) {
stream->write_function(stream, "relay=Y|");
}else {
stream->write_function(stream, "relay=N");
}
@ -1354,7 +1369,7 @@ static ftdm_status_t handle_status_mtp3link(ftdm_stream_handle_t *stream, char *
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the status request */
@ -1380,7 +1395,7 @@ static ftdm_status_t handle_status_mtp3link(ftdm_stream_handle_t *stream, char *
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
@ -1396,7 +1411,7 @@ static ftdm_status_t handle_status_mtp2link(ftdm_stream_handle_t *stream, char *
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp2Link[x].name, name)) {
/* send the status request */
@ -1424,7 +1439,7 @@ static ftdm_status_t handle_status_mtp2link(ftdm_stream_handle_t *stream, char *
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
@ -1440,7 +1455,7 @@ static ftdm_status_t handle_status_linkset(ftdm_stream_handle_t *stream, char *n
/* find the linkset request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
while(x < (MAX_MTP_LINKSETS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
/* send the status request */
@ -1475,7 +1490,7 @@ static ftdm_status_t handle_set_inhibit(ftdm_stream_handle_t *stream, char *name
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the inhibit request */
@ -1492,7 +1507,7 @@ static ftdm_status_t handle_set_inhibit(ftdm_stream_handle_t *stream, char *name
/* move to the next linkset */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
@ -1507,7 +1522,7 @@ static ftdm_status_t handle_set_uninhibit(ftdm_stream_handle_t *stream, char *na
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -1524,7 +1539,7 @@ static ftdm_status_t handle_set_uninhibit(ftdm_stream_handle_t *stream, char *na
/* move to the next linkset */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
@ -1879,7 +1894,7 @@ static ftdm_status_t handle_bind_link(ftdm_stream_handle_t *stream, char *name)
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -1895,7 +1910,7 @@ static ftdm_status_t handle_bind_link(ftdm_stream_handle_t *stream, char *name)
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -1910,7 +1925,7 @@ static ftdm_status_t handle_unbind_link(ftdm_stream_handle_t *stream, char *name
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -1926,7 +1941,7 @@ static ftdm_status_t handle_unbind_link(ftdm_stream_handle_t *stream, char *name
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -1941,7 +1956,7 @@ static ftdm_status_t handle_activate_link(ftdm_stream_handle_t *stream, char *na
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -1957,7 +1972,7 @@ static ftdm_status_t handle_activate_link(ftdm_stream_handle_t *stream, char *na
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -1972,7 +1987,7 @@ static ftdm_status_t handle_deactivate_link(ftdm_stream_handle_t *stream, char *
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the deactivate request */
@ -1988,7 +2003,7 @@ static ftdm_status_t handle_deactivate_link(ftdm_stream_handle_t *stream, char *
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -2003,7 +2018,7 @@ static ftdm_status_t handle_activate_linkset(ftdm_stream_handle_t *stream, char
/* find the linkset request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
while(x < (MAX_MTP_LINKSETS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
/* send the activate request */
@ -2034,7 +2049,7 @@ static ftdm_status_t handle_deactivate_linkset(ftdm_stream_handle_t *stream, cha
/* find the linkset request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
while(x < (MAX_MTP_LINKSETS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name, name)) {
/* send the deactivate request */
@ -2066,7 +2081,7 @@ static ftdm_status_t handle_tx_lpo(ftdm_stream_handle_t *stream, char *name)
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -2082,7 +2097,7 @@ static ftdm_status_t handle_tx_lpo(ftdm_stream_handle_t *stream, char *name)
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -2097,7 +2112,7 @@ static ftdm_status_t handle_tx_lpr(ftdm_stream_handle_t *stream, char *name)
/* find the link request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while(x < (MAX_MTP_LINKS+1)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.mtp3Link[x].name, name)) {
/* send the uninhibit request */
@ -2113,7 +2128,7 @@ static ftdm_status_t handle_tx_lpr(ftdm_stream_handle_t *stream, char *name)
/* move to the next link */
x++;
} /* while (id != 0) */
} /* while (x < (MAX_MTP_LINKS+1)) */
stream->write_function(stream, "Could not find link=%s\n", name);
@ -2132,7 +2147,7 @@ static ftdm_status_t handle_status_relay(ftdm_stream_handle_t *stream, char *nam
/* find the channel request by it's name */
x = 1;
while(g_ftdm_sngss7_data.cfg.relay[x].id != 0) {
while(x < (MAX_RELAY_CHANNELS)) {
if (!strcasecmp(g_ftdm_sngss7_data.cfg.relay[x].name, name)) {
if (ftmod_ss7_relay_status(g_ftdm_sngss7_data.cfg.relay[x].id, &sta)) {
@ -2156,7 +2171,7 @@ static ftdm_status_t handle_status_relay(ftdm_stream_handle_t *stream, char *nam
/* move to the next link */
x++;
} /* g_ftdm_sngss7_data.cfg.relay[x].id */
} /* x < (MAX_RELAY_CHANNELS) */
success:
return FTDM_SUCCESS;

View File

@ -68,11 +68,15 @@ int ftmod_ss7_shutdown_isup(void);
int ftmod_ss7_shutdown_mtp3(void);
int ftmod_ss7_shutdown_mtp2(void);
int ftmod_ss7_shutdown_relay(void);
int ftmod_ss7_disable_relay_channel(uint32_t chanId);
int ftmod_ss7_disable_grp_mtp3Link(uint32_t procId);
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId);
int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId);
int ftmod_ss7_block_isup_ckt(uint32_t cktId);
int ftmod_ss7_unblock_isup_ckt(uint32_t cktId);
/******************************************************************************/
/* FUNCTIONS ******************************************************************/
@ -81,9 +85,10 @@ int ft_to_sngss7_activate_all(void)
int x;
x = 1;
while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
while (x < (MAX_ISAPS)) {
/* check if this link has already been actived */
if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE)) {
if ((g_ftdm_sngss7_data.cfg.isap[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE))) {
if (ftmod_ss7_enable_isap(x)) {
SS7_CRITICAL("ISAP %d Enable: NOT OK\n", x);
@ -97,12 +102,13 @@ int ft_to_sngss7_activate_all(void)
} /* if !SNGSS7_ACTIVE */
x++;
} /* while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) */
} /* while (x < (MAX_ISAPS)) */
x = 1;
while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) {
while (x < (MAX_NSAPS)) {
/* check if this link has already been actived */
if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE)) {
if ((g_ftdm_sngss7_data.cfg.nsap[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE))) {
if (ftmod_ss7_enable_nsap(x)) {
SS7_CRITICAL("NSAP %d Enable: NOT OK\n", x);
@ -116,13 +122,14 @@ int ft_to_sngss7_activate_all(void)
} /* if !SNGSS7_ACTIVE */
x++;
} /* while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) */
} /* while (x < (MAX_NSAPS)) */
if (g_ftdm_sngss7_data.cfg.mtpRoute[1].id != 0) {
x = 1;
while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
while (x < (MAX_MTP_LINKSETS+1)) {
/* check if this link has already been actived */
if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE)) {
if ((g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) &&
(!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE))) {
if (ftmod_ss7_enable_mtpLinkSet(x)) {
SS7_CRITICAL("LinkSet \"%s\" Enable: NOT OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name);
@ -136,7 +143,7 @@ int ft_to_sngss7_activate_all(void)
} /* if !SNGSS7_ACTIVE */
x++;
} /* while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) */
} /* while (x < (MAX_MTP_LINKSETS+1)) */
}
return 0;
@ -712,6 +719,38 @@ int ftmod_ss7_shutdown_relay(void)
return (sng_cntrl_relay(&pst, &cntrl));
}
/******************************************************************************/
int ftmod_ss7_disable_relay_channel(uint32_t chanId)
{
RyMngmt cntrl;
Pst pst;
/* initalize the post structure */
smPstInit(&pst);
/* insert the destination Entity */
pst.dstEnt = ENTRY;
/* initalize the control structure */
memset(&cntrl, 0x0, sizeof(RyMngmt));
/* initalize the control header */
smHdrInit(&cntrl.hdr);
cntrl.hdr.msgType = TCNTRL; /* this is a control request */
cntrl.hdr.entId.ent = ENTRY;
cntrl.hdr.entId.inst = S_INST;
cntrl.hdr.elmId.elmnt = STGEN;
cntrl.hdr.elmId.elmntInst1 = chanId;
cntrl.t.cntrl.action = ADISIMM; /* Deactivate */
cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */
return (sng_cntrl_relay(&pst, &cntrl));
}
/******************************************************************************/
int ftmod_ss7_disable_grp_mtp3Link(uint32_t procId)
{
@ -808,6 +847,69 @@ int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId)
}
/******************************************************************************/
int ftmod_ss7_block_isup_ckt(uint32_t cktId)
{
SiMngmt cntrl;
Pst pst;
/* initalize the post structure */
smPstInit(&pst);
/* insert the destination Entity */
pst.dstEnt = ENTSI;
/* initalize the control structure */
memset(&cntrl, 0x0, sizeof(SiMngmt));
/* initalize the control header */
smHdrInit(&cntrl.hdr);
cntrl.hdr.msgType = TCNTRL; /* this is a control request */
cntrl.hdr.entId.ent = ENTSI;
cntrl.hdr.entId.inst = S_INST;
cntrl.hdr.elmId.elmnt = STICIR;
cntrl.t.cntrl.s.siElmnt.elmntId.circuit = cktId;
cntrl.t.cntrl.s.siElmnt.elmntParam.cir.flag = LSI_CNTRL_CIR_FORCE;
cntrl.t.cntrl.action = ADISIMM; /* block via BLO */
cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */
return (sng_cntrl_isup(&pst, &cntrl));
}
/******************************************************************************/
int ftmod_ss7_unblock_isup_ckt(uint32_t cktId)
{
SiMngmt cntrl;
Pst pst;
/* initalize the post structure */
smPstInit(&pst);
/* insert the destination Entity */
pst.dstEnt = ENTSI;
/* initalize the control structure */
memset(&cntrl, 0x0, sizeof(SiMngmt));
/* initalize the control header */
smHdrInit(&cntrl.hdr);
cntrl.hdr.msgType = TCNTRL; /* this is a control request */
cntrl.hdr.entId.ent = ENTSI;
cntrl.hdr.entId.inst = S_INST;
cntrl.hdr.elmId.elmnt = STICIR;
cntrl.t.cntrl.s.siElmnt.elmntId.circuit = cktId;
cntrl.t.cntrl.s.siElmnt.elmntParam.cir.flag = LSI_CNTRL_CIR_FORCE;
cntrl.t.cntrl.action = AENA; /* unblock via UBL */
cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */
return (sng_cntrl_isup(&pst, &cntrl));
}
/******************************************************************************/
/* For Emacs:
* Local Variables:

View File

@ -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:
@ -881,232 +922,187 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/******************************************************************************/
ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
/* confirm that the circuit is active on our side otherwise move to the next circuit */
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[circuit], SNGSS7_ACTIVE)) {
SS7_ERROR("[CIC:%d]Rx %s but circuit is not active yet, skipping!\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
return FTDM_FAIL;
}
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
switch (evntType) {
/**************************************************************************/
case SIT_STA_REATTEMPT: /* reattempt indication */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Reattempt indication\n", sngss7_info->circuit->cic);
handle_reattempt(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_ERRORIND: /* error indication */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Error indication\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CONTCHK: /* continuity check */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CCR start\n", sngss7_info->circuit->cic);
handle_cot_start(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CONTREP: /* continuity report */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx COT report\n", sngss7_info->circuit->cic);
handle_cot(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_STPCONTIN: /* stop continuity */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CCR stop\n", sngss7_info->circuit->cic);
handle_cot_stop(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CGQRYRSP: /* circuit grp query response from far end forwarded to upper layer by ISUP */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CQM\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CONFUSION: /* confusion */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CFN\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_LOOPBACKACK: /* loop-back acknowledge */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx LPA\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CIRRSRVREQ: /* circuit reservation request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Ckt Resveration req\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CIRRSRVACK: /* circuit reservation acknowledgement */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Ckt Res ack\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CIRBLOREQ: /* circuit blocking request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx BLO\n", sngss7_info->circuit->cic);
handle_blo_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRBLORSP: /* circuit blocking response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx BLA\n", sngss7_info->circuit->cic);
handle_blo_rsp(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRUBLREQ: /* circuit unblocking request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx UBL\n", sngss7_info->circuit->cic);
handle_ubl_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRUBLRSP: /* circuit unblocking response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx UBA\n", sngss7_info->circuit->cic);
handle_ubl_rsp(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRRESREQ: /* circuit reset request - RSC */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx RSC\n", sngss7_info->circuit->cic);
handle_rsc_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRLOCRES: /* reset initiated locally by the software */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Local RSC\n", sngss7_info->circuit->cic);
handle_local_rsc_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRRESRSP: /* circuit reset response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx RSC-RLC\n", sngss7_info->circuit->cic);
handle_rsc_rsp(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CGBREQ: /* CGB request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CGB\n", sngss7_info->circuit->cic);
handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CGUREQ: /* CGU request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CGU\n", sngss7_info->circuit->cic);
handle_cgu_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CGQRYREQ: /* circuit group query request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CQM\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CGBRSP: /* mntc. oriented CGB response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx mntc CGB\n", sngss7_info->circuit->cic);
/*handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break;
/**************************************************************************/
case SIT_STA_CGURSP: /* mntc. oriented CGU response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx mntc CGU\n", sngss7_info->circuit->cic);
/*SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));*/
break;
/**************************************************************************/
case SIT_STA_GRSREQ: /* circuit group reset request */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx GRS\n", sngss7_info->circuit->cic);
handle_grs_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRUNEQPD: /* circuit unequipped indication */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx UCIC\n", sngss7_info->circuit->cic);
handle_ucic(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_GRSRSP: /* circuit group reset response */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx GRA\n", sngss7_info->circuit->cic);
handle_grs_rsp(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_PAUSEIND: /* pause indication */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx SUS\n", sngss7_info->circuit->cic);
handle_pause(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_RESUMEIND: /* resume indication */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx RES\n", sngss7_info->circuit->cic);
handle_resume(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_USRPARTA: /* user part available */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx UPA\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_RMTUSRUNAV: /* remote user not available */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Remote User not Available\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_MTPCONG0: /* congestion indication level 0 */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Congestion L0\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_MTPCONG1: /* congestion indication level 1 */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Congestion L1\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_MTPCONG2: /* congestion indication level 2 */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Congestion L2\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_MTPCONG3: /* congestion indication level 3 */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Congestion L3\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_MTPSTPCONG: /* stop congestion indication level 0 */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Stop Congestion\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CIRLOCALBLOIND: /* Mngmt local blocking */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Local BLO\n", sngss7_info->circuit->cic);
handle_local_blk(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_CIRLOCALUBLIND: /* Mngmt local unblocking */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Local UBL\n", sngss7_info->circuit->cic);
handle_local_ubl(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_OVERLOAD: /* Overload */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Overload\n", sngss7_info->circuit->cic);
handle_olm_msg(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);
break;
/**************************************************************************/
case SIT_STA_LMCGBREQ: /* when LM requests ckt grp blocking */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx LM CGB\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_LMCGUREQ: /* when LM requests ckt grp unblocking */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx LM CGU\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_LMGRSREQ: /* when LM requests ckt grp reset */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx LM RSC\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CGBINFOIND: /* circuit grp blking ind , no resp req */
/*SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx CGB no resp req\n", sngss7_info->circuit->cic);*/
/* handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break;
/**************************************************************************/
case SIT_STA_LMCQMINFOREQ: /* when LM requests ckt grp query */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx LM CQM\n", sngss7_info->circuit->cic);
// SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
case SIT_STA_CIRLOCGRS: /* group reset initiated locally by the software */
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx Local GRS\n", sngss7_info->circuit->cic);
SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break;
/**************************************************************************/
@ -1128,11 +1124,25 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1189,6 +1199,13 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
/* check that the infId matches and that this is not a siglink */
if ((g_ftdm_sngss7_data.cfg.isupCkt[i].infId == infId) &&
(g_ftdm_sngss7_data.cfg.isupCkt[i].type == VOICE)) {
/* confirm that the circuit is active on our side otherwise move to the next circuit */
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
i++;
continue;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(i, &sngss7_info, &ftdmchan)) {
@ -1207,7 +1224,7 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
sngss7_set_ckt_flag(sngss7_info, FLAG_INFID_PAUSED);
/* clear the resume flag on the channel */
sngss7_set_ckt_flag(sngss7_info, FLAG_INFID_RESUME);
sngss7_clear_ckt_flag(sngss7_info, FLAG_INFID_RESUME);
}
/* unlock the channel again before we exit */
@ -1248,6 +1265,13 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
if ((g_ftdm_sngss7_data.cfg.isupCkt[i].infId == infId) &&
(g_ftdm_sngss7_data.cfg.isupCkt[i].type == VOICE)) {
/* confirm that the circuit is active on our side otherwise move to the next circuit */
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
i++;
continue;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(i, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -1291,11 +1315,25 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1332,11 +1370,25 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1363,11 +1415,25 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1417,11 +1483,25 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1453,11 +1533,25 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1480,11 +1574,25 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1519,11 +1627,25 @@ ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1546,11 +1668,25 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1591,13 +1727,26 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
ftdm_mutex_lock(ftdmchan->mutex);
@ -1636,11 +1785,25 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1713,10 +1876,25 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int range;
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* extract the range value from the event structure */
@ -1749,10 +1927,25 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_span_data_t *sngss7_span = NULL;
int range;
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* extract the range value from the event structure */
@ -1791,11 +1984,25 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
@ -1827,22 +2034,36 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* lock the channel */
ftdm_mutex_lock(ftdmchan->mutex);
/* check if the circuit is already blocked or not */
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX)) {
SS7_WARN("Received local UBL on circuit that is already unblocked!\n");
/* check if the circuit is blocked or not */
if (!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_BLOCK_RX)) {
SS7_WARN("Received local UBL on circuit that is not blocked!\n");
}
/* throw the ckt block flag */
/* throw the ckt unblock flag */
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX);
/* set the channel to suspended state */
@ -1865,11 +2086,25 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* check if we just sent a GRS request...*/
@ -1914,13 +2149,26 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
memset(&status[0], '\0', sizeof(status));
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* grab the span info */
sngss7_span = ftdmchan->span->signal_data;
@ -2049,11 +2297,25 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
memset(&sigev, 0, sizeof (sigev));
memset(&status[0], '\0', sizeof(status));
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* grab the span info */
@ -2167,11 +2429,25 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* confirm that the circuit is voice channel */
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("[CIC:%d]Rx %s on non-voice CIC\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return FTDM_FAIL;
}
SS7_INFO_CHAN(ftdmchan, "[CIC:%d]Rx %s\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
}
/* handle overload */

View File

@ -66,6 +66,12 @@ void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -104,6 +110,12 @@ void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -142,6 +154,12 @@ void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCn
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -181,6 +199,12 @@ void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -219,6 +243,12 @@ void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -257,6 +287,12 @@ void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiIn
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -295,6 +331,12 @@ void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -334,6 +376,12 @@ void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -373,6 +421,12 @@ void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -412,29 +466,26 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
uint32_t intfId;
int x;
/* check if the eventType is a pause/resume */
switch (evntType) {
/**************************************************************************/
case (SIT_STA_PAUSEIND):
case (SIT_STA_RESUMEIND):
/* the circuit for this type of event may not exist on the local system
* so first check if the circuit is local
*/
if ((circuit >= (g_ftdm_sngss7_data.cfg.procId * 1000)) &&
(circuit < ((g_ftdm_sngss7_data.cfg.procId +1) * 1000))) {
/* the circuit is on the local system, handle normally */
goto sta_ind_local;
}
/* the circuit is not local, so find a local circuit with the same intfId
* by finding the orginial circuit in our array first, finding the intfId
* from there, then go through the local circuits to see if we find a
* match and use that circuit instead
/* the circuit may or may not be on the local system so we have to find
* circuit with the same intfId. The circuit specified might also be
* a non-voice cic so we also need to find the first voice cic on this
* system with the same intfId.
*/
intfId = g_ftdm_sngss7_data.cfg.isupCkt[circuit].infId;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_DEBUG("Rx %s on circuit that is not a voice CIC (%d) finding a new circuit\n",
DECODE_LCC_EVENT(evntType),
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic);
}
x = (g_ftdm_sngss7_data.cfg.procId * 1000) + 1;
while ((g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) &&
(g_ftdm_sngss7_data.cfg.isupCkt[x].id < ((g_ftdm_sngss7_data.cfg.procId +1) * 1000))) {
@ -446,6 +497,14 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
if (g_ftdm_sngss7_data.cfg.isupCkt[x].infId == intfId) {
/* we have a match, setup the pointers to the correct values */
circuit = x;
/* confirm that the circuit is active on our side otherwise move to the next circuit */
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[circuit], SNGSS7_ACTIVE)) {
SS7_DEBUG("[CIC:%d]Rx %s but circuit is not active yet, skipping!\n",
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
continue;
}
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -472,7 +531,14 @@ move_along:
break;
/**************************************************************************/
default:
sta_ind_local:
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx %s on circuit that is not a voice CIC (%d)\n",
DECODE_LCC_EVENT(evntType),
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -520,6 +586,12 @@ void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiS
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
@ -561,6 +633,12 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
ftdm_channel_t *ftdmchan = NULL;
sngss7_event_data_t *sngss7_event = NULL;
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);

View File

@ -134,7 +134,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -149,24 +149,19 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
switch (sta->t.usta.alarm.cause) {
/******************************************************************/
case (LCM_CAUSE_UNKNOWN):
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s\n",
buf,
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
break;
/******************************************************************/
case (LCM_CAUSE_MGMT_INITIATED):
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s[MGMT] %s\n",
buf,
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
break;
/******************************************************************/
default:
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s (***unknown cause***)\n",
buf,
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
break;
case (LCM_CAUSE_MGMT_INITIATED):
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s[MGMT] cause:%s event:%s\n",
buf,
DECODE_LCM_CAUSE(sta->t.usta.alarm.cause),
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
break;
case (LCM_CAUSE_UNKNOWN):
default:
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s cause:%s event:%s\n",
buf,
DECODE_LCM_CAUSE(sta->t.usta.alarm.cause),
DECODE_LSD_EVENT(sta->t.usta.alarm.event));
break;
/******************************************************************/
} /* switch (sta->t.usta.alarm.cause) */
break;
@ -175,7 +170,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -198,7 +193,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -211,7 +206,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
sprintf(buf, "[%s]", g_ftdm_sngss7_data.cfg.mtp2Link[x].name);
}
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s : %s\n",
ftdm_log(FTDM_LOG_DEBUG,"[MTP2]%s %s : %s\n",
buf,
DECODE_LSD_EVENT(sta->t.usta.alarm.event),
DECODE_DISC_REASON(sta->t.usta.evntParm[1]));
@ -222,7 +217,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -248,7 +243,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -271,7 +266,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp2Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp2Link[x].id == sta->t.usta.evntParm[0]) {
break;
}
@ -366,7 +361,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
/* find the name for the sap in question */
x = 1;
while (g_ftdm_sngss7_data.cfg.mtp3Link[x].id != 0) {
while (x < (MAX_MTP_LINKS+1)) {
if (g_ftdm_sngss7_data.cfg.mtp3Link[x].id == sta->hdr.elmId.elmntInst1) {
break;
}
@ -402,7 +397,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
break;
/**********************************************************************/
default:
ftdm_log(FTDM_LOG_ERROR,"[MTP3]%s %s(%d) : %s(%d)\n",
ftdm_log(FTDM_LOG_DEBUG,"[MTP3]%s %s(%d) : %s(%d)\n",
buf,
DECODE_LSN_EVENT(sta->t.usta.alarm.event),
sta->t.usta.alarm.event,
@ -421,7 +416,7 @@ void handle_sng_mtp3_alarm(Pst *pst, SnMngmt *sta)
break;
/**************************************************************************/
case (STLNKSET):
ftdm_log(FTDM_LOG_ERROR,"[MTP3][LNKSET:%d] %s : %s\n",
ftdm_log(FTDM_LOG_DEBUG,"[MTP3][LNKSET:%d] %s : %s\n",
sta->hdr.elmId.elmntInst1,
DECODE_LSN_EVENT(sta->t.usta.alarm.event),
DECODE_LSN_CAUSE(sta->t.usta.alarm.cause));
@ -766,7 +761,18 @@ void handle_sng_relay_alarm(Pst *pst, RyMngmt *sta)
DECODE_LRY_REASON(sta->t.usta.s.ryErrUsta.reason));
/* process the event */
handle_relay_disconnect_on_error(sta);
switch (sta->t.usta.s.ryErrUsta.reason) {
/**********************************************************************/
case (LRYRSNMGMTREQ):
/* do nothing since this is a shutdown */
break;
/**********************************************************************/
default:
/* handle the error */
handle_relay_disconnect_on_error(sta);
break;
/**********************************************************************/
} /* switch (sta->t.usta.s.ryErrUsta.reason) */
break;
/**************************************************************************/

View File

@ -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 *****************************************************************/
@ -109,7 +110,15 @@ ftdm_state_map_t sangoma_ss7_state_map = {
{FTDM_CHANNEL_STATE_RING, FTDM_END},
{FTDM_CHANNEL_STATE_SUSPENDED, FTDM_CHANNEL_STATE_RESTART,
FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP,
FTDM_CHANNEL_STATE_PROGRESS, FTDM_END}
FTDM_CHANNEL_STATE_RINGING, FTDM_CHANNEL_STATE_PROGRESS, FTDM_END}
},
{
ZSD_INBOUND,
ZSM_UNACCEPTABLE,
{FTDM_CHANNEL_STATE_RINGING, FTDM_END},
{FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP,
FTDM_CHANNEL_STATE_PROGRESS, FTDM_CHANNEL_STATE_PROGRESS_MEDIA,
FTDM_CHANNEL_STATE_UP, FTDM_END},
},
{
ZSD_INBOUND,
@ -365,6 +374,9 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)
/* check each channel on the span to see if there is an un-procressed SUS/RES flag */
check_for_res_sus_flag(ftdmspan);
/* check each channel on the span to see if it needs to be reconfigured */
check_for_reconfig_flag(ftdmspan);
/* Poll for events, e.g HW DTMF */
switch (ftdm_span_poll_event(ftdmspan, 0, NULL)) {
/**********************************************************************/
@ -498,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) {
/**************************************************************************/
@ -606,6 +613,8 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
break;
/**************************************************************************/
/* We handle RING indication the same way we would indicate PROGRESS */
case FTDM_CHANNEL_STATE_RINGING:
case FTDM_CHANNEL_STATE_PROGRESS:
if (ftdmchan->last_state == FTDM_CHANNEL_STATE_SUSPENDED) {
@ -623,7 +632,10 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
} else {
/* inbound call so we need to send out ACM */
ft_to_sngss7_acm(ftdmchan);
if (!sngss7_test_ckt_flag(sngss7_info, FLAG_SENT_ACM)) {
sngss7_set_ckt_flag(sngss7_info, FLAG_SENT_ACM);
ft_to_sngss7_acm(ftdmchan);
}
}
break;
@ -874,6 +886,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* clear any call related flags */
sngss7_clear_ckt_flag (sngss7_info, FLAG_REMOTE_REL);
sngss7_clear_ckt_flag (sngss7_info, FLAG_LOCAL_REL);
sngss7_clear_ckt_flag (sngss7_info, FLAG_SENT_ACM);
if (ftdm_test_flag (ftdmchan, FTDM_CHANNEL_OPEN)) {
@ -906,8 +919,8 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
case FTDM_CHANNEL_STATE_RESTART: /* CICs needs a Reset */
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_UCIC_BLOCK)) {
if ((sngss7_test_ckt_blk_flag(sngss7_info, FLAG_RESET_RX)) ||
(sngss7_test_ckt_blk_flag(sngss7_info, FLAG_GRP_RESET_RX))) {
if ((sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_RX)) ||
(sngss7_test_ckt_flag(sngss7_info, FLAG_GRP_RESET_RX))) {
SS7_DEBUG_CHAN(ftdmchan,"Incoming Reset request on CIC in UCIC block, removing UCIC block%s\n", "");
@ -926,33 +939,27 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
}
}
/* if we're not coming from HANGUP_COMPLETE we need to check for resets
* we can also check if we are in a PAUSED state (no point in sending message
*/
if ((ftdmchan->last_state != FTDM_CHANNEL_STATE_HANGUP_COMPLETE) &&
(!sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED))) {
/* check if this is an outgoing RSC */
if ((sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_TX)) &&
!(sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_SENT))) {
/* check if this is an outgoing RSC */
if ((sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_TX)) &&
!(sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_SENT))) {
/* send a reset request */
ft_to_sngss7_rsc (ftdmchan);
sngss7_set_ckt_flag(sngss7_info, FLAG_RESET_SENT);
/* send a reset request */
ft_to_sngss7_rsc (ftdmchan);
sngss7_set_ckt_flag(sngss7_info, FLAG_RESET_SENT);
} /* if (sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_TX)) */
/* check if this is the first channel of a GRS (this flag is thrown when requesting reset) */
if ( (sngss7_test_ckt_flag (sngss7_info, FLAG_GRP_RESET_TX)) &&
!(sngss7_test_ckt_flag(sngss7_info, FLAG_GRP_RESET_SENT)) &&
(sngss7_test_ckt_flag(sngss7_info, FLAG_GRP_RESET_BASE))) {
} /* if (sngss7_test_ckt_flag(sngss7_info, FLAG_RESET_TX)) */
/* send out the grs */
ft_to_sngss7_grs (ftdmchan);
sngss7_set_ckt_flag(sngss7_info, FLAG_GRP_RESET_SENT);
/* check if this is the first channel of a GRS (this flag is thrown when requesting reset) */
if ( (sngss7_test_ckt_flag (sngss7_info, FLAG_GRP_RESET_TX)) &&
!(sngss7_test_ckt_flag(sngss7_info, FLAG_GRP_RESET_SENT)) &&
(sngss7_test_ckt_flag(sngss7_info, FLAG_GRP_RESET_BASE))) {
}/* if ( sngss7_test_ckt_flag ( sngss7_info, FLAG_GRP_RESET_TX ) ) */
} /* if ( last_state != HANGUP && !PAUSED */
/* send out the grs */
ft_to_sngss7_grs (ftdmchan);
sngss7_set_ckt_flag(sngss7_info, FLAG_GRP_RESET_SENT);
}/* if ( sngss7_test_ckt_flag ( sngss7_info, FLAG_GRP_RESET_TX ) ) */
/* if the sig_status is up...bring it down */
if (ftdm_test_flag (ftdmchan, FTDM_CHANNEL_SIG_UP)) {
@ -1023,10 +1030,13 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/**************************************************************************/
case FTDM_CHANNEL_STATE_SUSPENDED: /* circuit has been blocked */
SS7_DEBUG_CHAN(ftdmchan,"Current flags: 0x%X\n", sngss7_info->ckt_flags);
SS7_DEBUG_CHAN(ftdmchan,"Current flags: ckt=0x%X, blk=0x%X\n",
sngss7_info->ckt_flags,
sngss7_info->blk_flags);
/**********************************************************************/
if (sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_RESUME)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing RESUME%s\n", "");
/* clear the RESUME flag */
@ -1041,30 +1051,28 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
(sngss7_test_ckt_flag (sngss7_info, FLAG_GRP_RESET_TX)) ||
(sngss7_test_ckt_flag (sngss7_info, FLAG_GRP_RESET_RX))) {
/* go back to the reset state */
/* don't bring up the sig status but also move to reset */
goto suspend_goto_restart;
} else {
/* bring the sig status back up */
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_UP);
}
/* go back to the last state */
goto suspend_goto_last;
} /* if (sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) */
if (sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing PAUSE%s\n", "");
/* bring the sig status down */
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_DOWN);
/* go back to the last state */
goto suspend_goto_last;
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP)) {
/* bring the sig status down */
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_DOWN);
}
} /* if (sngss7_test_ckt_flag(sngss7_info, FLAG_INFID_PAUSED)) { */
/**********************************************************************/
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX) &&
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_BLOCK_RX) &&
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_BLOCK_RX flag %s\n", "");
/* bring the sig status down */
@ -1080,10 +1088,13 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
goto suspend_goto_last;
}
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX) &&
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX_DN)){
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX)){
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_UNBLK_RX flag %s\n", "");
/* clear the block flags */
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
/* clear the unblock flag */
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_RX);
@ -1093,9 +1104,6 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* send a uba */
ft_to_sngss7_uba (ftdmchan);
/* throw the done flag */
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_RX_DN);
/* check the last state and return to it to allow the call to finish */
goto suspend_goto_last;
}
@ -1103,6 +1111,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/**********************************************************************/
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_TX) &&
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_TX_DN)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_BLOCK_TX flag %s\n", "");
/* bring the sig status down */
@ -1118,12 +1127,16 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
goto suspend_goto_last;
}
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX) &&
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX_DN)){
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_UNBLK_TX flag %s\n", "");
/* clear the block flags */
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_BLOCK_TX);
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_BLOCK_TX_DN);
/* clear the unblock flag */
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_MN_UNBLK_TX);
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_TX);
/* bring the sig status up */
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_UP);
@ -1131,9 +1144,6 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* send a ubl */
ft_to_sngss7_ubl (ftdmchan);
/* throw the done flag */
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_TX_DN);
/* check the last state and return to it to allow the call to finish */
goto suspend_goto_last;
}
@ -1141,6 +1151,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/**********************************************************************/
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_BLOCK_RX) &&
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_BLOCK_RX_DN)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_LC_BLOCK_RX flag %s\n", "");
/* send a BLA */
@ -1153,18 +1164,20 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
goto suspend_goto_last;
}
if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX) &&
!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX_DN)) {
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_LC_UNBLK_RX)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_LC_UNBLK_RX flag %s\n", "");
/* clear the block flags */
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_LC_BLOCK_RX);
sngss7_clear_ckt_blk_flag (sngss7_info, FLAG_CKT_LC_BLOCK_RX_DN);
/* clear the unblock flag */
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_RX);
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX);
/* send a uba */
/*ft_to_sngss7_uba(ftdmchan);*/
/* throw the done flag */
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_LC_UNBLK_RX_DN);
/* check the last state and return to it to allow the call to finish */
goto suspend_goto_last;
@ -1172,6 +1185,7 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/**********************************************************************/
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_BLOCK) &&
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_BLOCK_DN)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_UCIC_BLOCK flag %s\n", "");
/* bring the channel signaling status to down */
@ -1192,12 +1206,12 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
goto suspend_goto_last;
}
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK) &&
!sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK_DN)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_UCIC_UNBLK flag %s\n", "");;
if (sngss7_test_ckt_blk_flag (sngss7_info, FLAG_CKT_UCIC_UNBLK)) {
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_UCIC_UNBLK flag %s\n", "");
/* remove the UCIC block flag */
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_UCIC_BLOCK);
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_UCIC_BLOCK_DN);
/* remove the UCIC unblock flag */
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_UCIC_UNBLK);
@ -1205,13 +1219,12 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* throw the channel into reset to sync states */
sngss7_set_ckt_flag(sngss7_info, FLAG_RESET_TX);
/* throw the done flag */
sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_UCIC_UNBLK_DN);
/* bring the channel into restart again */
goto suspend_goto_restart;
}
SS7_DEBUG_CHAN(ftdmchan,"No block flag processed!%s\n", "");
suspend_goto_last:
state_flag = 0;
ftdm_set_state(ftdmchan, ftdmchan->last_state);
@ -1370,30 +1383,27 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
ftdm_clear_flag (span, FTDM_SPAN_STOP_THREAD);
ftdm_clear_flag (span, FTDM_SPAN_IN_THREAD);
/* activate all the configured ss7 links */
if (ft_to_sngss7_activate_all()) {
SS7_CRITICAL ("Failed to activate LibSngSS7!\n");
return FTDM_FAIL;
}
/*start the span monitor thread */
if (ftdm_thread_create_detached (ftdm_sangoma_ss7_run, span) != FTDM_SUCCESS) {
SS7_CRITICAL ("Failed to start Span Monitor Thread!\n");
return FTDM_FAIL;
}
/* confirm the state of all isup interfaces*/
/* check the status of all isup interfaces */
check_status_of_all_isup_intf();
/* throw the channels in pause */
for (x = 1; x < (span->chan_count + 1); x++) {
/* extract the channel structure and sngss7 channel data */
ftdmchan = span->channels[x];
/* if there is no sig mod data move along */
if (ftdmchan->call_data == NULL) continue;
sngss7_info = ftdmchan->call_data;
sngss7_span = ftdmchan->span->signal_data;
sngss7_intf = &g_ftdm_sngss7_data.cfg.isupIntf[sngss7_info->circuit->infId];
/* flag the circuit as active so we can receieve events on it */
sngss7_set_flag(sngss7_info->circuit, SNGSS7_ACTIVE);
/* if this is a non-voice channel, move along cause we're done with it */
if (sngss7_info->circuit->type != VOICE) continue;
/* lock the channel */
ftdm_mutex_lock(ftdmchan->mutex);
@ -1428,6 +1438,18 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
ftdm_mutex_unlock(ftdmchan->mutex);
}
/* activate all the configured ss7 links */
if (ft_to_sngss7_activate_all()) {
SS7_CRITICAL ("Failed to activate LibSngSS7!\n");
return FTDM_FAIL;
}
/*start the span monitor thread */
if (ftdm_thread_create_detached (ftdm_sangoma_ss7_run, span) != FTDM_SUCCESS) {
SS7_CRITICAL ("Failed to start Span Monitor Thread!\n");
return FTDM_FAIL;
}
SS7_DEBUG ("Finished starting span %s:%u.\n", span->name, span->span_id);
return FTDM_SUCCESS;
@ -1595,6 +1617,8 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_ss7_unload)
{
/*this function is called by the FT-core to unload the signaling module */
int x;
ftdm_log (FTDM_LOG_INFO, "Starting ftmod_sangoma_ss7 unload...\n");
if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_CC)) {
@ -1622,6 +1646,26 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_ss7_unload)
}
if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_RY)) {
/* go through all the relays channels and configure it */
x = 1;
while (x < (MAX_RELAY_CHANNELS)) {
/* check if this relay channel has been configured already */
if ((g_ftdm_sngss7_data.cfg.relay[x].flags & SNGSS7_CONFIGURED)) {
/* send the specific configuration */
if (ftmod_ss7_disable_relay_channel(x)) {
SS7_CRITICAL("Relay Channel %d disable failed!\n", x);
return 1;
} else {
SS7_INFO("Relay Channel %d disable DONE!\n", x);
}
/* set the SNGSS7_CONFIGURED flag */
g_ftdm_sngss7_data.cfg.relay[x].flags &= !SNGSS7_CONFIGURED;
} /* if !SNGSS7_CONFIGURED */
x++;
} /* while (x < (MAX_RELAY_CHANNELS)) */
ftmod_ss7_shutdown_relay();
sng_isup_free_relay();
sngss7_clear_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_RY);

View File

@ -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,
@ -316,9 +323,23 @@ typedef struct sng_isup_ckt {
uint32_t typeCntrl;
uint32_t ssf;
uint32_t switchType;
uint32_t clg_nadi;
uint32_t cld_nadi;
uint8_t rdnis_nadi;
/* 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;
@ -386,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];
@ -503,9 +525,33 @@ typedef enum {
FLAG_GLARE = (1 << 13),
FLAG_INFID_RESUME = (1 << 14),
FLAG_INFID_PAUSED = (1 << 15),
FLAG_RELAY_DOWN = (1 << 30)
FLAG_SENT_ACM = (1 << 16),
FLAG_RELAY_DOWN = (1 << 30),
FLAG_CKT_RECONFIG = (1 << 31)
} sng_ckt_flag_t;
#define CKT_FLAGS_STRING \
"RX_RSC", \
"TX_RSC", \
"TX_RSC_REQ_SENT", \
"TX_RSC_RSP_RECIEVED", \
"RX_GRS", \
"RX_GRS_DONE", \
"RX_GRS_CMPLT", \
"GRS_BASE", \
"TX_GRS", \
"TX_GRS_REQ_SENT", \
"TX_GRS_RSP_RECIEVED", \
"REMOTE_REL", \
"LOCAL_REL", \
"GLARE", \
"INF_RESUME", \
"INF_PAUSED", \
"TX_ACM_SENT" \
"RELAY_DOWN", \
"CKT_RECONFIG"
FTDM_STR2ENUM_P(ftmod_ss7_ckt_state2flag, ftmod_ss7_ckt_flag2str, sng_ckt_flag_t)
/* ckt blocking flags */
typedef enum {
FLAG_CKT_UCIC_BLOCK = (1 << 0),
@ -538,6 +584,41 @@ typedef enum {
FLAG_GRP_MN_UNBLK_TX_DN = (1 << 27)
} sng_ckt_block_flag_t;
#define BLK_FLAGS_STRING \
"UCIC BLK", \
"UCIC BLK DN", \
"UCIC UNBLK", \
"UCIC UNBLK DN", \
"RX LC BLK", \
"RX LC BLK DN", \
"RX LC UNBLK", \
"RX LC UNBLK DN", \
"RX CKT BLK", \
"RX CKT BLK DN", \
"RX CKT UNBLK", \
"RX CKT UNBLK DN", \
"TX CKT BLK", \
"TX CKT BLK DN", \
"TX CKT UNBLK", \
"TX CKT UNBLK DN", \
"RX GRP MN BLK", \
"RX GRP MN BLK DN", \
"RX GRP MN UNBLK", \
"RX GRP MN UNBLK DN", \
"TX GRP MN BLK", \
"TX GRP MN BLK DN", \
"TX GRP MN UNBLK", \
"TX GRP MN UNBLK DN", \
"RX GRP HW BLK", \
"RX GRP HW BLK DN", \
"RX GRP HW UNBLK", \
"RX GRP HW UNBLK DN", \
"TX GRP HW BLK", \
"TX GRP HW BLK DN", \
"TX GRP HW UNBLK", \
"TX GRP HW UNBLK DN"
FTDM_STR2ENUM_P(ftmod_ss7_blk_state2flag, ftmod_ss7_blk_flag2str, sng_ckt_block_flag_t)
/* valid for every cfg array except circuits */
typedef enum {
SNGSS7_CONFIGURED = (1 << 0),
@ -626,12 +707,17 @@ int ftmod_ss7_shutdown_isup(void);
int ftmod_ss7_shutdown_mtp3(void);
int ftmod_ss7_shutdown_mtp2(void);
int ftmod_ss7_shutdown_relay(void);
int ftmod_ss7_disable_relay_channel(uint32_t chanId);
int ftmod_ss7_disable_grp_mtp3Link(uint32_t procId);
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId);
int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId);
int ftmod_ss7_block_isup_ckt(uint32_t cktId);
int ftmod_ss7_unblock_isup_ckt(uint32_t cktId);
/* in ftmod_sangoma_ss7_sta.c */
int ftmod_ss7_mtp1link_sta(uint32_t id, L1Mngmt *cfm);
int ftmod_ss7_mtp2link_sta(uint32_t id, SdMngmt *cfm);
@ -661,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);
@ -678,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);
@ -718,12 +811,25 @@ 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);
uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
uint8_t append_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven);
ftdm_status_t copy_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);
ftdm_status_t copy_tknStr_to_sngss7(char* str, TknStr *tknStr, TknU8 *oddEven);
int check_for_state_change(ftdm_channel_t *ftdmchan);
int check_cics_in_range(sngss7_chan_data_t *sngss7_info);
@ -756,6 +862,7 @@ int find_ssf_type_in_map(const char *ssfType);
int find_cic_cntrl_in_map(const char *cntrlType);
ftdm_status_t check_status_of_all_isup_intf(void);
ftdm_status_t check_for_reconfig_flag(ftdm_span_t *ftdmspan);
void sngss7_send_signal(sngss7_chan_data_t *sngss7_info, ftdm_signal_event_t event_id);
void sngss7_set_sig_status(sngss7_chan_data_t *sngss7_info, ftdm_signaling_status_t status);
@ -767,6 +874,13 @@ void handle_isup_t35(void *userdata);
/******************************************************************************/
/* MACROS *********************************************************************/
#define SS7_STATE_CHANGE(ftdmchan, new_state) \
if (ftdmchan->state == new_state) { \
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_IDLE); \
} else { \
ftdm_set_state(ftdmchan, new_state); \
}
#define SS7_DEBUG(a,...) ftdm_log(FTDM_LOG_DEBUG,a , ##__VA_ARGS__ );
#define SS7_INFO(a,...) ftdm_log(FTDM_LOG_INFO,a , ##__VA_ARGS__ );
#define SS7_WARN(a,...) ftdm_log(FTDM_LOG_WARNING,a , ##__VA_ARGS__ );

View File

@ -36,10 +36,8 @@
/******************************************************************************/
/* DEFINES ********************************************************************/
/******************************************************************************/
/* GLOBALS ********************************************************************/
/******************************************************************************/
/* PROTOTYPES *****************************************************************/
void ft_to_sngss7_iam(ftdm_channel_t * ftdmchan);
@ -66,242 +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);
}
/* Nature of Connection Indicators */
copy_natConInd_to_sngss7(ftdmchan, &iam.natConInd);
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);
}
/* Forward Call Indicators */
copy_fwdCallInd_to_sngss7(ftdmchan, &iam.fwdCallInd);
/* 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);
/* 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') */
}
/* 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__);
@ -338,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;
/**********************************************************************/
@ -381,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__);
@ -891,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:

Some files were not shown because too many files have changed in this diff Show More