diff options
author | Christian Richter <christian.richter@beronet.com> | 2006-02-24 17:38:43 +0000 |
---|---|---|
committer | Christian Richter <christian.richter@beronet.com> | 2006-02-24 17:38:43 +0000 |
commit | 61f1bf14fa346ec5fe41c1f8f27642d1408e7039 (patch) | |
tree | c41397a33c6d8854230a11038eea2842b9c66aed | |
parent | acfc2197335f4117cc4565db692a687283906ed4 (diff) |
added export and import of RDNIS channel variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_misdn.c | 6 | ||||
-rw-r--r-- | channels/misdn/isdn_msg_parser.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index b2f80d6bb..bfbf907f2 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2946,6 +2946,10 @@ void import_ies(struct ast_channel *chan, struct misdn_bchannel *bc) tmp=pbx_builtin_getvar_helper(chan,"PRI_USER1"); if (tmp) bc->user1=atoi(tmp); + + tmp=pbx_builtin_getvar_helper(chan,"RDNIS"); + if (tmp) ast_copy_string(bc->rad,tmp,sizeof(bc->rad)); + } void export_ies(struct ast_channel *chan, struct misdn_bchannel *bc) @@ -2963,6 +2967,8 @@ void export_ies(struct ast_channel *chan, struct misdn_bchannel *bc) sprintf(tmp,"%d",bc->user1); pbx_builtin_setvar_helper(chan,"PRI_USER1",tmp); + + pbx_builtin_setvar_helper(chan,"RDNIS",bc->rad); } diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c index 4935deefa..5eb7e1f68 100644 --- a/channels/misdn/isdn_msg_parser.c +++ b/channels/misdn/isdn_msg_parser.c @@ -277,6 +277,13 @@ msg_t *build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) if (bc->dad[0]) enc_ie_called_pn(&setup->CALLED_PN, msg, bc->dnumplan, 1, bc->dad, nt,bc); } + + { + if (bc->rad[0]) + enc_ie_redir_nr(&setup->REDIR_NR, msg, 1, 1, bc->pres, bc->screen, 0, bc->rad, nt,bc); + } + + if (*bc->display) { enc_ie_display(&setup->DISPLAY, msg, bc->display, nt,bc); |