[asterisk-commits] crichter: trunk r64951 - in /trunk: ./ channels/
channels/misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri May 18 02:31:27 MST 2007
Author: crichter
Date: Fri May 18 04:31:27 2007
New Revision: 64951
URL: http://svn.digium.com/view/asterisk?view=rev&rev=64951
Log:
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
........
................
Modified:
trunk/ (props changed)
trunk/channels/chan_misdn.c
trunk/channels/misdn/ie.c
trunk/channels/misdn/isdn_lib.c
trunk/channels/misdn/isdn_lib.h
trunk/channels/misdn/isdn_msg_parser.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=64951&r1=64950&r2=64951
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Fri May 18 04:31:27 2007
@@ -2015,7 +2015,12 @@
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 @@
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 @@
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)
@@ -3677,6 +3687,10 @@
if (bc->urate) {
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);
}
}
@@ -3850,7 +3864,9 @@
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 @@
case EVENT_RELEASE:
{
- bc->out_cause=16;
-
hangup_chan(ch);
release_chan(bc);
Modified: trunk/channels/misdn/ie.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/ie.c?view=diff&rev=64951&r1=64950&r2=64951
==============================================================================
--- trunk/channels/misdn/ie.c (original)
+++ trunk/channels/misdn/ie.c Fri May 18 04:31:27 2007
@@ -1324,7 +1324,7 @@
/* IE_USERUSER */
-#if 0
+#if 1
static void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, char *user, int user_len, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
@@ -1366,7 +1366,7 @@
}
#endif
-#if 0
+#if 1
static void dec_ie_useruser(unsigned char *p, Q931_info_t *qi, int *protocol, char *user, int *user_len, int nt, struct misdn_bchannel *bc)
{
char debug[768];
Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?view=diff&rev=64951&r1=64950&r2=64951
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Fri May 18 04:31:27 2007
@@ -463,7 +463,7 @@
static int empty_chan_in_stack(struct misdn_stack *stack, int channel)
{
- if (channel<=0 || channel>=MAX_BCHANS) {
+ if (channel<=0 || channel>MAX_BCHANS) {
cb_log(0,stack?stack->port:0, "empty_chan_in_stack: cannot empty channel %d\n",channel);
return -1;
}
@@ -618,6 +618,8 @@
bc->dad[0] = 0;
bc->rad[0] = 0;
bc->orig_dad[0] = 0;
+ bc->uu[0]=0;
+ bc->uulen=0;
bc->fac_in.Function = Fac_None;
bc->fac_out.Function = Fac_None;
@@ -1533,8 +1535,10 @@
if (bc->channel>0)
empty_chan_in_stack(stack,bc->channel);
int tmpcause=bc->cause;
+ int tmp_out_cause=bc->out_cause;
empty_bc(bc);
bc->cause=tmpcause;
+ bc->out_cause=tmp_out_cause;
clean_up_bc(bc);
break;
default:
@@ -3082,6 +3086,9 @@
}
int maxnum=inout&&!stack->pri&&!stack->ptp?stack->b_num+1:stack->b_num;
+ //int maxnum=stack->b_num+1;
+
+ cb_log(0,0,"maxnum:%d",maxnum);
for (i = 0; i <maxnum; i++) {
if (!stack->bc[i].in_use) {
/* 3. channel on bri means CW*/
@@ -3322,8 +3329,10 @@
if (bc->channel>0)
empty_chan_in_stack(stack,bc->channel);
int tmpcause=bc->cause;
+ int tmp_out_cause=bc->out_cause;
empty_bc(bc);
bc->cause=tmpcause;
+ bc->out_cause=tmp_out_cause;
clean_up_bc(bc);
}
break;
Modified: trunk/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.h?view=diff&rev=64951&r1=64950&r2=64951
==============================================================================
--- trunk/channels/misdn/isdn_lib.h (original)
+++ trunk/channels/misdn/isdn_lib.h Fri May 18 04:31:27 2007
@@ -335,7 +335,9 @@
/* unsigned char info_keypad[32]; */
/* unsigned char clisub[24]; */
/* unsigned char cldsub[24]; */
-/* unsigned char uu[256]; */
+
+ char uu[256];
+ int uulen;
int cause;
int out_cause;
Modified: trunk/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_msg_parser.c?view=diff&rev=64951&r1=64950&r2=64951
==============================================================================
--- trunk/channels/misdn/isdn_msg_parser.c (original)
+++ trunk/channels/misdn/isdn_msg_parser.c Fri May 18 04:31:27 2007
@@ -252,6 +252,14 @@
set_channel(bc,channel);
}
+
+ {
+ int protocol ;
+ dec_ie_useruser(setup->USER_USER, (Q931_info_t *)setup, &protocol, bc->uu, &bc->uulen, nt,bc);
+ if (bc->uulen) cb_log(1,bc->port,"USERUESRINFO:%s\n",bc->uu);
+ else
+ cb_log(1,bc->port,"NO USERUESRINFO\n");
+ }
dec_ie_progress(setup->PROGRESS, (Q931_info_t *)setup, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
@@ -331,7 +339,15 @@
enc_ie_complete(&setup->BEARER,msg, bc->sending_complete, nt, bc);
}
-#ifdef DEBUG
+ {
+ int protocol=4;
+ enc_ie_useruser(&setup->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
+ if (bc->uulen) cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu);
+ else
+ cb_log(1,bc->port,"NO USERUESRINFO ENCODED\n");
+ }
+
+#if DEBUG
printf("Building SETUP Msg\n");
#endif
return msg;
More information about the asterisk-commits
mailing list