stream->write_function(stream, "Sangoma SS7 CLI usuage:\n\n");
stream->write_function(stream, "Ftmod_sangoma_ss7 general control:\n");
- stream->write_function(stream, "ftdm ss7 set ftace X Y\n");
- stream->write_function(stream, "ftdm ss7 set mtace X Y\n");
+ stream->write_function(stream, "ftdm ss7 set ftrace X Y\n");
+ stream->write_function(stream, "ftdm ss7 set mtrace X Y\n");
stream->write_function(stream, "\n");
stream->write_function(stream, "Ftmod_sangoma_ss7 information:\n");
stream->write_function(stream, "ftdm ss7 show status link X\n");
/* grab the signaling_status */
ftdm_channel_get_sig_status(ftdmchan, &sigstatus);
- stream->write_function(stream, "span=%2d|chan=%2d|cic=%4d|sig_status=%s|state=%s|",
+ stream->write_function(stream, "span=%2d|chan=%2d|cic=%4d|sig_status=%4s|state=%s|",
ckt->span,
ckt->chan,
ckt->cic,
(sta.t.ssta.s.snDLSAP.remBlkd) ? "Y":"N",
(sta.t.ssta.s.snDLSAP.locInhbt) ? "Y":"N",
(sta.t.ssta.s.snDLSAP.rmtInhbt) ? "Y":"N");
- break;
+
+ goto success;
}
/* move to the next link */
x++;
} /* while (id != 0) */
+ stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
+
+success:
return FTDM_SUCCESS;
}
name,
DECODE_LSN_LINKSET_STATUS(sta.t.ssta.s.snLnkSet.state),
sta.t.ssta.s.snLnkSet.nmbActLnks);
- break;
+
+ goto success;
}
/* move to the next linkset */
x++;
} /* while (id != 0) */
+ stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
+
+success:
return FTDM_SUCCESS;
}
/* print the new status of the link */
handle_status_link(stream, &name[0]);
- break;
+ goto success;
}
/* move to the next linkset */
x++;
} /* while (id != 0) */
+ stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
+
+success:
return FTDM_SUCCESS;
}
/* print the new status of the link */
handle_status_link(stream, &name[0]);
- break;
+ goto success;
}
/* move to the next linkset */
x++;
} /* while (id != 0) */
+ stream->write_function(stream, "Failed to find link=\"%s\"\n", name);
+
+success:
return FTDM_SUCCESS;
}
/* go the next circuit */
x++;
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[x]id != 0) */
+
+ /* print the status of channels */
+ handle_show_status(stream, span, chan, verbose);
+
return FTDM_SUCCESS;
x++;
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[x]id != 0) */
+ x=1;
+ while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
+ if (g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) {
+
+ sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
+ ftdmchan = sngss7_info->ftdmchan;
+ sngss7_span = ftdmchan->span->mod_data;
+
+ if ((ftdmchan->physical_span_id == span) &&
+ ((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
+
+ handle_show_status(stream, span, chan, verbose);
+ }
+ } /* if ( cic == voice) */
+
+ /* go the next circuit */
+ x++;
+ } /* while (g_ftdm_sngss7_data.cfg.isupCkt[x]id != 0) */
return FTDM_SUCCESS;
}
/* send the circuit group block */
ft_to_sngss7_cgb(main_chan);
+
+ x=1;
+ while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
+ if (g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) {
+
+ sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
+ ftdmchan = sngss7_info->ftdmchan;
+ sngss7_span = ftdmchan->span->mod_data;
+
+ if ((ftdmchan->physical_span_id == span) &&
+ ((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
+
+ handle_show_status(stream, span, chan, verbose);
+ }
+ } /* if ( cic == voice) */
+
+ /* go the next circuit */
+ x++;
+ } /* while (g_ftdm_sngss7_data.cfg.isupCkt[x]id != 0) */
return FTDM_SUCCESS;
/* send the circuit group block */
ft_to_sngss7_cgu(main_chan);
+
+ x=1;
+ while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
+ if (g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) {
+
+ sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
+ ftdmchan = sngss7_info->ftdmchan;
+ sngss7_span = ftdmchan->span->mod_data;
+
+ if ((ftdmchan->physical_span_id == span) &&
+ ((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
+
+ handle_show_status(stream, span, chan, verbose);
+ }
+ } /* if ( cic == voice) */
+
+ /* go the next circuit */
+ x++;
+ } /* while (g_ftdm_sngss7_data.cfg.isupCkt[x]id != 0) */
return FTDM_SUCCESS;
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
- sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
+ sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
+ sng_isup_inf_t *isup_intf = &g_ftdm_sngss7_data.cfg.isupIntf[sngss7_info->circuit->infId];
SiCnStEvnt acm;
memset (&acm, 0x0, sizeof (acm));
acm.bckCallInd.echoCtrlDevInd.val = 0x1; /* ec device present */
acm.bckCallInd.sccpMethInd.pres = PRSNT_NODEF;
acm.bckCallInd.sccpMethInd.val = SCCPMTH_NOIND;
-
+
+ /* fill in any optional parameters */
+ if (sngss7_test_options(isup_intf, SNGSS7_ACM_OBCI_BITA)) {
+ acm.optBckCalInd.eh.pres = PRSNT_NODEF;
+ acm.optBckCalInd.inbndInfoInd.pres = PRSNT_NODEF;
+ acm.optBckCalInd.inbndInfoInd.val = sngss7_test_options(isup_intf, SNGSS7_ACM_OBCI_BITA);
+ acm.optBckCalInd.caFwdMayOcc.pres = PRSNT_DEF;
+ acm.optBckCalInd.simpleSegmInd.pres = PRSNT_DEF;
+ acm.optBckCalInd.mlppUserInd.pres = PRSNT_DEF;
+ acm.optBckCalInd.usrNetIneractInd.pres = PRSNT_DEF;
+ } /* if (sngss7_test_options(isup_intf, SNGSS7_ACM_OBCI_BITA)) */
+
/* send the ACM request to LibSngSS7 */
sng_cc_con_status (1,
sngss7_info->suInstId,
int ftmod_ss7_mtplink_sta(uint32_t id, SnMngmt *cfm)
{
SnMngmt sta;
+ Pst pst;
memset(&sta, 0x0, sizeof(sta));
+ /* initalize the post structure */
+ smPstInit(&pst);
+
+ /* insert the destination Entity */
+ pst.dstEnt = ENTSN;
+
sta.hdr.elmId.elmnt = STDLSAP;
sta.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtpLink[id].id;
- return(sng_sta_mtp3(&sta, cfm));
+ return(sng_sta_mtp3(&pst, &sta, cfm));
}
/******************************************************************************/
int ftmod_ss7_mtplinkSet_sta(uint32_t id, SnMngmt *cfm)
{
SnMngmt sta;
+ Pst pst;
memset(&sta, 0x0, sizeof(sta));
+ /* initalize the post structure */
+ smPstInit(&pst);
+
+ /* insert the destination Entity */
+ pst.dstEnt = ENTSN;
+
sta.hdr.elmId.elmnt = STLNKSET;
sta.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtpLinkSet[id].id;
sta.hdr.elmId.elmntInst2 = g_ftdm_sngss7_data.cfg.mtpLinkSet[id].links[0];
- return(sng_sta_mtp3(&sta, cfm));
+ return(sng_sta_mtp3(&pst, &sta, cfm));
}
/******************************************************************************/
sng_isup.cld_nadi = atoi(parm->val);
SS7_DEBUG("\tFound default CLD_NADI value = %d\n", sng_isup.cld_nadi);
/**********************************************************************/
+ } else if (!strcasecmp(parm->var, "obci_bita")) {
+ /**********************************************************************/
+ if (*parm->val == '1') {
+ sngss7_set_options(&sng_isup, SNGSS7_ACM_OBCI_BITA);
+ SS7_DEBUG("\tFound Optional Backwards Indicator: Bit A (early media) enable option\n");
+ } else if (*parm->val == '0') {
+ sngss7_clear_options(&sng_isup, SNGSS7_ACM_OBCI_BITA);
+ SS7_DEBUG("\tFound Optional Backwards Indicator: Bit A (early media) disable option\n");
+ } else {
+ SS7_DEBUG("\tInvalid value for \"obci_bita\" option\n");
+ }
+ /**********************************************************************/
} else {
SS7_ERROR("\tFound an invalid parameter \"%s\"!\n", parm->val);
return FTDM_FAIL;
g_ftdm_sngss7_data.cfg.isupIntf[i].isap = sng_isup->isap;
g_ftdm_sngss7_data.cfg.isupIntf[i].cld_nadi = sng_isup->cld_nadi;
g_ftdm_sngss7_data.cfg.isupIntf[i].clg_nadi = sng_isup->clg_nadi;
-
+ g_ftdm_sngss7_data.cfg.isupIntf[i].options = sng_isup->options;
if (sng_isup->t4 != 0) {
g_ftdm_sngss7_data.cfg.isupIntf[i].t4 = sng_isup->t4;
} else {