Added Notify to NT-mode.
modified: README modified: dss1.cpp modified: dss1.h modified: mISDN.cpp modified: trace.h
This commit is contained in:
parent
b2f6c87b1b
commit
2debf08535
2
README
2
README
|
@ -476,3 +476,5 @@ Changes after Version 1.4 release
|
|||
- Added Callweaver support. (thanx to Kristijan)
|
||||
- Bugfix on timeout rules. (thanx to Benjamin)
|
||||
- Fixed dtmf detection of A-D. (thanx to Ralf)
|
||||
- Fixed Notification messages in NT-mode
|
||||
-> Notifications like diversions are now sent to terminal.
|
||||
|
|
49
dss1.cpp
49
dss1.cpp
|
@ -1685,6 +1685,20 @@ void Pdss1::facility_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
|
|||
}
|
||||
|
||||
|
||||
/* CC_PROGRESS INDICATION */
|
||||
void Pdss1::progress_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
|
||||
{
|
||||
unsigned char facil[256];
|
||||
int facil_len;
|
||||
struct lcr_msg *message;
|
||||
int coding, location, progress;
|
||||
|
||||
l1l2l3_trace_header(p_m_mISDNport, this, L3_PROGRESS_IND, DIRECTION_IN);
|
||||
dec_ie_progress(l3m, &coding, &location, &progress);
|
||||
end_trace();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* handler for isdn connections
|
||||
* incoming information are parsed and sent via message to the endpoint
|
||||
|
@ -1827,6 +1841,10 @@ void Pdss1::message_isdn(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
|
|||
facility_ind(cmd, pid, l3m);
|
||||
break;
|
||||
|
||||
case MT_PROGRESS:
|
||||
progress_ind(cmd, pid, l3m);
|
||||
break;
|
||||
|
||||
case MT_FREE:
|
||||
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_L3ID_IND, DIRECTION_IN);
|
||||
add_trace("callref", NULL, "0x%x", p_m_d_l3id);
|
||||
|
@ -1859,7 +1877,7 @@ void Pdss1::message_isdn(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
|
|||
break;
|
||||
|
||||
default:
|
||||
l1l2l3_trace_header(p_m_mISDNport, this, L3_UNKNOWN, DIRECTION_IN);
|
||||
l1l2l3_trace_header(p_m_mISDNport, this, L3_UNKNOWN_IND, DIRECTION_IN);
|
||||
add_trace("unhandled", "cmd", "0x%x", cmd);
|
||||
end_trace();
|
||||
}
|
||||
|
@ -2310,15 +2328,11 @@ void Pdss1::message_notify(unsigned int epoint_id, int message_id, union paramet
|
|||
int notify;
|
||||
int plan = 0, type = -1, present = 0;
|
||||
|
||||
printf("if = %d\n", param->notifyinfo.notify);
|
||||
if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
|
||||
notify = param->notifyinfo.notify & 0x7f;
|
||||
else
|
||||
notify = -1;
|
||||
if (p_state != PORT_STATE_CONNECT)
|
||||
{
|
||||
/* notify only allowed in active state */
|
||||
notify = -1;
|
||||
}
|
||||
if (notify >= 0)
|
||||
{
|
||||
plan = 1;
|
||||
|
@ -2362,7 +2376,7 @@ void Pdss1::message_notify(unsigned int epoint_id, int message_id, union paramet
|
|||
|
||||
if (notify >= 0)
|
||||
{
|
||||
if (p_state!=PORT_STATE_CONNECT)
|
||||
if (p_state!=PORT_STATE_CONNECT && p_state!=PORT_STATE_IN_PROCEEDING && p_state!=PORT_STATE_IN_ALERTING)
|
||||
{
|
||||
/* queue notification */
|
||||
if (p_m_d_notify_pending)
|
||||
|
@ -2856,6 +2870,13 @@ int Pdss1::message_epoint(unsigned int epoint_id, int message_id, union paramete
|
|||
break;
|
||||
}
|
||||
message_proceeding(epoint_id, message_id, param);
|
||||
if (p_m_d_notify_pending)
|
||||
{
|
||||
/* send pending notify message during connect */
|
||||
message_notify(ACTIVE_EPOINT(p_epointlist), p_m_d_notify_pending->type, &p_m_d_notify_pending->param);
|
||||
message_free(p_m_d_notify_pending);
|
||||
p_m_d_notify_pending = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case MESSAGE_ALERTING: /* call of endpoint is ringing */
|
||||
|
@ -2866,6 +2887,13 @@ int Pdss1::message_epoint(unsigned int epoint_id, int message_id, union paramete
|
|||
break;
|
||||
}
|
||||
message_alerting(epoint_id, message_id, param);
|
||||
if (p_m_d_notify_pending)
|
||||
{
|
||||
/* send pending notify message during connect */
|
||||
message_notify(ACTIVE_EPOINT(p_epointlist), p_m_d_notify_pending->type, &p_m_d_notify_pending->param);
|
||||
message_free(p_m_d_notify_pending);
|
||||
p_m_d_notify_pending = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case MESSAGE_CONNECT: /* call of endpoint is connected */
|
||||
|
@ -2878,6 +2906,13 @@ int Pdss1::message_epoint(unsigned int epoint_id, int message_id, union paramete
|
|||
break;
|
||||
}
|
||||
message_connect(epoint_id, message_id, param);
|
||||
if (p_m_d_notify_pending)
|
||||
{
|
||||
/* send pending notify message during connect */
|
||||
message_notify(ACTIVE_EPOINT(p_epointlist), p_m_d_notify_pending->type, &p_m_d_notify_pending->param);
|
||||
message_free(p_m_d_notify_pending);
|
||||
p_m_d_notify_pending = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case MESSAGE_DISCONNECT: /* call has been disconnected */
|
||||
|
|
1
dss1.h
1
dss1.h
|
@ -47,6 +47,7 @@ class Pdss1 : public PmISDN
|
|||
void t312_timeout_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void notify_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void facility_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void progress_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void hold_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void retrieve_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
void suspend_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
|
||||
|
|
|
@ -221,7 +221,7 @@ static struct isdn_message {
|
|||
{"PH_DEACTIVATE", L1_DEACTIVATE_REQ},
|
||||
{"DL_ESTABLISH", L2_ESTABLISH_REQ},
|
||||
{"DL_RELEASE", L2_RELEASE_REQ},
|
||||
{"UNKNOWN", L3_UNKNOWN},
|
||||
{"UNKNOWN", L3_UNKNOWN_REQ},
|
||||
{"MT_TIMEOUT", L3_TIMEOUT_REQ},
|
||||
{"MT_SETUP", L3_SETUP_REQ},
|
||||
{"MT_SETUP_ACK", L3_SETUP_ACKNOWLEDGE_REQ},
|
||||
|
@ -270,6 +270,7 @@ void l1l2l3_trace_header(struct mISDNport *mISDNport, class PmISDN *port, unsign
|
|||
i = 0;
|
||||
while(isdn_message[i].name)
|
||||
{
|
||||
// if (msg == L3_NOTIFY_REQ) printf("val = %x %s\n", isdn_message[i].value, isdn_message[i].name);
|
||||
if (isdn_message[i].value == (msg&0xffffff00))
|
||||
{
|
||||
SCPY(msgtext, isdn_message[i].name);
|
||||
|
@ -1560,11 +1561,9 @@ void PmISDN::set_tone(const char *dir, const char *tone)
|
|||
Port::set_tone(dir, tone);
|
||||
return;
|
||||
}
|
||||
if (p_tone_dir[0])
|
||||
goto nodsp;
|
||||
|
||||
/* now we USE dsp-tone, convert name */
|
||||
else if (!strcmp(tone, "dialtone"))
|
||||
if (!strcmp(tone, "dialtone"))
|
||||
{
|
||||
switch(options.dsptones) {
|
||||
case DSP_AMERICAN: id = TONE_AMERICAN_DIALTONE; break;
|
||||
|
|
Loading…
Reference in New Issue