From 76c5d82d4cbdd9d75e6b6db9e51eb22d10fb44bd Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 16 Jan 2010 11:42:46 +0100 Subject: Added "release" action and timeout to "execute" action. modified: README modified: action.cpp modified: apppbx.cpp modified: apppbx.h modified: dss1.cpp modified: mISDN.cpp modified: message.h modified: route.c modified: route.h modified: socket_server.c --- dss1.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'dss1.cpp') diff --git a/dss1.cpp b/dss1.cpp index 4a96e28..3bcf410 100644 --- a/dss1.cpp +++ b/dss1.cpp @@ -2607,45 +2607,46 @@ void Pdss1::message_release(unsigned int epoint_id, int message_id, union parame 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(); - 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; - } /* - * 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(); - 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; + } #if 0 -- cgit v1.2.3-55-g7522