Register recall signal is now handled correctly
Active call will be put on hold. During dialing, active call will be retrieved. This also applies to on-hook pulse, if it is used by AN. (No AN I have seen uses this pulse.)
This commit is contained in:
parent
f2500899b8
commit
39e66c6e31
|
@ -1546,9 +1546,20 @@ static void v5_sig_ind(pstn_t *pstn, uint8_t *data, int len)
|
||||||
break;
|
break;
|
||||||
case PSTN_V5_IE_PULSED_SIGNAL:
|
case PSTN_V5_IE_PULSED_SIGNAL:
|
||||||
switch ((data[2] & 0x7f)) {
|
switch ((data[2] & 0x7f)) {
|
||||||
|
case PSTN_V5_PULSED_SIGNAL_REG_RECAL:
|
||||||
|
PDEBUG(DTEL, DEBUG_INFO, "Received register recall signal.\n");
|
||||||
|
if (pstn->recall && (pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ACTIVE
|
||||||
|
|| pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ENBLOCK
|
||||||
|
|| pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_OVERLAP_NET)) {
|
||||||
|
PDEBUG(DTEL, DEBUG_INFO, "Performing hookflash, register recall signal was received.\n");
|
||||||
|
hookflash(pstn);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PSTN_V5_PULSED_SIGNAL_ON_HOOK:
|
case PSTN_V5_PULSED_SIGNAL_ON_HOOK:
|
||||||
PDEBUG(DTEL, DEBUG_INFO, "Received pulsed on-kook signal.\n");
|
PDEBUG(DTEL, DEBUG_INFO, "Received pulsed on-kook signal.\n");
|
||||||
if (pstn->recall && pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ACTIVE) {
|
if (pstn->recall && (pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ACTIVE
|
||||||
|
|| pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ENBLOCK
|
||||||
|
|| pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_OVERLAP_NET)) {
|
||||||
PDEBUG(DTEL, DEBUG_INFO, "Performing hookflash, on-hook pulse was received.\n");
|
PDEBUG(DTEL, DEBUG_INFO, "Performing hookflash, on-hook pulse was received.\n");
|
||||||
hookflash(pstn);
|
hookflash(pstn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ enum pstn_v5_signal {
|
||||||
PSTN_V5_STEADY_SIGNAL_ON_HOOK = 0x05,
|
PSTN_V5_STEADY_SIGNAL_ON_HOOK = 0x05,
|
||||||
PSTN_V5_STEADY_SIGNAL_STOP_RING = 0x0e,
|
PSTN_V5_STEADY_SIGNAL_STOP_RING = 0x0e,
|
||||||
PSTN_V5_PULSED_SIGNAL_INIT_RING = 0x79,
|
PSTN_V5_PULSED_SIGNAL_INIT_RING = 0x79,
|
||||||
|
PSTN_V5_PULSED_SIGNAL_REG_RECAL = 0x76,
|
||||||
PSTN_V5_PULSED_SIGNAL_ON_HOOK = 0x7c,
|
PSTN_V5_PULSED_SIGNAL_ON_HOOK = 0x7c,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue