implement Ringing and Proceeding status display in ttyI
This commit is contained in:
parent
f283a7e2c8
commit
68bcd010cf
|
@ -781,3 +781,22 @@ Description of the Interface between Linklevel and Hardwarelevel
|
|||
arg = channel-number, locally to the driver. (starting with 0)
|
||||
parm = unused.
|
||||
|
||||
ISDN_STAT_ALERT:
|
||||
|
||||
With this call, the HL-driver signals the receive of an ALERTING message to the LL.
|
||||
|
||||
Parameter:
|
||||
driver = driver-Id
|
||||
command = ISDN_STAT_ALERT
|
||||
arg = channel-number, locally to the driver. (starting with 0)
|
||||
|
||||
ISDN_STAT_PROCEED:
|
||||
|
||||
With this call, the HL-driver signals the receive of an CALL PROCEEDING message
|
||||
to the LL.
|
||||
|
||||
Parameter:
|
||||
driver = driver-Id
|
||||
command = ISDN_STAT_PROCEED
|
||||
arg = channel-number, locally to the driver. (starting with 0)
|
||||
|
||||
|
|
|
@ -278,6 +278,12 @@ README for the ISDN-subsystem
|
|||
1 = Add CPN to FCON message on
|
||||
Bit 2: 0 = Add CDN to RING/FCON message off
|
||||
1 = Add CDN to RING/FCON message on
|
||||
Bit 3: 0 = Do not signal RINGING
|
||||
1 = Signal RINGING if ALERT was received
|
||||
Bit 4: 0 = Do not signal PROCEEDING
|
||||
1 = Signal PROCEEDING if CALL PROCEEDING
|
||||
was received
|
||||
|
||||
|
||||
Last but not least a (at the moment fairly primitive) device to request
|
||||
the line-status (/dev/isdninfo) is made available.
|
||||
|
|
|
@ -145,9 +145,11 @@ enum {
|
|||
EV_PROCEED, /* 20 */
|
||||
EV_ALERT, /* 21 */
|
||||
EV_REDIR, /* 22 */
|
||||
EV_ALERTING, /* 23 */
|
||||
EV_PROCEEDING, /* 24 */
|
||||
};
|
||||
|
||||
#define EVENT_COUNT (EV_REDIR + 1)
|
||||
#define EVENT_COUNT (EV_PROCEEDING + 1)
|
||||
|
||||
static char *strEvent[] =
|
||||
{
|
||||
|
@ -174,6 +176,8 @@ static char *strEvent[] =
|
|||
"EV_PROCEED",
|
||||
"EV_ALERT",
|
||||
"EV_REDIR",
|
||||
"EV_ALERTING",
|
||||
"EV_PROCEEDING",
|
||||
};
|
||||
|
||||
|
||||
|
@ -285,6 +289,22 @@ lli_prep_dialout(struct FsmInst *fi, int event, void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
lli_alerting(struct FsmInst *fi, int event, void *arg)
|
||||
{
|
||||
struct Channel *chanp = fi->userdata;
|
||||
|
||||
HL_LL(chanp, ISDN_STAT_ALERT);
|
||||
}
|
||||
|
||||
static void
|
||||
lli_proceeding(struct FsmInst *fi, int event, void *arg)
|
||||
{
|
||||
struct Channel *chanp = fi->userdata;
|
||||
|
||||
HL_LL(chanp, ISDN_STAT_PROCEED);
|
||||
}
|
||||
|
||||
static void
|
||||
lli_resume(struct FsmInst *fi, int event, void *arg)
|
||||
{
|
||||
|
@ -784,6 +804,8 @@ static struct FsmNode fnlist[] __initdata =
|
|||
{ST_OUT_DIAL, EV_DISCONNECT_IND, lli_release_req},
|
||||
{ST_OUT_DIAL, EV_RELEASE, lli_dhup_close},
|
||||
{ST_OUT_DIAL, EV_NOSETUP_RSP, lli_no_setup_rsp},
|
||||
{ST_OUT_DIAL, EV_PROCEEDING, lli_proceeding},
|
||||
{ST_OUT_DIAL, EV_ALERTING, lli_alerting},
|
||||
{ST_OUT_DIAL, EV_SETUP_ERR, lli_error},
|
||||
{ST_IN_WAIT_LL, EV_LEASED_REL, lli_failure_l},
|
||||
{ST_IN_WAIT_LL, EV_ACCEPTD, lli_setup_rsp},
|
||||
|
@ -997,8 +1019,13 @@ dchan_l3l4(struct PStack *st, int pr, void *arg)
|
|||
FsmEvent(&chanp->fi, EV_RELEASE, NULL);
|
||||
break;
|
||||
case (CC_PROCEED_SEND | INDICATION):
|
||||
break;
|
||||
case (CC_PROCEEDING | INDICATION):
|
||||
FsmEvent(&chanp->fi, EV_PROCEEDING, NULL);
|
||||
break;
|
||||
case (CC_ALERTING | INDICATION):
|
||||
FsmEvent(&chanp->fi, EV_ALERTING, NULL);
|
||||
break;
|
||||
case (CC_PROGRESS | INDICATION):
|
||||
case (CC_NOTIFY | INDICATION):
|
||||
break;
|
||||
|
|
|
@ -757,6 +757,10 @@ isdn_status_callback(isdn_ctrl * c)
|
|||
if (divert_if)
|
||||
return(divert_if->stat_callback(c));
|
||||
#endif /* CONFIG_ISDN_DIVERSION */
|
||||
case ISDN_STAT_ALERT:
|
||||
case ISDN_STAT_PROCEED:
|
||||
isdn_tty_stat_callback(i, c);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -2318,6 +2318,22 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||
isdn_tty_at_cout("\r\n", info);
|
||||
}
|
||||
return 1;
|
||||
case ISDN_STAT_ALERT:
|
||||
#ifdef ISDN_TTY_STAT_DEBUG
|
||||
printk(KERN_DEBUG "tty_STAT_ALERT ttyI%d\n", info->line);
|
||||
#endif
|
||||
/* Signal RINGING to tty-device if requested */
|
||||
if (info->emu.mdmreg[REG_ALERT] & BIT_ALERT)
|
||||
isdn_tty_modem_result(RESULT_RINGING, info);
|
||||
return 1;
|
||||
case ISDN_STAT_PROCEED:
|
||||
#ifdef ISDN_TTY_STAT_DEBUG
|
||||
printk(KERN_DEBUG "tty_STAT_PROCEED ttyI%d\n", info->line);
|
||||
#endif
|
||||
/* Signal PROCEEDING to tty-device if requested */
|
||||
if (info->emu.mdmreg[REG_PROCEED] & BIT_PROCEED)
|
||||
isdn_tty_modem_result(RESULT_PROCEEDING, info);
|
||||
return 1;
|
||||
case ISDN_STAT_DCONN:
|
||||
#ifdef ISDN_TTY_STAT_DEBUG
|
||||
printk(KERN_DEBUG "tty_STAT_DCONN ttyI%d\n", info->line);
|
||||
|
@ -2630,7 +2646,7 @@ isdn_tty_modem_result(int code, modem_info * info)
|
|||
static char *msg[] =
|
||||
{"OK", "CONNECT", "RING", "NO CARRIER", "ERROR",
|
||||
"CONNECT 64000", "NO DIALTONE", "BUSY", "NO ANSWER",
|
||||
"RINGING", "NO MSN/EAZ", "VCON", "RUNG"};
|
||||
"RINGING", "NO MSN/EAZ", "VCON", "RUNG", "PROCEEDING"};
|
||||
ulong flags;
|
||||
char s[ISDN_MSNLEN+10];
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@
|
|||
#define BIT_CPNFCON 2
|
||||
#define REG_CDN 23
|
||||
#define BIT_CDN 4
|
||||
#define REG_ALERT 23
|
||||
#define BIT_ALERT 8
|
||||
#define REG_PROCEED 23
|
||||
#define BIT_PROCEED 16
|
||||
|
||||
/* defines for result codes */
|
||||
#define RESULT_OK 0
|
||||
|
@ -93,6 +97,7 @@
|
|||
#define RESULT_NO_MSN_EAZ 10
|
||||
#define RESULT_VCON 11
|
||||
#define RESULT_RUNG 12
|
||||
#define RESULT_PROCEEDING 13
|
||||
|
||||
#ifdef ISDN_TTY_FCLASS1
|
||||
#define TTY_IS_FCLASS1(info) \
|
||||
|
|
|
@ -214,6 +214,8 @@ typedef struct
|
|||
#define ISDN_STAT_FAXIND 276 /* FAX indications from HL-driver */
|
||||
#define ISDN_STAT_AUDIO 277 /* DTMF, DSP indications */
|
||||
#define ISDN_STAT_DISCH 278 /* Disable/Enable channel usage */
|
||||
#define ISDN_STAT_ALERT 279 /* Signal alerting */
|
||||
#define ISDN_STAT_PROCEED 280 /* Signal proceeding */
|
||||
|
||||
/*
|
||||
* Audio commands
|
||||
|
|
Loading…
Reference in New Issue