mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
FreeTDM: Improve error checking and logging in load_config(), add FTDM_SPAN_IS_DIGITAL() helper.
Output the current trunk_type in "add X-channel vs. trunk_type" error messages and check this for B-/D-channels too. ISDN (= digital) spans need to have a trunk_type set before adding channels, bail out early with an error message (actually two) if this is not the case. (Adding channels should really be moved out of the parsing loop, to catch certain types of errors easier.) Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
@@ -204,6 +204,15 @@ FTDM_STR2ENUM_P(ftdm_str2ftdm_chan_type, ftdm_chan_type2str, ftdm_chan_type_t)
|
||||
(fchan)->span->trunk_type == FTDM_TRUNK_BRI || \
|
||||
(fchan)->span->trunk_type == FTDM_TRUNK_BRI_PTMP)
|
||||
|
||||
/*! \brief Test if a span is digital */
|
||||
#define FTDM_SPAN_IS_DIGITAL(span) \
|
||||
((span)->trunk_type == FTDM_TRUNK_E1 || \
|
||||
(span)->trunk_type == FTDM_TRUNK_T1 || \
|
||||
(span)->trunk_type == FTDM_TRUNK_J1 || \
|
||||
(span)->trunk_type == FTDM_TRUNK_BRI || \
|
||||
(span)->trunk_type == FTDM_TRUNK_BRI_PTMP)
|
||||
|
||||
|
||||
/*! \brief Logging function prototype to be used for all FreeTDM logs
|
||||
* you should use ftdm_global_set_logger to set your own logger
|
||||
*/
|
||||
|
Reference in New Issue
Block a user