diff options
author | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-18 09:31:27 +0000 |
---|---|---|
committer | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-18 09:31:27 +0000 |
commit | 7188fd81cffe0cd2dcb2ea4f9bc87962d9e0e14b (patch) | |
tree | d99496be1c60b010957cde4236f18fee022b6e46 /channels/chan_misdn.c | |
parent | 98059cd8247753754256f372d0de65f7ee3492cb (diff) |
Merged revisions 58825-58826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r58825 | crichter | 2007-03-12 13:43:24 +0100 (Mo, 12 Mär 2007) | 1 line
added UU transceiving and corect handling for rdnis
................
r58826 | crichter | 2007-03-12 14:08:06 +0100 (Mo, 12 Mär 2007) | 21 lines
Merged revisions 57034,57523,57753,58558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r57034 | crichter | 2007-02-28 17:09:27 +0100 (Mi, 28 Feb 2007) | 1 line
fixed bugs.digium.com bugs: #9157 and bugs.beronet.com bugs: #302, #303, #304
........
r57523 | crichter | 2007-03-02 19:32:51 +0100 (Fr, 02 Mar 2007) | 1 line
fixed typo
........
r57753 | crichter | 2007-03-04 11:39:50 +0100 (So, 04 Mar 2007) | 1 line
fixed another place where the out_cause was hardcoded to 16
........
r58558 | crichter | 2007-03-09 15:43:58 +0100 (Fr, 09 Mar 2007) | 1 line
we can free channel 31 as well, since we can occupy it
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64951 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 38a2151f8..fefef85b7 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2015,7 +2015,12 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout) strncpy(newbc->dad,ast->exten, l); newbc->dad[l-1] = 0; } - newbc->rad[0]=0; + + if (ast->cid.cid_rdnis) + strcpy(newbc->rad, ast->cid.cid_rdnis); + else + newbc->rad[0]=0; + chan_misdn_log(3, port, " --> * adding2newbc callerid %s\n",ast->cid.cid_num); if (ast_strlen_zero(newbc->oad) && ast->cid.cid_num ) { @@ -2330,12 +2335,8 @@ static int misdn_indication(struct ast_channel *ast, int cond, const void *data, chan_misdn_log(1, p->bc->port, " --> * IND :\tcongestion pid:%d\n",p->bc?p->bc->pid:-1); p->bc->out_cause=42; - if (p->state != MISDN_CONNECTED) { - start_bc_tones(p); - misdn_lib_send_event( p->bc, EVENT_RELEASE); - } else { - misdn_lib_send_event( p->bc, EVENT_DISCONNECT); - } + start_bc_tones(p); + misdn_lib_send_event( p->bc, EVENT_DISCONNECT); if (p->bc->nt) { hanguptone_indicate(p); @@ -3660,6 +3661,15 @@ void import_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_ if (tmp && (atoi(tmp) == 1)) { bc->sending_complete=1; } + + ast_log(LOG_VERBOSE, "getting MISDN_USERUSER:\n"); + tmp=pbx_builtin_getvar_helper(chan,"MISDN_USERUSER"); + if (tmp) { + ast_log(LOG_VERBOSE, "MISDN_USERUSER: %s\n", tmp); + strcpy(bc->uu, tmp); + bc->uulen=strlen(bc->uu); + } + } void export_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_list *ch) @@ -3678,6 +3688,10 @@ void export_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_ sprintf(tmp,"%d",bc->urate); pbx_builtin_setvar_helper(chan,"MISDN_URATE",tmp); } + + if (bc->uulen) { + pbx_builtin_setvar_helper(chan,"MISDN_USERUSER",bc->uu); + } } int add_in_calls(int port) @@ -3850,7 +3864,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) if ( stop_tone ) { stop_indicate(ch); } - + + if (!ch->ast) break; + if (ch->state == MISDN_WAITING4DIGS ) { /* Ok, incomplete Setup, waiting till extension exists */ @@ -4397,8 +4413,6 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) case EVENT_RELEASE: { - bc->out_cause=16; - hangup_chan(ch); release_chan(bc); |