Don't send IE field 'Sending Complete' when we want to do overlap dialing (sending)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@39 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
80355d96c5
commit
6e8e051464
4
libpri.h
4
libpri.h
@ -351,4 +351,8 @@ extern int pri_call(struct pri *pri, q931_call *c, int transmode, int channel,
|
||||
/* Override message and error stuff */
|
||||
extern void pri_set_message(void (*__pri_error)(char *));
|
||||
extern void pri_set_error(void (*__pri_error)(char *));
|
||||
|
||||
/* Set overlap mode */
|
||||
#define PRI_SET_OVERLAPDIAL
|
||||
extern void pri_set_overlapdial(struct pri *pri,int state);
|
||||
#endif
|
||||
|
6
pri.c
6
pri.c
@ -304,3 +304,9 @@ void pri_error(char *fmt, ...)
|
||||
else
|
||||
fprintf(stderr, tmp);
|
||||
}
|
||||
/* Set overlap mode */
|
||||
void pri_set_overlapdial(struct pri *pri,int state)
|
||||
{
|
||||
pri->overlapdial = state;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,9 @@ struct pri {
|
||||
|
||||
/* Q.931 calls */
|
||||
q931_call *calls;
|
||||
|
||||
/* do we do overlap dialing */
|
||||
int overlapdial;
|
||||
};
|
||||
|
||||
extern int pri_schedule_event(struct pri *pri, int ms, void (*function)(void *data), void *data);
|
||||
|
2
q931.c
2
q931.c
@ -1142,7 +1142,7 @@ static int receive_sending_complete(struct pri *pri, q931_call *call, int msgtyp
|
||||
|
||||
static int transmit_sending_complete(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)
|
||||
{
|
||||
if ((pri->switchtype == PRI_SWITCH_EUROISDN_E1) || (pri->switchtype == PRI_SWITCH_EUROISDN_T1)) {
|
||||
if (!pri->overlapdial && ((pri->switchtype == PRI_SWITCH_EUROISDN_E1) || (pri->switchtype == PRI_SWITCH_EUROISDN_T1))) {
|
||||
/* Include this single-byte IE */
|
||||
ie->f = 1;
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user