mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-02 01:25:11 +00:00
Merge branch 'master' into smgmaster
Conflicts: src/switch_core_sqldb.c
This commit is contained in:
commit
a94590bbc7
57 files changed
+5183
-711
No files matched your search
@@ -355,6 +355,7 @@
|
||||
/libsndfile/Cfg/missing
|
||||
/libsndfile/M4/Makefile
|
||||
/libsndfile/M4/Makefile.in
|
||||
/libsndfile/M4/lt~obsolete.m4
|
||||
/libsndfile/Makefile
|
||||
/libsndfile/Makefile.in
|
||||
/libsndfile/Octave/Makefile
|
||||
|
||||
@@ -483,14 +483,17 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
||||
i++;
|
||||
}
|
||||
|
||||
/* check if the end of pulsing character has arrived or the right number of digits */
|
||||
if (ftdmchan->caller_data.dnis.digits[i] == 0xF) {
|
||||
/* check if the end of pulsing (ST) character has arrived or the right number of digits */
|
||||
if (ftdmchan->caller_data.dnis.digits[i-1] == 'F') {
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Received the end of pulsing character %s\n", "");
|
||||
|
||||
/* remove the ST */
|
||||
ftdmchan->caller_data.dnis.digits[i-1] = '\0';
|
||||
|
||||
/*now go to the RING state */
|
||||
ftdm_set_state_locked (ftdmchan, FTDM_CHANNEL_STATE_RING);
|
||||
|
||||
} else if (i >= g_ftdm_sngss7_data.min_digits) {
|
||||
} else if (i > g_ftdm_sngss7_data.min_digits) {
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Received %d digits (min digits = %d)\n", i, g_ftdm_sngss7_data.min_digits);
|
||||
|
||||
/*now go to the RING state */
|
||||
@@ -950,6 +953,42 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
||||
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Current flags: 0x%X\n", sngss7_info->flags);
|
||||
|
||||
/**********************************************************************/
|
||||
if (sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) {
|
||||
|
||||
/* clear the RESUME flag */
|
||||
sngss7_clear_flag(sngss7_info, FLAG_INFID_RESUME);
|
||||
|
||||
/* if there are any resets present */
|
||||
if ((sngss7_test_flag (sngss7_info, FLAG_RESET_TX)) ||
|
||||
(sngss7_test_flag (sngss7_info, FLAG_RESET_RX)) ||
|
||||
(sngss7_test_flag (sngss7_info, FLAG_GRP_RESET_TX)) ||
|
||||
(sngss7_test_flag (sngss7_info, FLAG_GRP_RESET_RX))) {
|
||||
|
||||
/* go back to the reset state */
|
||||
goto suspend_goto_restart;
|
||||
} else {
|
||||
|
||||
/* bring the sig status back up */
|
||||
sigev.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||
sigev.sigstatus = FTDM_SIG_STATE_UP;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigev);
|
||||
}
|
||||
|
||||
/* go back to the last state */
|
||||
goto suspend_goto_last;
|
||||
} /* if (sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) */
|
||||
|
||||
if (sngss7_test_flag(sngss7_info, FLAG_INFID_PAUSED)) {
|
||||
|
||||
/* bring the sig status down */
|
||||
sigev.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||
sigev.sigstatus = FTDM_SIG_STATE_DOWN;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigev);
|
||||
|
||||
/* go back to the last state */
|
||||
goto suspend_goto_last;
|
||||
} /* if (sngss7_test_flag(sngss7_info, FLAG_INFID_PAUSED)) { */
|
||||
/**********************************************************************/
|
||||
if (sngss7_test_flag (sngss7_info, FLAG_CKT_MN_BLOCK_RX)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Processing CKT_MN_BLOCK_RX flag %s\n", "");
|
||||
|
||||
@@ -105,7 +105,7 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
||||
iam.fwdCallInd.isdnUsrPrtInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnUsrPrtInd.val = ISUP_USED;
|
||||
iam.fwdCallInd.isdnUsrPrtPrfInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnUsrPrtPrfInd.val = PREF_REQAW;
|
||||
iam.fwdCallInd.isdnUsrPrtPrfInd.val = PREF_PREFAW;
|
||||
iam.fwdCallInd.isdnAccInd.pres = PRSNT_NODEF;
|
||||
iam.fwdCallInd.isdnAccInd.val = ISDNACC_ISDN;
|
||||
iam.fwdCallInd.sccpMethInd.pres = PRSNT_NODEF;
|
||||
@@ -179,11 +179,12 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
||||
copy_cdPtyNum_to_sngss7 (&ftdmchan->caller_data, &iam.cdPtyNum);
|
||||
|
||||
/* copy down the calling number information */
|
||||
|
||||
copy_cgPtyNum_to_sngss7 (&ftdmchan->caller_data, &iam.cgPtyNum);
|
||||
|
||||
/* check if the user would like a custom NADI value for the calling Pty Num */
|
||||
nadi = ftdm_channel_get_var(ftdmchan, "ss7_nadi");
|
||||
if ((nadi != NULL) && (nadi != "")) {
|
||||
if ((nadi != NULL) && (*nadi)) {
|
||||
SS7_DEBUG_CHAN(ftdmchan,"Found user supplied NADI value \"%s\"\n", nadi);
|
||||
iam.cgPtyNum.natAddrInd.val = atoi(nadi);
|
||||
} else {
|
||||
@@ -198,7 +199,9 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
|
||||
&iam,
|
||||
0);
|
||||
|
||||
SS7_MSG_TRACE(ftdmchan, sngss7_info, "Tx IAM\n");
|
||||
SS7_INFO_CHAN(ftdmchan,"Tx IAM clg = \"%s\", cld = \"%s\"\n",
|
||||
ftdmchan->caller_data.cid_num.digits,
|
||||
ftdmchan->caller_data.dnis.digits);
|
||||
|
||||
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
|
||||
return;
|
||||
@@ -217,27 +220,27 @@ void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
|
||||
/* fill in the needed information for the ACM */
|
||||
acm.bckCallInd.eh.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.chrgInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.chrgInd.val = 0x00;
|
||||
acm.bckCallInd.chrgInd.val = CHRG_CHRG;
|
||||
acm.bckCallInd.cadPtyStatInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.cadPtyStatInd.val = 0x01;
|
||||
acm.bckCallInd.cadPtyCatInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.cadPtyCatInd.val = 0x00;
|
||||
acm.bckCallInd.cadPtyCatInd.val = CADCAT_ORDSUBS;
|
||||
acm.bckCallInd.end2EndMethInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.end2EndMethInd.val = 0x00;
|
||||
acm.bckCallInd.end2EndMethInd.val = E2EMTH_NOMETH;
|
||||
acm.bckCallInd.intInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.intInd.val = 0x00;
|
||||
acm.bckCallInd.intInd.val = INTIND_NOINTW;
|
||||
acm.bckCallInd.end2EndInfoInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.end2EndInfoInd.val = 0x00;
|
||||
acm.bckCallInd.end2EndInfoInd.val = E2EINF_NOINFO;
|
||||
acm.bckCallInd.isdnUsrPrtInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.isdnUsrPrtInd.val = 0x0;
|
||||
acm.bckCallInd.isdnUsrPrtInd.val = ISUP_USED;
|
||||
acm.bckCallInd.holdInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.holdInd.val = 0x00;
|
||||
acm.bckCallInd.holdInd.val = HOLD_NOTREQD;
|
||||
acm.bckCallInd.isdnAccInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.isdnAccInd.val = 0x0;
|
||||
acm.bckCallInd.isdnAccInd.val = ISDNACC_NONISDN;
|
||||
acm.bckCallInd.echoCtrlDevInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.echoCtrlDevInd.val = 0x1; /* ec device present */
|
||||
acm.bckCallInd.sccpMethInd.pres = PRSNT_NODEF;
|
||||
acm.bckCallInd.sccpMethInd.val = 0x00;
|
||||
acm.bckCallInd.sccpMethInd.val = SCCPMTH_NOIND;
|
||||
|
||||
/* send the ACM request to LibSngSS7 */
|
||||
sng_cc_con_status (1,
|
||||
|
||||
@@ -74,9 +74,10 @@ uint8_t copy_cgPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum)
|
||||
int k;
|
||||
int j;
|
||||
int flag;
|
||||
int odd;
|
||||
char tmp[2];
|
||||
unsigned char lower;
|
||||
unsigned char upper;
|
||||
uint8_t lower;
|
||||
uint8_t upper;
|
||||
|
||||
/**************************************************************************/
|
||||
cgPtyNum->eh.pres = PRSNT_NODEF;
|
||||
@@ -106,81 +107,73 @@ uint8_t copy_cgPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCgPtyNum *cgPtyNum)
|
||||
k = 0;
|
||||
j = 0;
|
||||
flag = 0;
|
||||
odd = 0;
|
||||
upper = 0x0;
|
||||
lower = 0x0;
|
||||
|
||||
while (1) {
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
/* move on to the next value */
|
||||
k++;
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
if (isdigit(tmp[0])) {
|
||||
lower = atoi(&tmp[0]);
|
||||
/* push it into the lower nibble */
|
||||
lower = atoi(&tmp[0]);
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
} else {
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
lower = atoi(&tmp[0]);
|
||||
k++;
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
} else {
|
||||
flag = 1;
|
||||
lower = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
} /* (isdigit(tmp)) */
|
||||
} else {
|
||||
flag = 1;
|
||||
lower = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
if (isdigit(tmp[0])) {
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
/* push the digit into the upper nibble */
|
||||
upper = (atoi(&tmp[0])) << 4;
|
||||
} else {
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->cid_num.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
upper = (atoi(&tmp[0])) << 4;
|
||||
k++;
|
||||
} else {
|
||||
flag = 1;
|
||||
upper = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
} /* if (isdigit(tmp)) */
|
||||
} else {
|
||||
if (flag == 1) {
|
||||
/* there is no upper ... fill in 0 */
|
||||
upper = 0x0;
|
||||
} else {
|
||||
/* throw the odd flag */
|
||||
odd = 1;
|
||||
/* throw the end flag */
|
||||
flag = 1;
|
||||
upper = 0xf;
|
||||
} /* if (flag == 1) */
|
||||
} /* if (tmp != '\0') */
|
||||
} /* if (tmp != '\0') */
|
||||
} else {
|
||||
/* keep the odd flag down */
|
||||
odd = 0;
|
||||
/* throw the flag */
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
/* push the digits into the trillium structure */
|
||||
cgPtyNum->addrSig.val[j] = upper | lower;
|
||||
|
||||
/* increment the trillium pointer */
|
||||
j++;
|
||||
|
||||
if (flag) {
|
||||
break;
|
||||
} else {
|
||||
k++;
|
||||
}
|
||||
/* if the flag is up we're through all the digits */
|
||||
if (flag) break;
|
||||
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
} /* while(1) */
|
||||
|
||||
cgPtyNum->addrSig.len = j;
|
||||
|
||||
/**************************************************************************/
|
||||
cgPtyNum->oddEven.pres = PRSNT_NODEF;
|
||||
|
||||
cgPtyNum->oddEven.val = ((cgPtyNum->addrSig.val[j] >> 4) == 0x0 ) ? 0x01 : 0x00;
|
||||
|
||||
cgPtyNum->oddEven.val = odd;
|
||||
/**************************************************************************/
|
||||
return 0;
|
||||
}
|
||||
@@ -198,9 +191,10 @@ uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum)
|
||||
int k;
|
||||
int j;
|
||||
int flag;
|
||||
int odd;
|
||||
char tmp[2];
|
||||
unsigned char lower;
|
||||
unsigned char upper;
|
||||
uint8_t lower;
|
||||
uint8_t upper;
|
||||
|
||||
/**************************************************************************/
|
||||
cdPtyNum->eh.pres = PRSNT_NODEF;
|
||||
@@ -219,77 +213,74 @@ uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum)
|
||||
/* atoi will search through memory starting from the pointer it is given until
|
||||
* it finds the \0...since tmp is on the stack it will start going through the
|
||||
* possibly causing corruption. Hard code a \0 to prevent this
|
||||
*/
|
||||
*/ /* dnis */
|
||||
tmp[1] = '\0';
|
||||
k = 0;
|
||||
j = 0;
|
||||
flag = 0;
|
||||
odd = 0;
|
||||
upper = 0x0;
|
||||
lower = 0x0;
|
||||
|
||||
while (1) {
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
/* move on to the next value */
|
||||
k++;
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
if (isdigit(tmp[0])) {
|
||||
lower = atoi(&tmp[0]);
|
||||
/* push it into the lower nibble */
|
||||
lower = atoi(&tmp[0]);
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
/* grab a digit from the ftdm digits */
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
|
||||
/* check if the digit is a number and that is not null */
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
} else {
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
lower = atoi(&tmp[0]);
|
||||
k++;
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
} else {
|
||||
flag = 1;
|
||||
lower = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
} /* (isdigit(tmp)) */
|
||||
} else {
|
||||
flag = 1;
|
||||
lower = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
if (isdigit(tmp[0])) {
|
||||
/* check if tmp is null or a digit */
|
||||
if (tmp[0] != '\0') {
|
||||
/* push the digit into the upper nibble */
|
||||
upper = (atoi(&tmp[0])) << 4;
|
||||
} else {
|
||||
while (!(isdigit(tmp[0])) && (tmp[0] != '\0')) {
|
||||
k++;
|
||||
tmp[0] = ftdm->dnis.digits[k];
|
||||
} /* while(!(isdigit(tmp))) */
|
||||
|
||||
if (tmp[0] != '\0') {
|
||||
upper = (atoi(&tmp[0])) << 4;
|
||||
k++;
|
||||
} else {
|
||||
flag = 1;
|
||||
upper = 0xf;
|
||||
} /* if (tmp != '\0') */
|
||||
} /* if (isdigit(tmp)) */
|
||||
} else {
|
||||
if (flag == 1) {
|
||||
upper = 0x0;
|
||||
} else {
|
||||
/* there is no upper ... fill in ST */
|
||||
upper = 0xF;
|
||||
/* throw the odd flag */
|
||||
odd = 1;
|
||||
/* throw the end flag */
|
||||
flag = 1;
|
||||
upper = 0xf;
|
||||
} /* if (flag == 1) */
|
||||
} /* if (tmp != '\0') */
|
||||
} /* if (tmp != '\0') */
|
||||
} else {
|
||||
/* keep the odd flag down */
|
||||
odd = 1;
|
||||
/* need to add the ST */
|
||||
lower = 0xF;
|
||||
upper = 0x0;
|
||||
/* throw the flag */
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
/* push the digits into the trillium structure */
|
||||
cdPtyNum->addrSig.val[j] = upper | lower;
|
||||
|
||||
/* increment the trillium pointer */
|
||||
j++;
|
||||
|
||||
if (flag) {
|
||||
break;
|
||||
} else {
|
||||
k++;
|
||||
}
|
||||
/* if the flag is up we're through all the digits */
|
||||
if (flag) break;
|
||||
|
||||
/* move to the next digit */
|
||||
k++;
|
||||
} /* while(1) */
|
||||
|
||||
cdPtyNum->addrSig.len = j;
|
||||
@@ -297,7 +288,7 @@ uint8_t copy_cdPtyNum_to_sngss7(ftdm_caller_data_t *ftdm, SiCdPtyNum *cdPtyNum)
|
||||
/**************************************************************************/
|
||||
cdPtyNum->oddEven.pres = PRSNT_NODEF;
|
||||
|
||||
cdPtyNum->oddEven.val = ((cdPtyNum->addrSig.val[j] >> 4) == 0x0 ) ? 0x01 : 0x00;
|
||||
cdPtyNum->oddEven.val = odd;
|
||||
|
||||
/**************************************************************************/
|
||||
return 0;
|
||||
@@ -315,9 +306,9 @@ uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
j = 0;
|
||||
|
||||
for (i = 0; i < str.len; i++) {
|
||||
sprintf(&ftdm[j], "%d", (str.val[i] & 0x0F));
|
||||
sprintf(&ftdm[j], "%X", (str.val[i] & 0x0F));
|
||||
j++;
|
||||
sprintf(&ftdm[j], "%d", ((str.val[i] & 0xF0) >> 4));
|
||||
sprintf(&ftdm[j], "%X", ((str.val[i] & 0xF0) >> 4));
|
||||
j++;
|
||||
}
|
||||
|
||||
@@ -327,6 +318,8 @@ uint8_t copy_tknStr_from_sngss7(TknStr str, char *ftdm, TknU8 oddEven)
|
||||
} else {
|
||||
ftdm[j] = '\0';
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
SS7_ERROR("Asked to copy tknStr that is not present!\n");
|
||||
return 1;
|
||||
@@ -568,24 +561,19 @@ ftdm_status_t check_for_res_sus_flag(ftdm_span_t *ftdmspan)
|
||||
sigev.span_id = ftdmchan->span_id;
|
||||
sigev.channel = ftdmchan;
|
||||
|
||||
/* if we have the PAUSED flag and the sig status is still UP */
|
||||
if ((sngss7_test_flag(sngss7_info, FLAG_INFID_PAUSED)) &&
|
||||
(ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP))) {
|
||||
|
||||
/* bring the sig status down */
|
||||
sigev.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||
sigev.sigstatus = FTDM_SIG_STATE_DOWN;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigev);
|
||||
/* throw the channel into SUSPENDED to process the flag */
|
||||
/* after doing this once the sig status will be down */
|
||||
ftdm_set_state_locked (ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);
|
||||
}
|
||||
|
||||
if ((sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) &&
|
||||
!(ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP))) {
|
||||
|
||||
/* bring the sig status back up */
|
||||
sigev.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||
sigev.sigstatus = FTDM_SIG_STATE_UP;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigev);
|
||||
|
||||
sngss7_clear_flag(sngss7_info, FLAG_INFID_RESUME);
|
||||
/* if the RESUME flag is up go to SUSPENDED to process the flag */
|
||||
/* after doing this the flag will be cleared */
|
||||
if (sngss7_test_flag(sngss7_info, FLAG_INFID_RESUME)) {
|
||||
ftdm_set_state_locked (ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);
|
||||
}
|
||||
|
||||
/* unlock the channel */
|
||||
|
||||
@@ -267,7 +267,7 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
|
||||
ts->samples * 2);
|
||||
}
|
||||
}
|
||||
return ts->samples;
|
||||
return ts->samples / ts->channels;
|
||||
}
|
||||
|
||||
TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cmd)
|
||||
|
||||
@@ -302,7 +302,7 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
|
||||
ts->samples * 2);
|
||||
}
|
||||
}
|
||||
return ts->samples;
|
||||
return ts->samples / ts->channels;
|
||||
}
|
||||
|
||||
/* don't ask */
|
||||
|
||||
@@ -60,10 +60,8 @@ struct t30_state_s
|
||||
int supported_t30_features;
|
||||
/*! \brief TRUE is ECM mode handling is enabled. */
|
||||
int ecm_allowed;
|
||||
#if 0
|
||||
/*! \brief TRUE if we are capable of retransmitting pages */
|
||||
int retransmit_capable;
|
||||
#endif
|
||||
|
||||
/*! \brief The received DCS, formatted as an ASCII string, for inclusion
|
||||
in the TIFF file. */
|
||||
@@ -71,12 +69,12 @@ struct t30_state_s
|
||||
/*! \brief The text which will be used in FAX page header. No text results
|
||||
in no header line. */
|
||||
char header_info[T30_MAX_PAGE_HEADER_INFO + 1];
|
||||
#if 0
|
||||
/*! \brief TRUE for FAX page headers to overlay (i.e. replace) the beginning of the
|
||||
page image. FALSE for FAX page headers to add to the overall length of
|
||||
the page. */
|
||||
int header_overlays_image;
|
||||
#endif
|
||||
/*! \brief TRUE if remote T.30 procedural interrupts are allowed. */
|
||||
int remote_interrupts_allowed;
|
||||
|
||||
/*! \brief The information fields received. */
|
||||
t30_exchanged_info_t rx_info;
|
||||
@@ -207,13 +205,6 @@ struct t30_state_s
|
||||
/*! \brief This is only used in full duplex (e.g. ISDN) modes. */
|
||||
int timer_t8;
|
||||
|
||||
/* These fields are guessed based on compiler error forensics, I added them to fix the build -anthm */
|
||||
int remote_interrupts_allowed;
|
||||
int rtp_events;
|
||||
int rtn_events;
|
||||
int retransmit_capable;
|
||||
/* end guessed fields */
|
||||
|
||||
/*! \brief TRUE once the far end FAX entity has been detected. */
|
||||
int far_end_detected;
|
||||
|
||||
@@ -283,12 +274,10 @@ struct t30_state_s
|
||||
/*! \brief The current completion status. */
|
||||
int current_status;
|
||||
|
||||
#if 0
|
||||
/*! \brief The number of RTP events */
|
||||
int rtp_events;
|
||||
/*! \brief The number of RTN events */
|
||||
int rtn_events;
|
||||
#endif
|
||||
|
||||
/*! \brief the FCF2 field of the last PPS message we received. */
|
||||
uint8_t last_pps_fcf2;
|
||||
|
||||
@@ -682,6 +682,10 @@ SPAN_DECLARE(void) t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t);
|
||||
\param state TRUE to enable interrupt request, else FALSE. */
|
||||
SPAN_DECLARE(void) t30_local_interrupt_request(t30_state_t *s, int state);
|
||||
|
||||
/*! Allow remote interrupts of FAX exchange.
|
||||
\brief Allow remote interrupts of FAX exchange.
|
||||
\param s The T.30 context.
|
||||
\param state TRUE to allow interruptd, else FALSE. */
|
||||
SPAN_DECLARE(void) t30_remote_interrupts_allowed(t30_state_t *s, int state);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Reference in new issue
Block a user