From bf3c4d173ad6ecf845de2d9e6d11ab87769d0943 Mon Sep 17 00:00:00 2001 From: Super User Date: Wed, 18 Jul 2007 11:44:25 +0200 Subject: 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 --- apppbx.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'apppbx.cpp') 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 */ } -- cgit v1.2.3-55-g7522