Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug", "Debug", "{6374D55C-FABE-4A02-9CF1-4145308A56C5}"\r
ProjectSection(SolutionItems) = preProject\r
debug\conf\freeswitch.xml = debug\conf\freeswitch.xml\r
- debug\conf\vars.xml = debug\conf\vars.xml\r
EndProjectSection\r
EndProject\r
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Build System", "_Build System", "{DB1024A8-41BF-4AD7-9AE6-13202230D1F3}"\r
configure.in = configure.in\r
Makefile.am = Makefile.am\r
build\modmake.rules.in = build\modmake.rules.in\r
- build\modules.conf.in = build\modules.conf.in\r
libs\win32\util.vbs = libs\win32\util.vbs\r
EndProjectSection\r
EndProject\r
conf\autoload_configs\limit.conf.xml = conf\autoload_configs\limit.conf.xml\r
conf\autoload_configs\local_stream.conf.xml = conf\autoload_configs\local_stream.conf.xml\r
conf\autoload_configs\logfile.conf.xml = conf\autoload_configs\logfile.conf.xml\r
- conf\autoload_configs\modules.conf.xml = conf\autoload_configs\modules.conf.xml\r
conf\autoload_configs\openmrcp.conf.xml = conf\autoload_configs\openmrcp.conf.xml\r
conf\autoload_configs\portaudio.conf.xml = conf\autoload_configs\portaudio.conf.xml\r
conf\autoload_configs\rss.conf.xml = conf\autoload_configs\rss.conf.xml\r
conf\autoload_configs\sofia.conf.xml = conf\autoload_configs\sofia.conf.xml\r
conf\autoload_configs\spidermonkey.conf.xml = conf\autoload_configs\spidermonkey.conf.xml\r
- conf\autoload_configs\switch.conf.xml = conf\autoload_configs\switch.conf.xml\r
conf\autoload_configs\syslog.conf.xml = conf\autoload_configs\syslog.conf.xml\r
conf\autoload_configs\voicemail.conf.xml = conf\autoload_configs\voicemail.conf.xml\r
conf\autoload_configs\wanpipe.conf.xml = conf\autoload_configs\wanpipe.conf.xml\r
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sip_profiles", "sip_profiles", "{8E2E8798-8B6F-4A55-8E4F-4E6FDE40ED26}"\r
ProjectSection(SolutionItems) = preProject\r
conf\sip_profiles\external.xml = conf\sip_profiles\external.xml\r
- conf\sip_profiles\internal.xml = conf\sip_profiles\internal.xml\r
conf\sip_profiles\nat.xml = conf\sip_profiles\nat.xml\r
EndProjectSection\r
EndProject\r
EndProject\r
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dialplan", "dialplan", "{D44DD429-FE98-42AA-B5B7-4B4EBE33AEFD}"\r
ProjectSection(SolutionItems) = preProject\r
- debug\conf\dialplan\default.xml = debug\conf\dialplan\default.xml\r
debug\conf\dialplan\US.conf.xml = debug\conf\dialplan\US.conf.xml\r
EndProjectSection\r
EndProject\r
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.All|x64.ActiveCfg = Release|Any CPU\r
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|Win32.Build.0 = Debug|Any CPU\r
- {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|x64.ActiveCfg = Debug|x64\r
- {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|x64.Build.0 = Debug|x64\r
+ {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|x64.ActiveCfg = Debug|Any CPU\r
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|Win32.ActiveCfg = Release|Any CPU\r
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|Win32.Build.0 = Release|Any CPU\r
- {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.ActiveCfg = Release|x64\r
- {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.Build.0 = Release|x64\r
+ {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.ActiveCfg = Release|Any CPU\r
{E796E337-DE78-4303-8614-9A590862EE95}.All|Win32.ActiveCfg = Release|Win32\r
{E796E337-DE78-4303-8614-9A590862EE95}.All|Win32.Build.0 = Release|Win32\r
{E796E337-DE78-4303-8614-9A590862EE95}.All|x64.ActiveCfg = Release|Win32\r
#endpoints/mod_skypopen
#endpoints/mod_h323
#../../libs/openzap/mod_openzap
-#../../libs/freetdm/mod_freetdm
+../../libs/freetdm/mod_freetdm
#asr_tts/mod_unimrcp
#asr_tts/mod_flite
#asr_tts/mod_pocketsphinx
<configuration name="modules.conf" description="Modules">
<modules>
- <!-- Loggers (I'd load these first) -->
<load module="mod_console"/>
<load module="mod_logfile"/>
- <!-- <load module="mod_syslog"/> -->
-
- <!--<load module="mod_yaml"/>-->
-
- <!-- Multi-Faceted -->
- <!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
- <load module="mod_enum"/>
-
- <!-- XML Interfaces -->
- <!-- <load module="mod_xml_rpc"/> -->
- <!-- <load module="mod_xml_curl"/> -->
- <!-- <load module="mod_xml_cdr"/> -->
-
- <!-- Event Handlers -->
- <load module="mod_cdr_csv"/>
- <!-- <load module="mod_event_multicast"/> -->
<load module="mod_event_socket"/>
- <!-- <load module="mod_zeroconf"/> -->
- <!-- <load module="mod_erlang_event"/> -->
-
- <!-- Directory Interfaces -->
- <!-- <load module="mod_ldap"/> -->
-
- <!-- Endpoints -->
- <!-- <load module="mod_dingaling"/> -->
- <!-- <load module="mod_portaudio"/> -->
- <!-- <load module="mod_alsa"/> -->
<load module="mod_sofia"/>
- <load module="mod_loopback"/>
- <!-- <load module="mod_woomera"/> -->
- <!-- <load module="mod_openzap"/> -->
- <!-- <load module="mod_unicall"/> -->
- <!-- <load module="mod_skinny"/> -->
-
- <!-- Applications -->
<load module="mod_commands"/>
- <load module="mod_conference"/>
- <load module="mod_db"/>
<load module="mod_dptools"/>
<load module="mod_expr"/>
- <load module="mod_fifo"/>
- <load module="mod_hash"/>
- <load module="mod_voicemail"/>
- <!--<load module="mod_directory"/>-->
- <!--<load module="mod_lcr"/>-->
- <load module="mod_esf"/>
- <load module="mod_fsv"/>
- <load module="mod_cluechoo"/>
- <load module="mod_valet_parking"/>
- <!--<load module="mod_spy"/>-->
-
- <!-- SNOM Module -->
- <!--<load module="mod_snom"/>-->
-
- <!-- Dialplan Interfaces -->
- <!-- <load module="mod_dialplan_directory"/> -->
<load module="mod_dialplan_xml"/>
- <load module="mod_dialplan_asterisk"/>
-
- <!-- Codec Interfaces -->
- <load module="mod_spandsp"/>
- <load module="mod_g723_1"/>
- <load module="mod_g729"/>
- <load module="mod_amr"/>
- <load module="mod_ilbc"/>
- <load module="mod_speex"/>
- <load module="mod_h26x"/>
- <load module="mod_siren"/>
- <!--<load module="mod_celt"/>-->
-
- <!-- File Format Interfaces -->
<load module="mod_sndfile"/>
<load module="mod_native_file"/>
- <!--For icecast/mp3 streams/files-->
- <!--<load module="mod_shout"/>-->
- <!--For local streams (play all the files in a directory)-->
- <load module="mod_local_stream"/>
- <load module="mod_tone_stream"/>
- <load module="mod_file_string"/>
-
- <!-- Timers -->
-
- <!-- Languages -->
- <load module="mod_spidermonkey"/>
- <!-- <load module="mod_perl"/> -->
- <!-- <load module="mod_python"/> -->
- <!-- <load module="mod_java"/> -->
- <load module="mod_lua"/>
-
- <!-- ASR /TTS -->
- <!-- <load module="mod_flite"/> -->
- <!-- <load module="mod_pocketsphinx"/> -->
- <!-- <load module="mod_cepstral"/> -->
- <!-- <load module="mod_tts_commandline"/> -->
- <!-- <load module="mod_rss"/> -->
-
- <!-- Say -->
- <load module="mod_say_en"/>
- <load module="mod_say_ru"/>
- <!-- <load module="mod_say_zh"/> -->
-
- <!-- Third party modules -->
- <!--<load module="mod_nibblebill"/>-->
-
</modules>
</configuration>
cp mod_freetdm/Debug/*.pdb $fsdir/Debug/mod/
cp Debug/*.dll $fsdir/Debug/
cp Debug/*.pdb $fsdir/Debug/
-cp Debug/testsangomaboost.exe $fsdir/Debug/
+#cp Debug/testsangomaboost.exe $fsdir/Debug/
echo "FRIENDLY REMINDER: RECOMPILE ftmod_wanpipe WHENEVER YOU INSTALL NEW DRIVERS"
set +x
}
/* initalize sng_isdn library */
- sng_isdn_init(&g_sngisdn_event_interface);
+
+ ftdm_assert_return(!sng_isdn_init(&g_sngisdn_event_interface), FTDM_FAIL, "Failed to initialize stack\n");
return FTDM_SUCCESS;
}
ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *span);
/* Support functions */
-FT_DECLARE_INLINE(uint32_t) get_unique_suInstId(uint8_t cc_id);
+FT_DECLARE_INLINE(uint32_t) get_unique_suInstId(int16_t cc_id);
FT_DECLARE_INLINE(void) clear_call_data(sngisdn_chan_data_t *sngisdn_info);
FT_DECLARE_INLINE(void) clear_call_glare_data(sngisdn_chan_data_t *sngisdn_info);
void stack_hdr_init(Header *hdr);
void stack_pst_init(Pst *pst);
-FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_spInstId(uint8_t cc_id, uint32_t spInstId, sngisdn_chan_data_t **sngisdn_data);
-FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_suInstId(uint8_t cc_id, uint32_t suInstId, sngisdn_chan_data_t **sngisdn_data);
+FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_spInstId(int16_t cc_id, uint32_t spInstId, sngisdn_chan_data_t **sngisdn_data);
+FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_suInstId(int16_t cc_id, uint32_t suInstId, sngisdn_chan_data_t **sngisdn_data);
FT_DECLARE_INLINE(ftdm_status_t) sng_isdn_set_avail_rate(ftdm_span_t *ftdmspan, sngisdn_avail_t avail);
/* Outbound Call Control functions */
L1Mngmt cfg;
Pst pst;
- S32 d_channel_fd = -1;
+ int32_t d_channel_fd = -1;
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*)span->signal_data;
/* initalize the post structure */
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
if (ftdmchan->type == FTDM_CHAN_TYPE_DQ921) {
- d_channel_fd = (S32) ftdmchan->sockfd;
+ d_channel_fd = (int32_t)ftdmchan->sockfd;
break;
}
}
break;
}
- sngisdn_info->suInstId = get_unique_suInstId((int8_t) suId);
+ sngisdn_info->suInstId = get_unique_suInstId(suId);
sngisdn_info->spInstId = spInstId;
sngisdn_set_flag(sngisdn_info, FLAG_DELAYED_REL);
sngisdn_info->glare.suId = suId;
- sngisdn_info->glare.suInstId = get_unique_suInstId((int8_t) suId);
+ sngisdn_info->glare.suInstId = get_unique_suInstId(suId);
sngisdn_info->glare.spInstId = spInstId;
sngisdn_info->glare.dChan = dChan;
ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Con Cfm on unconfigured cc\n");
ftdm_assert(g_sngisdn_data.dchans[dChan].num_spans != 0, "Con Cfm on unconfigured dchan\n");
- if (get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
+ if (get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
return;
ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Cnst Ind on unconfigured cc\n");
ftdm_assert(g_sngisdn_data.dchans[dChan].num_spans != 0, "Cnst Ind on unconfigured dchan\n");
- if (get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
+ if (get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
return;
ftdm_assert(spInstId != 0, "Received DISCONNECT with invalid id");
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
/* It seems that Trillium has a bug where they sometimes send release twice on a call, so do not crash on these for now */
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
- if (!(spInstId && get_ftdmchan_by_spInstId((int8_t) suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
- !(suInstId && get_ftdmchan_by_suInstId((int8_t) suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
+ if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
+ !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ftdm_assert(0, "Inconsistent call states\n");
}
-FT_DECLARE_INLINE(uint32_t) get_unique_suInstId(uint8_t cc_id)
+FT_DECLARE_INLINE(uint32_t) get_unique_suInstId(int16_t cc_id)
{
uint32_t suInstId;
+ ftdm_assert_return((cc_id > 0 && cc_id <=MAX_VARIANTS), FTDM_FAIL, "Invalid cc_id\n");
ftdm_mutex_lock(g_sngisdn_data.ccs[cc_id].mutex);
suInstId = g_sngisdn_data.ccs[cc_id].last_suInstId;
return 0;
}
-FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_suInstId(uint8_t cc_id, uint32_t suInstId, sngisdn_chan_data_t **sngisdn_data)
+FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_suInstId(int16_t cc_id, uint32_t suInstId, sngisdn_chan_data_t **sngisdn_data)
{
+ ftdm_assert_return((cc_id > 0 && cc_id <=MAX_VARIANTS), FTDM_FAIL, "Invalid cc_id\n");
ftdm_assert_return(g_sngisdn_data.ccs[cc_id].activation_done, FTDM_FAIL, "Trying to find call on unconfigured CC\n");
if (g_sngisdn_data.ccs[cc_id].active_suInstIds[suInstId] == NULL) {
return FTDM_SUCCESS;
}
-FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_spInstId(uint8_t cc_id, uint32_t spInstId, sngisdn_chan_data_t **sngisdn_data)
+FT_DECLARE_INLINE(ftdm_status_t) get_ftdmchan_by_spInstId(int16_t cc_id, uint32_t spInstId, sngisdn_chan_data_t **sngisdn_data)
{
+ ftdm_assert_return((cc_id > 0 && cc_id <=MAX_VARIANTS), FTDM_FAIL, "Invalid cc_id\n");
ftdm_assert_return(g_sngisdn_data.ccs[cc_id].activation_done, FTDM_FAIL, "Trying to find call on unconfigured CC\n");
if (g_sngisdn_data.ccs[cc_id].active_spInstIds[spInstId] == NULL) {
}
alarms = tdm_api.wp_tdm_cmd.fe_alarms;
#endif
+#if 1
+ /* DAVIDY - Temporary fix: in the current trunk of libsangoma, for BRI,
+ WAN_TE_BIT_ALARM_RED bit is set if the card is in disconnected state, but this has
+ not been ported to Windows-libsangoma yet */
+ if (alarms) {
+ ftdmchan->alarm_flags |= FTDM_ALARM_RED;
+ alarms = 0;
+ }
+#endif
+
ftdmchan->alarm_flags = FTDM_ALARM_NONE;
if (alarms & WAN_TE_BIT_ALARM_RED) {
#define FT_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
#define FT_DECLARE_DATA __declspec(dllimport)
#endif
-#define FT_DECLARE_INLINE(type) type
+#define FT_DECLARE_INLINE(type) extern __inline__ type /* why extern? see http://support.microsoft.com/kb/123768 */
#define EX_DECLARE_DATA __declspec(dllexport)
#else
#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(HAVE_VISIBILITY)
#define FT_DECLARE_NONSTD(type) type
#define FT_DECLARE_DATA
#endif
-#define FT_DECLARE_INLINE(type) type __inline__
+#define FT_DECLARE_INLINE(type) __inline__ type
#define EX_DECLARE_DATA
#endif