Merge remote-tracking branch 'fsorig/master'

This commit is contained in:
Moises Silva 2012-01-31 15:57:07 -05:00
commit 1ad0bc250c
488 changed files with 108347 additions and 4416 deletions

View File

@ -467,8 +467,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dingaling", "src\mod\en
ProjectSection(ProjectDependencies) = postProject
{1906D736-08BD-4EE1-924F-B536249B9A54} = {1906D736-08BD-4EE1-924F-B536249B9A54}
{D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE}
{B4B62169-5AD4-4559-8707-3D933AC5DB39} = {B4B62169-5AD4-4559-8707-3D933AC5DB39}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{B4B62169-5AD4-4559-8707-3D933AC5DB39} = {B4B62169-5AD4-4559-8707-3D933AC5DB39}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
EndProjectSection
@ -946,6 +946,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_h323", "src\mod\endpoin
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_iSAC", "src\mod\codecs\mod_isac\mod_iSAC.2008.vcproj", "{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skinny", "src\mod\endpoints\mod_skinny\mod_skinny_2008.vcproj", "{CC1DD008-9406-448D-A0AD-33C3186CFADB}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
@ -1137,9 +1142,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openssl", "libs\win32\opens
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_directory", "src\mod\applications\mod_directory\mod_directory.2008.vcproj", "{42E721FD-43D6-4B04-A34B-42567199FFB8}"
ProjectSection(ProjectDependencies) = postProject
{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
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_httapi", "src\mod\applications\mod_httapi\mod_httapi.2008.vcproj", "{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_abstraction", "src\mod\applications\mod_abstraction\mod_abstraction.2008.vcproj", "{BDA173DB-F8EF-4270-9553-B453AF92E43A}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -2405,6 +2423,13 @@ Global
{05C9FB27-480E-4D53-B3B7-7338E2514666}.Debug|x64.ActiveCfg = Debug|x64
{05C9FB27-480E-4D53-B3B7-7338E2514666}.Release|Win32.ActiveCfg = Release|Win32
{05C9FB27-480E-4D53-B3B7-7338E2514666}.Release|x64.ActiveCfg = Release|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|Win32.ActiveCfg = All|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|Win32.Build.0 = All|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x64.ActiveCfg = All|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|Win32.ActiveCfg = Debug|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|x64.ActiveCfg = Debug|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|Win32.ActiveCfg = Release|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|x64.ActiveCfg = Release|x64
{CC1DD008-9406-448D-A0AD-33C3186CFADB}.All|Win32.ActiveCfg = Release|Win32
{CC1DD008-9406-448D-A0AD-33C3186CFADB}.All|x64.ActiveCfg = Release|Win32
{CC1DD008-9406-448D-A0AD-33C3186CFADB}.Debug|Win32.ActiveCfg = Debug|Win32
@ -2856,6 +2881,28 @@ Global
{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
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.All|Win32.ActiveCfg = Release|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.All|x64.ActiveCfg = Release|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.All|x64.Build.0 = Release|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Debug|Win32.ActiveCfg = Debug|Win32
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Debug|Win32.Build.0 = Debug|Win32
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Debug|x64.ActiveCfg = Debug|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Debug|x64.Build.0 = Debug|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Release|Win32.ActiveCfg = Release|Win32
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Release|Win32.Build.0 = Release|Win32
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Release|x64.ActiveCfg = Release|x64
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}.Release|x64.Build.0 = Release|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.All|Win32.ActiveCfg = Release|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.All|x64.ActiveCfg = Release|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.All|x64.Build.0 = Release|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Debug|Win32.ActiveCfg = Debug|Win32
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Debug|Win32.Build.0 = Debug|Win32
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Debug|x64.ActiveCfg = Debug|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Debug|x64.Build.0 = Debug|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Release|Win32.ActiveCfg = Release|Win32
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Release|Win32.Build.0 = Release|Win32
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Release|x64.ActiveCfg = Release|x64
{BDA173DB-F8EF-4270-9553-B453AF92E43A}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2868,6 +2915,7 @@ Global
{8DEB383C-4091-4F42-A56F-C9E46D552D79} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{2C3C2423-234B-4772-8899-D3B137E5CA35} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{0B6C905B-142E-4999-B39D-92FF7951E921} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{D5C87B19-150D-4EF3-A671-96589BD2D14A} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{4D418176-3B33-47E6-A63E-01BA34ADD21C} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{AFA983D6-4569-4F88-BA94-555ED00FD9A8} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
@ -2903,6 +2951,8 @@ Global
{1E21AFE0-6FDB-41D2-942D-863607C24B91} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{2E250296-0C08-4342-9C8A-BCBDD0E7DF65} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{42E721FD-43D6-4B04-A34B-42567199FFB8} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{BDA173DB-F8EF-4270-9553-B453AF92E43A} = {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}

View File

@ -453,6 +453,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthread", "libs\win32\pthre
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g723_1", "src\mod\codecs\mod_g723_1\mod_g723_1.2010.vcxproj", "{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_iSAC", "src\mod\codecs\mod_isac\mod_iSAC.2010.vcxproj", "{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_native_file", "src\mod\formats\mod_native_file\mod_native_file.2010.vcxproj", "{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_core_db", "src\mod\languages\mod_spidermonkey\mod_spidermonkey_core_db.2010.vcxproj", "{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}"
@ -718,6 +720,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_callcenter", "src\mod\a
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_blacklist", "src\mod\applications\mod_blacklist\mod_blacklist.2010.vcxproj", "{50AAC2CE-BFC9-4912-87CC-C6381850D735}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_httapi", "src\mod\applications\mod_httapi\mod_httapi.2010.vcxproj", "{4748FF56-CA85-4809-97D6-A94C0FAC1D77}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_abstraction", "src\mod\applications\mod_abstraction\mod_abstraction.2010.vcxproj", "{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -1428,6 +1434,20 @@ Global
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|x64.Build.0 = Release Passthrough|x64
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|x64 Setup.ActiveCfg = Release Passthrough|x64
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|x86 Setup.ActiveCfg = Release Passthrough|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|Win32.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x64.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x64.Build.0 = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x64 Setup.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x64 Setup.Build.0 = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.All|x86 Setup.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|Win32.ActiveCfg = Debug|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|x64.ActiveCfg = Debug|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|x64 Setup.ActiveCfg = Debug|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Debug|x86 Setup.ActiveCfg = Debug|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|Win32.ActiveCfg = Release|Win32
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|x64.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|x64 Setup.ActiveCfg = Release|x64
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD}.Release|x86 Setup.ActiveCfg = Release|Win32
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|Win32.ActiveCfg = Release|x64
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|x64.ActiveCfg = Release|x64
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|x64.Build.0 = Release|x64
@ -3680,6 +3700,40 @@ Global
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x64.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x64 Setup.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x86 Setup.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.All|Win32.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.All|x64.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.All|x64.Build.0 = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.All|x64 Setup.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.All|x86 Setup.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|Win32.ActiveCfg = Debug|Win32
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|Win32.Build.0 = Debug|Win32
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|x64.ActiveCfg = Debug|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|x64.Build.0 = Debug|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|x64 Setup.ActiveCfg = Debug|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Debug|x86 Setup.ActiveCfg = Debug|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|Win32.ActiveCfg = Release|Win32
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|Win32.Build.0 = Release|Win32
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|x64.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|x64.Build.0 = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|x64 Setup.ActiveCfg = Release|x64
{4748FF56-CA85-4809-97D6-A94C0FAC1D77}.Release|x86 Setup.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.All|Win32.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.All|x64.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.All|x64.Build.0 = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.All|x64 Setup.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.All|x86 Setup.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|Win32.ActiveCfg = Debug|Win32
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|Win32.Build.0 = Debug|Win32
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|x64.ActiveCfg = Debug|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|x64.Build.0 = Debug|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|x64 Setup.ActiveCfg = Debug|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Debug|x86 Setup.ActiveCfg = Debug|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|Win32.ActiveCfg = Release|Win32
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|Win32.Build.0 = Release|Win32
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|x64.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|x64.Build.0 = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|x64 Setup.ActiveCfg = Release|x64
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}.Release|x86 Setup.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3689,6 +3743,7 @@ Global
{5580D60E-0F77-4716-9CD4-B8E5986FA375} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{D3EC0AFF-76FC-4210-A825-9A17410660A3} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{7F1610F1-DD5A-4CF7-8610-30AB12C60ADD} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{8DEB383C-4091-4F42-A56F-C9E46D552D79} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{2C3C2423-234B-4772-8899-D3B137E5CA35} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{0B6C905B-142E-4999-B39D-92FF7951E921} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
@ -3730,6 +3785,8 @@ Global
{5C2B4D88-3BEA-4FE0-90DF-FA9836099D5F} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{50AAC2CE-BFC9-4912-87CC-C6381850D735} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{4748FF56-CA85-4809-97D6-A94C0FAC1D77} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F} = {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}

View File

@ -15,6 +15,7 @@ applications/mod_hash
#applications/mod_http_cache
#applications/mod_redis
applications/mod_voicemail
#applications/mod_voicemail_ivr
#applications/mod_directory
#applications/mod_lcr
applications/mod_expr
@ -40,7 +41,10 @@ applications/mod_valet_parking
#applications/mod_fsk
#applications/mod_ladspa
#applications/mod_mongo
#applications/mod_abstraction
#applications/mod_esl
applications/mod_sms
applications/mod_httapi
codecs/mod_g723_1
codecs/mod_amr
#codecs/mod_amrwb
@ -57,6 +61,7 @@ codecs/mod_siren
#codecs/mod_opus
#codecs/mod_sangoma_codec
#codecs/mod_dahdi_codec
#codecs/mod_isac
#dialplans/mod_dialplan_directory
dialplans/mod_dialplan_xml
dialplans/mod_dialplan_asterisk

View File

@ -0,0 +1,5 @@
<configuration name="abstraction.conf" description="Abstraction">
<apis>
<api name="user_name" description="Return Name for extension" syntax="<exten>" parse="(.*)" destination="user_data" argument="$1@default var effective_caller_id_name"/>
</apis>
</configuration>

View File

@ -118,6 +118,8 @@
<!-- <param name="ivr-dtmf-timeout" value="500"/> -->
<!-- How much to wait for the first DTMF, 0 forever -->
<!-- <param name="ivr-input-timeout" value="0" /> -->
<!-- Delay before a conference is asked to be terminated -->
<!-- <param name="endconf-grace-time" value="120" /> -->
</profile>
<profile name="wideband">

View File

@ -1,5 +1,7 @@
<configuration name="directory.conf" description="Directory">
<settings>
<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
<!--<param name="dbname" value="directory"/>-->
</settings>
<profiles>
<profile name="default">

View File

@ -0,0 +1,127 @@
<configuration name="httapi.conf" description="HT-TAPI Hypertext Telephony API">
<settings>
<!-- print xml on the consol -->
<param name="debug" value="true"/>
<!-- time to keep audio files when discoverd they were deleted from the http server -->
<param name="file-not-found-expires" value="300"/>
<!-- how often to re-check the server to make sure the remote file has not changed -->
<param name="file-cache-ttl" value="300"/>
</settings>
<profiles>
<profile name="default">
<!-- default params for conference action tags -->
<conference>
<param name="default-profile" value="default"/>
</conference>
<!-- default params for dial action tags -->
<dial>
<param name="context" value="default"/>
<param name="dialplan" value="XML"/>
</dial>
<!-- permissions -->
<permissions>
<!-- <permission name="all" value="true"/> -->
<!--<permission name="none" value="true"/> -->
<permission name="set-params" value="true"/>
<permission name="set-vars" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
-->
</permission>
<permission name="get-vars" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
-->
</permission>
<permission name="extended-data" value="false"/>
<permission name="execute-apps" value="true">
<!-- default to "deny" or "allow" -->
<application-list default="deny">
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<application name="info"/>
<application name="hangup"/>
</application-list>
</permission>
<permission name="expand-vars-in-tag-body" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
<api-list default="deny">
<api name="expr"/>
<api name="lua"/>
</api-list>
-->
</permission>
<permission name="dial" value="true"/>
<permission name="dial-set-context" value="false"/>
<permission name="dial-set-dialplan" value="false"/>
<permission name="dial-set-cid-name" value="false"/>
<permission name="dial-set-cid-number" value="false"/>
<permission name="dial-full-originate" value="false"/>
<permission name="conference" value="true"/>
<permission name="conference-set-profile" value="false"/>
</permissions>
<params>
<!-- default url can be overridden by app data -->
<param name="gateway-url" value="http://www.freeswitch.org/api/index.cgi" />
<!-- set this to provide authentication credentials to the server -->
<!--<param name="gateway-credentials" value="muser:mypass"/>-->
<!--<param name="auth-scheme" value="basic"/>-->
<!-- optional: this will enable the CA root certificate check by libcurl to
verify that the certificate was issued by a major Certificate Authority.
note: default value is disabled. only enable if you want this! -->
<!--<param name="enable-cacert-check" value="true"/>-->
<!-- optional: verify that the server is actually the one listed in the cert -->
<!-- <param name="enable-ssl-verifyhost" value="true"/> -->
<!-- optional: these options can be used to specify custom SSL certificates
to use for HTTPS communications. Either use both options or neither.
Specify your public key with 'ssl-cert-path' and the private key with
'ssl-key-path'. If your private key has a password, specify it with
'ssl-key-password'. -->
<!-- <param name="ssl-cert-path" value="$${base_dir}/conf/certs/public_key.pem"/> -->
<!-- <param name="ssl-key-path" value="$${base_dir}/conf/certs/private_key.pem"/> -->
<!-- <param name="ssl-key-password" value="MyPrivateKeyPassword"/> -->
<!-- optional timeout -->
<!-- <param name="timeout" value="10"/> -->
<!-- optional: use a custom CA certificate in PEM format to verify the peer
with. This is useful if you are acting as your own certificate authority.
note: only makes sense if used in combination with "enable-cacert-check." -->
<!-- <param name="ssl-cacert-file" value="$${base_dir}/conf/certs/cacert.pem"/> -->
<!-- optional: specify the SSL version to force HTTPS to use. Valid options are
"SSLv3" and "TLSv1". Otherwise libcurl will auto-negotiate the version. -->
<!-- <param name="ssl-version" value="TLSv1"/> -->
<!-- optional: enables cookies and stores them in the specified file. -->
<!-- <param name="cookie-file" value="/tmp/cookie-mod_xml_curl.txt"/> -->
<!-- one or more of these imply you want to pick the exact variables that are transmitted -->
<!--<param name="enable-post-var" value="Unique-ID"/>-->
</params>
</profile>
</profiles>
</configuration>

View File

@ -3,6 +3,8 @@
<param name="max-urls" value="10000"/>
<param name="location" value="$${base_dir}/http_cache"/>
<param name="default-max-age" value="86400"/>
<param name="prefetch-thread-count" value="8"/>
<param name="prefetch-queue-size" value="100"/>
</settings>
</configuration>

View File

@ -10,6 +10,9 @@
<!--<param name="logfile" value="/var/log/freeswitch.log"/>-->
<!-- At this length in bytes rotate the log file (0 for never) -->
<param name="rollover" value="10485760"/>
<!-- Maximum number of log files to keep before wrapping -->
<!-- If this parameter is enabled, the log filenames will not include a date stamp -->
<!-- <param name="maximum-rotate" value="32"/> -->
<!-- Uncomment to prefix all log lines by the session's uuid -->
<!-- <param name="uuid" value="true" /> -->
</settings>

View File

@ -62,6 +62,7 @@
<load module="mod_valet_parking"/>
<!--<load module="mod_fsk"/>-->
<!--<load module="mod_spy"/>-->
<load module="mod_httapi"/>
<!-- SNOM Module -->
<!--<load module="mod_snom"/>-->
@ -83,12 +84,14 @@
<load module="mod_speex"/>
<load module="mod_h26x"/>
<load module="mod_siren"/>
<!--<load module="mod_isac"/>-->
<!--<load module="mod_celt"/>-->
<!--<load module="mod_opus"/>-->
<!-- File Format Interfaces -->
<load module="mod_sndfile"/>
<load module="mod_native_file"/>
<!-- <load module="mod_shell_stream"/> -->
<!--For icecast/mp3 streams/files-->
<!--<load module="mod_shout"/>-->
<!--For local streams (play all the files in a directory)-->

View File

@ -0,0 +1,208 @@
<configuration name="voicemail_ivr.conf" description="Voicemail IVR">
<profiles>
<profile name="default">
<settings>
<param name="IVR-Maximum-Attempts" value="3" />
<param name="IVR-Entry-Timeout" value="3" />
<param name="Record-Format" value="wav" />
<!--<param name="Record-Sample-Rate" value="8000" />-->
<param name="Record-Silence-Hits" value="4" />
<param name="Record-Silence-Threshold" value="200" />
<param name="Record-Maximum-Length" value="30" />
<!--<param name="Record-Minimum-Length" value="3" />-->
<param name="Exit-Purge" value="true" />
<param name="Password-Mask" value="XXX." />
<param name="User-Mask" value="X." />
</settings>
<apis>
<api name="auth_login" value="vm_fsdb_auth_login" />
<api name="msg_list" value="vm_fsdb_msg_list" />
<api name="msg_count" value="vm_fsdb_msg_count" />
<api name="msg_delete" value="vm_fsdb_msg_delete" />
<api name="msg_undelete" value="vm_fsdb_msg_undelete" />
<api name="msg_save" value="vm_fsdb_msg_save" />
<api name="msg_purge" value="vm_fsdb_msg_purge" />
<api name="msg_get" value="vm_fsdb_msg_get" />
<api name="msg_forward" value="vm_fsdb_msg_forward" />
<api name="pref_greeting_set" value="vm_fsdb_pref_greeting_set" />
<api name="pref_recname_set" value="vm_fsdb_pref_recname_set" />
<api name="pref_password_set" value="vm_fsdb_pref_password_set" />
</apis>
<menus>
<menu name="std_authenticate">
<phrases>
<phrase name="fail_auth" value="fail_auth@voicemail_ivr" />
</phrases>
<keys>
</keys>
</menu>
<menu name="std_authenticate_ask_user">
<phrases>
<phrase name="instructions" value="enter_id@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" />
</keys>
</menu>
<menu name="std_authenticate_ask_password">
<phrases>
<phrase name="instructions" value="enter_pass@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" />
</keys>
</menu>
<menu name="std_main_menu">
<phrases>
<phrase name="msg_count" value="message_count@mtvoicemail" />
<phrase name="say_date" value="say_date_event@mtvoicemail" />
<phrase name="say_msg_number" value="say_message_number@mtvoicemail" />
<phrase name="menu_options" value="menu@mtvoicemail" />
</phrases>
<keys>
<key dtmf="1" action="new_msg:std_navigator" variable="VM-Key-Play-New-Messages" />
<key dtmf="2" action="saved_msg:std_navigator" variable="VM-Key-Play-Saved-Messages" />
<key dtmf="5" action="menu:std_preference" variable="VM-Key-Config-Menu"/>
<key dtmf="#" action="return" variable="VM-Key-Terminator" />
</keys>
</menu>
<menu name="std_navigator">
<settings>
<!--<param name="Nav-Action-On-Delete" value="next_msg" />-->
</settings>
<phrases>
<phrase name="msg_count" value="message_count@voicemail_ivr" />
<phrase name="say_date" value="say_date_event@voicemail_ivr" />
<phrase name="say_msg_number" value="say_message_number@voicemail_ivr" />
<phrase name="menu_options" value="listen_file_check@voicemail_ivr" />
<phrase name="ack" value="ack@voicemail_ivr" />
<phrase name="play_message" value="play_message@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="skip_intro" variable="VM-Key-Main-Listen-File" />
<key dtmf="6" action="next_msg" variable="VM-Key-Main-Next-Msg" />
<key dtmf="4" action="prev_msg" />
<key dtmf="7" action="delete_msg" variable="VM-Key-Main-Delete-File" /> <!-- Same key for undelete if it already deleted -->
<key dtmf="8" action="menu:std_forward" variable="VM-Key-Main-Forward" />
<key dtmf="3" action="save_msg" variable="VM-Key-Main-Save-File" />
<key dtmf="2" action="callback" variable="VM-Key-Main-Callback" />
<key dtmf="5" action="menu:std_preference" />
<key dtmf="#" action="return" /> <!-- TODO Might Conflict with future fast-forward -->
</keys>
</menu>
<menu name="std_preference">
<phrases>
<phrase name="menu_options" value="config_menu@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="menu:std_record_greeting_with_slot" variable="VM-Key-Record-Greeting" />
<key dtmf="2" action="menu:std_select_greeting_slot" variable="VM-Key-Choose-Greeting" />
<key dtmf="3" action="menu:std_record_name" variable="VM-Key-Record-Name" />
<key dtmf="6" action="menu:std_set_password" variable="VM-Key-Change-Password" />
<key dtmf="#" action="return" variable="VM-Key-Main-Menu" />
</keys>
</menu>
<menu name="std_record_greeting">
<phrases>
<phrase name="instructions" value="record_greeting@voicemail_ivr" />
<phrase name="play_recording" value="play_recording@voicemail_ivr" />
<phrase name="menu_options" value="record_file_check@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
<key dtmf="#" action="skip_instruction" />
</keys>
</menu>
<menu name="std_record_name">
<phrases>
<phrase name="instructions" value="record_name@voicemail_ivr" />
<phrase name="play_recording" value="play_recording@voicemail_ivr" />
<phrase name="menu_options" value="record_file_check@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
<key dtmf="#" action="skip_instruction" />
</keys>
</menu>
<menu name="std_record_message">
<phrases>
<phrase name="instructions" value="record_message@voicemail_ivr" />
<phrase name="play_recording" value="play_recording@voicemail_ivr" />
<phrase name="menu_options" value="record_file_check@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
<key dtmf="#" action="skip_instruction" />
</keys>
</menu>
<menu name="std_forward_ask_prepend">
<phrases>
<phrase name="menu_options" value="forward_ask_prepend@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="1" action="prepend" variable="VM-Key-Prepend" />
<key dtmf="8" action="forward" variable="VM-Key-Forward" />
<key dtmf="#" action="return" variable="VM-Key-Return" />
</keys>
</menu>
<menu name="std_forward_ask_extension">
<phrases>
<phrase name="instructions" value="forward_ask_extension@voicemail_ivr" />
<phrase name="ack" value="ack@voicemail_ivr" />
<phrase name="invalid_extension" value="invalid_extension@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" />
</keys>
</menu>
<menu name="std_select_greeting_slot">
<phrases>
<phrase name="instructions" value="choose_greeting@voicemail_ivr" />
<phrase name="invalid_slot" value="choose_greeting_fail@voicemail_ivr" />
<phrase name="selected_slot" value="greeting_selected@voicemail_ivr" />
</phrases>
<keys>
</keys>
</menu>
<menu name="std_record_greeting_with_slot">
<phrases>
<phrase name="instructions" value="choose_greeting@voicemail_ivr" />
</phrases>
<keys>
</keys>
</menu>
<menu name="std_set_password">
<phrases>
<phrase name="instructions" value="enter_pass@voicemail_ivr" />
</phrases>
<keys>
<key dtmf="#" action="ivrengine:terminate_entry" variable="VM-Key-Terminator" />
</keys>
</menu>
</menus>
</profile>
</profiles>
</configuration>

View File

@ -1,6 +1,8 @@
<configuration name="xml_curl.conf" description="cURL XML Gateway">
<bindings>
<binding name="example">
<!-- Allow to bind on a particular IP for requests sent -->
<!--<param name="bind-local" value="$${local_ip_v4}" />-->
<!-- The url to a gateway cgi that can generate xml similar to
what's in this file only on-the-fly (leave it commented if you dont
need it) -->

View File

@ -52,19 +52,19 @@
<!-- If the function "break" is encountered all parsing will cease -->
<input pattern="(\d+):(\d+)">
<match>
<action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
<action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
<action function="break"/>
</match>
<nomatch>
<action function="speak-text" data="Die Eingabe war ungültig."/>
<action function="speak-text" data="Die Eingabe war ungültig."/>
</nomatch>
</input>
<input pattern="(\d+) min (\d+) sek">
<match>
<action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
<action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
</match>
<nomatch>
<action function="speak-text" data="Die Eingabe war ungültig."/>
<action function="speak-text" data="Die Eingabe war ungültig."/>
</nomatch>
</input>
</macro>

View File

@ -64,7 +64,7 @@
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="Um neue Nachrichten zu hören, drücken Sie $1. Um gespeicherte Nachrichten zu hören, drücken Sie $2, Für erweiterte Optionen, drücken Sie $3. Zum beenden drücken Sie $4."/>
data="Um neue Nachrichten zu hören, drücken Sie $1. Um gespeicherte Nachrichten zu hören, drücken Sie $2, Für erweiterte Optionen, drücken Sie $3. Zum beenden drücken Sie $4."/>
</match>
</input>
</macro>
@ -74,7 +74,7 @@
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="Um eine Ansage aufzunehmen, drücken Sie $1. Um eine Ansage auszuwählen, drücken Sie $2. Um ihren Namen aufzunehmen, drücken Sie $3. Um zum Hauptmenü zurückzukehren, drücken Sie $4."/>
data="Um eine Ansage aufzunehmen, drücken Sie $1. Um eine Ansage auszuwählen, drücken Sie $2. Um ihren Namen aufzunehmen, drücken Sie $3. Um zum Hauptmenü zurückzukehren, drücken Sie $4."/>
</match>
</input>
</macro>
@ -83,7 +83,7 @@
<macro name="voicemail_record_name">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Sprechen Sie Ihren Namen nach dem Ton, drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
<action function="speak-text" data="Sprechen Sie Ihren Namen nach dem Ton, drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
</match>
</input>
</macro>
@ -92,7 +92,7 @@
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="Um die Aufzeichnung anzuhören, drücken Sie $1. Um die Aufzeichnung zu speichern, drücken Sie $2. Für eine erneute Aufnahme drücken Sie $3."/>
data="Um die Aufzeichnung anzuhören, drücken Sie $1. Um die Aufzeichnung zu speichern, drücken Sie $2. Für eine erneute Aufnahme drücken Sie $3."/>
</match>
</input>
</macro>
@ -101,7 +101,7 @@
<input pattern="^([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="Drücken Sie $1 um diese Nachricht als wichtig zu markieren. Um fortzufahren drücken Sie $2."/>
data="Drücken Sie $1 um diese Nachricht als wichtig zu markieren. Um fortzufahren drücken Sie $2."/>
</match>
</input>
</macro>
@ -110,7 +110,7 @@
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="Drücken Sie $1 um die Nachricht erneut zu hören. Um die Nachricht zu speichern, drücken Sie $2. Zum löschen der Nachricht drücken Sie $3. Für die Weiterleitung als Email, drücken Sie $4."/>
data="Drücken Sie $1 um die Nachricht erneut zu hören. Um die Nachricht zu speichern, drücken Sie $2. Zum löschen der Nachricht drücken Sie $3. Für die Weiterleitung als Email, drücken Sie $4."/>
</match>
</input>
</macro>
@ -118,7 +118,7 @@
<macro name="voicemail_choose_greeting">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Wählen Sie eine Ansage zwischen 1 und 3."/>
<action function="speak-text" data="Wählen Sie eine Ansage zwischen 1 und 3."/>
</match>
</input>
</macro>
@ -126,7 +126,7 @@
<macro name="voicemail_choose_greeting_fail">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Ungültige Eingabe."/>
<action function="speak-text" data="Ungültige Eingabe."/>
</match>
</input>
</macro>
@ -134,7 +134,7 @@
<macro name="voicemail_record_greeting">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Zeichnen Sie Ihre Ansage nach dem Ton auf. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
<action function="speak-text" data="Zeichnen Sie Ihre Ansage nach dem Ton auf. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
</match>
</input>
</macro>
@ -142,7 +142,7 @@
<macro name="voicemail_record_message">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Sprechen Sie nach dem Ton. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
<action function="speak-text" data="Sprechen Sie nach dem Ton. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
</match>
</input>
</macro>
@ -150,7 +150,7 @@
<macro name="voicemail_greeting_selected">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="Ansage $1 ausgewählt."/>
<action function="speak-text" data="Ansage $1 ausgewählt."/>
</match>
</input>
</macro>
@ -158,7 +158,7 @@
<macro name="voicemail_play_greeting">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="$1 ist nicht verfügbar."/>
<action function="speak-text" data="$1 ist nicht verfügbar."/>
</match>
</input>
</macro>

View File

@ -8,6 +8,7 @@
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
<X-PRE-PROCESS cmd="include" data="ivr/*.xml"/> <!-- IVR and custom phrases go here -->
</macros>
<X-PRE-PROCESS cmd="include" data="vm/voicemail_ivr.xml"/>
</phrases>
</language>
</include>

View File

@ -1,33 +1,61 @@
<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>
<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>
<macro name="has_called_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<macro name="has_called_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-has_joined.wav"/>
</match>
</input>
</macro>
<macro name="has_left_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<action function="play-file" data="conference/conf-has_joined.wav"/>
</match>
</input>
</macro>
<macro name="has_left_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-has_left.wav"/>
</match>
</input>
</macro>
<action function="play-file" data="conference/conf-has_left.wav"/>
</match>
</input>
</macro>
<macro name="callers_in_conf">
<input pattern="^1$" break_on_match="true">
<match>
<action function="sleep" data="500"/>
<!-- <action function="play-file" data="ivr/ivr-there_is.wav"/> -->
<action function="play-file" data="digits/1.wav"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-listener_in_conference.wav"/>
</match>
</input>
<input pattern="^(\d+)$">
<match>
<action function="sleep" data="500"/>
<action function="play-file" data="ivr/ivr-there_are.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-members_in_conference.wav"/>
</match>
<nomatch>
<action function="sleep" data="500"/>
<action function="play-file" data="ivr/ivr-there_are.wav"/>
<action function="play-file" data="digits/0.wav"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-members_in_conference.wav"/>
</nomatch>
</input>
</macro>
<macro name="enter_dest_number">
<input pattern="^(.*)$">

View File

@ -25,6 +25,22 @@
</input>
</macro>
<macro name="voicemail_change_pass_success">
<input pattern="(.*)">
<match>
<action function="play-file" data="ivr/ivr-Thank_you.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_change_pass_fail">
<input pattern="(.*)">
<match>
<action function="play-file" data="voicemail/vm-fail_auth.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_hello">
<input pattern="(.*)">
<match>

View File

@ -0,0 +1,397 @@
<include><!--This line will be ignored it's here to validate the xml and is optional -->
<macros name="voicemail_ivr">
<macro name="press_key">
<input pattern="^(.*):(.*)$">
<match>
<action function="play-file" data="$2"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="plurial_msg">
<input pattern="^[01]:(.*):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="$1"/>
</match>
</input>
<input pattern="^.*:(.*):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="$2"/>
</match>
</input>
</macro>
<macro name="enter_id">
<input pattern="(.+)">
<match>
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
<nomatch>
<action function="play-file" data="voicemail/vm-enter_id.wav"/>
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
</nomatch>
</input>
</macro>
<macro name="enter_pass">
<input pattern="(.+)">
<match>
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
<nomatch>
<action function="play-file" data="voicemail/vm-enter_pass.wav"/>
<action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
</nomatch>
</input>
</macro>
<macro name="fail_auth">
<input>
<match>
<action function="play-file" data="voicemail/vm-fail_auth.wav"/>
</match>
</input>
</macro>
<macro name="hello">
<input>
<match>
<!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
</match>
</input>
</macro>
<macro name="goodbye">
<input>
<match>
<action function="play-file" data="voicemail/vm-goodbye.wav"/>
</match>
</input>
</macro>
<macro name="abort">
<input>
<match>
<action function="play-file" data="voicemail/vm-abort.wav"/>
</match>
</input>
</macro>
<macro name="message_count">
<input field="${VM-Total-New-Urgent-Messages}" pattern="^(0)$">
<nomatch>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="${VM-Total-New-Urgent-Messages}" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-urgent-new.wav"/>
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
</nomatch>
</input>
<input field="${VM-Total-New-Messages}" pattern="^(\d+)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="${VM-Total-New-Messages}" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-new.wav"/>
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
</match>
</input>
<input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
<nomatch>
<action function="play-file" data="currency/and.wav"/>
<action function="say" data="${VM-Total-Saved-Messages}" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-saved.wav"/>
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
</nomatch>
</input>
</macro>
<macro name="menu">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-New-Messages}:voicemail/vm-listen_new.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-Saved-Messages}:voicemail/vm-listen_saved.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Config-Menu}:voicemail/vm-advanced.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Terminator}:voicemail/vm-to_exit.wav"/>
</match>
</input>
</macro>
<macro name="config_menu">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-Greeting}:voicemail/vm-to_record_greeting.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Choose-Greeting}:voicemail/vm-choose_greeting.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-Name}:voicemail/vm-record_name2.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Change-Password}:voicemail/vm-change_password.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Menu}:voicemail/vm-main_menu.wav"/>
</match>
</input>
</macro>
<macro name="record_name">
<input>
<match>
<action function="play-file" data="voicemail/vm-record_name1.wav"/>
</match>
</input>
</macro>
<macro name="forward_ask_prepend">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
</match>
</input>
</macro>
<macro name="forward_ask_extension">
<input>
<match>
<action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
<!-- <action function="phrase" phrase="play-file" data="voicemail/vm-followed_by.wav"/>
<action function="say" data="${VM-Key-Terminate}" method="pronounced" type="name_spelled"/>-->
</match>
</input>
</macro>
<macro name="record_file_check">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Save-File}:voicemail/vm-save_recording.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-File}:voicemail/vm-rerecord.wav"/>
</match>
</input>
</macro>
<macro name="record_urgent_check">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Urgent}:voicemail/vm-mark-urgent.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Terminator}:voicemail/vm-continue.wav"/>
</match>
</input>
</macro>
<macro name="forward_prepend">
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
</match>
</input>
</macro>
<macro name="forward_message_enter_extension">
<input pattern="^([0-9#*])$">
<match>
<action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
<action function="play-file" data="voicemail/vm-followed_by.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="invalid_extension">
<input>
<match>
<action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
</match>
</input>
</macro>
<macro name="listen_file_check">
<input>
<match>
<!--<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Next-Msg}:voicemail/vm-for_next_msg.wav"/>--> <!-- Not existant in callie recordings -->
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Save-File}:voicemail/vm-save_recording.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Delete-File}:voicemail/vm-delete_recording.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
</match>
</input>
<input field="${VM-Message-Email}" pattern="^$">
<nomatch>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Email}:voicemail/vm-forward_to_email.wav"/>
</nomatch>
</input>
<input>
<match>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Callback}:voicemail/vm-return_call.wav"/>
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
</match>
</input>
</macro>
<macro name="choose_greeting">
<input>
<match>
<action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
</match>
</input>
</macro>
<macro name="choose_greeting_fail">
<input>
<match>
<action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
</match>
</input>
</macro>
<macro name="record_greeting">
<input>
<match>
<action function="play-file" data="voicemail/vm-record_greeting.wav"/>
</match>
</input>
</macro>
<macro name="record_message">
<input>
<match>
<action function="play-file" data="voicemail/vm-record_message.wav"/>
</match>
</input>
</macro>
<macro name="greeting_selected">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="voicemail/vm-greeting.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-selected.wav"/>
</match>
</input>
</macro>
<macro name="play_greeting">
<input pattern="^(.*)$">
<match>
<action function="play-file" data="voicemail/vm-person.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-not_available.wav"/>
</match>
</input>
</macro>
<macro name="say_number">
<input pattern="^(\d+)$">
<match>
<action function="say" data="$1" method="pronounced" type="items"/>
</match>
</input>
</macro>
<macro name="say_message_number">
<input>
<match>
<action function="play-file" data="voicemail/vm-${VM-Message-Type}.wav"/>
<action function="play-file" data="voicemail/vm-message_number.wav"/>
<action function="say" data="${VM-Message-Number}" method="pronounced" type="items"/>
</match>
</input>
</macro>
<macro name="say_phone_number">
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<macro name="say_name">
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
<macro name="ack">
<input pattern="^(too-small)$">
<match>
<action function="play-file" data="voicemail/vm-too-small.wav"/>
</match>
</input>
<input pattern="^(undeleted)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(deleted)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(saved)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(emailed)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(marked-urgent)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
</macro>
<macro name="say_date">
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="short_date_time"/>
</match>
</input>
</macro>
<macro name="say_date_event">
<input>
<match>
<action function="say" data="${VM-Message-Received-Epoch}" method="pronounced" type="short_date_time"/>
</match>
</input>
</macro>
<macro name="play_message">
<input>
<match>
<action function="play-file" data="${VM-Message-File-Path}"/>
</match>
</input>
</macro>
<macro name="play_recording">
<input>
<match>
<action function="play-file" data="${VM-Record-File-Path}"/>
</match>
</input>
</macro>
<macro name="disk_quota_exceeded">
<input>
<match>
<action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
</match>
</input>
</macro>
</macros>
</include><!--This line will be ignored it's here to validate the xml and is optional -->

View File

@ -69,12 +69,25 @@
<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls" value="$${external_ssl_enable}"/>
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
<param name="tls-only" value="false"/>
<!-- additional bind parameters for TLS -->
<param name="tls-bind-params" value="transport=tls"/>
<!-- Port to listen on for TLS requests. (5081 will be used if unspecified) -->
<param name="tls-sip-port" value="$${external_tls_port}"/>
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
<param name="tls-cert-dir" value="$${external_ssl_dir}"/>
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
<param name="tls-passphrase" value=""/>
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
<param name="tls-verify-in-subjects" value=""/>
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
<param name="tls-version" value="$${sip_tls_version}"/>

View File

@ -176,12 +176,25 @@
<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls" value="$${internal_ssl_enable}"/>
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
<param name="tls-only" value="false"/>
<!-- additional bind parameters for TLS -->
<param name="tls-bind-params" value="transport=tls"/>
<!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
<param name="tls-sip-port" value="$${internal_tls_port}"/>
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
<param name="tls-cert-dir" value="$${internal_ssl_dir}"/>
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
<param name="tls-passphrase" value=""/>
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
<param name="tls-verify-in-subjects" value=""/>
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
<param name="tls-version" value="$${sip_tls_version}"/>

View File

@ -537,6 +537,8 @@ if test "x${ac_cv_func_mlockall}" = "xyes"; then
USE_MLOCKALL=yes
;;
*-freebsd*)
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
AC_MSG_RESULT([no, broken for non-root users])
;;
*)

View File

@ -186,7 +186,7 @@
</time>
<voicemail>
<prompt phrase="The person at extension" filename="vm-person.wav"/>
<prompt phrase="marked urgent" filename="vm-marked-urgent.wav"/>
<prompt phrase="marked urgent" filename="vm-marked_urgent.wav"/>
<prompt phrase="emailed" filename="vm-emailed.wav"/>
<prompt phrase="you have" filename="vm-you_have.wav"/>
<prompt phrase="please enter your i d, followed by" filename="vm-enter_id.wav"/>
@ -220,7 +220,7 @@
<prompt phrase="to listen to the recording" filename="vm-listen_to_recording.wav"/>
<prompt phrase="to save the recording" filename="vm-save_recording.wav"/>
<prompt phrase="to rerecord" filename="vm-rerecord.wav"/>
<prompt phrase="to mark this message urgent" filename="vm-mark-urgent.wav"/>
<prompt phrase="to mark this message urgent" filename="vm-mark_urgent.wav"/>
<prompt phrase="to continue" filename="vm-continue.wav"/>
<prompt phrase="to listen to the recording again" filename="vm-listen_to_recording_again.wav"/>
<prompt phrase="to delete the recording" filename="vm-delete_recording.wav"/>
@ -239,8 +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"/>
<prompt phrase="The PIN you entered is below the minimum length." filename="vm-pin_below_minimum_length.wav"/>
<prompt phrase="The minimum PIN length is..." filename="vm-minimum_pin_length_is.wav"/>
</voicemail>
<directory>
<prompt phrase="Please enter the first few letters of the persons" filename="dir-enter_person.wav"/>
@ -291,10 +291,11 @@
<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"/>
<prompt phrase="This conference is in Q and A mode." filename="conf-conference_is_in_qna_mode.wav"/>
<prompt phrase="Q and A mode..." filename="conf-qna_mode.wav"/>
<prompt phrase="Entry sound..." filename="conf-entry_sound.wav"/>
<prompt phrase="Exit sound..." filename="conf-exit_sound.wav"/>
<prompt phrase="This conference is full. Please contact the conference moderator." filename="conf-conference_is_full.wav"/>
</conference>
<ivr>
<prompt phrase="Account number" filename="ivr-account_number.wav"/>
@ -312,7 +313,6 @@
<prompt phrase="Send this caller to voicemail" filename="ivr-send_to_voicemail.wav"/>
<prompt phrase="To speak to a customer service representative" filename="ivr-speak_to_a_customer_service_representative.wav"/>
<prompt phrase="Take a message" filename="ivr-take_a_message.wav"/>
<prompt phrase="Thank you" filename="ivr-thank_you.wav"/>
<prompt phrase="That was an invalid entry" filename="ivr-that_was_an_invalid_entry.wav"/>
<prompt phrase="This is a call from" filename="ivr-this_is_a_call_from.wav"/>
<prompt phrase="This IVR will let you test some of the features..." filename="ivr-this_ivr_will_let_you_test_features.wav"/>
@ -397,7 +397,7 @@
<prompt phrase="The account balance is..." filename="ivr-account_balance_is.wav"/>
<prompt phrase="Thank you for calling. If you know your party's extension, please enter it now. For a directory, press..." filename="ivr-generic_greeting.wav"/>
<prompt phrase="...file..." filename="ivr-file.wav"/>
<prompt phrase="...files..." filename="ivr-files-.wav"/>
<prompt phrase="...files..." filename="ivr-files.wav"/>
<prompt phrase="For a wakeup call..." filename="ivr-for_a_wakeup_call.wav"/>
<prompt phrase="This is your wakeup call." filename="ivr-this_is_your_wakeup_call.wav"/>
<prompt phrase="To request a wakeup call..." filename="ivr-request_wakeup_call.wav"/>
@ -468,8 +468,8 @@
<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="...is now on." filename="ivr-is_now_on.wav"/>
<prompt phrase="...is now off." filename="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"/>
@ -489,13 +489,27 @@
<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="This conference is full. Please contact the conference moderator." filename="conf-conference_is_full.wav"/>
<prompt phrase="You do not have permission to perform this action." filename="ivr-not_have_permission.wav"/>
<prompt phrase="You're doing it wrong, but I'll try to connect you anyway. (Douchebag!)" filename="ivr-youre_doing_it_wrong.wav"/>
<prompt phrase="3... 2... 1... WE'RE ASTERISK FREE!!!" filename="ivr-were_asterisk_free"/>
<prompt phrase="" filename=""/>
<prompt phrase="" filename=""/>
<prompt phrase="3... 2... 1... WE'RE ASTERISK FREE!!!" filename="ivr-were_asterisk_free.wav"/>
<prompt phrase="Thank you for calling Douche Telecom, where we make sure that your communications never have that 'not so fresh' feeling!" filename="ivr-douche_telecom.wav"/>
<prompt phrase="To learn more about FreeSWITCH..." filename="ivr-to_learn_more_about_freeswitch.wav"/>
<!-- The following phrases still need to be recorded -->
<prompt phrase="Your password has been changed." filename="vm-password_has_been_changed.wav"/>
<prompt phrase="Please enter your new password, then press the pound key." filename="vm-enter_new_pin.wav"/>
<prompt phrase="The password you entered is not valid on this system." filename="vm-password_not_valid.wav"/>
<prompt phrase="A password such as '1111' or '1234' is not secure." filename="vm-password_is_not_secure.wav"/>
<prompt phrase="Please choose a password that does not contain all repeating or all consecutive digits." filename="vm-choose_password.wav"/>
<prompt phrase="Remember that your voicemail password is also your Web interface password." filename="vm-voicemail_password_is_web_password.wav"/>
<prompt phrase="Your conference will start shortly. Please stay on the line." filename="conf-conference_will_start_shortly.wav"/>
<prompt phrase="Asterisk is like syphilis: it hurts until it's gone." filename="ivr-asterisk_like_syphilis.wav"/>
<prompt phrase="...other persons in this conference." filename="conf-other_persons_conference.wav"/>
<prompt phrase="...other person in this conference." filename="conf-other_person_conference.wav"/>
<prompt phrase="...other member in this conference." filename="conf-other_member_conference.wav"/>
<prompt phrase="There is..." filename="ivr-there_is.wav"/>
<prompt phrase="That number is on the Do Not Call list." filename="ivr-do_not_call_list.wav"/>
<prompt phrase="The call attempt has been aborted." filename="ivr-call_attempt_aborted.wav"/>
<prompt phrase="" filename=""/>
</ivr>
<misc>
<prompt phrase="This call has been secured" filename="call_secured.wav"/>
@ -509,6 +523,12 @@
<prompt phrase="An error has occurred please contact the administrator" filename="error.wav"/>
<prompt phrase="Your call will be terminated in..." filename="misc-your_call_will_be_terminated_in.wav"/>
<prompt phrase="Your call has been terminated." filename="misc-your_call_has_been_terminated.wav"/>
<prompt phrase="To hear about ClueCon..." filename="misc-to_hear_about_cluecon.wav"/>
<prompt phrase="ClueCon is the premier open source telephony developer conference." filename="misc-cluecon_is_premier_conference.wav"/>
<prompt phrase="It is held in downtown Chicago each summer." filename="misc-chicago_each_summer.wav"/>
<prompt phrase="ClueCon brings together a wide range of VoIP engineers, software developers, and business persons." filename="misc-wide_range_of_persons.wav"/>
<prompt phrase="By attending ClueCon, you are showing support not only for FreeSWITCH but also the entire spectrum of open source telephony software." filename="misc-support_open_source_by_attending.wav"/>
<prompt phrase="CudaTel! You know you want one!" filename="misc-cudatel_you_know_you_want_one.wav"/>
</misc>
<zrtp>
<!-- base256 prompts for SAS -->

View File

@ -178,7 +178,7 @@
<prompt phrase="Bienvenue dans votre boîte aux lettres" filename="vm-hello.wav"/>
<prompt phrase="Au revoir" filename="vm-goodbye.wav"/>
<prompt phrase="Au bip, enregistrez votre nom, puis appuyez sur une touche ou arrêtez de parler pour finir l'enregistrement." filename="vm-record_name1.wav"/>
<prompt phrase="Choisissez un message d'accueil entre 1 et 9" filename="vm-choose_greeting.wav"/>
<prompt phrase="Choisissez un message d'accueil entre 1 et 9" filename="vm-choose_greeting_choose.wav"/>
<prompt phrase="Valeur incorrecte" filename="vm-choose_greeting_fail.wav"/>
<prompt phrase="Trop de tentatives incorrectes" filename="vm-abort.wav"/>
<prompt phrase="Pour modifier votre code d'accès" filename="vm-change_password.wav"/>
@ -210,7 +210,7 @@
<prompt phrase="Pour transférer l'enregistrement vers votre messagerie électronique" filename="vm-forward_to_email.wav"/>
<prompt phrase="message d'accueil" filename="vm-greeting.wav"/>
<prompt phrase="choisi" filename="vm-selected.wav"/>
<prompt phrase="n'est pas disponible" filename="vm-not_avaliable.wav"/>
<prompt phrase="n'est pas disponible" filename="vm-not_available.wav"/>
<prompt phrase="message numéro" filename="vm-message_number.wav"/>
<prompt phrase="effacé" filename="vm-deleted.wav"/>
<prompt phrase="Votre enregistrement est trop court, veuillez réessayer" filename="vm-too-small.wav"/>
@ -223,7 +223,7 @@
<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="Votre recherche a retourner aucune résultat, essayer de nouveaux." filename="dir-no_matching_results.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-too_many_result.wav"/>
<prompt phrase="Fin des résultats." filename="dir-no_more_results.wav"/>
@ -240,7 +240,7 @@
<conference>
<prompt phrase="NULL" filename="conf-ack.wav" type="tone"/>
<prompt phrase="NULL" filename="conf-nack.wav" type="tone"/>
<prompt phrase="Personne ne peut vous entendre." filename="conf-mute.wav"/>
<prompt phrase="Personne ne peut vous entendre." filename="conf-muted.wav"/>
<prompt phrase="Tout le monde peut vous entendre." filename="conf-unmuted.wav"/>
<prompt phrase="Vous êtes actuellement le seul participant dans cette conférence." filename="conf-alone.wav"/>
<prompt phrase="NULL" filename="conf-perpetual.wav" type="music"/>

View File

@ -429,17 +429,21 @@ export QA_RPATHS=$[ 0x0001|0x0002 ]
# Application Modules
#
######################################################################################################################
APPLICATION_MODULES_AE="applications/mod_avmd applications/mod_callcenter applications/mod_cidlookup applications/mod_cluechoo \
applications/mod_commands applications/mod_conference applications/mod_curl applications/mod_db applications/mod_directory \
applications/mod_distributor applications/mod_dptools applications/mod_easyroute applications/mod_enum \
applications/mod_esf applications/mod_expr applications/mod_blacklist"
APPLICATION_MODULES_FM="applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr applications/mod_limit \
applications/mod_memcache applications/mod_http_cache"
APPLICATION_MODULES_NY="applications/mod_nibblebill applications/mod_redis applications/mod_rss applications/mod_snom \
applications/mod_soundtouch applications/mod_spandsp applications/mod_spy applications/mod_stress \
applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail applications/mod_sms"
APPLICATION_MODULES_AC="applications/mod_abstraction applications/mod_avmd applications/mod_blacklist \
applications/mod_callcenter applications/mod_cidlookup applications/mod_cluechoo \
applications/mod_commands applications/mod_conference applications/mod_curl"
APPLICATION_MODULES_DE="applications/mod_db applications/mod_directory applications/mod_distributor \
applications/mod_dptools applications/mod_easyroute applications/mod_enum applications/mod_esf \
applications/mod_expr"
APPLICATION_MODULES_FR="applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr \
applications/mod_limit applications/mod_memcache applications/mod_http_cache \
applications/mod_nibblebill applications/mod_redis applications/mod_rss"
APPLICATION_MODULES_SZ="applications/mod_sms applications/mod_snom applications/mod_soundtouch \
applications/mod_spandsp applications/mod_spy applications/mod_stress \
applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail \
applications/mod_voicemail_ivr"
APPLICATIONS_MODULES="$APPLICATION_MODULES_AE $APPLICATION_MODULES_FM $APPLICATION_MODULES_NY $APPLICATION_MODULES_VZ"
APPLICATIONS_MODULES="$APPLICATION_MODULES_AC $APPLICATION_MODULES_DE $APPLICATION_MODULES_FR $APPLICATION_MODULES_SZ"
######################################################################################################################
#
# Automatic Speech Recognition and Text To Speech Modules
@ -451,8 +455,8 @@ ASR_TTS_MODULES="asr_tts/mod_pocketsphinx asr_tts/mod_flite asr_tts/mod_unimrcp"
# Codecs
#
######################################################################################################################
CODECS_MODULES="codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod_celt codecs/mod_codec2 codecs/mod_ilbc codecs/mod_mp4v \
codecs/mod_opus codecs/mod_silk codecs/mod_siren codecs/mod_theora "
CODECS_MODULES="codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod_celt codecs/mod_codec2 codecs/mod_ilbc \
codecs/mod_mp4v codecs/mod_opus codecs/mod_silk codecs/mod_siren codecs/mod_theora "
#
%if %{build_sng_tc}
CODECS_MODULES+="codecs/mod_sangoma_codec"
@ -474,15 +478,17 @@ DIRECTORIES_MODULES=""
# Endpoints
#
######################################################################################################################
ENDPOINTS_MODULES="endpoints/mod_dingaling endpoints/mod_loopback ../../libs/freetdm/mod_freetdm endpoints/mod_portaudio \
endpoints/mod_sofia endpoints/mod_skinny endpoints/mod_skypopen endpoints/mod_rtmp"
ENDPOINTS_MODULES="endpoints/mod_dingaling endpoints/mod_loopback ../../libs/freetdm/mod_freetdm \
endpoints/mod_portaudio endpoints/mod_sofia endpoints/mod_skinny endpoints/mod_skypopen \
endpoints/mod_rtmp"
######################################################################################################################
#
# Event Handlers
#
######################################################################################################################
EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_sqlite event_handlers/mod_event_socket event_handlers/mod_event_multicast"
EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_sqlite event_handlers/mod_event_socket \
event_handlers/mod_event_multicast"
######################################################################################################################
#
# File and Audio Format Handlers
@ -749,6 +755,7 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/*.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/extensions.conf
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/mime.types
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/abstraction.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/acl.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/alsa.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/blacklist.conf.xml
@ -805,6 +812,7 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/unicall.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/unimrcp.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/voicemail.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/voicemail_ivr.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/xml_cdr.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/xml_curl.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/xml_rpc.conf.xml
@ -888,6 +896,7 @@ fi
# Modules in Alphabetical Order, please keep them that way..
#
######################################################################################################################
%{prefix}/mod/mod_abstraction.so*
%{prefix}/mod/mod_amrwb.so*
%{prefix}/mod/mod_avmd.so*
%{prefix}/mod/mod_blacklist.so*
@ -960,6 +969,7 @@ fi
%{prefix}/mod/mod_valet_parking.so*
%{prefix}/mod/mod_vmd.so*
%{prefix}/mod/mod_voicemail.so*
%{prefix}/mod/mod_voicemail_ivr.so*
%{prefix}/mod/mod_xml_cdr.so*
%{prefix}/mod/mod_xml_curl.so*
%{prefix}/mod/mod_xml_rpc.so*

View File

@ -124,7 +124,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
if (writefd != CURL_SOCKET_BAD) {
if (pfd[num].revents & POLLOUT)
ret |= CSELECT_OUT;
if (pfd[num].revents & POLLERR)
if (pfd[num].revents & (POLLERR|POLLHUP))
ret |= CSELECT_ERR;
}

View File

@ -614,8 +614,7 @@ static void clear_line(void)
static void redisplay(void)
{
#ifdef WIN32
#else
#ifndef WIN32
const LineInfo *lf = el_line(el);
const char *c = lf->buffer;
if (!(write_str(prompt_str))) goto done;
@ -1124,7 +1123,6 @@ int main(int argc, char *argv[])
char dft_cfile[512] = "fs_cli.conf";
#endif
char *home = getenv("HOME");
char *term = getenv("TERM");
/* Vars for optargs */
int opt;
static struct option options[] = {
@ -1159,15 +1157,11 @@ int main(int argc, char *argv[])
int argv_quiet = 0;
int loops = 2, reconnect = 0, timeout = 0;
if (term && (!strncasecmp("screen", term, 6) ||
!strncasecmp("vt100", term, 5))) {
feature_level = 1;
} else {
feature_level = 0;
}
#ifdef WIN32
feature_level = 0;
#else
feature_level = 1;
#endif
strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
@ -1357,7 +1351,12 @@ int main(int argc, char *argv[])
}
global_handle = &handle;
global_profile = profile;
esl_thread_create_detached(msg_thread_run, &handle);
if (esl_thread_create_detached(msg_thread_run, &handle) != ESL_SUCCESS) {
printf("Error starting thread!\n");
esl_disconnect(&handle);
return 0;
}
#ifdef HAVE_EDITLINE
el = el_init(__FILE__, stdin, stdout, stderr);

View File

@ -166,7 +166,7 @@ namespace ManagedEslTest
ESLconnection eslConnection = new ESLconnection(sckClient.Handle.ToInt32());
ESLevent eslEvent = eslConnection.GetInfo();
string strUuid = eslEvent.GetHeader("UNIQUE-ID");
string strUuid = eslEvent.GetHeader("UNIQUE-ID", 0);
eslConnection.SendRecv("myevents");
eslConnection.SendRecv("divert_events on");

View File

@ -72,6 +72,16 @@
#include <poll.h>
#endif
#ifndef ESL_MIN
#define ESL_MIN(x,y) ((x) < (y) ? (x) : (y))
#endif
#ifndef ESL_MAX
#define ESL_MAX(x,y) ((x) > (y) ? (x) : (y))
#endif
#ifndef ESL_CLAMP
#define ESL_CLAMP(min,max,val) (ESL_MIN(max,ESL_MAX(val,min)))
#endif
/* Written by Marc Espie, public domain */
#define ESL_CTYPE_NUM_CHARS 256
@ -1187,7 +1197,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
}
rrval = handle_recv(handle, handle->socket_buf, sizeof(handle->socket_buf) - 1);
*((char *)handle->socket_buf + rrval) = '\0';
*((char *)handle->socket_buf + ESL_CLAMP(0, sizeof(handle->socket_buf) - 1, rrval)) = '\0';
if (rrval == 0) {
if (++zc >= 100) {
@ -1224,7 +1234,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
sofar = esl_buffer_read(handle->packet_buf, body, len);
} else {
r = handle_recv(handle, handle->socket_buf, sizeof(handle->socket_buf) - 1);
*((char *)handle->socket_buf + r) = '\0';
*((char *)handle->socket_buf + ESL_CLAMP(0, sizeof(handle->socket_buf) - 1, r)) = '\0';
if (r < 0) {
strerror_r(handle->errnum, handle->err, sizeof(handle->err));

View File

@ -285,7 +285,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_FALSE;
esl_status_t status = (esl_status_t) ESL_FALSE;
int x = 0;
esl_ssize_t hlen = -1;
unsigned long hash = 0;
@ -875,12 +875,12 @@ ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char
if (!(cj = cJSON_Parse(json))) {
return ESL_FALSE;
return (esl_status_t) ESL_FALSE;
}
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
cJSON_Delete(cj);
return ESL_FALSE;
return (esl_status_t) ESL_FALSE;
}
for (cjp = cj->child; cjp; cjp = cjp->next) {

View File

@ -60,7 +60,7 @@ struct esl_thread {
#endif
};
size_t thread_default_stacksize = 0;
size_t thread_default_stacksize = 240 * 1024;
void esl_thread_override_default_stacksize(size_t size)
{
@ -119,7 +119,9 @@ esl_status_t esl_thread_create_detached_ex(esl_thread_function_t func, void *dat
status = ESL_SUCCESS;
goto done;
failpthread:
pthread_attr_destroy(&thread->attribute);
#endif

View File

@ -281,6 +281,253 @@ with the signaling protocols that you can run on top of your I/O interfaces.
</span>
</r2_spans>
<!-- Sangoma ISDN PRI/BRI spans. Requires libsng_isdn to be installed -->
<sangoma_pri_spans>
<span name="wp1">
<!--
Switch emulation/Variant
Possible values are:
national
4ess
5ess
qsig
euroisdn
ntt
<param name="switchtype" value="national"/>
-->
<!--
Signalling
Possible values are:
net
cpe
<param name="signalling" value="cpe"/>
-->
<!--
Overlap - whether to support overlap receive
Possible values are: Yes/No
<param name="overlap" value="yes"/>
-->
<!--
Facility - whether to support facility messages
Possible values are: Yes/No
<param name="facility" value="yes"/>
-->
<!--
Minimum Digits
In overlap receive mode.
Minimum number of digits to receive before sending notification
to the dialplan
Possible values are: <Any digit>
<param name="min-digits" value="8"/>
-->
<!--
TEI - default value for Terminal Equipment Identifier.
Used in Point-to-point connections
Possible values are: <1-127>
<param name="tei" value="0"/>
-->
<!--
Type of Number (TON)
Set the TON on outbound calls
Possible values are:
unknown
international
national
network-specific
subscriber-number
abbreviated-number
<param name="outbound-called-ton" value="unknown"/>
<param name="outbound-calling-ton" value="unknown"/>
<param name="outbound-rdnis-ton" value="unknown"/>
-->
<!--
Numbering Plan Indendification (NPI)
Set the NPI on outbound calls
Possible values are:
unknown
isdn
data
telex
national
private
reserved
<param name="outbound-called-npi" value="unknown"/>
<param name="outbound-calling-npi" value="unknown"/>
<param name="outbound-rdnis-npi" value="unknown"/>
-->
<!--
Bearer Capability - Transfer Capability
Set the Bearer Capability - Transfer Capability on outbound calls
Possible values are:
speech
unrestricted-digital-information
restricted-digital-information
3.1-Khz-audio
7-Khz-audio
15-Khz-audio
video
<param name="outbound-bc-transfer-cap" value="speech"/>
-->
<!--
Bearer Capability - User Layer 1
Set the Bearer Capability - User Layer 1 on outbound calls
Possible values are:
V.110
ulaw
alaw
<param name="outbound-bc-user-layer1" value="speech"/>
-->
<!--
Channel Restart Timeout
If we do not receive a RESTART message within this timeout on link
UP, we will send a channel restart.
<param name="channel-restart-timeout" value="20"/>
-->
<!--
Local Number (MSN)
On incoming calls, we will only respond to this call if
the Called Party Number matches this value.
Note: Up to 8 local numbers can be added per span.
<param name="local-number" value="9054741990"/>
-->
<!--
Facility Timeout
Amount of time to wait for the FACILITY message after a SETUP message is
received
<param name="facility-timeout" value="1"/>
-->
<!--
Transfer Timeout
Amount of time to wait for the remote switch to respond to a transfer request
<param name="transfer-timeout" value="20"/>
-->
<!--
AT&T Transfer - Remove DTMF
Whether to remove DTMF tones received from remote switch when performing
AT&T Transfer.
<param name="att-remove-dtmf" value="yes/no"/>
-->
<!--
Facility Information Element Decoding
Whether to decode contents within Facility IE. You should only disable this option if your custom application has its own Facility IE decoding.
<param name="facility-ie-decode" value="yes/no"/>
-->
<!--
Ignore cause value
When using 5ESS switchtype, whether or not do initiate disconnects based on cause code.
<param name="ignore-cause-value" value="yes/no"/>
-->
<!--
Trace (Interpreted)
Whether or not to enable Q921/Q931 trace on start
<param name="q931-trace" value="yes/no"/>
<param name="q921-trace" value="yes/no"/>
-->
<!--
Trace (Raw)
Whether or not to enable Q921/Q931 trace on start
<param name="q931-raw-trace" value="yes/no"/>
<param name="q921-raw-trace" value="yes/no"/>
-->
<!--
Force sending complete
Will add Sending Complete IE to outgoing SETUP message
By default, enabled on EuroISDN, disabled on US variants.
<param name="force-sending-complete" value="yes/no"/>
-->
<!--
Early Media Override
Assume early media is available, even if Q.931 message does not have
progress indicator IE = in-band data ready
Possible values
on-proceed
on-progress
on-alert
<param name="early-media-override" value="on-alert"/>
-->
<!--
Invert Channel ID Invert Bit
Invert the Channel ID Extend Bit
<param name="chan-id-invert-extend-bit" value="yes/no"/>
-->
<!--
CID Name transmit method
How to transmit Caller ID Name
Possible values:
display-ie
user-user-ie
facility-ie
default (will transmit CID-Name based on variant)
<param name="cid-name-transmit-method" value="default"/>
-->
<!--
CID Name transmit
Whether to transmit Caller ID Name
Possible values:
yes - always send CID-name
no - nether send CID-name
default (will transmit CID-Name based on variant)
<param name="cid-name-transmit-method" value="default"/>
-->
<!--
Q.931 Timers in seconds
Override default Q.931 values
timers:
timer-t301
timer-t302
timer-t303
timer-t304
timer-t305
timer-t306
timer-t307
timer-t308
timer-t310
timer-t312
timer-t313
timer-t314
timer-t316
timer-t318
timer-t319
timer-t322
<param name="timer-t301" value="10"/>
-->
</span>
</sangoma_pri_spans>
<!--
PRI passive tapping spans. Requires patched version from libpri at http://svn.digium.com/svn/libpri/team/moy/tap-1.4
You must also configure FreeTDM with "-with-pritap" (see ./configure help for details)

View File

@ -4251,6 +4251,42 @@ end:
return SWITCH_STATUS_SUCCESS;
}
FTDM_CLI_DECLARE(ftdm_cmd_alarms)
{
ftdm_alarm_flag_t alarmbits = FTDM_ALARM_NONE;
uint32_t chan_id = 0;
ftdm_span_t *span;
if (argc < 3) {
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[1], &span);
chan_id = atoi(argv[2]);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
} else if (chan_id) {
if(chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid channel\n");
} else {
ftdm_channel_t *chan = ftdm_span_get_channel(span, chan_id);
if (!chan) {
stream->write_function(stream, "-ERR channel not configured\n");
} else {
ftdm_channel_get_alarms(chan, &alarmbits);
if (!strlen(ftdm_channel_get_last_error(chan))) {
stream->write_function(stream, "+OK No alarms\n");
} else {
stream->write_function(stream, "-ERR %s on %s:%d\n", ftdm_channel_get_last_error(chan), argv[1], chan);
}
}
}
}
end:
return SWITCH_STATUS_SUCCESS;
}
FTDM_CLI_DECLARE(ftdm_cmd_sigstatus)
{
ftdm_span_t *span = NULL;
@ -4657,6 +4693,7 @@ static ftdm_cli_entry_t ftdm_cli_options[] =
{ "start", "<span_id|span_name>", "", ftdm_cmd_start_stop },
{ "stop", "<span_id|span_name>", "", ftdm_cmd_start_stop },
{ "reset", "<span_id|span_name> [<chan_id>]", "", ftdm_cmd_reset },
{ "alarms", "<span_id> <chan_id>", "", ftdm_cmd_alarms },
{ "dump", "<span_id|span_name> [<chan_id>]", "", ftdm_cmd_dump },
{ "sigstatus", "get|set <span_id|span_name> [<chan_id>] [<sigstatus>]", "::[set:get", ftdm_cmd_sigstatus },
{ "trace", "<path> <span_id|span_name> [<chan_id>]", "", ftdm_cmd_trace },

View File

@ -1188,7 +1188,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read_event(ftdm_channel_t *ftdmchan, ftdm
ftdm_channel_lock(ftdmchan);
if (!span->fio->channel_next_event) {
ftdm_log(FTDM_LOG_ERROR, "channel_next_event method not implemented in module %s!", span->fio->name);
ftdm_log(FTDM_LOG_ERROR, "channel_next_event method not implemented in module %s!\n", span->fio->name);
status = FTDM_NOTIMPL;
goto done;
}
@ -2548,7 +2548,9 @@ FT_DECLARE(ftdm_status_t) _ftdm_call_place(const char *file, const char *func, i
goto done;
}
/* let the user know which channel was picked and which call id was generated */
caller_data->fchan = fchan;
caller_data->call_id = fchan->caller_data.call_id;
done:
ftdm_channel_unlock(fchan);
@ -4574,7 +4576,7 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span_channels(ftdm_span_t *span, const
ftdm_assert_return(span->fio != NULL, FTDM_EINVAL, "span with no I/O configured\n");
ftdm_assert_return(span->fio->configure_span != NULL, FTDM_NOTIMPL, "span I/O with no channel configuration implemented\n");
currindex = span->chan_count;
currindex = span->chan_count;
*configured = 0;
*configured = span->fio->configure_span(span, str, chan_config->type, chan_config->name, chan_config->number);
if (!*configured) {
@ -4604,8 +4606,10 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span_channels(ftdm_span_t *span, const
}
if (chan_config->debugdtmf) {
span->channels[chan_index]->dtmfdbg.requested = 1;
span->channels[chan_index]->dtmfdbg.requested = 1;
}
span->channels[chan_index]->dtmfdetect.duration_ms = chan_config->dtmfdetect_ms;
}
return FTDM_SUCCESS;
@ -4628,6 +4632,7 @@ static ftdm_status_t load_config(void)
memset(&chan_config, 0, sizeof(chan_config));
sprintf(chan_config.group_name, "__default");
chan_config.dtmfdetect_ms = 45;
if (!ftdm_config_open_file(&cfg, cfg_name)) {
return FTDM_FAIL;
@ -4802,6 +4807,10 @@ static ftdm_status_t load_config(void)
} else if (!strcasecmp(var, "debugdtmf")) {
chan_config.debugdtmf = ftdm_true(val);
ftdm_log(FTDM_LOG_DEBUG, "Setting debugdtmf to '%s'\n", chan_config.debugdtmf ? "yes" : "no");
} else if (!strncasecmp(var, "dtmfdetect_ms", sizeof("dtmfdetect_ms")-1)) {
if (sscanf(val, "%d", &(chan_config.dtmfdetect_ms)) != 1) {
ftdm_log(FTDM_LOG_ERROR, "invalid dtmfdetect_ms: '%s'\n", val);
}
} else if (!strncasecmp(var, "iostats", sizeof("iostats")-1)) {
if (ftdm_true(val)) {
chan_config.iostats = FTDM_TRUE;

View File

@ -391,7 +391,7 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
case FTDM_SUCCESS:
/* Check if there are any channels that have data available */
for (citer = ftdm_span_get_chan_iterator(span, chaniter); citer; citer = ftdm_iterator_next(citer)) {
len = 1000;
len = sizeof(data);
ftdmchan = ftdm_iterator_current(citer);
if (FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_RX_DISABLED)) {

View File

@ -49,7 +49,11 @@
#include "private/ftdm_core.h"
#include "ftmod_sangoma_isdn_user.h"
#ifdef WIN32
#include <sng_isdn.h>
#else
#include <sng_isdn/sng_isdn.h>
#endif
/* Theoretical limit for MAX_SPANS_PER_NFAS_LINK is 31,
but set to 8 for now to save some memory */
@ -67,8 +71,6 @@
#define MI_NOTIFY 0x14
#endif
/* TODO: rename all *_cc_* to *_an_* */
typedef enum {
FLAG_RESET_RX = (1 << 0),
FLAG_RESET_TX = (1 << 1),
@ -258,7 +260,7 @@ typedef struct sngisdn_span_data {
uint8_t setup_arb;
uint8_t facility_ie_decode;
uint8_t facility;
int8_t facility_timeout;
int32_t facility_timeout;
uint8_t att_remove_dtmf;
int32_t transfer_timeout;
uint8_t num_local_numbers;
@ -273,6 +275,24 @@ typedef struct sngisdn_span_data {
uint8_t force_sending_complete;
uint8_t cid_name_method;
uint8_t send_cid_name;
int32_t timer_t301;
int32_t timer_t302;
int32_t timer_t303;
int32_t timer_t304;
int32_t timer_t305;
int32_t timer_t306;
int32_t timer_t307;
int32_t timer_t308;
int32_t timer_t310;
int32_t timer_t312;
int32_t timer_t313;
int32_t timer_t314;
int32_t timer_t316;
int32_t timer_t318;
int32_t timer_t319;
int32_t timer_t322;
char* local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
ftdm_timer_id_t timers[SNGISDN_NUM_SPAN_TIMERS];
ftdm_sched_t *sched;
@ -479,6 +499,7 @@ ftdm_status_t get_calling_subaddr(ftdm_channel_t *ftdmchan, CgPtySad *cgPtySad);
ftdm_status_t get_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd);
ftdm_status_t get_facility_ie(ftdm_channel_t *ftdmchan, FacilityStr *facilityStr);
ftdm_status_t get_facility_ie_str(ftdm_channel_t *ftdmchan, uint8_t *data, uint8_t data_len);
ftdm_status_t get_network_specific_fac(ftdm_channel_t *ftdmchan, NetFac *netFac);
ftdm_status_t set_calling_num(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb);
ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb);
@ -488,6 +509,7 @@ ftdm_status_t set_calling_name(ftdm_channel_t *ftdmchan, ConEvnt *conEvnt);
ftdm_status_t set_calling_subaddr(ftdm_channel_t *ftdmchan, CgPtySad *cgPtySad);
ftdm_status_t set_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd, ftdm_sngisdn_progind_t prog_ind);
ftdm_status_t set_bear_cap_ie(ftdm_channel_t *ftdmchan, BearCap *bearCap);
ftdm_status_t set_network_specific_fac(ftdm_channel_t *ftdmchan, NetFac *netFac);
ftdm_status_t set_chan_id_ie(ftdm_channel_t *ftdmchan, ChanId *chanId);
ftdm_status_t set_restart_ind_ie(ftdm_channel_t *ftdmchan, RstInd *rstInd);
ftdm_status_t set_facility_ie(ftdm_channel_t *ftdmchan, FacilityStr *facilityStr);

View File

@ -34,6 +34,7 @@
#include "ftmod_sangoma_isdn.h"
static ftdm_status_t parse_timer(const char* val, int32_t *target);
static ftdm_status_t parse_switchtype(const char* switch_name, ftdm_span_t *span);
static ftdm_status_t parse_signalling(const char* signalling, ftdm_span_t *span);
static ftdm_status_t add_local_number(const char* val, ftdm_span_t *span);
@ -42,6 +43,16 @@ static ftdm_status_t set_switchtype_defaults(ftdm_span_t *span);
extern ftdm_sngisdn_data_t g_sngisdn_data;
static ftdm_status_t parse_timer(const char* val, int32_t *target)
{
*target = atoi(val);
if (*target < 0) {
*target = 0;
}
return FTDM_SUCCESS;
}
static ftdm_status_t parse_yesno(const char* var, const char* val, uint8_t *target)
{
if (ftdm_true(val)) {
@ -369,15 +380,9 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
return FTDM_FAIL;
}
} else if (!strcasecmp(var, "facility-timeout")) {
signal_data->facility_timeout = atoi(val);
if (signal_data->facility_timeout < 0) {
signal_data->facility_timeout = 0;
}
parse_timer(val, &signal_data->facility_timeout);
} else if (!strcasecmp(var, "transfer-timeout")) {
signal_data->transfer_timeout = atoi(val);
if (signal_data->transfer_timeout < 0) {
signal_data->transfer_timeout = 0;
}
parse_timer(val, &signal_data->transfer_timeout);
} else if (!strcasecmp(var, "att-remove-dtmf")) {
parse_yesno(var, val, &signal_data->att_remove_dtmf);
} else if (!strcasecmp(var, "facility-ie-decode")) {
@ -428,6 +433,38 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
ftdm_log(FTDM_LOG_WARNING, "Invalid option %s for parameter %s\n", val, var);
signal_data->send_cid_name = SNGISDN_OPT_DEFAULT;
}
} else if (!strcasecmp(var, "timer-t301")) {
parse_timer(val, &signal_data->timer_t301);
} else if (!strcasecmp(var, "timer-t302")) {
parse_timer(val, &signal_data->timer_t302);
} else if (!strcasecmp(var, "timer-t303")) {
parse_timer(val, &signal_data->timer_t303);
} else if (!strcasecmp(var, "timer-t304")) {
parse_timer(val, &signal_data->timer_t304);
} else if (!strcasecmp(var, "timer-t305")) {
parse_timer(val, &signal_data->timer_t305);
} else if (!strcasecmp(var, "timer-t306")) {
parse_timer(val, &signal_data->timer_t306);
} else if (!strcasecmp(var, "timer-t307")) {
parse_timer(val, &signal_data->timer_t307);
} else if (!strcasecmp(var, "timer-t308")) {
parse_timer(val, &signal_data->timer_t308);
} else if (!strcasecmp(var, "timer-t310")) {
parse_timer(val, &signal_data->timer_t310);
} else if (!strcasecmp(var, "timer-t312")) {
parse_timer(val, &signal_data->timer_t312);
} else if (!strcasecmp(var, "timer-t313")) {
parse_timer(val, &signal_data->timer_t313);
} else if (!strcasecmp(var, "timer-t314")) {
parse_timer(val, &signal_data->timer_t314);
} else if (!strcasecmp(var, "timer-t316")) {
parse_timer(val, &signal_data->timer_t316);
} else if (!strcasecmp(var, "timer-t318")) {
parse_timer(val, &signal_data->timer_t318);
} else if (!strcasecmp(var, "timer-t319")) {
parse_timer(val, &signal_data->timer_t319);
} else if (!strcasecmp(var, "timer-t322")) {
parse_timer(val, &signal_data->timer_t322);
} else {
ftdm_log(FTDM_LOG_WARNING, "Ignoring unknown parameter %s\n", ftdm_parameters[paramindex].var);
}

View File

@ -750,10 +750,12 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.redirAdr.eh.pres = NOTPRSNT; /* redirAdr Numbering Plan */
cfg.t.cfg.s.inDLSAP.forwSubsc = FALSE; /* programmed forwarding subscription */
cfg.t.cfg.s.inDLSAP.cndSubsc = TRUE; /* calling adddress delivery service subscription */
/* 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;
if (signal_data->timer_t301 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t301.val = signal_data->timer_t301;
}
/* It looks like ETSI is the only variant that supports Overlap */
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN) {
@ -764,21 +766,54 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.tmr.t302.val = 0;
}
if (signal_data->timer_t302 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t302.val = signal_data->timer_t302;
}
cfg.t.cfg.s.inDLSAP.tmr.t303.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t303.val = 4;
if (signal_data->timer_t303 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t303.val = signal_data->timer_t303;
}
cfg.t.cfg.s.inDLSAP.tmr.t304.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t304.val = 30;
if (signal_data->timer_t304 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t304.val = signal_data->timer_t304;
}
cfg.t.cfg.s.inDLSAP.tmr.t305.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t305.val = 30;
if (signal_data->timer_t305 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t305.val = signal_data->timer_t305;
}
cfg.t.cfg.s.inDLSAP.tmr.t306.enb = FALSE;
cfg.t.cfg.s.inDLSAP.tmr.t306.val = 35;
if (signal_data->timer_t306 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t306.val = signal_data->timer_t306;
}
cfg.t.cfg.s.inDLSAP.tmr.t307.enb = FALSE;
cfg.t.cfg.s.inDLSAP.tmr.t307.val = 35;
if (signal_data->timer_t307 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t307.val = signal_data->timer_t307;
}
cfg.t.cfg.s.inDLSAP.tmr.t308.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t308.val = 4;
cfg.t.cfg.s.inDLSAP.tmr.t310.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t310.val = 120;
if (signal_data->timer_t308 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t308.val = signal_data->timer_t308;
}
if (signal_data->signalling == SNGISDN_SIGNALING_NET) {
cfg.t.cfg.s.inDLSAP.tmr.t312.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t312.val = cfg.t.cfg.s.inDLSAP.tmr.t303.val+2;
@ -786,18 +821,52 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.tmr.t312.enb = FALSE;
}
if (signal_data->timer_t310 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t310.val = signal_data->timer_t310;
}
if (signal_data->timer_t312 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t312.val = signal_data->timer_t312;
}
cfg.t.cfg.s.inDLSAP.tmr.t313.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t313.val = 4;
if (signal_data->timer_t313 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t313.val = signal_data->timer_t313;
}
cfg.t.cfg.s.inDLSAP.tmr.t316.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t316.val = 120;
if (signal_data->timer_t316 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t316.val = signal_data->timer_t316;
}
cfg.t.cfg.s.inDLSAP.tmr.t316c.enb = FALSE;
cfg.t.cfg.s.inDLSAP.tmr.t316c.val = 35;
cfg.t.cfg.s.inDLSAP.tmr.t318.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t318.val = 4;
if (signal_data->timer_t318 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t318.val = signal_data->timer_t318;
}
cfg.t.cfg.s.inDLSAP.tmr.t319.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t319.val = 4;
if (signal_data->timer_t319 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t319.val = signal_data->timer_t319;
}
cfg.t.cfg.s.inDLSAP.tmr.t322.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t322.val = 4;
if (signal_data->timer_t322 > 0) {
cfg.t.cfg.s.inDLSAP.tmr.t322.val = signal_data->timer_t322;
}
cfg.t.cfg.s.inDLSAP.tmr.t332.enb = FALSE;
cfg.t.cfg.s.inDLSAP.tmr.t332.val = 35;

View File

@ -133,8 +133,9 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
get_redir_num(ftdmchan, &conEvnt->redirNmb);
get_calling_subaddr(ftdmchan, &conEvnt->cgPtySad);
get_prog_ind_ie(ftdmchan, &conEvnt->progInd);
get_facility_ie(ftdmchan, &conEvnt->facilityStr);
get_facility_ie(ftdmchan, &conEvnt->facilityStr);
get_calling_name(ftdmchan, conEvnt);
get_network_specific_fac(ftdmchan, &conEvnt->netFac[0]);
ftdm_log_chan(sngisdn_info->ftdmchan, FTDM_LOG_INFO, "Incoming call: Called No:[%s] Calling No:[%s]\n", ftdmchan->caller_data.dnis.digits, ftdmchan->caller_data.cid_num.digits);
@ -945,14 +946,8 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
break;
}
break;
case 2: /* overlap sending/receiving */
case 2: /* overlap sending */
switch (ftdmchan->state) {
case FTDM_CHANNEL_STATE_COLLECT:
/* T302 Timeout reached */
/* Send the call to user, and see if they accept it */
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "T302 Timer expired, proceeding with call\n");
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_RING);
break;
case FTDM_CHANNEL_STATE_PROCEED:
case FTDM_CHANNEL_STATE_PROGRESS:
case FTDM_CHANNEL_STATE_RINGING:
@ -1069,7 +1064,10 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
case 25: /* Overlap receiving */
switch (ftdmchan->state) {
case FTDM_CHANNEL_STATE_COLLECT:
/* do nothing */
/* T302 Timeout reached */
/* Send the call to user, and see if they accept it */
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "T302 Timer expired, proceeding with call\n");
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_RING);
break;
default:
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Don't know how to handle incompatible state. remote call state:%d our state:%s\n", call_state, ftdm_channel_state2str(ftdmchan->state));

View File

@ -69,6 +69,7 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
set_calling_subaddr(ftdmchan, &conEvnt.cgPtySad);
set_redir_num(ftdmchan, &conEvnt.redirNmb);
set_calling_name(ftdmchan, &conEvnt);
set_network_specific_fac(ftdmchan, &conEvnt.netFac[0]);
/* set_facility_ie will overwrite Calling Name for NI-2 if user specifies custom Facility IE */
set_facility_ie(ftdmchan, &conEvnt.facilityStr);
@ -481,6 +482,12 @@ void sngisdn_snd_data(ftdm_channel_t *dchan, uint8_t *data, ftdm_size_t len)
sng_l1_frame_t l1_frame;
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) dchan->span->signal_data;
if (len > sizeof(l1_frame.data)) {
ftdm_log_chan(dchan, FTDM_LOG_ERROR, "Received frame of %"FTDM_SIZE_FMT" bytes, exceeding max size of %"FTDM_SIZE_FMT" bytes\n",
len, sizeof(l1_frame.data));
return;
}
memset(&l1_frame, 0, sizeof(l1_frame));
l1_frame.len = len;

View File

@ -43,8 +43,21 @@ 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)
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);
SNGISDN_ENUM_NAMES(SNGISDN_NETSPECFAC_TYPE_NAMES, SNGISDN_NETSPECFAC_TYPE_STRINGS)
SNGISDN_STR2ENUM(ftdm_str2ftdm_sngisdn_netspecfac_type, ftdm_sngisdn_netspecfac_type2str, ftdm_sngisdn_netspecfac_type_t, SNGISDN_NETSPECFAC_TYPE_NAMES, SNGISDN_NETSPECFAC_TYPE_INVALID)
SNGISDN_ENUM_NAMES(SNGISDN_NETSPECFAC_PLAN_NAMES, SNGISDN_NETSPECFAC_PLAN_STRINGS)
SNGISDN_STR2ENUM(ftdm_str2ftdm_sngisdn_netspecfac_plan, ftdm_sngisdn_netspecfac_plan2str, ftdm_sngisdn_netspecfac_plan_t, SNGISDN_NETSPECFAC_PLAN_NAMES, SNGISDN_NETSPECFAC_PLAN_INVALID)
SNGISDN_ENUM_NAMES(SNGISDN_NETSPECFAC_SPEC_NAMES, SNGISDN_NETSPECFAC_SPEC_STRINGS)
SNGISDN_STR2ENUM(ftdm_str2ftdm_sngisdn_netspecfac_spec, ftdm_sngisdn_netspecfac_spec2str, ftdm_sngisdn_netspecfac_spec_t, SNGISDN_NETSPECFAC_SPEC_NAMES, SNGISDN_NETSPECFAC_SPEC_INVALID)
static uint8_t _get_trillium_val(ftdm2trillium_t *vals, unsigned int num_vals, uint8_t ftdm_val, uint8_t default_val);
static uint8_t _get_ftdm_val(ftdm2trillium_t *vals, unsigned int num_vals, uint8_t trillium_val, uint8_t default_val);
#define get_trillium_val(vals, ftdm_val, default_val) _get_trillium_val(vals, ftdm_array_len(vals), ftdm_val, default_val)
#define get_ftdm_val(vals, trillium_val, default_val) _get_ftdm_val(vals, ftdm_array_len(vals), trillium_val, default_val)
ftdm_status_t get_calling_name_from_usr_usr(ftdm_channel_t *ftdmchan, UsrUsr *usrUsr);
ftdm_status_t get_calling_name_from_display(ftdm_channel_t *ftdmchan, Display *display);
ftdm_status_t get_calling_name_from_ntDisplay(ftdm_channel_t *ftdmchan, NtDisplay *display);
@ -71,29 +84,51 @@ ftdm2trillium_t ton_codes[] = {
{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 nsf_spec_codes[] = {
{SNGISDN_NETSPECFAC_SPEC_ACCUNET, 0xe6},
{SNGISDN_NETSPECFAC_SPEC_MEGACOM, 0xe3},
{SNGISDN_NETSPECFAC_SPEC_MEGACOM_800, 0xe2},
{SNGISDN_NETSPECFAC_SPEC_SDDN, 0xe1},
{SNGISDN_NETSPECFAC_SPEC_INVALID, 0x00},
};
ftdm2trillium_t nsf_type_codes[] = {
{SNGISDN_NETSPECFAC_TYPE_USER_SPEC, 0x00},
{SNGISDN_NETSPECFAC_TYPE_NATIONAL_NETWORK_IDENT, 0x02},
{SNGISDN_NETSPECFAC_TYPE_INTERNATIONAL_NETWORK_IDENT, 0x03},
{SNGISDN_NETSPECFAC_TYPE_INVALID, 0x00},
};
ftdm2trillium_t nsf_plan_codes[] = {
{SNGISDN_NETSPECFAC_PLAN_UNKNOWN, 0x00},
{SNGISDN_NETSPECFAC_PLAN_CARRIER_IDENT, 0x01},
{SNGISDN_NETSPECFAC_PLAN_DATA_NETWORK_IDENT, 0x03},
{SNGISDN_NETSPECFAC_PLAN_INVALID, 0x00},
};
static uint8_t _get_trillium_val(ftdm2trillium_t *vals, unsigned int num_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;
int i;
for (i = 0; i < num_vals; i++) {
if (vals[i].ftdm_val == ftdm_val) {
return vals[i].trillium_val;
}
}
return default_val;
}
static uint8_t _get_ftdm_val(ftdm2trillium_t *vals, unsigned int num_vals, uint8_t trillium_val, uint8_t default_val)
{
int i;
for (i = 0; i < num_vals; i++) {
if (vals[i].trillium_val == trillium_val) {
return vals[i].ftdm_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;
@ -530,6 +565,29 @@ ftdm_status_t get_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd)
}
ftdm_status_t get_network_specific_fac(ftdm_channel_t *ftdmchan, NetFac *netFac)
{
if (!netFac->eh.pres) {
return FTDM_FAIL;
}
if (netFac->netFacSpec.pres == PRSNT_NODEF) {
char digits_string [32];
memcpy(digits_string, (const char*)netFac->netFacSpec.val, netFac->netFacSpec.len);
digits_string[netFac->netFacSpec.len] = '\0';
sngisdn_add_var((sngisdn_chan_data_t*)ftdmchan->call_data, "isdn.netFac.spec", digits_string);
}
if (netFac->typeNetId.pres == PRSNT_NODEF) {
sngisdn_add_var((sngisdn_chan_data_t*)ftdmchan->call_data, "isdn.netFac.type", ftdm_sngisdn_netspecfac_type2str(get_ftdm_val(nsf_type_codes, netFac->typeNetId.val, 0x00)));
}
if (netFac->netIdPlan.pres == PRSNT_NODEF) {
sngisdn_add_var((sngisdn_chan_data_t*)ftdmchan->call_data, "isdn.netFac.plan", ftdm_sngisdn_netspecfac_type2str(get_ftdm_val(nsf_plan_codes, netFac->netIdPlan.val, 0x00)));
}
return FTDM_SUCCESS;
}
ftdm_status_t set_calling_num(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
{
ftdm_caller_data_t *caller_data = &ftdmchan->caller_data;
@ -900,6 +958,67 @@ ftdm_status_t set_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd, ftdm_s
return FTDM_SUCCESS;
}
ftdm_status_t set_network_specific_fac(ftdm_channel_t *ftdmchan, NetFac *netFac)
{
const char *str = NULL;
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.netFac.spec");
if (ftdm_strlen_zero(str)) {
/* Network-specific facility specification is mandatory, cannot send IE
without it */
return FTDM_SUCCESS;
} else {
ftdm_sngisdn_netspecfac_spec_t spec = ftdm_str2ftdm_sngisdn_netspecfac_spec(str);
netFac->eh.pres = PRSNT_NODEF;
netFac->netFacSpec.pres = PRSNT_NODEF;
if (spec == SNGISDN_NETSPECFAC_SPEC_INVALID) {
int byte = 0;
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Non-standard NSF specified:%s\n", str);
if (sscanf(str, "%x", &byte) == 1) {
netFac->netFacSpec.val[0] = byte & 0xFF;
}
netFac->netFacSpec.len = 1;
} else {
/* User is using one of the pre-specified NSF's */
netFac->netFacSpec.val[0] = get_trillium_val(nsf_spec_codes, spec, 0x00);
netFac->netFacSpec.len = 1;
}
}
netFac->lenNetId.pres = PRSNT_NODEF;
netFac->lenNetId.val = 0;
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.netFac.type");
if (!ftdm_strlen_zero(str)) {
netFac->typeNetId.pres = PRSNT_NODEF;
netFac->typeNetId.val = ftdm_str2ftdm_sngisdn_netspecfac_type(str);
}
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.netFac.plan");
if (!ftdm_strlen_zero(str)) {
netFac->netIdPlan.pres = PRSNT_NODEF;
netFac->netIdPlan.val = ftdm_str2ftdm_sngisdn_netspecfac_plan(str);
}
if (netFac->netIdPlan.pres == PRSNT_NODEF || netFac->typeNetId.pres == PRSNT_NODEF) {
netFac->lenNetId.val++;
}
str = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.netFac.ident");
if (!ftdm_strlen_zero(str)) {
netFac->lenNetId.val++;
netFac->netId.pres = PRSNT_NODEF;
memcpy(netFac->netId.val, str, strlen(str));
}
return FTDM_SUCCESS;
}
ftdm_status_t set_user_to_user_ie(ftdm_channel_t *ftdmchan, UsrUsr *usrUsr)
{
sngisdn_chan_data_t *sngisdn_info = ftdmchan->call_data;

View File

@ -771,7 +771,7 @@ uint32_t sngisdn_decode_ie(char *str, uint32_t *str_len, uint8_t current_codeset
default:
{
*str_len += sprintf(&str[*str_len], "Undecoded");
print_hex_dump((char*)str, str_len, data, index_start, index_end);
print_hex_dump((char*)str, str_len, data, index_start, index_end + 1);
}
break;
}

View File

@ -101,6 +101,42 @@ typedef enum {
#define SNGISDN_PROGIND_LOC_STRINGS "user", "private-net-local-user", "public-net-local-user", "transit-network", "public-net-remote-user", "private-net-remote-user", "beyond-interworking", "invalid"
SNGISDN_STR2ENUM_P(ftdm_str2ftdm_sngisdn_progind_loc, ftdm_sngisdn_progind_loc2str, ftdm_sngisdn_progind_loc_t);
typedef enum {
/* User Specified */
SNGISDN_NETSPECFAC_TYPE_USER_SPEC,
/* National network identification */
SNGISDN_NETSPECFAC_TYPE_NATIONAL_NETWORK_IDENT,
/* International network identification */
SNGISDN_NETSPECFAC_TYPE_INTERNATIONAL_NETWORK_IDENT,
/* Invalid */
SNGISDN_NETSPECFAC_TYPE_INVALID,
} ftdm_sngisdn_netspecfac_type_t;
#define SNGISDN_NETSPECFAC_TYPE_STRINGS "user-specified", "national-network-identification", "national-network-identification", "invalid"
SNGISDN_STR2ENUM_P(ftdm_str2ftdm_sngisdn_netspecfac_type, ftdm_sngisdn_netspecfac_type2str, ftdm_sngisdn_netspecfac_type_t);
typedef enum {
/* Unknown */
SNGISDN_NETSPECFAC_PLAN_UNKNOWN,
/* Carrier Identification Code */
SNGISDN_NETSPECFAC_PLAN_CARRIER_IDENT,
/* Data network identification code */
SNGISDN_NETSPECFAC_PLAN_DATA_NETWORK_IDENT,
/* Invalid */
SNGISDN_NETSPECFAC_PLAN_INVALID,
} ftdm_sngisdn_netspecfac_plan_t;
#define SNGISDN_NETSPECFAC_PLAN_STRINGS "unknown", "carrier-identification", "data-network-identification", "invalid"
SNGISDN_STR2ENUM_P(ftdm_str2ftdm_sngisdn_netspecfac_plan, ftdm_sngisdn_netspecfac_plan2str, ftdm_sngisdn_netspecfac_plan_t);
typedef enum {
/* Unknown */
SNGISDN_NETSPECFAC_SPEC_ACCUNET,
SNGISDN_NETSPECFAC_SPEC_MEGACOM,
SNGISDN_NETSPECFAC_SPEC_MEGACOM_800,
SNGISDN_NETSPECFAC_SPEC_SDDN,
SNGISDN_NETSPECFAC_SPEC_INVALID,
} ftdm_sngisdn_netspecfac_spec_t;
#define SNGISDN_NETSPECFAC_SPEC_STRINGS "accunet", "megacom", "megacom-800", "sddn", "invalid"
SNGISDN_STR2ENUM_P(ftdm_str2ftdm_sngisdn_netspecfac_spec, ftdm_sngisdn_netspecfac_spec2str, ftdm_sngisdn_netspecfac_spec_t);
#endif /* __FTMOD_SANGOMA_ISDN_USER_H__*/

View File

@ -233,11 +233,11 @@ int ftmod_ss7_parse_xml(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *spa
if (!strcasecmp(var, "dialplan")) {
/**********************************************************************/
/* do i give a shit about this??? */
/* don't care for now */
/**********************************************************************/
} else if (!strcasecmp(var, "context")) {
/**********************************************************************/
/* do i give a shit about this??? */
/* don't care for now */
/**********************************************************************/
} else if (!strcasecmp(var, "ccSpanId")) {
/**********************************************************************/

View File

@ -471,6 +471,7 @@ static FIO_CONFIGURE_FUNCTION(wanpipe_configure)
wp_globals.ring_off_ms = num;
}
}
}
return FTDM_SUCCESS;
@ -1010,7 +1011,7 @@ static FIO_READ_FUNCTION(wanpipe_read)
memset(&hdrframe, 0, sizeof(hdrframe));
rx_len = sangoma_readmsg_tdm(ftdmchan->sockfd, &hdrframe, (int)sizeof(hdrframe), data, (int)*datalen, 0);
*datalen = rx_len;
*datalen = 0;
if (rx_len == 0) {
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_WARNING, "Read 0 bytes\n");
@ -1027,6 +1028,7 @@ static FIO_READ_FUNCTION(wanpipe_read)
#endif
return FTDM_FAIL;
}
*datalen = rx_len;
if (ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_IO_STATS)) {
wanpipe_read_stats(ftdmchan, &hdrframe);
@ -1468,13 +1470,19 @@ static __inline__ ftdm_status_t wanpipe_channel_process_event(ftdm_channel_t *fc
if (tdm_api->wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_PRESENT) {
ftdm_set_flag(fchan, FTDM_CHANNEL_MUTE);
fchan->dtmfdetect.start_time = ftdm_current_time_in_ms();
}
if (tdm_api->wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_STOP) {
ftdm_clear_flag(fchan, FTDM_CHANNEL_MUTE);
if (ftdm_test_flag(fchan, FTDM_CHANNEL_INUSE)) {
ftdm_log_chan(fchan, FTDM_LOG_DEBUG, "Queuing wanpipe DTMF: %c\n", tmp_dtmf[0]);
ftdm_channel_queue_dtmf(fchan, tmp_dtmf);
ftdm_time_t diff = ftdm_current_time_in_ms() - fchan->dtmfdetect.start_time;
if (diff > fchan->dtmfdetect.duration_ms) {
ftdm_log_chan(fchan, FTDM_LOG_DEBUG, "Queuing wanpipe DTMF: %c (duration:%d min:%d)\n", tmp_dtmf[0], diff, fchan->dtmfdetect.duration_ms);
ftdm_channel_queue_dtmf(fchan, tmp_dtmf);
} else {
ftdm_log_chan(fchan, FTDM_LOG_DEBUG, "Ignoring wanpipe DTMF: %c (duration:%d min:%d)\n", tmp_dtmf[0], diff, fchan->dtmfdetect.duration_ms);
}
}
}
}

View File

@ -34,6 +34,7 @@
*
* Moises Silva <moy@sangoma.com>
* W McRoberts <fs@whmcr.com>
* Puskás Zsolt <errotan@gmail.com>
*
*/
@ -877,10 +878,13 @@ static FIO_COMMAND_FUNCTION(zt_command)
static FIO_GET_ALARMS_FUNCTION(zt_get_alarms)
{
struct zt_spaninfo info;
zt_params_t params;
memset(&info, 0, sizeof(info));
info.span_no = ftdmchan->physical_span_id;
memset(&params, 0, sizeof(params));
if (ioctl(CONTROL_FD, codes.SPANSTAT, &info)) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "ioctl failed (%s)", strerror(errno));
snprintf(ftdmchan->span->last_error, sizeof(ftdmchan->span->last_error), "ioctl failed (%s)", strerror(errno));
@ -889,6 +893,27 @@ static FIO_GET_ALARMS_FUNCTION(zt_get_alarms)
ftdmchan->alarm_flags = info.alarms;
/* get channel alarms if span has no alarms */
if (info.alarms == FTDM_ALARM_NONE) {
if (ioctl(ftdmchan->sockfd, codes.GET_PARAMS, &params)) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "ioctl failed (%s)", strerror(errno));
snprintf(ftdmchan->span->last_error, sizeof(ftdmchan->span->last_error), "ioctl failed (%s)", strerror(errno));
return FTDM_FAIL;
}
if (params.chan_alarms > 0) {
if (params.chan_alarms == DAHDI_ALARM_YELLOW) {
ftdmchan->alarm_flags = FTDM_ALARM_YELLOW;
}
else if (params.chan_alarms == DAHDI_ALARM_BLUE) {
ftdmchan->alarm_flags = FTDM_ALARM_BLUE;
}
else {
ftdmchan->alarm_flags = FTDM_ALARM_RED;
}
}
}
return FTDM_SUCCESS;
}
@ -1350,6 +1375,7 @@ static FIO_IO_LOAD_FUNCTION(zt_init)
zt_interface.write = zt_write;
zt_interface.poll_event = zt_poll_event;
zt_interface.next_event = zt_next_event;
zt_interface.channel_next_event = zt_channel_next_event;
zt_interface.channel_destroy = zt_channel_destroy;
zt_interface.get_alarms = zt_get_alarms;
*fio = &zt_interface;

View File

@ -339,6 +339,10 @@ ZT_ABIT = 8
#define DAHDI_HDLCRAWMODE _IOW (DAHDI_CODE, 36, int) /* Set a clear channel into HDLC w/out FCS checking/calculation mode */
#define DAHDI_HDLCFCSMODE _IOW (DAHDI_CODE, 37, int) /* Set a clear channel into HDLC w/ FCS mode */
/* Dahdi channel alarms */
#define DAHDI_ALARM_YELLOW (1 << 2) /* Yellow Alarm */
#define DAHDI_ALARM_BLUE (1 << 4) /* Blue Alarm */
/* Specify a channel on /dev/dahdi/chan -- must be done before any other ioctl's and is only valid on /dev/dahdi/chan */
#define DAHDI_SPECIFY _IOW (DAHDI_CODE, 38, int)

View File

@ -480,7 +480,7 @@ typedef enum {
FTDM_STR2ENUM_P(ftdm_str2ftdm_trunk_type, ftdm_trunk_type2str, ftdm_trunk_type_t)
/*! \brief Basic channel configuration provided to ftdm_configure_span_channels */
typedef struct ftdm_channel_config {
typedef struct ftdm_channel_config {
char name[FTDM_MAX_NAME_STR_SZ];
char number[FTDM_MAX_NUMBER_STR_SZ];
char group_name[FTDM_MAX_NAME_STR_SZ];
@ -488,6 +488,7 @@ typedef struct ftdm_channel_config {
float rxgain;
float txgain;
uint8_t debugdtmf;
uint32_t dtmfdetect_ms;
uint8_t iostats;
} ftdm_channel_config_t;

View File

@ -384,6 +384,11 @@ typedef struct {
ftdm_mutex_t *mutex;
} ftdm_dtmf_debug_t;
typedef struct {
uint32_t duration_ms;
ftdm_time_t start_time;
} ftdm_dtmf_detect_t;
/* 2^8 table size, one for each byte (sample) value */
#define FTDM_GAINS_TABLE_SIZE 256
struct ftdm_channel {
@ -463,6 +468,7 @@ struct ftdm_channel {
ftdm_timer_id_t hangup_timer;
ftdm_channel_iostats_t iostats;
ftdm_dtmf_debug_t dtmfdbg;
ftdm_dtmf_detect_t dtmfdetect;
ftdm_io_dump_t rxdump;
ftdm_io_dump_t txdump;
ftdm_interrupt_t *state_completed_interrupt; /*!< Notify when a state change is completed */

59
libs/iksemel/acinclude.m4 Normal file
View File

@ -0,0 +1,59 @@
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
if $PKG_CONFIG --exists "$2" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING($1_CFLAGS)
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
$1_LIBS=`$PKG_CONFIG --libs "$2"`
AC_MSG_RESULT($$1_LIBS)
else
$1_CFLAGS=""
$1_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
ifelse([$4], ,echo $$1_PKG_ERRORS,)
fi
AC_SUBST($1_CFLAGS)
AC_SUBST($1_LIBS)
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
ifelse([$3], , :, [$3])
else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
fi
])

View File

@ -838,12 +838,12 @@ static void do_presence(ldl_handle_t *handle, char *from, char *to, char *type,
char buf[512];
iks *tag;
if (!strchr(from, '/')) {
if (from && !strchr(from, '/')) {
snprintf(buf, sizeof(buf), "%s/talk", from);
from = buf;
}
if (ldl_test_flag(handle, LDL_FLAG_COMPONENT) && ldl_jid_domcmp(from, to)) {
if (ldl_test_flag(handle, LDL_FLAG_COMPONENT) && from && to && ldl_jid_domcmp(from, to)) {
globals.logger(DL_LOG_ERR, "Refusal to send presence from and to the same domain in component mode [%s][%s]\n", from, to);
return;
}
@ -1372,7 +1372,6 @@ static void on_log(ldl_handle_t *handle, const char *data, size_t size, int is_i
} else {
globals.logger(DL_LOG_NOTICE, "+xml:%s%s:%s", iks_is_secure(handle->parser) ? "Sec" : "", is_incoming ? "RECV" : "SEND", data);
}
}
}
@ -1444,7 +1443,11 @@ static ldl_queue_t ldl_flush_queue(ldl_handle_t *handle, int done)
while(apr_queue_trypop(handle->queue, &pop) == APR_SUCCESS) {
if (pop) {
msg = (iks *) pop;
if (!done) iks_send(handle->parser, msg);
if (!done) {
if (iks_send(handle->parser, msg) != IKS_OK) {
globals.logger(DL_LOG_DEBUG, "Failed sending data!\n");
};
};
iks_delete(msg);
pop = NULL;
sent_data = LDL_QUEUE_SENT;
@ -1474,7 +1477,9 @@ static ldl_queue_t ldl_flush_queue(ldl_handle_t *handle, int done)
if (globals.debug) {
globals.logger(DL_LOG_DEBUG, "Sending packet %s (%d left)\n", packet_node->id, packet_node->retries);
}
iks_send(handle->parser, packet_node->xml);
if (iks_send(handle->parser, packet_node->xml) != IKS_OK) {
globals.logger(DL_LOG_DEBUG, "Failed trying re-sending data!\n");
};
packet_node->next = now + 5000000;
sent_data = LDL_QUEUE_SENT;
}
@ -1500,8 +1505,8 @@ static ldl_queue_t ldl_flush_queue(ldl_handle_t *handle, int done)
static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
{
int timeout_ka = LDL_KEEPALIVE_TIMEOUT;
int count_ka = timeout_ka;
int count_ka = LDL_KEEPALIVE_TIMEOUT;
time_t tstart, tnow;
while (ldl_test_flag((&globals), LDL_FLAG_READY) && ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
int e;
@ -1532,6 +1537,8 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
j_setup_filter(handle);
globals.logger(DL_LOG_DEBUG, "xmpp connecting\n");
e = iks_connect_via(handle->parser,
handle->server ? handle->server : handle->acc->server,
handle->port ? handle->port : IKS_JABBER_PORT,
@ -1555,17 +1562,13 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
}
handle->counter = opt_timeout;
if ((tstart = time(NULL)) == -1) {
globals.logger(DL_LOG_DEBUG, "error determining connection time");
}
while (ldl_test_flag((&globals), LDL_FLAG_READY) && ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
e = iks_recv(handle->parser, 1);
if (count_ka-- <= 0) {
if( iks_send_raw(handle->parser, " ") == IKS_OK) {
count_ka = timeout_ka;
globals.logger(DL_LOG_DEBUG, "Sent keep alive signal\n");
}
}
if (handle->loop_callback) {
if (handle->loop_callback(handle) != LDL_STATUS_SUCCESS) {
ldl_clear_flag_locked(handle, LDL_FLAG_RUNNING);
@ -1582,14 +1585,24 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
}
if (IKS_OK != e || ldl_test_flag(handle, LDL_FLAG_BREAK)) {
globals.logger(DL_LOG_DEBUG, "io error 2 %d retry in %d second(s)\n", e, ++handle->fail_count);
globals.logger(DL_LOG_DEBUG, "io error 2 %d retry in %d second(s)", e, ++handle->fail_count);
if ((tnow = time(NULL)) == -1) {
globals.logger(DL_LOG_DEBUG, "error deterniming io error time");
}
if (difftime(tnow, tstart) > 30) {
/* this is a new error situation: reset counter */
globals.logger(DL_LOG_DEBUG, "resetting fail count");
handle->fail_count = 1;
}
microsleep(1000 * handle->fail_count);
goto fail;
}
if (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
ldl_flush_queue(handle, 0);
}
if (ldl_flush_queue(handle, 0) == LDL_QUEUE_SENT) {
count_ka = LDL_KEEPALIVE_TIMEOUT;
}
}
handle->counter--;
if (!ldl_test_flag(handle, LDL_FLAG_CONNECTED)) {
@ -1606,7 +1619,17 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
}
}
microsleep(100);
if (count_ka-- <= 0) {
if( iks_send_raw(handle->parser, " ") == IKS_OK) {
globals.logger(DL_LOG_DEBUG, "Sent keep alive signal");
count_ka = LDL_KEEPALIVE_TIMEOUT;
} else {
globals.logger(DL_LOG_DEBUG, "Failed sending keep alive signal");
microsleep(500);
break;
}
}
}
fail:

View File

@ -64,8 +64,8 @@ extern "C" {
#define LDL_MAX_PAYLOADS 50
#define LDL_RETRY 3
#define IKS_NS_COMPONENT "jabber:component:accept"
/* period between keep alive signals in 0.1sec units*/
#define LDL_KEEPALIVE_TIMEOUT 6000
/* period between keep alive signals in 1sec units*/
#define LDL_KEEPALIVE_TIMEOUT 300
/*! \brief A structure to store a jingle candidate */
struct ldl_candidate {

View File

@ -609,10 +609,15 @@ mc_again:
}
del = where - el->el_cursor.h;
#if 0
/* workaround miscounting of control characters in prompt by
avoiding absolute horizontal positioning */
if ((del < -4 || del > 4) && GoodStr(T_ch))
/* go there directly */
(void) tputs(tgoto(Str(T_ch), where, where), where, term__putc);
else {
else
#endif
{
if (del > 0) { /* moving forward */
if ((del > 4) && GoodStr(T_RI))
(void) tputs(tgoto(Str(T_RI), del, del),

View File

@ -171,9 +171,9 @@ int sendnewportmappingrequest(natpmp_t * p, int protocol,
p->pending_request[1] = (char)protocol;
p->pending_request[2] = 0;
p->pending_request[3] = 0;
*((uint16_t *)(p->pending_request + 4)) = htons(privateport);
*((uint16_t *)(p->pending_request + 6)) = htons(publicport);
*((uint32_t *)(p->pending_request + 8)) = htonl(lifetime);
*((uint16_t *)(intptr_t)(p->pending_request + 4)) = htons(privateport);
*((uint16_t *)(intptr_t)(p->pending_request + 6)) = htons(publicport);
*((uint32_t *)(intptr_t)(p->pending_request + 8)) = htonl(lifetime);
p->pending_request_len = 12;
return sendnatpmprequest(p);
}

View File

@ -1 +1 @@
Fri Dec 16 10:29:41 CST 2011
Mon Jan 16 17:26:19 CST 2012

0
libs/sofia-sip/configure.gnu Normal file → Executable file
View File

View File

@ -428,12 +428,16 @@ int nua_subscribe_server_report(nua_server_request_t *sr, tagi_t const *tags)
* @sa @RFC3265, #nua_i_subscribe, #nua_i_refer, NUTAG_ALLOW_EVENTS()
*/
#if 0
static int nua_notify_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
static int nua_notify_client_init_etag(nua_client_request_t *cr,
msg_t *msg, sip_t *sip,
tagi_t const *tags);
static int nua_notify_client_request(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
@ -442,7 +446,8 @@ static int nua_notify_client_report(nua_client_request_t *cr,
sip_t const *sip,
nta_outgoing_t *orq,
tagi_t const *tags);
#endif
#if 0
static nua_client_methods_t const nua_notify_client_methods = {
SIP_METHOD_NOTIFY, /* crm_method, crm_method_name */
0, /* crm_extra */
@ -460,6 +465,25 @@ static nua_client_methods_t const nua_notify_client_methods = {
nua_notify_client_report, /* crm_report */
NULL, /* crm_complete */
};
#endif
nua_client_methods_t const nua_notify_client_methods = {
SIP_METHOD_NOTIFY, /* crm_method, crm_method_name */
0, /* crm_extra */
{ /* crm_flags */
/* create_dialog */ 1,
/* in_dialog */ 1,
/* target refresh */ 1
},
NULL, /* crm_template */
NULL, /* crm_init */
NULL, /* crm_send */
NULL, /* crm_check_restart */
NULL, /* crm_recv */
NULL, /* crm_preliminary */
NULL, /* crm_report */
NULL, /* crm_complete */
};
/**@internal Send NOTIFY. */
int nua_stack_notify(nua_t *nua,
@ -469,7 +493,7 @@ int nua_stack_notify(nua_t *nua,
{
return nua_client_create(nh, e, &nua_notify_client_methods, tags);
}
#if 0
static int nua_notify_client_init(nua_client_request_t *cr,
msg_t *msg, sip_t *sip,
tagi_t const *tags)
@ -715,7 +739,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
return nua_base_client_request(cr, msg, sip, tags);
}
#endif
/** @NUA_EVENT nua_r_notify
*
* Response to an outgoing @b NOTIFY request.
@ -747,7 +771,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
*
* @END_NUA_EVENT
*/
#if 0
static int nua_notify_client_report(nua_client_request_t *cr,
int status, char const *phrase,
sip_t const *sip,
@ -782,7 +806,7 @@ static int nua_notify_client_report(nua_client_request_t *cr,
return 0;
}
#endif
static void nua_notify_usage_refresh(nua_handle_t *nh,
nua_dialog_state_t *ds,

View File

@ -198,6 +198,12 @@ enum tport_tls_verify_policy {
TPTLS_VERIFY_SUBJECTS_ALL = 0xF,
};
TPORT_DLL extern tag_typedef_t tptag_tls_passphrase;
#define TPTAG_TLS_PASSPHRASE(x) tptag_tls_passphrase, tag_str_v(x)
TPORT_DLL extern tag_typedef_t tptag_tls_passphrase_ref;
#define TPTAG_TLS_PASSPHRASE_REF(x) tptag_tls_passphrase_ref, tag_str_vr(&(x))
TPORT_DLL extern tag_typedef_t tptag_tls_verify_policy;
#define TPTAG_TLS_VERIFY_POLICY(x) tptag_tls_verify_policy, tag_uint_v((x))

View File

@ -359,7 +359,7 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
assert(self); assert(msg);
su = msg_addr(msg);
su_self = self->tp_addr;
su_self = self->tp_pri->pri_primary->tp_addr;
mr = self->tp_master;
@ -402,8 +402,8 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
}
#endif
hep_header.hp_dport = dst ? su->su_port : htons(atoi(self->tp_port));
hep_header.hp_sport = dst ? htons(atoi(self->tp_port)) : su->su_port;
hep_header.hp_dport = dst ? su->su_port : su_self->su_port;
hep_header.hp_sport = dst ? su_self->su_port : su->su_port;
/* Copy hepheader */

View File

@ -288,6 +288,16 @@ tag_typedef_t tptag_tls_version = UINTTAG_TYPEDEF(tls_version);
*/
tag_typedef_t tptag_tls_verify_peer = UINTTAG_TYPEDEF(tls_verify_peer);
/**@def TPTAG_TLS_PASSPHRASE(x)
*
* Sets the passphrase password to be used by openSSL to encrypt/decrypt
* private key files.
*
* @NEW_1_12_11.
*/
tag_typedef_t tptag_tls_passphrase = STRTAG_TYPEDEF(tls_passphrase);
/**@def TPTAG_TLS_VERIFY_POLICY(x)
*
* The verification of certificates can be controlled:

View File

@ -160,6 +160,27 @@ void tls_log_errors(unsigned level, char const *s, unsigned long e)
}
}
/*
* This callback hands back the password to be used during decryption.
*
* buf : the function will write the password into this buffer
* size : the size of "buf"
* rwflag : indicates whether the callback is being used for reading/
* decryption (0) or writing/encryption (1)
* userdata : pointer tls_issues_t where the passphrase is stored
*/
static int passwd_cb(char *buf, int size, int rwflag, void *userdata)
{
if (rwflag == 0) { // reading/decryption
tls_issues_t *tlsi = (tls_issues_t *)userdata;
strncpy(buf, tlsi->passphrase, size);
buf[size - 1] = '\0';
return strlen(tlsi->passphrase);
}
return 0;
}
static
tls_t *tls_create(int type)
@ -290,6 +311,12 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
return -1;
}
/* Set callback if we have a passphrase */
if (ti->passphrase != NULL) {
SSL_CTX_set_default_passwd_cb(tls->ctx, passwd_cb);
SSL_CTX_set_default_passwd_cb_userdata(tls->ctx, (void *)ti);
}
if (!SSL_CTX_use_certificate_file(tls->ctx,
ti->cert,
SSL_FILETYPE_PEM)) {

View File

@ -56,6 +56,7 @@ typedef struct tls_issues_s {
int configured; /* If non-zero, complain about certificate errors */
char *cert; /* CERT file name. File format is PEM */
char *key; /* Private key file. PEM format */
char *passphrase; /* Passphrase for password protected private key */
char *randFile; /* Seed file for the PRNG (default: tls_seed.dat) */
char *CAfile; /* PEM file of CA's */
char *CApath; /* PEM file path of CA's */

View File

@ -182,6 +182,7 @@ static int tport_tls_init_master(tport_primary_t *pri,
char const *path = NULL;
unsigned tls_version = 1;
unsigned tls_verify = 0;
char const *passphrase = NULL;
unsigned tls_policy = TPTLS_VERIFY_NONE;
unsigned tls_depth = 0;
unsigned tls_date = 1;
@ -198,6 +199,7 @@ static int tport_tls_init_master(tport_primary_t *pri,
TPTAG_CERTIFICATE_REF(path),
TPTAG_TLS_VERSION_REF(tls_version),
TPTAG_TLS_VERIFY_PEER_REF(tls_verify),
TPTAG_TLS_PASSPHRASE_REF(passphrase),
TPTAG_TLS_VERIFY_POLICY_REF(tls_policy),
TPTAG_TLS_VERIFY_DEPTH_REF(tls_depth),
TPTAG_TLS_VERIFY_DATE_REF(tls_date),
@ -218,6 +220,7 @@ static int tport_tls_init_master(tport_primary_t *pri,
ti.configured = path != tbf;
ti.randFile = su_sprintf(autohome, "%s/%s", path, "tls_seed.dat");
ti.key = su_sprintf(autohome, "%s/%s", path, "agent.pem");
ti.passphrase = su_strdup(autohome, passphrase);
ti.cert = ti.key;
ti.CAfile = su_sprintf(autohome, "%s/%s", path, "cafile.pem");
ti.version = tls_version;

View File

@ -1,7 +1,8 @@
#!/bin/sh
CONFDIR=@prefix@/conf/ssl
DAYS=365
DAYS=2190
KEY_SIZE=2048
TMPFILE="/tmp/fs-ca-$$-$(date +%Y%m%d%H%M%S)"
@ -38,7 +39,7 @@ setup_ca() {
if [ ! -e "${CONFDIR}/CA/config.tpl" ]; then
cat > "${CONFDIR}/CA/config.tpl" <<-EOF
[ req ]
default_bits = 1024
default_bits = $ENV::KEY_SIZE
prompt = no
distinguished_name = req_dn
@ -46,11 +47,23 @@ setup_ca() {
commonName = %CN%
organizationName = %ORG%
[ ext ]
[ server ]
nsComment="FS Server Cert"
basicConstraints=CA:FALSE
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
subjectAltName=%ALTNAME%
nsCertType=server
extendedKeyUsage=serverAuth
[ client ]
nsComment="FS Client Cert"
basicConstraints=CA:FALSE
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
subjectAltName=%ALTNAME%
nsCertType=client
extendedKeyUsage=clientAuth
EOF
fi
@ -62,14 +75,10 @@ setup_ca() {
"${CONFDIR}/CA/config.tpl" \
> "${TMPFILE}.cfg" || exit 1
openssl req -new -out "${CONFDIR}/CA/careq.pem" \
-newkey rsa:1024 -keyout "${CONFDIR}/CA/cakey.pem" \
openssl req -out "${CONFDIR}/CA/cacert.pem" \
-new -x509 -keyout "${CONFDIR}/CA/cakey.pem" \
-config "${TMPFILE}.cfg" -nodes -sha1 >/dev/null || exit 1
openssl x509 -req -signkey "${CONFDIR}/CA/cakey.pem" -in "${CONFDIR}/CA/careq.pem" \
-out "${CONFDIR}/CA/cacert.pem" -extfile "${TMPFILE}.cfg" \
-extensions ext -days ${DAYS} -sha1 >/dev/null || exit 1
cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
rm "${TMPFILE}.cfg"
echo "DONE"
@ -108,14 +117,13 @@ generate_cert() {
> "${TMPFILE}.cfg" || exit 1
openssl req -new -out "${TMPFILE}.req" \
-newkey rsa:1024 -keyout "${TMPFILE}.key" \
-newkey rsa: -keyout "${TMPFILE}.key" \
-config "${TMPFILE}.cfg" -nodes -sha1 >/dev/null || exit 1
openssl x509 -req -CAkey "${CONFDIR}/CA/cakey.pem" -CA "${CONFDIR}/CA/cacert.pem" -CAcreateserial \
-in "${TMPFILE}.req" -out "${TMPFILE}.crt" -extfile "${TMPFILE}.cfg" \
-extensions ext -days ${DAYS} -sha1 >/dev/null || exit 1
-extensions "${EXTENSIONS}" -days ${DAYS} -sha1 >/dev/null || exit 1
cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
cat "${TMPFILE}.crt" "${TMPFILE}.key" > "${CONFDIR}/${OUTFILE}"
rm "${TMPFILE}.cfg" "${TMPFILE}.crt" "${TMPFILE}.key" "${TMPFILE}.req"
@ -133,7 +141,7 @@ remove_ca() {
echo "DONE"
}
OUTFILESET="0"
command="$1"
shift
@ -154,6 +162,7 @@ while [ $# -gt 0 ]; do
-out)
shift
OUTFILE="$1"
OUTFILESET="1"
;;
-days)
shift
@ -170,6 +179,18 @@ case ${command} in
;;
create)
EXTENSIONS="server"
generate_cert
;;
create_server)
EXTENSIONS="server"
generate_cert
;;
create_client)
EXTENSIONS="client"
if [ "${OUTFILESET}" = "0" ]; then
OUTFILE="client.pem"
fi
generate_cert
;;
@ -185,15 +206,15 @@ case ${command} in
*)
cat <<-EOF
$0 <setup|create|clean> [options]
$0 <setup|create_server|create_client|clean> [options]
* commands:
setup - Setup new CA
remove - Remove CA
create - Create new certificate (overwriting old!)
create_server - Create new certificate (overwriting existing!)
create_client - Create a new client certificate (overwrites existing!)
* options:

View File

@ -193,6 +193,12 @@ struct switch_media_bug {
switch_thread_id_t thread_id;
char *function;
char *target;
switch_codec_implementation_t read_impl;
switch_codec_implementation_t write_impl;
switch_timer_t timer;
uint32_t last_read_ts;
uint32_t last_write_ts;
switch_frame_t *ping_frame;
struct switch_media_bug *next;
};

View File

@ -109,7 +109,6 @@
#include "switch_platform.h"
#include "switch_types.h"
#include "switch_apr.h"
#include "switch_curl.h"
#include "switch_mprintf.h"
#include "switch_core_db.h"
#include "switch_dso.h"

View File

@ -591,7 +591,10 @@ SWITCH_DECLARE(void) switch_channel_event_set_extended_data(_In_ switch_channel_
\return the original string if no expansion takes place otherwise a new string that must be freed
\note it's necessary to test if the return val is the same as the input and free the string if it is not.
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(_In_ switch_channel_t *channel, _In_ const char *in);
SWITCH_DECLARE(char *) switch_channel_expand_variables_check(switch_channel_t *channel, const char *in, switch_event_t *var_list, switch_event_t *api_list);
#define switch_channel_expand_variables(_channel, _in) switch_channel_expand_variables_check(_channel, _in, NULL, NULL)
SWITCH_DECLARE(char *) switch_channel_build_param_string(_In_ switch_channel_t *channel, _In_opt_ switch_caller_profile_t *caller_profile,
_In_opt_ const char *prefix);
SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(_In_ switch_channel_t *channel);

View File

@ -995,7 +995,9 @@ SWITCH_DECLARE(void) switch_core_thread_session_end(_In_ switch_core_session_t *
\brief Launch a service thread on a session to drop inbound data
\param session the session the launch thread on
*/
SWITCH_DECLARE(void) switch_core_service_session(_In_ switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_service_session_av(_In_ switch_core_session_t *session, switch_bool_t audio, switch_bool_t video);
#define switch_core_service_session(_s) switch_core_service_session_av(_s, SWITCH_TRUE, SWITCH_FALSE)
/*!
\brief Request an outgoing session spawned from an existing session using a desired endpoing module
@ -1467,6 +1469,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec)
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(_In_ switch_core_session_t *session, switch_codec_t *codec);
/*!
\brief Assign the original read codec to a given session. This is the read codec used by an endpoint.
\param session session to add the codec to
\param codec the codec to add
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_set_real_read_codec(_In_ switch_core_session_t *session, switch_codec_t *codec);
SWITCH_DECLARE(void) switch_core_session_unset_read_codec(_In_ switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_session_unset_write_codec(_In_ switch_core_session_t *session);
@ -2115,6 +2125,7 @@ SWITCH_DECLARE(uint32_t) switch_core_default_dtmf_duration(uint32_t duration);
SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string);
SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string);
SWITCH_DECLARE(int) switch_system(const char *cmd, switch_bool_t wait);
SWITCH_DECLARE(int) switch_stream_system(const char *cmd, switch_stream_handle_t *stream);
SWITCH_DECLARE(void) switch_cond_yield(switch_interval_time_t t);
SWITCH_DECLARE(void) switch_cond_next(void);
SWITCH_DECLARE(switch_status_t) switch_core_chat_send_args(const char *dest_proto, const char *proto, const char *from, const char *to,
@ -2302,7 +2313,8 @@ SWITCH_DECLARE(char *) switch_say_file_handle_detach_path(switch_say_file_handle
SWITCH_DECLARE(void) switch_say_file_handle_destroy(switch_say_file_handle_t **sh);
SWITCH_DECLARE(switch_status_t) switch_say_file_handle_create(switch_say_file_handle_t **sh, const char *ext, switch_event_t **var_event);
SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *fmt, ...);
SWITCH_DECLARE(int) switch_max_file_desc(void);
SWITCH_DECLARE(void) switch_close_extra_files(int *keep, int keep_ttl);
SWITCH_END_EXTERN_C
#endif

View File

@ -49,7 +49,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_setopt(CURL *handle, switch_CUR
SWITCH_DECLARE(const char *) switch_curl_easy_strerror(switch_CURLcode errornum );
SWITCH_DECLARE(void) switch_curl_init(void);
SWITCH_DECLARE(void) switch_curl_destroy(void);
SWITCH_DECLARE(switch_status_t) switch_curl_process_form_post_params(switch_event_t *event, switch_CURL *curl_handle, struct curl_httppost **formpostp);
#endif

View File

@ -104,7 +104,8 @@ struct switch_event {
typedef enum {
EF_UNIQ_HEADERS = (1 << 0),
EF_NO_CHAT_EXEC = (1 << 1)
EF_NO_CHAT_EXEC = (1 << 1),
EF_DEFAULT_ALLOW = (1 << 2)
} switch_event_flag_t;
@ -329,7 +330,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, con
SWITCH_DECLARE(switch_status_t) switch_event_set_body(switch_event_t *event, const char *body);
SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const char *in);
SWITCH_DECLARE(char *) switch_event_expand_headers_check(switch_event_t *event, const char *in, switch_event_t *var_list, switch_event_t *api_list);
#define switch_event_expand_headers(_event, _in) switch_event_expand_headers_check(_event, _in, NULL, NULL)
SWITCH_DECLARE(switch_status_t) switch_event_create_pres_in_detailed(_In_z_ char *file, _In_z_ char *func, _In_ int line,
_In_z_ const char *proto, _In_z_ const char *login,
@ -399,7 +401,7 @@ SWITCH_DECLARE(void) switch_event_deliver(switch_event_t **event);
#define switch_event_fire_data(event, data) switch_event_fire_detailed(__FILE__, (const char * )__SWITCH_FUNC__, __LINE__, event, data)
SWITCH_DECLARE(char *) switch_event_build_param_string(switch_event_t *event, const char *prefix, switch_hash_t *vars_map);
SWITCH_DECLARE(int) switch_event_check_permission_list(switch_event_t *list, const char *name);
///\}
SWITCH_END_EXTERN_C

View File

@ -162,13 +162,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
\param mod_name the module name of the ASR library
\param grammar the grammar text, URI, or local file name
\param result of speech recognition, allocated from the session pool
\param input_timeout time to wait for input
\param args arguements to pass for callbacks etc
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_play_and_detect_speech(switch_core_session_t *session,
const char *file,
const char *mod_name,
const char *grammar,
char **result);
const char *file,
const char *mod_name,
const char *grammar,
char **result,
uint32_t input_timeout,
switch_input_args_t *args);
/*!
\brief Engage background Speech detection on a session
@ -911,6 +916,7 @@ SWITCH_DECLARE(switch_bool_t) switch_ivr_uuid_exists(const char *uuid);
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_last_ping(switch_ivr_dmachine_t *dmachine);
SWITCH_DECLARE(const char *) switch_ivr_dmachine_get_name(switch_ivr_dmachine_t *dmachine);
SWITCH_DECLARE(void) switch_ivr_dmachine_set_match_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t match_callback);
SWITCH_DECLARE(void) switch_ivr_dmachine_set_nonmatch_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t nonmatch_callback);

View File

@ -61,56 +61,56 @@ typedef struct cJSON_Hooks {
} cJSON_Hooks;
// Supply malloc, realloc and free functions to cJSON
extern void cJSON_InitHooks(cJSON_Hooks* hooks);
SWITCH_DECLARE(void) cJSON_InitHooks(cJSON_Hooks* hooks);
// Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished.
extern cJSON *cJSON_Parse(const char *value);
SWITCH_DECLARE(cJSON *)cJSON_Parse(const char *value);
// Render a cJSON entity to text for transfer/storage. Free the char* when finished.
extern char *cJSON_Print(cJSON *item);
SWITCH_DECLARE(char *)cJSON_Print(cJSON *item);
// Render a cJSON entity to text for transfer/storage without any formatting. Free the char* when finished.
extern char *cJSON_PrintUnformatted(cJSON *item);
SWITCH_DECLARE(char *)cJSON_PrintUnformatted(cJSON *item);
// Delete a cJSON entity and all subentities.
extern void cJSON_Delete(cJSON *c);
SWITCH_DECLARE(void) cJSON_Delete(cJSON *c);
// Returns the number of items in an array (or object).
extern int cJSON_GetArraySize(cJSON *array);
SWITCH_DECLARE(int) cJSON_GetArraySize(cJSON *array);
// Retrieve item number "item" from array "array". Returns NULL if unsuccessful.
extern cJSON *cJSON_GetArrayItem(cJSON *array,int item);
SWITCH_DECLARE(cJSON *)cJSON_GetArrayItem(cJSON *array,int item);
// Get item "string" from object. Case insensitive.
extern cJSON *cJSON_GetObjectItem(cJSON *object,const char *string);
SWITCH_DECLARE(cJSON *)cJSON_GetObjectItem(cJSON *object,const char *string);
// These calls create a cJSON item of the appropriate type.
extern cJSON *cJSON_CreateNull(void);
extern cJSON *cJSON_CreateTrue(void);
extern cJSON *cJSON_CreateFalse(void);
extern cJSON *cJSON_CreateNumber(double num);
extern cJSON *cJSON_CreateString(const char *string);
extern cJSON *cJSON_CreateArray(void);
extern cJSON *cJSON_CreateObject(void);
SWITCH_DECLARE(cJSON *)cJSON_CreateNull(void);
SWITCH_DECLARE(cJSON *)cJSON_CreateTrue(void);
SWITCH_DECLARE(cJSON *)cJSON_CreateFalse(void);
SWITCH_DECLARE(cJSON *)cJSON_CreateNumber(double num);
SWITCH_DECLARE(cJSON *)cJSON_CreateString(const char *string);
SWITCH_DECLARE(cJSON *)cJSON_CreateArray(void);
SWITCH_DECLARE(cJSON *)cJSON_CreateObject(void);
// These utilities create an Array of count items.
extern cJSON *cJSON_CreateIntArray(int *numbers,int count);
extern cJSON *cJSON_CreateFloatArray(float *numbers,int count);
extern cJSON *cJSON_CreateDoubleArray(double *numbers,int count);
extern cJSON *cJSON_CreateStringArray(const char **strings,int count);
SWITCH_DECLARE(cJSON *)cJSON_CreateIntArray(int *numbers,int count);
SWITCH_DECLARE(cJSON *)cJSON_CreateFloatArray(float *numbers,int count);
SWITCH_DECLARE(cJSON *)cJSON_CreateDoubleArray(double *numbers,int count);
SWITCH_DECLARE(cJSON *)cJSON_CreateStringArray(const char **strings,int count);
// Append item to the specified array/object.
extern void cJSON_AddItemToArray(cJSON *array, cJSON *item);
extern void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item);
SWITCH_DECLARE(void) cJSON_AddItemToArray(cJSON *array, cJSON *item);
SWITCH_DECLARE(void) cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item);
// Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON.
extern void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
extern void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item);
SWITCH_DECLARE(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
SWITCH_DECLARE(void) cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item);
// Remove/Detatch items from Arrays/Objects.
extern cJSON *cJSON_DetachItemFromArray(cJSON *array,int which);
extern void cJSON_DeleteItemFromArray(cJSON *array,int which);
extern cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string);
extern void cJSON_DeleteItemFromObject(cJSON *object,const char *string);
SWITCH_DECLARE(cJSON *)cJSON_DetachItemFromArray(cJSON *array,int which);
SWITCH_DECLARE(void) cJSON_DeleteItemFromArray(cJSON *array,int which);
SWITCH_DECLARE(cJSON *)cJSON_DetachItemFromObject(cJSON *object,const char *string);
SWITCH_DECLARE(void) cJSON_DeleteItemFromObject(cJSON *object,const char *string);
// Update array items.
extern void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem);
extern void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);
SWITCH_DECLARE(void) cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem);
SWITCH_DECLARE(void) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);
#define cJSON_AddNullToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateNull())
#define cJSON_AddTrueToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateTrue())

View File

@ -32,6 +32,10 @@
#define __SWITCH_SSL_H
#if defined(HAVE_OPENSSL)
#if defined (MACOSX) || defined(DARWIN)
/* Disable depricated-declarations on OS X */
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <openssl/crypto.h>
static switch_mutex_t **ssl_mutexes;

View File

@ -785,6 +785,12 @@ typedef struct {
#pragma pack(pop, r1)
#endif
typedef struct audio_buffer_header_s {
uint32_t ts;
uint32_t len;
} audio_buffer_header_t;
/*!
\enum switch_priority_t
\brief Priority Indication
@ -1199,6 +1205,9 @@ typedef enum {
CF_ZOMBIE_EXEC,
CF_INTERCEPT,
CF_INTERCEPTED,
CF_VIDEO_REFRESH_REQ,
CF_SERVICE_AUDIO,
CF_SERVICE_VIDEO,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX

View File

@ -834,6 +834,9 @@ SWITCH_DECLARE(const char *) switch_inet_ntop(int af, void const *src, char *dst
SWITCH_DECLARE(char *) switch_uuid_str(char *buf, switch_size_t len);
SWITCH_DECLARE(char *) switch_format_number(const char *num);
SWITCH_DECLARE(unsigned int) switch_atoui(const char *nptr);
SWITCH_DECLARE(unsigned long) switch_atoul(const char *nptr);
SWITCH_END_EXTERN_C
#endif
/* For Emacs:

View File

@ -0,0 +1,2 @@
BASE=../../../..
include $(BASE)/build/modmake.rules

View File

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="mod_abstraction"
ProjectGUID="{BDA173DB-F8EF-4270-9553-B453AF92E43A}"
RootNamespace="mod_abstraction"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\mod_abstraction.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,131 @@
<?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>mod_abstraction</ProjectName>
<ProjectGuid>{60C542EE-6882-4EA2-8C21-5AB6DB1BA73F}</ProjectGuid>
<RootNamespace>mod_abstraction</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</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" />
<Import Project="..\..\..\..\w32\module_release.props" />
</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" />
<Import Project="..\..\..\..\w32\module_debug.props" />
</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" />
<Import Project="..\..\..\..\w32\module_release.props" />
</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" />
<Import Project="..\..\..\..\w32\module_debug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mod_abstraction.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2010.vcxproj">
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,166 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Marc Olivier Chouinard <mochouinard@moctel.com>
*
*
* mod_abstraction.c -- Abstraction
*
*/
#include <switch.h>
/* Prototypes */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_abstraction_shutdown);
SWITCH_MODULE_RUNTIME_FUNCTION(mod_abstraction_runtime);
SWITCH_MODULE_LOAD_FUNCTION(mod_abstraction_load);
const char *global_cf = "abstraction.conf";
/* SWITCH_MODULE_DEFINITION(name, load, shutdown, runtime)
* Defines a switch_loadable_module_function_table_t and a static const char[] modname
*/
SWITCH_MODULE_DEFINITION(mod_abstraction, mod_abstraction_load, mod_abstraction_shutdown, NULL);
SWITCH_STANDARD_API(api_abstraction_function)
{
const char *api_name = switch_event_get_header(stream->param_event, "API-Command");
switch_xml_t cfg, xml, x_apis, x_api;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
goto end;
}
if (!(x_apis = switch_xml_child(cfg, "apis"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No apis group\n");
goto end;
}
if ((x_api = switch_xml_find_child_multi(x_apis, "api", "name", api_name , NULL))) {
const char *parse = switch_xml_attr_soft(x_api, "parse");
const char *destination = switch_xml_attr_soft(x_api, "destination");
const char *arguments = switch_xml_attr_soft(x_api, "argument");
int proceed = 0;
switch_regex_t *re = NULL;
int ovector[30];
if ((proceed = switch_regex_perform(cmd, parse, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
const char *api_args = NULL;
char *substituted = NULL;
if (cmd && strchr(parse, '(')) {
uint32_t len = (uint32_t) (strlen(cmd) + strlen(arguments) + 10) * proceed;
if (!(substituted = malloc(len))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Memory Error!\n");
proceed = 0;
goto end;
}
memset(substituted, 0, len);
switch_perform_substitution(re, proceed, arguments, cmd , substituted, len, ovector);
api_args = substituted;
} else {
api_args = arguments;
}
switch_api_execute(destination, api_args, session, stream);
switch_safe_free(substituted);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No match for API %s (%s != %s)\n", api_name, parse, cmd);
}
switch_regex_safe_free(re);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "API %s doesn't exist inside the xml structure. You might have forgot to reload the module after editing it\n", api_name);
}
end:
if (xml)
switch_xml_free(xml);
return SWITCH_STATUS_SUCCESS;
}
/* Macro expands to: switch_status_t mod_abstraction_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool) */
SWITCH_MODULE_LOAD_FUNCTION(mod_abstraction_load)
{
switch_status_t status = SWITCH_STATUS_TERM;
switch_api_interface_t *api_interface;
switch_xml_t cfg, xml, x_apis, x_api;
int count = 0;
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
goto end;
}
if (!(x_apis = switch_xml_child(cfg, "apis"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No apis group\n");
goto end;
}
for (x_api = switch_xml_child(x_apis, "api"); x_api; x_api = x_api->next) {
const char *name = switch_xml_attr_soft(x_api, "name");
const char *description = switch_xml_attr_soft(x_api, "description");
const char *syntax = switch_xml_attr_soft(x_api, "syntax");
SWITCH_ADD_API(api_interface, name, description, api_abstraction_function, syntax);
count++;
}
if (count > 0) {
status = SWITCH_STATUS_SUCCESS;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No API abstraction defined\n");
}
end:
if (xml)
switch_xml_free(xml);
return status;
}
/*
Called when the system shuts down
Macro expands to: switch_status_t mod_abstraction_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_abstraction_shutdown)
{
/* Cleanup dynamically allocated config settings */
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4
*/

View File

@ -1386,6 +1386,9 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
switch_time_t t_agent_answered = 0;
switch_time_t t_member_called = atoi(h->member_joined_epoch);
switch_event_t *event = NULL;
char agent_uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
switch_uuid_str(agent_uuid_str, sizeof(agent_uuid_str));
switch_mutex_lock(globals.mutex);
globals.threads++;
@ -1415,6 +1418,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Agent", h->agent_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Agent-Type", h->agent_type);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Agent-System", h->agent_system);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Agent-UUID", agent_uuid_str);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Member-UUID", h->member_uuid);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Member-Session-UUID", h->member_session_uuid);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "CC-Member-CID-Name", h->member_cid_name);
@ -1436,10 +1440,12 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "loopback_bowout", "false");
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "loopback_bowout_on_execute", "false");
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "ignore_early_media", "true");
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "origination_uuid", "%s", agent_uuid_str);
t_agent_called = local_epoch_time_now(NULL);
dialstr = switch_mprintf("%s", h->originate_string);
status = switch_ivr_originate(NULL, &agent_session, &cause, dialstr, 60, NULL, h->member_cid_name, h->member_cid_number, NULL, ovars, SOF_NONE, NULL);
switch_safe_free(dialstr);
switch_event_destroy(&ovars);
@ -1473,7 +1479,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
}
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Invalid agent type '%s' for agent '%s', aborting member offering", h->agent_type, h->agent_name);
status = SWITCH_CAUSE_USER_NOT_REGISTERED;
cause = SWITCH_CAUSE_USER_NOT_REGISTERED;
}
/* Originate/Bridge is not finished, processing the return value */

View File

@ -4791,11 +4791,10 @@ SWITCH_STANDARD_API(system_function)
return SWITCH_STATUS_SUCCESS;
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Executing command: %s\n", cmd);
if (switch_system(cmd, SWITCH_TRUE) < 0) {
if (switch_stream_system(cmd, stream) < 0) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", cmd);
}
stream->write_function(stream, "+OK\n");
return SWITCH_STATUS_SUCCESS;
}

View File

@ -312,6 +312,10 @@ typedef struct conference_obj {
uint32_t eflags;
uint32_t verbose_events;
int end_count;
/* allow extra time after 'endconf' member leaves */
switch_time_t endconf_time;
int endconf_grace_time;
uint32_t relationship_total;
uint32_t score;
int mux_loop_count;
@ -364,6 +368,7 @@ struct conference_member {
switch_codec_t read_codec;
switch_codec_t write_codec;
char *rec_path;
switch_time_t rec_time;
uint8_t *frame;
uint8_t *last_frame;
uint32_t frame_size;
@ -900,7 +905,9 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
conference->count++;
if (switch_test_flag(member, MFLAG_ENDCONF)) {
if (conference->end_count++) {};
if (conference->end_count++) {
conference->endconf_time = 0;
}
}
conference_send_presence(conference);
@ -966,10 +973,6 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
}
}
if (conference->count == 1) {
conference->floor_holder = member;
}
if (conference->min && conference->count >= conference->min) {
switch_set_flag(conference, CFLAG_ENFORCE_MIN);
}
@ -1098,6 +1101,14 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
if (member == member->conference->floor_holder) {
member->conference->floor_holder = NULL;
if (test_eflag(conference, EFLAG_FLOOR_CHANGE)) {
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d", member->id);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "none");
switch_event_fire(&event);
}
}
member->conference = NULL;
@ -1107,7 +1118,8 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
if (switch_test_flag(member, MFLAG_ENDCONF)) {
if (!--conference->end_count) {
switch_set_flag_locked(conference, CFLAG_DESTRUCT);
//switch_set_flag_locked(conference, CFLAG_DESTRUCT);
conference->endconf_time = switch_epoch_time_now(NULL);
}
}
@ -1127,10 +1139,6 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
}
}
if (conference->count == 1) {
conference->floor_holder = conference->members;
}
if (test_eflag(conference, EFLAG_DEL_MEMBER) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
@ -1160,20 +1168,30 @@ static void *SWITCH_THREAD_FUNC conference_video_bridge_thread_run(switch_thread
switch_status_t status;
switch_frame_t *read_frame;
conference_obj_t *conference = vh->member_a->conference;
switch_core_session_message_t msg = { 0 };
switch_thread_rwlock_rdlock(conference->rwlock);
switch_thread_rwlock_rdlock(vh->member_a->rwlock);
switch_thread_rwlock_rdlock(vh->member_b->rwlock);
/* Acquire locks for both sessions so the helper object and member structures don't get destroyed before we exit */
switch_core_session_read_lock(session_a);
switch_core_session_read_lock(session_b);
/* Tell the channel to request a fresh vid frame */
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
vh->up = 1;
while (vh->up == 1 && switch_test_flag(vh->member_a, MFLAG_RUNNING) && switch_test_flag(vh->member_b, MFLAG_RUNNING) &&
switch_channel_ready(channel_a) && switch_channel_ready(channel_b)) {
if (switch_channel_test_flag(channel_a, CF_VIDEO_REFRESH_REQ)) {
switch_core_session_receive_message(session_b, &msg);
switch_channel_clear_flag(channel_a, CF_VIDEO_REFRESH_REQ);
}
status = switch_core_session_read_video_frame(session_a, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@ -1208,21 +1226,25 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
conference_member_t *imember;
switch_frame_t *vid_frame;
switch_status_t status;
int has_vid = 1;// req_iframe = 0;
int has_vid = 1, want_refresh = 0;
int yield = 0;
uint32_t last_member = 0;
switch_core_session_t *session;
switch_core_session_message_t msg = { 0 };
conference->video_running = 1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video thread started for conference %s\n", conference->name);
/* Tell the channel to request a fresh vid frame */
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
while (has_vid && conference->video_running == 1 && globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) {
if (yield) {
switch_yield(yield);
yield = 0;
}
switch_mutex_lock(conference->member_mutex);
switch_mutex_lock(conference->mutex);
if (!conference->floor_holder) {
yield = 100000;
@ -1236,70 +1258,48 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
session = conference->floor_holder->session;
switch_core_session_read_lock(session);
switch_mutex_unlock(conference->member_mutex);
status = switch_core_session_read_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
switch_mutex_lock(conference->member_mutex);
switch_mutex_unlock(conference->mutex);
if (!switch_channel_ready(switch_core_session_get_channel(session))) {
status = SWITCH_STATUS_FALSE;
} else {
status = switch_core_session_read_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
switch_mutex_lock(conference->mutex);
switch_core_session_rwunlock(session);
if (!SWITCH_READ_ACCEPTABLE(status) || !conference->floor_holder || switch_test_flag(vid_frame, SFF_CNG)) {
conference->floor_holder = NULL;
//req_iframe = 0;
if (!SWITCH_READ_ACCEPTABLE(status)) {
yield = 100000;
goto do_continue;
}
if (conference->floor_holder->id != last_member) {
int iframe = 0;
#if 0
switch_core_session_message_t msg = { 0 };
if (!req_iframe) {
/* Tell the channel to request a fresh vid frame */
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
switch_core_session_receive_message(conference->floor_holder->session, &msg);
req_iframe = 1;
}
#endif
if (vid_frame->codec->implementation->ianacode == 34) { /* h.263 */
//iframe = (*((int16_t *) vid_frame->data) >> 12 == 6);
iframe = 1;
} else if (vid_frame->codec->implementation->ianacode == 115) { /* h.263-1998 */
int y = *((int8_t *) vid_frame->data + 2) & 0xfe;
iframe = (y == 0x80 || y == 0x82);
} else if (vid_frame->codec->implementation->ianacode == 99) { /* h.264 */
uint8_t * hdr = vid_frame->data;
uint8_t fragment_type = hdr[0] & 0x1f;
uint8_t nal_type = hdr[1] & 0x1f;
uint8_t start_bit = hdr[1] & 0x80;
iframe = (((fragment_type == 28 || fragment_type == 29) && nal_type == 5 && start_bit == 128) || fragment_type == 5);
} else { /* we need more defs */
iframe = 1;
}
if (!iframe) {
goto do_continue;
}
//req_iframe = 0;
}
last_member = conference->floor_holder->id;
switch_mutex_unlock(conference->member_mutex);
switch_mutex_lock(conference->member_mutex);
switch_mutex_unlock(conference->mutex);
switch_mutex_lock(conference->mutex);
has_vid = 0;
want_refresh = 0;
for (imember = conference->members; imember; imember = imember->next) {
if (imember->session && switch_channel_test_flag(switch_core_session_get_channel(imember->session), CF_VIDEO)) {
switch_channel_t *ichannel = switch_core_session_get_channel(imember->session);
if (switch_channel_test_flag(ichannel, CF_VIDEO_REFRESH_REQ)) {
want_refresh++;
switch_channel_clear_flag(ichannel, CF_VIDEO_REFRESH_REQ);
}
if (imember->session && switch_channel_test_flag(ichannel, CF_VIDEO)) {
has_vid++;
switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
}
if (want_refresh) {
switch_core_session_receive_message(session, &msg);
want_refresh = 0;
}
do_continue:
switch_mutex_unlock(conference->member_mutex);
do_continue:
switch_mutex_unlock(conference->mutex);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video thread ending for conference %s\n", conference->name);
@ -1353,8 +1353,8 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
int has_file_data = 0, members_with_video = 0;
uint32_t conf_energy = 0;
int nomoh = 0;
conference_member_t *video_bridge_members[2] = { 0 };
conference_member_t *floor_holder, *video_bridge_members[2] = { 0 };
/* Sync the conference to a single timing source */
if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
switch_set_flag(conference, CFLAG_DESTRUCT);
@ -1364,18 +1364,26 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
switch_mutex_lock(conference->mutex);
has_file_data = ready = total = 0;
floor_holder = conference->floor_holder;
/* Read one frame of audio from each member channel and save it for redistribution */
for (imember = conference->members; imember; imember = imember->next) {
uint32_t buf_read = 0;
total++;
imember->read = 0;
if (imember->session) {
if (switch_channel_test_flag(switch_core_session_get_channel(imember->session), CF_VIDEO)) {
if (switch_test_flag(imember, MFLAG_RUNNING) && imember->session) {
switch_channel_t *channel = switch_core_session_get_channel(imember->session);
if ((!floor_holder || (imember->score_iir > SCORE_IIR_SPEAKING_MAX && (floor_holder->score_iir < SCORE_IIR_SPEAKING_MIN))) &&
(!switch_test_flag(conference, CFLAG_VID_FLOOR) || switch_channel_test_flag(channel, CF_VIDEO))) {
floor_holder = imember;
}
if (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_VIDEO)) {
members_with_video++;
if (switch_test_flag(imember, MFLAG_VIDEO_BRIDGE)) {
if (switch_test_flag(conference, CFLAG_VIDEO_BRIDGE) && switch_test_flag(imember, MFLAG_VIDEO_BRIDGE)) {
if (!video_bridge_members[0]) {
video_bridge_members[0] = imember;
} else {
@ -1400,6 +1408,48 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
}
switch_mutex_unlock(imember->audio_in_mutex);
}
if (floor_holder != conference->floor_holder) {
switch_event_t *event = NULL;
if (test_eflag(conference, EFLAG_FLOOR_CHANGE)) {
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
if (floor_holder) {
conference_add_event_member_data(floor_holder, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "%d", floor_holder->id);
} else {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "none");
}
if (conference->floor_holder) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d", conference->floor_holder->id);
} else {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Old-ID", "none");
}
switch_event_fire(&event);
}
if (floor_holder) {
switch_channel_t *floor_channel = switch_core_session_get_channel(floor_holder->session);
if (switch_channel_test_flag(floor_channel, CF_VIDEO)) {
switch_core_session_message_t msg = { 0 };
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
switch_core_session_receive_message(floor_holder->session, &msg);
}
}
conference->floor_holder = floor_holder;
}
if (conference->perpetual_sound && !conference->async_fnode) {
conference_play_file(conference, conference->perpetual_sound, CONF_DEFAULT_LEADIN, NULL, 1);
@ -1437,6 +1487,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile);
launch_conference_record_thread(conference, rfile);
if (rfile != conference->auto_record) {
conference->record_filename = switch_core_strdup(conference->pool, rfile);
switch_safe_free(rfile);
} else {
conference->record_filename = switch_core_strdup(conference->pool, conference->auto_record);
@ -1459,7 +1510,16 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
}
}
if (conference->vh[0].up != 1 && conference->vh[1].up != 1 && video_bridge_members[0] && video_bridge_members[1]){
if (conference->vh[0].up == 0 &&
conference->vh[1].up == 0 &&
video_bridge_members[0] &&
video_bridge_members[1] &&
switch_test_flag(video_bridge_members[0], MFLAG_RUNNING) &&
switch_test_flag(video_bridge_members[1], MFLAG_RUNNING) &&
switch_channel_ready(switch_core_session_get_channel(video_bridge_members[0]->session)) &&
switch_channel_ready(switch_core_session_get_channel(video_bridge_members[1]->session))
) {
launch_conference_video_bridge_thread(video_bridge_members[0], video_bridge_members[1]);
}
}
@ -1693,6 +1753,13 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
switch_core_destroy_memory_pool(&pool);
}
if (!conference->end_count && conference->endconf_time &&
switch_epoch_time_now(NULL) - conference->endconf_time > conference->endconf_grace_time) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Conference %s: endconf grace time exceeded (%u)\n",
conference->name, conference->endconf_grace_time);
switch_set_flag(conference, CFLAG_DESTRUCT);
}
switch_mutex_unlock(conference->mutex);
}
/* Rinse ... Repeat */
@ -2386,7 +2453,6 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
switch_frame_t *read_frame = NULL;
uint32_t hangover = 40, hangunder = 5, hangover_hits = 0, hangunder_hits = 0, diff_level = 400;
switch_core_session_t *session = member->session;
int check_floor_change;
switch_assert(member != NULL);
@ -2400,7 +2466,6 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
and mux it with any audio from other channels. */
while (switch_test_flag(member, MFLAG_RUNNING) && switch_channel_ready(channel)) {
check_floor_change = 0;
if (switch_channel_ready(channel) && switch_channel_test_app_flag(channel, CF_APP_TAGGED)) {
switch_yield(100000);
@ -2541,7 +2606,6 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
}
if (diff >= diff_level || ++hangunder_hits >= hangunder) {
check_floor_change = 1;
hangover_hits = hangunder_hits = 0;
member->last_talking = switch_epoch_time_now(NULL);
@ -2642,27 +2706,6 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
switch_mutex_unlock(member->read_mutex);
if (check_floor_change) {
switch_mutex_lock(member->conference->member_mutex);
if ((!member->conference->floor_holder ||
!switch_test_flag(member->conference->floor_holder, MFLAG_TALKING) ||
((member->score_iir > SCORE_IIR_SPEAKING_MAX) && (member->conference->floor_holder->score_iir < SCORE_IIR_SPEAKING_MIN))) &&
(!switch_test_flag(member->conference, CFLAG_VID_FLOOR) || switch_channel_test_flag(channel, CF_VIDEO))) {
if (test_eflag(member->conference, EFLAG_FLOOR_CHANGE) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d",
member->conference->floor_holder ? member->conference->floor_holder->id : 0);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "%d", member->conference->floor_holder ? member->id : 0);
switch_event_fire(&event);
}
member->conference->floor_holder = member;
}
switch_mutex_unlock(member->conference->member_mutex);
}
}
@ -3167,6 +3210,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
member->conference = conference;
member->native_rate = conference->rate;
member->rec_path = rec->path;
member->rec_time = switch_epoch_time_now(NULL);
fh.channels = 1;
fh.samplerate = conference->rate;
member->id = next_member_id();
@ -4411,6 +4455,11 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
switch_xml_set_attr_d(x_conference, "recording", "true");
}
if (conference->endconf_grace_time > 0) {
switch_snprintf(i, sizeof(i), "%u", conference->endconf_grace_time);
switch_xml_set_attr_d(x_conference, "endconf_grace_time", ival);
}
switch_snprintf(i, sizeof(i), "%d", switch_epoch_time_now(NULL) - conference->run_time);
switch_xml_set_attr_d(x_conference, "run_time", ival);
@ -4436,6 +4485,22 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
char tmp[50] = "";
if (switch_test_flag(member, MFLAG_NOCHANNEL)) {
if (member->rec_path) {
x_member = switch_xml_add_child_d(x_members, "member", moff++);
switch_assert(x_member);
switch_xml_set_attr_d(x_member, "type", "recording_node");
/* or:
x_member = switch_xml_add_child_d(x_members, "recording_node", moff++);
*/
x_tag = switch_xml_add_child_d(x_member, "record_path", count++);
switch_xml_set_txt_d(x_tag, member->rec_path);
x_tag = switch_xml_add_child_d(x_member, "join_time", count++);
switch_xml_set_attr_d(x_tag, "type", "UNIX-epoch");
switch_snprintf(i, sizeof(i), "%d", member->rec_time);
switch_xml_set_txt_d(x_tag, i);
}
continue;
}
@ -5164,6 +5229,93 @@ static switch_status_t conf_api_sub_pin(conference_obj_t *conference, switch_str
}
}
static switch_status_t conf_api_sub_get(conference_obj_t *conference,
switch_stream_handle_t *stream, int argc, char **argv) {
int ret_status = SWITCH_STATUS_GENERR;
if (argc != 3) {
ret_status = SWITCH_STATUS_FALSE;
} else {
ret_status = SWITCH_STATUS_SUCCESS;
if (strcasecmp(argv[2], "run_time") == 0) {
stream->write_function(stream, "%ld",
switch_epoch_time_now(NULL) - conference->run_time);
} else if (strcasecmp(argv[2], "count") == 0) {
stream->write_function(stream, "%d",
conference->count);
} else if (strcasecmp(argv[2], "max_members") == 0) {
stream->write_function(stream, "%d",
conference->max_members);
} else if (strcasecmp(argv[2], "rate") == 0) {
stream->write_function(stream, "%d",
conference->rate);
} else if (strcasecmp(argv[2], "profile_name") == 0) {
stream->write_function(stream, "%s",
conference->profile_name);
} else if (strcasecmp(argv[2], "sound_prefix") == 0) {
stream->write_function(stream, "%s",
conference->sound_prefix);
} else if (strcasecmp(argv[2], "caller_id_name") == 0) {
stream->write_function(stream, "%s",
conference->caller_id_name);
} else if (strcasecmp(argv[2], "caller_id_number") == 0) {
stream->write_function(stream, "%s",
conference->caller_id_number);
} else if (strcasecmp(argv[2], "is_locked") == 0) {
stream->write_function(stream, "%s",
switch_test_flag(conference, CFLAG_LOCKED) ? "locked" : "");
} else if (strcasecmp(argv[2], "endconf_grace_time") == 0) {
stream->write_function(stream, "%d",
conference->endconf_grace_time);
} else {
ret_status = SWITCH_STATUS_FALSE;
}
}
return ret_status;
}
static switch_status_t conf_api_sub_set(conference_obj_t *conference,
switch_stream_handle_t *stream, int argc, char **argv) {
int ret_status = SWITCH_STATUS_GENERR;
if (argc != 4 || zstr(argv[3])) {
ret_status = SWITCH_STATUS_FALSE;
} else {
ret_status = SWITCH_STATUS_SUCCESS;
if (strcasecmp(argv[2], "max_members") == 0) {
int new_max = atoi(argv[3]);
if (new_max >= 0) {
stream->write_function(stream, "%d", conference->max_members);
conference->max_members = new_max;
} else {
ret_status = SWITCH_STATUS_FALSE;
}
} else if (strcasecmp(argv[2], "sound_prefix") == 0) {
stream->write_function(stream, "%s",conference->sound_prefix);
conference->sound_prefix = switch_core_strdup(conference->pool, argv[3]);
} else if (strcasecmp(argv[2], "caller_id_name") == 0) {
stream->write_function(stream, "%s",conference->caller_id_name);
conference->caller_id_name = switch_core_strdup(conference->pool, argv[3]);
} else if (strcasecmp(argv[2], "caller_id_number") == 0) {
stream->write_function(stream, "%s",conference->caller_id_number);
conference->caller_id_number = switch_core_strdup(conference->pool, argv[3]);
} else if (strcasecmp(argv[2], "endconf_grace_time") == 0) {
int new_gt = atoi(argv[3]);
if (new_gt >= 0) {
stream->write_function(stream, "%d", conference->endconf_grace_time);
conference->endconf_grace_time = new_gt;
} else {
ret_status = SWITCH_STATUS_FALSE;
}
} else {
ret_status = SWITCH_STATUS_FALSE;
}
}
return ret_status;
}
typedef enum {
CONF_API_COMMAND_LIST = 0,
CONF_API_COMMAND_ENERGY,
@ -5189,12 +5341,16 @@ typedef enum {
CONF_API_COMMAND_NORECORD,
CONF_API_COMMAND_EXIT_SOUND,
CONF_API_COMMAND_ENTER_SOUND,
CONF_API_COMMAND_PIN,
CONF_API_COMMAND_NOPIN,
CONF_API_COMMAND_GET,
CONF_API_COMMAND_SET,
} api_command_type_t;
/* API Interface Function sub-commands */
/* Entries in this list should be kept in sync with the enum above */
static api_command_t conf_api_sub_commands[] = {
{"list", (void_fn_t) & conf_api_sub_list, CONF_API_SUB_ARGS_SPLIT, "list", "[delim <string>]"},
{"list", (void_fn_t) & conf_api_sub_list, CONF_API_SUB_ARGS_SPLIT, "list", "[delim <string>]|[count]"},
{"xml_list", (void_fn_t) & conf_api_sub_xml_list, CONF_API_SUB_ARGS_SPLIT, "xml_list", ""},
{"energy", (void_fn_t) & conf_api_sub_energy, CONF_API_SUB_MEMBER_TARGET, "energy", "<member_id|all|last|non_moderator> [<newval>]"},
{"volume_in", (void_fn_t) & conf_api_sub_volume_in, CONF_API_SUB_MEMBER_TARGET, "volume_in", "<member_id|all|last|non_moderator> [<newval>]"},
@ -5224,6 +5380,8 @@ static api_command_t conf_api_sub_commands[] = {
{"enter_sound", (void_fn_t) & conf_api_sub_enter_sound, CONF_API_SUB_ARGS_SPLIT, "enter_sound", "on|off|none|file <filename>"},
{"pin", (void_fn_t) & conf_api_sub_pin, CONF_API_SUB_ARGS_SPLIT, "pin", "<pin#>"},
{"nopin", (void_fn_t) & conf_api_sub_pin, CONF_API_SUB_ARGS_SPLIT, "nopin", ""},
{"get", (void_fn_t) & conf_api_sub_get, CONF_API_SUB_ARGS_SPLIT, "get", "<parameter-name>"},
{"set", (void_fn_t) & conf_api_sub_set, CONF_API_SUB_ARGS_SPLIT, "set", "<parameter-name> <value>"},
};
#define CONFFUNCAPISIZE (sizeof(conf_api_sub_commands)/sizeof(conf_api_sub_commands[0]))
@ -6244,7 +6402,7 @@ SWITCH_STANDARD_APP(conference_function)
uint32_t max_members_val;
errno = 0; /* sanity first */
max_members_val = strtol(max_members_str, NULL, 0); /* base 0 lets 0x... for hex 0... for octal and base 10 otherwise through */
if (errno == ERANGE || errno == EINVAL || max_members_val < 0 || max_members_val == 1) {
if (errno == ERANGE || errno == EINVAL || (int32_t) max_members_val < 0 || max_members_val == 1) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"conference_max_members variable %s is invalid, not setting a limit\n", max_members_str);
} else {
@ -6791,6 +6949,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
char *auto_record = NULL;
char *conference_log_dir = NULL;
char *terminate_on_silence = NULL;
char *endconf_grace_time = NULL;
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH+1];
switch_uuid_t uuid;
switch_codec_implementation_t read_impl = { 0 };
@ -6974,7 +7133,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
} else if (!strcasecmp(var, "max-members") && !zstr(val)) {
errno = 0; /* sanity first */
max_members = strtol(val, NULL, 0); /* base 0 lets 0x... for hex 0... for octal and base 10 otherwise through */
if (errno == ERANGE || errno == EINVAL || max_members < 0 || max_members == 1) {
if (errno == ERANGE || errno == EINVAL || (int32_t) max_members < 0 || max_members == 1) {
/* a negative wont work well, and its foolish to have a conference limited to 1 person unless the outbound
* stuff is added, see comments above
*/
@ -6998,6 +7157,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
auto_record = val;
} else if (!strcasecmp(var, "terminate-on-silence") && !zstr(val)) {
terminate_on_silence = val;
} else if (!strcasecmp(var, "endconf-grace-time") && !zstr(val)) {
endconf_grace_time = val;
}
}
@ -7222,9 +7383,12 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
if (!zstr(auto_record)) {
conference->auto_record = switch_core_strdup(conference->pool, auto_record);
}
if (!zstr(terminate_on_silence)) {
conference->terminate_on_silence = atoi(terminate_on_silence);
}
if (!zstr(terminate_on_silence)) {
conference->terminate_on_silence = atoi(terminate_on_silence);
}
if (!zstr(endconf_grace_time)) {
conference->endconf_grace_time = atoi(endconf_grace_time);
}
if (!zstr(verbose_events) && switch_true(verbose_events)) {
conference->verbose_events = 1;

View File

@ -597,7 +597,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_db_load)
switch_api_interface_t *commands_api_interface;
switch_limit_interface_t *limit_interface;
memset(&globals, 0, sizeof(&globals));
memset(&globals, 0, sizeof(globals));
strncpy(globals.hostname, switch_core_get_switchname(), sizeof(globals.hostname));
globals.pool = pool;

View File

@ -73,6 +73,9 @@ static struct {
char *dbname;
switch_mutex_t *mutex;
switch_memory_pool_t *pool;
char odbc_dsn[1024];
char *odbc_user;
char *odbc_pass;
} globals;
#define DIR_PROFILE_CONFIGITEM_COUNT 100
@ -187,24 +190,51 @@ char *string_to_keypad_digit(const char *in)
return dst;
}
switch_cache_db_handle_t *directory_get_db_handle(void)
{
switch_cache_db_connection_options_t options = { {0} };
switch_cache_db_handle_t *dbh = NULL;
if (!zstr(globals.odbc_dsn)) {
options.odbc_options.dsn = globals.odbc_dsn;
options.odbc_options.user = globals.odbc_user;
options.odbc_options.pass = globals.odbc_pass;
if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_ODBC, &options) != SWITCH_STATUS_SUCCESS) {
dbh = NULL;
}
return dbh;
} else {
options.core_db_options.db_path = globals.dbname;
if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_CORE_DB, &options) != SWITCH_STATUS_SUCCESS) {
dbh = NULL;
}
return dbh;
}
}
static switch_status_t directory_execute_sql(char *sql, switch_mutex_t *mutex)
{
switch_core_db_t *db;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_cache_db_handle_t *dbh = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
if (mutex) {
switch_mutex_lock(mutex);
}
if (!(db = switch_core_db_open_file(globals.dbname))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", globals.dbname);
status = SWITCH_STATUS_FALSE;
if (!(dbh = directory_get_db_handle())) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB\n");
goto end;
}
status = switch_core_db_persistant_execute(db, sql, 1);
switch_core_db_close(db);
end:
if (globals.debug > 1) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "sql: %s\n", sql);
status = switch_cache_db_execute_sql(dbh, sql, NULL);
end:
switch_cache_db_release_db_handle(&dbh);
if (mutex) {
switch_mutex_unlock(mutex);
}
@ -417,7 +447,9 @@ static dir_profile_t *load_profile(const char *profile_name)
static switch_status_t load_config(switch_bool_t reload)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_xml_t cfg, xml = NULL, settings, param, x_profiles, x_profile;
switch_cache_db_handle_t *dbh = NULL;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
@ -430,6 +462,22 @@ static switch_status_t load_config(switch_bool_t reload)
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
if (switch_odbc_available()) {
switch_set_string(globals.odbc_dsn, val);
if ((globals.odbc_user = strchr(globals.odbc_dsn, ':'))) {
*globals.odbc_user++ = '\0';
if ((globals.odbc_pass = strchr(globals.odbc_user, ':'))) {
*globals.odbc_pass++ = '\0';
}
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
}
} else if (!strcasecmp(var, "dbname") && !zstr(val)) {
globals.dbname = switch_core_strdup(globals.pool, val);
}
if (!strcasecmp(var, "debug")) {
globals.debug = atoi(val);
}
@ -441,10 +489,27 @@ static switch_status_t load_config(switch_bool_t reload)
load_profile(switch_xml_attr_soft(x_profile, "name"));
}
}
if (zstr(globals.odbc_dsn) && zstr(globals.dbname)) {
globals.dbname = switch_core_sprintf(globals.pool, "directory");
}
dbh = directory_get_db_handle();
if (dbh) {
if (!reload) {
switch_cache_db_test_reactive(dbh, "delete from directory_search where uuid != '' and name_visible != '' ", "drop table directory_search", dir_sql);
}
switch_cache_db_release_db_handle(&dbh);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot open DB!2\n");
status = SWITCH_STATUS_TERM;
goto end;
}
end:
switch_mutex_unlock(globals.mutex);
switch_xml_free(xml);
return SWITCH_STATUS_SUCCESS;
return status;
}
static dir_profile_t *get_profile(const char *profile_name)
@ -579,7 +644,7 @@ static switch_status_t populate_database(switch_core_session_t *session, dir_pro
}
}
sql = switch_mprintf("BEGIN;%s;COMMIT;", sqlvalues);
directory_execute_sql(sql, profile->mutex);
directory_execute_sql(sql, globals.mutex);
end:
switch_safe_free(sql);
@ -755,7 +820,7 @@ switch_status_t navigate_entrys(switch_core_session_t *session, dir_profile_t *p
globals.hostname, switch_core_session_get_uuid(session), (params->search_by_last_name ? "last_name_digit" : "first_name_digit"),
params->digits);
directory_execute_sql_callback(profile->mutex, sql, sql2str_callback, &cbt);
directory_execute_sql_callback(globals.mutex, sql, sql2str_callback, &cbt);
switch_safe_free(sql);
result_count = atoi(entry_count);
@ -786,7 +851,7 @@ switch_status_t navigate_entrys(switch_core_session_t *session, dir_profile_t *p
listing_cbt.index = 0;
listing_cbt.want = cur_entry;
listing_cbt.move = ENTRY_MOVE_NEXT;
directory_execute_sql_callback(profile->mutex, sql, listing_callback, &listing_cbt);
directory_execute_sql_callback(globals.mutex, sql, listing_callback, &listing_cbt);
status = listen_entry(session, profile, &listing_cbt);
if (!zstr(listing_cbt.transfer_to)) {
switch_copy_string(params->transfer_to, listing_cbt.transfer_to, 255);
@ -937,7 +1002,7 @@ SWITCH_STANDARD_APP(directory_function)
/* Delete all sql entry for this call */
sql = switch_mprintf("delete from directory_search where hostname = '%q' and uuid = '%q'", globals.hostname, switch_core_session_get_uuid(session));
directory_execute_sql(sql, profile->mutex);
directory_execute_sql(sql, globals.mutex);
switch_safe_free(sql);
profile_rwunlock(profile);
}
@ -946,8 +1011,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_directory_load)
{
switch_application_interface_t *app_interface;
switch_status_t status;
switch_core_db_t *db = NULL;
char *sql = NULL;
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
@ -964,20 +1027,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_directory_load)
globals.hostname = switch_core_get_switchname();
globals.dbname = switch_core_sprintf(pool, "directory");
if ((db = switch_core_db_open_file(globals.dbname))) {
switch_core_db_test_reactive(db, "select count(uuid),name_visible from directory_search", "drop table directory_search", dir_sql);
switch_core_db_close(db);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open db name : %s\n", globals.dbname);
return SWITCH_STATUS_FALSE;
}
sql = switch_mprintf("delete from directory_search where hostname = '%q'", globals.hostname);
directory_execute_sql(sql, globals.mutex);
switch_safe_free(sql);
SWITCH_ADD_APP(app_interface, "directory", "directory", DIR_DESC, directory_function, DIR_USAGE, SAF_NONE);
/* indicate that the module should continue to be loaded */

View File

@ -340,18 +340,13 @@ static void bind_to_session(switch_core_session_t *session,
uint32_t digit_timeout = 1500;
uint32_t input_timeout = 0;
const char *var;
uint32_t tmp;
if ((var = switch_channel_get_variable(channel, "bind_digit_digit_timeout"))) {
tmp = (uint32_t) atol(var);
if (tmp < 0) tmp = 0;
digit_timeout = tmp;
digit_timeout = switch_atoul(var);
}
if ((var = switch_channel_get_variable(channel, "bind_digit_input_timeout"))) {
tmp = (uint32_t) atol(var);
if (tmp < 0) tmp = 0;
input_timeout = tmp;
input_timeout = switch_atoul(var);
}
switch_ivr_dmachine_create(&dmachine, "DPTOOLS", NULL, digit_timeout, input_timeout, NULL, digit_nomatch_action_callback, session);
@ -495,7 +490,7 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
char *engine = argv[0];
char *grammar = argv[1];
char *result = NULL;
switch_ivr_play_and_detect_speech(session, file, engine, grammar, &result);
switch_ivr_play_and_detect_speech(session, file, engine, grammar, &result, 0, NULL);
switch_channel_set_variable(channel, "detect_speech_result", result);
} else {
/* bad input */
@ -1570,6 +1565,22 @@ SWITCH_STANDARD_API(strepoch_api_function)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_STANDARD_API(strmicroepoch_api_function)
{
switch_time_t out;
if (zstr(cmd)) {
out = switch_micro_time_now();
} else {
out = switch_str_time(cmd);
}
stream->write_function(stream, "%"SWITCH_TIME_T_FMT, out);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_STANDARD_API(strftime_api_function)
{
switch_size_t retsize;
@ -2217,10 +2228,7 @@ SWITCH_STANDARD_APP(read_function)
}
if (argc > 6) {
digit_timeout = atoi(argv[6]);
if (digit_timeout < 0) {
digit_timeout = 0;
}
digit_timeout = switch_atoui(argv[6]);
}
if (min_digits <= 1) {
@ -2303,10 +2311,7 @@ SWITCH_STANDARD_APP(play_and_get_digits_function)
}
if (argc > 9) {
digit_timeout = atoi(argv[9]);
if (digit_timeout < 0) {
digit_timeout = 0;
}
digit_timeout = switch_atoui(argv[9]);
}
if (argc > 10) {
@ -2589,25 +2594,16 @@ SWITCH_STANDARD_APP(record_function)
l++;
}
if (l) {
limit = atoi(l);
if (limit < 0) {
limit = 0;
}
limit = switch_atoui(l);
}
}
if (argv[2]) {
fh.thresh = atoi(argv[2]);
if (fh.thresh < 0) {
fh.thresh = 0;
}
fh.thresh = switch_atoui(argv[2]);
}
if (argv[3]) {
fh.silence_hits = atoi(argv[3]);
if (fh.silence_hits < 0) {
fh.silence_hits = 0;
}
fh.silence_hits = switch_atoui(argv[3]);
}
if ((tmp = switch_channel_get_variable(channel, "record_rate"))) {
@ -3481,9 +3477,7 @@ SWITCH_STANDARD_APP(wait_for_silence_function)
listen_hits = atoi(argv[2]);
if (argv[3]) {
if ((timeout_ms = atoi(argv[3])) < 0) {
timeout_ms = 0;
}
timeout_ms = switch_atoui(argv[3]);
}
if (thresh > 0 && silence_hits > 0 && listen_hits > 0) {
@ -4006,6 +4000,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
SWITCH_ADD_CHAT(chat_interface, "api", api_chat_send);
SWITCH_ADD_API(api_interface, "strepoch", "Convert a date string into epoch time", strepoch_api_function, "<string>");
SWITCH_ADD_API(api_interface, "strmicroepoch", "Convert a date string into micoepoch time", strmicroepoch_api_function, "<string>");
SWITCH_ADD_API(api_interface, "chat", "chat", chat_api_function, "<proto>|<from>|<to>|<message>|[<content-type>]");
SWITCH_ADD_API(api_interface, "strftime", "strftime", strftime_api_function, "<format_string>");
SWITCH_ADD_API(api_interface, "presence", "presence", presence_api_function, PRESENCE_USAGE);

View File

@ -0,0 +1,13 @@
BASE=../../../..
ESL_DIR = $(switch_srcdir)/libs/esl
LOCAL_LDFLAGS=-L$(ESL_DIR) -lesl
LOCAL_OBJS=$(ESL_DIR)/libesl.so
LOCAL_LIBADD=$(ESL_DIR)/libesl.so
LOCAL_CFLAGS=-I$(ESL_DIR)/src/include
include $(BASE)/build/modmake.rules
$(ESL_DIR)/libesl.so: $(ESL_DIR)/Makefile
cd $(ESL_DIR) && $(MAKE) -j1

View File

@ -0,0 +1,150 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Marc Olivier Chouinard <mochouinard@moctel.com>
*
*
* mod_esl.c -- Allow to generate remote ESL commands
*
*/
#include <switch.h>
#include <esl.h>
/* Prototypes */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_esl_shutdown);
SWITCH_MODULE_RUNTIME_FUNCTION(mod_esl_runtime);
SWITCH_MODULE_LOAD_FUNCTION(mod_esl_load);
/* SWITCH_MODULE_DEFINITION(name, load, shutdown, runtime)
* Defines a switch_loadable_module_function_table_t and a static const char[] modname
*/
SWITCH_MODULE_DEFINITION(mod_esl, mod_esl_load, mod_esl_shutdown, NULL);
SWITCH_STANDARD_API(single_esl_api_function)
{
esl_handle_t handle = {{0}};
char *host = "127.0.0.1";
char *s_port = NULL;
int port = 8021;
char *username = NULL;
char *password = "ClueCon";
char *args = NULL;
char *s_timeout = NULL;
int timeout = 5000;
char *dup = strdup(cmd);
char *send = NULL;
username = dup;
if (username && (password = strchr(username, '|'))) {
*password++ = '\0';
}
if (password && (host = strchr(password, ' '))) {
*host++ = '\0';
}
if (host && (s_timeout = strchr(host, ' '))) {
*s_timeout++ = '\0';
}
if (host && (s_port = strchr(host, ':'))) {
*s_port++ = '\0';
}
if (s_timeout && (args = strchr(s_timeout, ' '))) {
*args++ = '\0';
}
if (!zstr(s_port)) {
port = atoi(s_port);
}
if (zstr(host) || zstr(password) || zstr(args) || zstr(s_timeout)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Bad parameters\n");
goto end;
}
timeout = atoi(s_timeout);
if (esl_connect_timeout(&handle, host, port, username, password, timeout) != ESL_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to connect to remote ESL at %s:%d\n",
host, port);
goto end;
} else {
send = switch_mprintf("api %s", args);
if (esl_send_recv_timed(&handle, send, timeout) != ESL_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Disconnected from remote ESL at %s:%d\n",
host, port);
goto end;
} else {
stream->write_function(stream, handle.last_sr_event->body);
}
}
end:
esl_disconnect(&handle);
memset(&handle, 0, sizeof(handle));
switch_safe_free(send);
switch_safe_free(dup);
return SWITCH_STATUS_SUCCESS;
}
/* Macro expands to: switch_status_t mod_esl_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool) */
SWITCH_MODULE_LOAD_FUNCTION(mod_esl_load)
{
switch_api_interface_t *api_interface;
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
SWITCH_ADD_API(api_interface, "single_esl", "Allow to do a single connection api call to a remote ESL server", single_esl_api_function, "[<user>]|<password> <host>[:<port>] <timeout> <remote api> <arguments>");
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
/*
Called when the system shuts down
Macro expands to: switch_status_t mod_esl_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_esl_shutdown)
{
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4
*/

View File

@ -488,6 +488,7 @@ struct fifo_chime_data {
char *orbit_exten;
char *orbit_dialplan;
char *orbit_context;
char *exit_key;
};
typedef struct fifo_chime_data fifo_chime_data_t;
@ -521,25 +522,25 @@ static switch_status_t caller_read_frame_callback(switch_core_session_t *session
if (cd->list[cd->index]) {
switch_input_args_t args = { 0 };
char buf[25] = "";
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *caller_exit_key = switch_channel_get_variable(channel, "fifo_caller_exit_key");
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_status_t status;
args.input_callback = moh_on_dtmf;
args.buf = buf;
args.buflen = sizeof(buf);
args.read_frame_callback = chime_read_frame_callback;
args.user_data = user_data;
status = switch_ivr_play_file(session, NULL, cd->list[cd->index], &args);
if (!SWITCH_READ_ACCEPTABLE(status)) {
return SWITCH_STATUS_BREAK;
}
if (match_key(caller_exit_key, *buf)) {
if (match_key(cd->exit_key, *buf)) {
cd->abort = 1;
return SWITCH_STATUS_BREAK;
}
if (status != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_BREAK;
}
cd->next = switch_epoch_time_now(NULL) + cd->freq;
cd->index++;
}
@ -2485,6 +2486,7 @@ SWITCH_STANDARD_APP(fifo_function)
cd.total = switch_separate_string(list_dup, ',', cd.list, (sizeof(cd.list) / sizeof(cd.list[0])));
cd.freq = freq;
cd.next = switch_epoch_time_now(NULL) + cd.freq;
cd.exit_key = (char *) switch_channel_get_variable(channel, "fifo_caller_exit_key");
}
send_presence(node);
@ -2492,6 +2494,7 @@ SWITCH_STANDARD_APP(fifo_function)
while (switch_channel_ready(channel)) {
switch_input_args_t args = { 0 };
char buf[25] = "";
switch_status_t rstatus;
args.input_callback = moh_on_dtmf;
args.buf = buf;
@ -2514,13 +2517,14 @@ SWITCH_STANDARD_APP(fifo_function)
switch_core_session_flush_private_events(session);
if (moh) {
switch_status_t status = switch_ivr_play_file(session, NULL, moh, &args);
if (!SWITCH_READ_ACCEPTABLE(status)) {
aborted = 1;
goto abort;
}
rstatus = switch_ivr_play_file(session, NULL, moh, &args);
} else {
switch_ivr_collect_digits_callback(session, &args, 0, 0);
rstatus = switch_ivr_collect_digits_callback(session, &args, 0, 0);
}
if (!SWITCH_READ_ACCEPTABLE(rstatus)) {
aborted = 1;
goto abort;
}
if (match_key(caller_exit_key, *buf)) {

View File

@ -111,9 +111,15 @@ SWITCH_STANDARD_APP(record_fsv_function)
switch_codec_implementation_t read_impl = { 0 };
switch_dtmf_t dtmf = { 0 };
int count = 0, sanity = 30;
switch_core_session_message_t msg = { 0 };
/* Tell the channel to request a fresh vid frame */
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
switch_core_session_get_read_impl(session, &read_impl);
switch_channel_answer(channel);
switch_core_session_receive_message(session, &msg);
switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "");
@ -290,6 +296,13 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_dtmf_t dtmf = { 0 };
switch_frame_t *read_frame;
switch_codec_implementation_t read_impl = { 0 };
switch_core_session_message_t msg = { 0 };
/* Tell the channel to request a fresh vid frame */
msg.from = __FILE__;
msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
switch_core_session_receive_message(session, &msg);
switch_core_session_get_read_impl(session, &read_impl);
@ -370,6 +383,8 @@ SWITCH_STANDARD_APP(play_fsv_function)
}
switch_core_session_set_read_codec(session, &codec);
switch_core_service_session_av(session, SWITCH_FALSE, SWITCH_TRUE);
while (switch_channel_ready(channel)) {
if (read(fd, &bytes, sizeof(bytes)) != sizeof(bytes)) {
@ -440,6 +455,8 @@ SWITCH_STANDARD_APP(play_fsv_function)
}
switch_core_thread_session_end(session);
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "OK");
end:

View File

@ -974,7 +974,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_hash_load)
switch_limit_interface_t *limit_interface;
switch_status_t status;
memset(&globals, 0, sizeof(&globals));
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
status = switch_event_reserve_subclass(LIMIT_EVENT_USAGE);

View File

@ -0,0 +1,42 @@
<?php
$xml = new XMLWriter();
$xml->openMemory();
$xml->setIndent(1);
$xml->startDocument();
if ( $_REQUEST['exiting'] ) {
header('Content-Type: text/plain');
print "OK";
exit();
}
header('Content-Type: text/xml');
$xml->startElement('document');
$xml->writeAttribute('type', 'xml/freeswitch-httapi');
$xml->startElement('work');
$xml->startElement('pause');
$xml->writeAttribute('milliseconds', '1500');
$xml->endElement(); // </pause>
$xml->startElement('playback');
$xml->writeAttribute('name', 'digits');
$xml->writeAttribute('file', 'http://sidious.freeswitch.org/sounds/exten.wav');
$xml->writeAttribute('error-file', 'http://sidious.freeswitch.org/sounds/invalid.wav');
$xml->writeAttribute('input-timeout', '5000');
$xml->writeAttribute('action', 'dial:default:XML');
$xml->startElement("bind");
$xml->writeAttribute('strip',"#");
$xml->text("~\\d+\#");
$xml->endElement(); // </bind>
$xml->endElement(); // </playback>
$xml->endElement(); // </work>
$xml->endElement(); // </document>
print $xml->outputMemory();

View File

@ -0,0 +1,111 @@
<?php
if ( array_key_exists( 'session_id', $_REQUEST ) ) {
session_id( $_REQUEST['session_id'] );
}
session_start();
$xml = new XMLWriter();
$xml->openMemory();
$xml->setIndent(1);
$xml->startDocument();
if ( array_key_exists( 'exten', $_REQUEST ) ) {
$exten = $_REQUEST['exten'];
} elseif ( array_key_exists( 'exten', $_SESSION ) ) {
$exten = $_SESSION['exten'];
} else {
$exten = '';
}
if ( array_key_exists( 'pin', $_REQUEST ) ) {
$pin = $_REQUEST['pin'];
} elseif ( array_key_exists( 'pin', $_SESSION ) ) {
$pin = $_SESSION['pin'];
} else {
$pin = '';
}
if ( array_key_exists( 'exiting', $_REQUEST ) ) {
$exiting = $_REQUEST['exiting'];
} elseif ( array_key_exists( 'exiting', $_SESSION ) ) {
$exiting = $_SESSION['exiting'];
} else {
$exiting = '';
}
if ( $exiting ) {
header('Content-Type: text/plain');
print "OK";
exit();
}
header('Content-Type: text/xml');
$xml->startElement('document');
$xml->writeAttribute('type', 'xml/freeswitch-httapi');
if ( $exten && $pin ) {
$xml->startElement('work');
$xml->writeElement("playback", "http://sidious.freeswitch.org/sounds/ext_num.wav");
$xml->startElement("say");
$xml->writeAttribute('language', "en");
$xml->writeAttribute('type', "name_spelled");
$xml->writeAttribute('method', "pronounced");
$xml->text($exten);
$xml->endElement(); // </say>
$xml->startElement('pause');
$xml->writeAttribute('milliseconds', "1500");
$xml->endElement(); // </pause>
$xml->startElement("say");
$xml->writeAttribute('language', "en");
$xml->writeAttribute('type', "name_spelled");
$xml->writeAttribute('method', "pronounced");
$xml->text($pin);
$xml->endElement(); // </say>
$xml->writeElement('hangup');
$xml->endElement(); // </work>
} elseif ( $exten ) {
$_SESSION['exten'] = $exten;
$xml->startElement('work');
$xml->startElement('playback');
$xml->writeAttribute('name', "pin");
$xml->writeAttribute('file', "http://sidious.freeswitch.org/sounds/pin.wav");
$xml->writeAttribute('error-file', "http://sidious.freeswitch.org/sounds/bad-pin.wav");
$xml->writeAttribute('input-timeout', "5000");
$xml->startElement("bind");
$xml->writeAttribute('strip', "#");
$xml->text("~\\d+\#");
$xml->endElement(); // </bind>
$xml->endElement(); // </playback>
$xml->endElement(); // </work>
} else {
$xml->startElement('work');
$xml->startElement('playback');
$xml->writeAttribute('name', "exten");
$xml->writeAttribute('file', "http://sidious.freeswitch.org/sounds/exten.wav");
$xml->writeAttribute('loops', "3");
$xml->writeAttribute('error-file', "http://sidious.freeswitch.org/sounds/invalid.wav");
$xml->writeAttribute('input-timeout', "5000");
$xml->startElement("bind");
$xml->writeAttribute('strip', "#");
$xml->text("~\\d+\#");
$xml->endElement(); // </bind>
$xml->endElement(); // </playback>
$xml->endElement(); // </work>
}
$xml->endElement(); // </document>
print $xml->outputMemory();

View File

@ -0,0 +1,71 @@
<?php
if ( array_key_exists( 'session_id', $_REQUEST ) ) {
session_id( $_REQUEST['session_id'] );
}
session_start();
$xml = new XMLWriter();
$xml->openMemory();
$xml->setIndent(1);
$xml->startDocument();
if ( array_key_exists( 'exiting', $_REQUEST ) ) {
$exiting = $_REQUEST['exiting'];
} elseif ( array_key_exists( 'exiting', $_SESSION ) ) {
$exiting = $_SESSION['exiting'];
} else {
$exiting = '';
}
if ( $_FILES && array_key_exists( 'recorded_file', $_FILES ) ) {
move_uploaded_file($_FILES['recorded_file']['tmp_name'], '/tmp/' . $_FILES['recorded_file']['name']);
trigger_error( print_r( $_FILES, true ) );
header('Content-Type: text/plain');
print "OK\n";
exit();
}
if ( $exiting ) {
header('Content-Type: text/plain');
print "OK";
exit();
}
header('Content-Type: text/xml');
$xml->startElement('document');
$xml->writeAttribute('type', 'xml/freeswitch-httapi');
$xml->startElement('work');
$xml->startElement('pause');
$xml->writeAttribute('milliseconds', "1500");
$xml->endElement();
$xml->startElement('playback');
$xml->writeAttribute('file', "http://sidious.freeswitch.org/eg/ivr-say_name.wav");
$xml->endElement();
$xml->startElement('record');
$xml->writeAttribute('name', "recorded_file");
$xml->writeAttribute('file', $_REQUEST['session_id'] . ".wav");
$xml->writeAttribute('error-file', "http://sidious.freeswitch.org/sounds/invalid.wav");
$xml->writeAttribute('input-timeout', "5000");
$xml->writeAttribute('beep-file', "tone_stream://%(1000,0,460)");
$xml->endElement();
$xml->startElement("bind");
$xml->writeAttribute('strip', "#");
$xml->text("~\\d+\#");
$xml->endElement();
$xml->endElement(); // </work>
$xml->endElement(); // </document>
print $xml->outputMemory();

View File

@ -0,0 +1,93 @@
<?php
if ( array_key_exists( 'session_id', $_REQUEST ) ) {
session_id( $_REQUEST['session_id'] );
}
session_start();
$xml = new XMLWriter();
$xml->openMemory();
$xml->setIndent(1);
$xml->startDocument();
if ( array_key_exists( 'exiting', $_REQUEST ) ) {
$exiting = $_REQUEST['exiting'];
} elseif ( array_key_exists( 'exiting', $_SESSION ) ) {
$exiting = $_SESSION['exiting'];
} else {
$exiting = '';
}
if ( array_key_exists( 'result', $_REQUEST ) ) {
$result = $_REQUEST['result'];
} elseif ( array_key_exists( 'result', $_SESSION ) ) {
$result = $_SESSION['result'];
} else {
$result = '';
}
if ( array_key_exists( 'input_type', $_REQUEST ) ) {
$input_type = $_REQUEST['input_type'];
} elseif ( array_key_exists( 'input_type', $_SESSION ) ) {
$input_type = $_SESSION['input_type'];
} else {
$input_type = '';
}
if ( $exiting ) {
header('Content-Type: text/plain');
print "OK";
exit();
}
header('Content-Type: text/xml');
$xml->startElement('document');
$xml->writeAttribute('type', 'xml/freeswitch-httapi');
if ($result) {
$xml->startElement('work');
if ($type == "dtmf") {
$xml->startElement("say");
$xml->writeAttribute('language', "en");
$xml->writeAttribute('type', "name_spelled");
$xml->writeAttribute('method', "pronounced");
$xml->text( $result );
}
$xml->startElement("log");
$xml->writeAttribute('level', "crit");
$xml->text($result);
$xml->endElement();
$xml->writeElement('hangup');
$xml->endElement();
} else {
$xml->startElement('work');
$xml->startElement('pause');
$xml->writeAttribute('milliseconds', "1500");
$xml->endElement();
$xml->startElement('playback');
$xml->writeAttribute('name', "result");
$xml->writeAttribute('asr-engine', "pocketsphinx");
$xml->writeAttribute('asr-grammar', "pizza_yesno");
$xml->writeAttribute('file', "http://sidious.freeswitch.org/sounds/ConfirmDelivery.wav");
$xml->writeAttribute('error-file', "http://sidious.freeswitch.org/sounds/invalid.wav");
$xml->startElement("bind");
$xml->writeAttribute('strip', "#");
$xml->text("~\\d+\#");
$xml->endElement();
$xml->endElement();
$xml->endElement();
}
$xml->endElement(); // </document>
print $xml->outputMemory();

View File

@ -0,0 +1,34 @@
#!/usr/bin/perl
# Object initialization:
use XML::Simple;
use CGI;
use Data::Dumper;
use XML::Writer;
my $q = CGI->new;
my $exiting = $q->param("exiting");
if ($exiting) {
print $q->header(-type => "text/plain");
print "OK";
exit();
}
print $q->header(-type => "text/xml");
my $writer = new XML::Writer(OUTPUT => STDOUT, DATA_MODE => 1);
$writer->startTag('document', type => 'xml/freeswitch-httapi');
$writer->startTag('work');
$writer->emptyTag('pause', milliseconds => "500");
$writer->emptyTag('execute', application => "info");
$writer->dataElement('execute', "user_busy", application => "hangup");
$writer->endTag('work');
$writer->endTag('document');
$writer->end();

View File

@ -0,0 +1,41 @@
#!/usr/bin/perl
# Object initialization:
use XML::Simple;
use CGI;
use Data::Dumper;
use XML::Writer;
my $q = CGI->new;
my $exiting = $q->param("exiting");
if ($exiting) {
print $q->header(-type => "text/plain");
print "OK";
exit();
}
print $q->header(-type => "text/xml");
my $writer = new XML::Writer(OUTPUT => STDOUT, DATA_MODE => 1);
$writer->startTag('document', type => 'xml/freeswitch-httapi');
$writer->startTag('work');
$writer->emptyTag('pause', milliseconds => "1500");
$writer->startTag('playback',
name => digits,
file => "http://sidious.freeswitch.org/sounds/exten.wav",
'error-file' => "http://sidious.freeswitch.org/sounds/invalid.wav",
'input-timeout' => "5000",
action => "dial:default:XML");
$writer->dataElement("bind", "~\\d+\#", strip => "#");
$writer->endTag('playback');
$writer->endTag('work');
$writer->endTag('document');
$writer->end();

View File

@ -0,0 +1,78 @@
#!/usr/bin/perl
# Object initialization:
use XML::Simple;
use CGI;
use Data::Dumper;
use XML::Writer;
my $q = CGI->new;
my $exten = $q->param("exten");
my $pin = $q->param("pin");
my $exiting = $q->param("exiting");
if ($exiting) {
print $q->header(-type => "text/plain");
print "OK";
exit();
}
print $q->header(-type => "text/xml");
my $writer = new XML::Writer(OUTPUT => STDOUT, DATA_MODE => 1);
$writer->startTag('document', type => 'xml/freeswitch-httapi');
$writer->startTag('params');
if ($exten) {
$writer->dataElement("exten", $exten);
}
if ($pin) {
$writer->dataElement("exten", $pin);
}
$writer->endTag('params');
if ($exten eq "invalid" || $pin eq "invalid") {
$writer->startTag('work');
$writer->emptyTag('hangup', cause => "destination_out_of_order");
$writer->endTag('work');
}
if ($exten && $pin) {
$writer->startTag('work');
$writer->dataElement("playback", "http://sidious.freeswitch.org/sounds/ext_num.wav");
$writer->dataElement("say", $exten, language => "en", type => "name_spelled", method => "pronounced");
$writer->emptyTag('pause', milliseconds => "1500");
$writer->dataElement("say", $pin, language => "en", type => "name_spelled", method => "pronounced");
$writer->emptyTag('hangup');
$writer->endTag('work');
} elsif ($exten) {
$writer->startTag('work');
$writer->startTag('playback',
name => "pin",
file => "http://sidious.freeswitch.org/sounds/pin.wav",
'error-file' => "http://sidious.freeswitch.org/sounds/bad-pin.wav",
'input-timeout' => "5000");
$writer->dataElement("bind", "~\\d+\#", strip => "#");
$writer->endTag('playback');
$writer->endTag('work');
} else {
$writer->startTag('work');
$writer->startTag('playback',
name => "exten",
file => "http://sidious.freeswitch.org/sounds/exten.wav",
loops => "3",
'error-file' => "http://sidious.freeswitch.org/sounds/invalid.wav",
'input-timeout' => "5000");
$writer->dataElement("bind", "~\\d+\#", strip => "#");
$writer->endTag('playback');
$writer->endTag('work');
}
$writer->endTag('document');
$writer->end();

View File

@ -0,0 +1,58 @@
#!/usr/bin/perl
# Object initialization:
use XML::Simple;
use CGI;
use Data::Dumper;
use XML::Writer;
my $q = CGI->new;
my $exiting = $q->param("exiting");
my $file = $q->upload("recorded_file");
if ($file) {
open(O, ">/tmp/recording.wav");
while(<$file>) {
print O $_;
}
close O;
print $q->header(-type => "text/plain");
print "OK\n";
exit();
}
if ($exiting) {
print $q->header(-type => "text/plain");
print "OK";
exit();
}
print $q->header(-type => "text/xml");
my $writer = new XML::Writer(OUTPUT => STDOUT, DATA_MODE => 1);
$writer->startTag('document', type => 'xml/freeswitch-httapi');
$writer->startTag('work');
$writer->emptyTag('pause', milliseconds => "1500");
$writer->emptyTag('playback', file => "http://sidious.freeswitch.org/eg/ivr-say_name.wav");
$writer->startTag('record',
name => "recorded_file",
file => "recording.wav",
'error-file' => "http://sidious.freeswitch.org/sounds/invalid.wav",
'input-timeout' => "5000",
'beep-file', => "tone_stream://%(1000,0,460)");
$writer->dataElement("bind", "~\\d+\#", strip => "#");
$writer->endTag('record');
$writer->endTag('work');
$writer->endTag('document');
$writer->end();

View File

@ -0,0 +1,61 @@
#!/usr/bin/perl
# Object initialization:
use XML::Simple;
use CGI;
use Data::Dumper;
use XML::Writer;
my $q = CGI->new;
my $result = $q->param("result");
my $type = $q->param("input_type");
my $exiting = $q->param("exiting");
if ($exiting) {
print $q->header(-type => "text/plain");
print "OK";
exit();
}
print $q->header(-type => "text/xml");
my $writer = new XML::Writer(OUTPUT => STDOUT, DATA_MODE => 1);
$writer->startTag('document', type => 'xml/freeswitch-httapi');
if ($result) {
$writer->startTag('work');
if ($type eq "dtmf") {
$writer->dataElement("say", $result, language => "en", type => "name_spelled", method => "pronounced");
}
$writer->dataElement("log", $result, level => "crit");
$writer->emptyTag('hangup');
$writer->endTag('work');
} else {
$writer->startTag('work');
$writer->emptyTag('pause', milliseconds => "1500");
$writer->startTag('playback',
name => "result",
'asr-engine' => "pocketsphinx",
'asr-grammar' => "pizza_yesno",
file => "http://sidious.freeswitch.org/sounds/ConfirmDelivery.wav",
'error-file' => "http://sidious.freeswitch.org/sounds/invalid.wav"
);
$writer->dataElement("bind", "~\\d+\#", strip => "#");
#$writer->dataElement("bind", "1");
#$writer->dataElement("bind", "2");
$writer->endTag('playback');
$writer->endTag('work');
}
$writer->endTag('document');
$writer->end();

View File

@ -0,0 +1,127 @@
<configuration name="httapi.conf" description="HT-TAPI Hypertext Telephony API">
<settings>
<!-- print xml on the consol -->
<param name="debug" value="true"/>
<!-- time to keep audio files when discoverd they were deleted from the http server -->
<param name="file-not-found-expires" value="300"/>
<!-- how often to re-check the server to make sure the remote file has not changed -->
<param name="file-cache-ttl" value="300"/>
</settings>
<profiles>
<profile name="default">
<!-- default params for conference action tags -->
<conference>
<param name="default-profile" value="default"/>
</conference>
<!-- default params for dial action tags -->
<dial>
<param name="context" value="default"/>
<param name="dialplan" value="XML"/>
</dial>
<!-- permissions -->
<permissions>
<!-- <permission name="all" value="true"/> -->
<!--<permission name="none" value="true"/> -->
<permission name="set-params" value="true"/>
<permission name="set-vars" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
-->
</permission>
<permission name="get-vars" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
-->
</permission>
<permission name="extended-data" value="false"/>
<permission name="execute-apps" value="true">
<!-- default to "deny" or "allow" -->
<application-list default="deny">
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<application name="info"/>
<application name="hangup"/>
</application-list>
</permission>
<permission name="expand-vars-in-tag-body" value="false">
<!-- default to "deny" or "allow" -->
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
<!--
<variable-list default="deny">
<variable name="caller_id_name"/>
<variable name="hangup"/>
</variable-list>
<api-list default="deny">
<api name="expr"/>
<api name="lua"/>
</api-list>
-->
</permission>
<permission name="dial" value="true"/>
<permission name="dial-set-context" value="false"/>
<permission name="dial-set-dialplan" value="false"/>
<permission name="dial-set-cid-name" value="false"/>
<permission name="dial-set-cid-number" value="false"/>
<permission name="dial-full-originate" value="false"/>
<permission name="conference" value="true"/>
<permission name="conference-set-profile" value="false"/>
</permissions>
<params>
<!-- default url can be overridden by app data -->
<param name="gateway-url" value="http://www.freeswitch.org/api/index.cgi" />
<!-- set this to provide authentication credentials to the server -->
<!--<param name="gateway-credentials" value="muser:mypass"/>-->
<!--<param name="auth-scheme" value="basic"/>-->
<!-- optional: this will enable the CA root certificate check by libcurl to
verify that the certificate was issued by a major Certificate Authority.
note: default value is disabled. only enable if you want this! -->
<!--<param name="enable-cacert-check" value="true"/>-->
<!-- optional: verify that the server is actually the one listed in the cert -->
<!-- <param name="enable-ssl-verifyhost" value="true"/> -->
<!-- optional: these options can be used to specify custom SSL certificates
to use for HTTPS communications. Either use both options or neither.
Specify your public key with 'ssl-cert-path' and the private key with
'ssl-key-path'. If your private key has a password, specify it with
'ssl-key-password'. -->
<!-- <param name="ssl-cert-path" value="$${base_dir}/conf/certs/public_key.pem"/> -->
<!-- <param name="ssl-key-path" value="$${base_dir}/conf/certs/private_key.pem"/> -->
<!-- <param name="ssl-key-password" value="MyPrivateKeyPassword"/> -->
<!-- optional timeout -->
<!-- <param name="timeout" value="10"/> -->
<!-- optional: use a custom CA certificate in PEM format to verify the peer
with. This is useful if you are acting as your own certificate authority.
note: only makes sense if used in combination with "enable-cacert-check." -->
<!-- <param name="ssl-cacert-file" value="$${base_dir}/conf/certs/cacert.pem"/> -->
<!-- optional: specify the SSL version to force HTTPS to use. Valid options are
"SSLv3" and "TLSv1". Otherwise libcurl will auto-negotiate the version. -->
<!-- <param name="ssl-version" value="TLSv1"/> -->
<!-- optional: enables cookies and stores them in the specified file. -->
<!-- <param name="cookie-file" value="/tmp/cookie-mod_xml_curl.txt"/> -->
<!-- one or more of these imply you want to pick the exact variables that are transmitted -->
<!--<param name="enable-post-var" value="Unique-ID"/>-->
</params>
</profile>
</profiles>
</configuration>

View File

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="mod_httapi"
ProjectGUID="{0807C5CB-F6FF-451D-89F0-1F7B2E1D9169}"
RootNamespace="mod_httapi"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\mod_httapi.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

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