From 4d6c4cc64f10a45808ba7b4d06c10915ea5e9a8f Mon Sep 17 00:00:00 2001 From: crichter Date: Fri, 6 Oct 2006 12:50:25 +0000 Subject: Merged revisions 44334 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r44334 | crichter | 2006-10-04 17:13:58 +0200 (Mi, 04 Okt 2006) | 1 line added the option 'reject_cause' to make it possible to set the RELEASE_COMPLETE - cause on the 3. incoming PMP channel, which is automatically rejected because chan_misdn does not support that kind of callwaiting. Therefore chan_misdn supports now 3 incoming channels on a PMP BRI Port. misdn_lib_get_free_bc now gets the info if the requested channel is incoming or outgoing to make the 3. channel possible ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44561 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_misdn.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'channels/chan_misdn.c') diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index a048e70fb..151b6a51b 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2935,7 +2935,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat if ( port_up>0 ) { - newbc = misdn_lib_get_free_bc(port, robin_channel); + newbc = misdn_lib_get_free_bc(port, robin_channel,0); if (newbc) { chan_misdn_log(4, port, " Success! Found port:%d channel:%d\n", newbc->port, newbc->channel); if (port_up) @@ -2969,7 +2969,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat chan_misdn_log(4, port, "portup:%d\n", port_up); if ( port_up>0 ) { - newbc = misdn_lib_get_free_bc(port, 0); + newbc = misdn_lib_get_free_bc(port, 0, 0); if (newbc) break; } @@ -2980,7 +2980,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat } else { if (channel) chan_misdn_log(1, port," --> preselected_channel: %d\n",channel); - newbc = misdn_lib_get_free_bc(port, channel); + newbc = misdn_lib_get_free_bc(port, channel, 0); } if (!newbc) { @@ -3830,6 +3830,14 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) } + if (bc->cw) { + chan_misdn_log(0, bc->port, " --> Call Waiting on PMP sending RELEASE_COMPLETE\n"); + int cause; + misdn_cfg_get( bc->port, MISDN_CFG_REJECT_CAUSE, &cause, sizeof(cause)); + bc->out_cause=cause?cause:16; + return RESPONSE_RELEASE_SETUP; + } + print_bearer(bc); { -- cgit v1.2.3