From 3ac6881c22bce18091f19b06958ac66016bf9a32 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Tue, 27 Oct 2009 08:02:16 +0100 Subject: Added keypad forwarding, keypad parameter, chan_lcr keypad option 'k'. modified: README modified: action.cpp modified: apppbx.cpp modified: chan_lcr.c modified: chan_lcr.h modified: dss1.cpp modified: joinpbx.cpp modified: joinpbx.h modified: message.h modified: route.c modified: route.h --- joinpbx.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'joinpbx.cpp') diff --git a/joinpbx.cpp b/joinpbx.cpp index af070b1..d21daf3 100644 --- a/joinpbx.cpp +++ b/joinpbx.cpp @@ -855,12 +855,17 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par if (param->setup.dialinginfo.itype == INFO_ITYPE_ISDN_EXTENSION) { numbers = param->setup.dialinginfo.id; while((number = strsep(&numbers, ","))) { - if (out_setup(epoint_id, message_type, param, number)) + if (out_setup(epoint_id, message_type, param, number, NULL)) + return; // join destroyed + } + numbers = param->setup.dialinginfo.id; + while((number = strsep(&numbers, ","))) { + if (out_setup(epoint_id, message_type, param, NULL, number)) return; // join destroyed } break; } - if (out_setup(epoint_id, message_type, param, NULL)) + if (out_setup(epoint_id, message_type, param, NULL, NULL)) return; // join destroyed break; @@ -945,7 +950,7 @@ int track_notify(int oldstate, int notify) * if other outgoing endpoints already exists, they are release as well. * note: if this functions fails, it will destroy its own join object! */ -int JoinPBX::out_setup(unsigned int epoint_id, int message_type, union parameter *param, char *newnumber) +int JoinPBX::out_setup(unsigned int epoint_id, int message_type, union parameter *param, char *newnumber, char *newkeypad) { struct join_relation *relation; struct lcr_msg *message; @@ -974,7 +979,9 @@ int JoinPBX::out_setup(unsigned int epoint_id, int message_type, union parameter memcpy(&message->param, param, sizeof(union parameter)); if (newnumber) SCPY(message->param.setup.dialinginfo.id, newnumber); - PDEBUG(DEBUG_JOIN, "setup message sent to ep %d with number='%s'.\n", relation->epoint_id, message->param.setup.dialinginfo.id); + if (newkeypad) + SCPY(message->param.setup.dialinginfo.keypad, newkeypad); + PDEBUG(DEBUG_JOIN, "setup message sent to ep %d with number='%s' keypad='%s'.\n", relation->epoint_id, message->param.setup.dialinginfo.id, message->param.setup.dialinginfo.keypad); message_put(message); return(0); } -- cgit v1.2.3-55-g7522