summaryrefslogtreecommitdiffstats
path: root/joinpbx.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2009-10-27 08:02:16 +0100
committerAndreas Eversberg2009-10-27 08:02:16 +0100
commit3ac6881c22bce18091f19b06958ac66016bf9a32 (patch)
treeb658b2d5b5c66145d86a8a5c820f0b76d08825eb /joinpbx.cpp
parentMerge branch 'master' of ssh://jolly@www.mISDN.org/var/git/lcr (diff)
downloadlcr-3ac6881c22bce18091f19b06958ac66016bf9a32.tar.gz
lcr-3ac6881c22bce18091f19b06958ac66016bf9a32.tar.xz
lcr-3ac6881c22bce18091f19b06958ac66016bf9a32.zip
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
Diffstat (limited to 'joinpbx.cpp')
-rw-r--r--joinpbx.cpp15
1 files changed, 11 insertions, 4 deletions
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);
}