projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increas version number to 1.10
[lcr.git]
/
dss1.cpp
diff --git
a/dss1.cpp
b/dss1.cpp
index
4a96e28
..
1dd009e
100644
(file)
--- a/
dss1.cpp
+++ b/
dss1.cpp
@@
-15,7
+15,7
@@
//#include <sys/socket.h>
extern "C" {
}
//#include <sys/socket.h>
extern "C" {
}
-#include <q931.h>
+#include <
mISDN/
q931.h>
extern unsigned int mt_assign_pid;
#include "ie.cpp"
extern unsigned int mt_assign_pid;
#include "ie.cpp"
@@
-801,6
+801,13
@@
void Pdss1::setup_acknowledge_ind(unsigned int cmd, unsigned int pid, struct l3_
dec_ie_progress(l3m, &coding, &location, &progress);
end_trace();
dec_ie_progress(l3m, &coding, &location, &progress);
end_trace();
+ if (progress >= 0) {
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROGRESS);
+ message->param.progressinfo.progress = progress;
+ message->param.progressinfo.location = location;
+ message_put(message);
+ }
+
/* process channel */
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
/* process channel */
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
@@
-850,6
+857,13
@@
void Pdss1::proceeding_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3
dec_ie_redir_dn(l3m, &type, &plan, &present, (unsigned char *)redir, sizeof(redir));
end_trace();
dec_ie_redir_dn(l3m, &type, &plan, &present, (unsigned char *)redir, sizeof(redir));
end_trace();
+ if (progress >= 0) {
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROGRESS);
+ message->param.progressinfo.progress = progress;
+ message->param.progressinfo.location = location;
+ message_put(message);
+ }
+
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_RELEASE);
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_RELEASE);
@@
-926,6
+940,13
@@
void Pdss1::alerting_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
dec_ie_redir_dn(l3m, &type, &plan, &present, (unsigned char *)redir, sizeof(redir));
end_trace();
dec_ie_redir_dn(l3m, &type, &plan, &present, (unsigned char *)redir, sizeof(redir));
end_trace();
+ if (progress >= 0) {
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROGRESS);
+ message->param.progressinfo.progress = progress;
+ message->param.progressinfo.location = location;
+ message_put(message);
+ }
+
/* process channel */
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
/* process channel */
ret = received_first_reply_to_setup(cmd, channel, exclusive);
if (ret < 0) {
@@
-1099,6
+1120,13
@@
void Pdss1::disconnect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3
location = LOCATION_PRIVATE_LOCAL;
}
location = LOCATION_PRIVATE_LOCAL;
}
+ if (progress >= 0) {
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROGRESS);
+ message->param.progressinfo.progress = progress;
+ message->param.progressinfo.location = proglocation;
+ message_put(message);
+ }
+
/* release if remote sends us no tones */
if (!p_m_mISDNport->earlyb) {
l3_msg *l3m;
/* release if remote sends us no tones */
if (!p_m_mISDNport->earlyb) {
l3_msg *l3m;
@@
-1639,6
+1667,13
@@
void Pdss1::progress_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
l1l2l3_trace_header(p_m_mISDNport, this, L3_PROGRESS_IND, DIRECTION_IN);
dec_ie_progress(l3m, &coding, &location, &progress);
end_trace();
l1l2l3_trace_header(p_m_mISDNport, this, L3_PROGRESS_IND, DIRECTION_IN);
dec_ie_progress(l3m, &coding, &location, &progress);
end_trace();
+
+ if (progress >= 0) {
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROGRESS);
+ message->param.progressinfo.progress = progress;
+ message->param.progressinfo.location = location;
+ message_put(message);
+ }
}
}
@@
-2001,7
+2036,7
@@
void Pdss1::message_setup(unsigned int epoint_id, int message_id, union paramete
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_REQ, DIRECTION_OUT);
/* channel information */
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_REQ, DIRECTION_OUT);
/* channel information */
- if (
channel >= 0) /* it should
*/
+ if (
p_m_d_ntmode || channel != CHANNEL_ANY) /* only omit channel id in te-mode/any channel
*/
enc_ie_channel_id(l3m, exclusive, channel);
/* caller information */
plan = 1;
enc_ie_channel_id(l3m, exclusive, channel);
/* caller information */
plan = 1;
@@
-2607,45
+2642,46
@@
void Pdss1::message_release(unsigned int epoint_id, int message_id, union parame
char *p = NULL;
/*
char *p = NULL;
/*
- *
we may only release during incoming disconnect state.
- *
this means that the endpoint doesnt require audio anymore
+ *
if we are on incoming call setup, we may reject by sending a release_complete
+ *
also on outgoing call setup, we send a release complete, BUT this is not conform. (i don't know any other way)
*/
*/
- if (p_state == PORT_STATE_IN_DISCONNECT
- || p_state == PORT_STATE_OUT_DISCONNECT) {
- /* sending release */
+ if (p_state==PORT_STATE_IN_SETUP
+ || p_state==PORT_STATE_OUT_SETUP) {
+//#warning remove me
+//PDEBUG(DEBUG_LOG, "JOLLY sending release complete %d\n", p_serial);
+ /* sending release complete */
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_REQ, DIRECTION_OUT);
/* send cause */
enc_ie_cause(l3m, (p_m_mISDNport->locally && param->disconnectinfo.location==LOCATION_PRIVATE_LOCAL)?LOCATION_PRIVATE_LOCAL:param->disconnectinfo.location, param->disconnectinfo.cause);
end_trace();
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_REQ, DIRECTION_OUT);
/* send cause */
enc_ie_cause(l3m, (p_m_mISDNport->locally && param->disconnectinfo.location==LOCATION_PRIVATE_LOCAL)?LOCATION_PRIVATE_LOCAL:param->disconnectinfo.location, param->disconnectinfo.cause);
end_trace();
- p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_RELEASE, p_m_d_l3id, l3m);
+ p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_RELEASE
_COMPLETE
, p_m_d_l3id, l3m);
new_state(PORT_STATE_RELEASE);
/* remove epoint */
free_epointid(epoint_id);
// wait for callref to be released
return;
new_state(PORT_STATE_RELEASE);
/* remove epoint */
free_epointid(epoint_id);
// wait for callref to be released
return;
-
}
/*
}
/*
- *
if we are on incoming call setup, we may reject by sending a release_complete
- *
also on outgoing call setup, we send a release complete, BUT this is not conform. (i don't know any other way)
+ *
we may only release during incoming disconnect state.
+ *
this means that the endpoint doesnt require audio anymore
*/
*/
- if (p_state==PORT_STATE_IN_SETUP
- || p_state==PORT_STATE_OUT_SETUP) {
-//#warning remove me
-//PDEBUG(DEBUG_LOG, "JOLLY sending release complete %d\n", p_serial);
- /* sending release complete */
+ if (p_state == PORT_STATE_IN_DISCONNECT
+ || p_state == PORT_STATE_OUT_DISCONNECT
+ || param->disconnectinfo.force) {
+ /* sending release */
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_REQ, DIRECTION_OUT);
/* send cause */
enc_ie_cause(l3m, (p_m_mISDNport->locally && param->disconnectinfo.location==LOCATION_PRIVATE_LOCAL)?LOCATION_PRIVATE_LOCAL:param->disconnectinfo.location, param->disconnectinfo.cause);
end_trace();
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_REQ, DIRECTION_OUT);
/* send cause */
enc_ie_cause(l3m, (p_m_mISDNport->locally && param->disconnectinfo.location==LOCATION_PRIVATE_LOCAL)?LOCATION_PRIVATE_LOCAL:param->disconnectinfo.location, param->disconnectinfo.cause);
end_trace();
- p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_RELEASE
_COMPLETE
, p_m_d_l3id, l3m);
+ p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_RELEASE, p_m_d_l3id, l3m);
new_state(PORT_STATE_RELEASE);
/* remove epoint */
free_epointid(epoint_id);
// wait for callref to be released
return;
new_state(PORT_STATE_RELEASE);
/* remove epoint */
free_epointid(epoint_id);
// wait for callref to be released
return;
+
}
#if 0
}
#if 0
@@
-2861,7
+2897,7
@@
int stack2manager(struct mISDNport *mISDNport, unsigned int cmd, unsigned int pi
port = port_first;
while(port) {
/* are we ISDN ? */
port = port_first;
while(port) {
/* are we ISDN ? */
- if ((port->p_type & PORT_CLASS_mISDN_MASK) == PORT_CLASS_
mISDN_
DSS1) {
+ if ((port->p_type & PORT_CLASS_mISDN_MASK) == PORT_CLASS_DSS1) {
pdss1 = (class Pdss1 *)port;
/* check out correct stack and id */
if (pdss1->p_m_mISDNport == mISDNport) {
pdss1 = (class Pdss1 *)port;
/* check out correct stack and id */
if (pdss1->p_m_mISDNport == mISDNport) {