X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=apppbx.cpp;h=d55424be1cede425008d60eb9c68f364f4b5ef0c;hp=0369bb9c2845ec276195433cebdcfadb8f8152e2;hb=3f7ef909c907a374a1760ffae0c01b49487f18d7;hpb=8b9bdad861adfc1ddb4b84113404459f9e447de0 diff --git a/apppbx.cpp b/apppbx.cpp index 0369bb9..d55424b 100644 --- a/apppbx.cpp +++ b/apppbx.cpp @@ -2471,6 +2471,19 @@ void EndpointAppPBX::port_enablekeypad(struct port_list *portlist, int message_t } +/* port MESSAGE_DISABLE_DEJITTER */ +void EndpointAppPBX::port_disable_dejitter(struct port_list *portlist, int message_type, union parameter *param) +{ + struct lcr_msg *message; + + logmessage(message_type, param, portlist->port_id, DIRECTION_IN); + + message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_join_id, EPOINT_TO_JOIN, MESSAGE_DISABLE_DEJITTER); + memcpy(&message->param, param, sizeof(union parameter)); + message_put(message); +} + + /* port sends message to the endpoint */ void EndpointAppPBX::ea_message_port(unsigned int port_id, int message_type, union parameter *param) @@ -2657,6 +2670,11 @@ void EndpointAppPBX::ea_message_port(unsigned int port_id, int message_type, uni port_enablekeypad(portlist, message_type, param); break; + case MESSAGE_DISABLE_DEJITTER: + PDEBUG(DEBUG_EPOINT, "EPOINT(%d) incoming disable dejitter message (terminal '%s', caller id '%s')\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id); + port_disable_dejitter(portlist, message_type, param); + break; + default: PDEBUG(DEBUG_EPOINT, "EPOINT(%d) epoint with terminal '%s' (caller id '%s') received a wrong message: %d\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id, message_type); @@ -3181,6 +3199,19 @@ void EndpointAppPBX::join_dtmf(struct port_list *portlist, int message_type, uni } } +/* join MESSAGE_DISABLE_DEJITTER */ +void EndpointAppPBX::join_disable_dejitter(struct port_list *portlist, int message_type, union parameter *param) +{ + struct lcr_msg *message; + + while(portlist) { + message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_DISABLE_DEJITTER); + memcpy(&message->param, param, sizeof(union parameter)); + message_put(message); + portlist = portlist->next; + } +} + /* JOIN sends messages to the endpoint */ void EndpointAppPBX::ea_message_join(unsigned int join_id, int message_type, union parameter *param) @@ -3352,6 +3383,12 @@ void EndpointAppPBX::ea_message_join(unsigned int join_id, int message_type, uni join_dtmf(portlist, message_type, param); break; + /* JOIN sends a DISABLE_DEJITTER message */ + case MESSAGE_DISABLE_DEJITTER: + PDEBUG(DEBUG_EPOINT, "EPOINT(%d) epoint with terminal '%s' (caller id '%s') received disable dejitter.\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id); + join_disable_dejitter(portlist, message_type, param); + break; + default: PDEBUG(DEBUG_EPOINT, "EPOINT(%d) epoint with terminal '%s' (caller id '%s') received a wrong message: #%d\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id, message_type); } @@ -4432,6 +4469,13 @@ void EndpointAppPBX::logmessage(int message_type, union parameter *param, unsign end_trace(); break; + case MESSAGE_DISABLE_DEJITTER: + trace_header("DISBALE_DEJITTER", dir); + if (param->queue) + add_trace("queue", NULL, "%d", param->queue); + end_trace(); + break; + default: PERROR("EPOINT(%d) message not of correct type (%d)\n", ea_endpoint->ep_serial, message_type); }