summaryrefslogtreecommitdiffstats
path: root/apppbx.cpp
diff options
context:
space:
mode:
authorSuper User2007-07-18 11:44:25 +0200
committerSuper User2007-07-18 11:44:25 +0200
commitbf3c4d173ad6ecf845de2d9e6d11ab87769d0943 (patch)
tree92ebe71b8a6f61c58ba31774bae4e739a1de42a3 /apppbx.cpp
parentalpha phase is open, this means: (diff)
downloadlcr-bf3c4d173ad6ecf845de2d9e6d11ab87769d0943.tar.gz
lcr-bf3c4d173ad6ecf845de2d9e6d11ab87769d0943.tar.xz
lcr-bf3c4d173ad6ecf845de2d9e6d11ab87769d0943.zip
fixes & improvements
modified: admin_client.c modified: apppbx.cpp modified: asterisk_client.c deleted: default/h323_gateway.conf modified: default/options.conf modified: default/routing.conf modified: dss1.cpp modified: message.c modified: todo.txt modified: vbox.cpp modified: vbox.h
Diffstat (limited to 'apppbx.cpp')
-rw-r--r--apppbx.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/apppbx.cpp b/apppbx.cpp
index 8e8d87b..7dbf24e 100644
--- a/apppbx.cpp
+++ b/apppbx.cpp
@@ -2380,12 +2380,16 @@ void EndpointAppPBX::port_disconnect_release(struct port_list *portlist, int mes
e_multipoint_cause = 0;
e_multipoint_location = LOCATION_PRIVATE_LOCAL;
- /* tone to disconnected end */
- SPRINT(buffer, "cause_%02x", cause);
- if (ea_endpoint->ep_portlist)
- set_tone(ea_endpoint->ep_portlist, buffer);
+ if (message_type == MESSAGE_DISCONNECT)
+ {
+ /* tone to disconnected end */
+ SPRINT(buffer, "cause_%02x", cause);
+ if (ea_endpoint->ep_portlist)
+ set_tone(ea_endpoint->ep_portlist, buffer);
+
+ new_state(EPOINT_STATE_IN_DISCONNECT);
+ }
- new_state(EPOINT_STATE_IN_DISCONNECT);
if (ea_endpoint->ep_join_id)
{
int haspatterns = 0;
@@ -2419,6 +2423,8 @@ void EndpointAppPBX::port_disconnect_release(struct port_list *portlist, int mes
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) the port has no patterns.\n", ea_endpoint->ep_serial);
}
}
+ if (message_type == MESSAGE_RELEASE)
+ ea_endpoint->free_portlist(portlist);
release(RELEASE_ALL, location, cause, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL); /* RELEASE_TYPE, callcause, portcause */
return; /* must exit here */
}