diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h index f88202b1a8..11ff2318bb 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h @@ -60,6 +60,10 @@ #define MAX_SIZEOF_SUBADDR_IE 24 /* as per Q931 4.5.9 */ +#define SNGSS7_SWITCHTYPE_ANSI(switchtype) (switchtype == LSI_SW_ANS88) || \ + (switchtype == LSI_SW_ANS92) || \ + (switchtype == LSI_SW_ANS95) + typedef struct ftdm2trillium { uint8_t ftdm_val; diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c index 91b8900fef..47249c2f5a 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c @@ -92,8 +92,10 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan) /* Transmission medium requirements */ copy_txMedReq_to_sngss7(ftdmchan, &iam.txMedReq); - /* User Service Info A */ - copy_usrServInfoA_to_sngss7(ftdmchan, &iam.usrServInfoA); + if (SNGSS7_SWITCHTYPE_ANSI(g_ftdm_sngss7_data.cfg.isupCkt[sngss7_info->circuit->id].switchType)) { + /* User Service Info A */ + copy_usrServInfoA_to_sngss7(ftdmchan, &iam.usrServInfoA); + } /* Called Number information */ copy_cdPtyNum_to_sngss7(ftdmchan, &iam.cdPtyNum);