aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-12 12:43:24 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-12 12:43:24 +0000
commitd3d44c7d2adb5f650b9cf32e84be2975d7de4903 (patch)
tree6bb49c4c61ca8f2dfaa207bd394e9bf9e73e222f /channels/misdn
parenta1b90a465555c6bb6590a18afe2401ff5d554727 (diff)
added UU transceiving and corect handling for rdnis
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@58825 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/ie.c4
-rw-r--r--channels/misdn/isdn_lib.c5
-rw-r--r--channels/misdn/isdn_lib.h4
-rw-r--r--channels/misdn/isdn_msg_parser.c16
4 files changed, 26 insertions, 3 deletions
diff --git a/channels/misdn/ie.c b/channels/misdn/ie.c
index af2d14019..3fbccab3e 100644
--- a/channels/misdn/ie.c
+++ b/channels/misdn/ie.c
@@ -1324,7 +1324,7 @@ static void dec_ie_redir_dn(unsigned char *p, Q931_info_t *qi, int *type, int *p
/* 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 @@ static void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, ch
}
#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];
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index f745e8bcb..8f587e5d0 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -617,6 +617,8 @@ static void empty_bc(struct misdn_bchannel *bc)
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 @@ struct misdn_bchannel* misdn_lib_get_free_bc(int port, int channel, int inout)
}
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*/
diff --git a/channels/misdn/isdn_lib.h b/channels/misdn/isdn_lib.h
index e320882dd..cc2ea45b8 100644
--- a/channels/misdn/isdn_lib.h
+++ b/channels/misdn/isdn_lib.h
@@ -334,7 +334,9 @@ struct misdn_bchannel {
/* 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;
diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c
index 1a1223db7..66e68b2ac 100644
--- a/channels/misdn/isdn_msg_parser.c
+++ b/channels/misdn/isdn_msg_parser.c
@@ -252,6 +252,14 @@ static void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchann
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 @@ static msg_t *build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, in
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