[svn-commits] crichter: branch 1.4 r58825 - in
/branches/1.4/channels: ./ misdn/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Mon Mar 12 05:43:25 MST 2007
Author: crichter
Date: Mon Mar 12 07:43:24 2007
New Revision: 58825
URL: http://svn.digium.com/view/asterisk?view=rev&rev=58825
Log:
added UU transceiving and corect handling for rdnis
Modified:
branches/1.4/channels/chan_misdn.c
branches/1.4/channels/misdn/ie.c
branches/1.4/channels/misdn/isdn_lib.c
branches/1.4/channels/misdn/isdn_lib.h
branches/1.4/channels/misdn/isdn_msg_parser.c
Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=58825&r1=58824&r2=58825
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Mon Mar 12 07:43:24 2007
@@ -1947,7 +1947,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_P(ast));
if (ast_strlen_zero(newbc->oad) && AST_CID_P(ast) ) {
@@ -3581,6 +3586,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)
@@ -3598,6 +3612,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);
}
}
Modified: branches/1.4/channels/misdn/ie.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/ie.c?view=diff&rev=58825&r1=58824&r2=58825
==============================================================================
--- branches/1.4/channels/misdn/ie.c (original)
+++ branches/1.4/channels/misdn/ie.c Mon Mar 12 07:43:24 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: branches/1.4/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/isdn_lib.c?view=diff&rev=58825&r1=58824&r2=58825
==============================================================================
--- branches/1.4/channels/misdn/isdn_lib.c (original)
+++ branches/1.4/channels/misdn/isdn_lib.c Mon Mar 12 07:43:24 2007
@@ -617,6 +617,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;
@@ -3086,6 +3088,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*/
Modified: branches/1.4/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/isdn_lib.h?view=diff&rev=58825&r1=58824&r2=58825
==============================================================================
--- branches/1.4/channels/misdn/isdn_lib.h (original)
+++ branches/1.4/channels/misdn/isdn_lib.h Mon Mar 12 07:43:24 2007
@@ -334,7 +334,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: branches/1.4/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/isdn_msg_parser.c?view=diff&rev=58825&r1=58824&r2=58825
==============================================================================
--- branches/1.4/channels/misdn/isdn_msg_parser.c (original)
+++ branches/1.4/channels/misdn/isdn_msg_parser.c Mon Mar 12 07:43:24 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,6 +339,14 @@
enc_ie_complete(&setup->BEARER,msg, bc->sending_complete, nt, bc);
}
+ {
+ 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
More information about the svn-commits
mailing list