mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
fixed a bug with the useruser information element. We send them now also in the disconnect message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2416,6 +2416,15 @@ static int misdn_hangup(struct ast_channel *ast)
|
|||||||
|
|
||||||
bc=p->bc;
|
bc=p->bc;
|
||||||
|
|
||||||
|
if (bc) {
|
||||||
|
const char *tmp=pbx_builtin_getvar_helper(ast,"MISDN_USERUSER");
|
||||||
|
if (tmp) {
|
||||||
|
ast_log(LOG_NOTICE, "MISDN_USERUSER: %s\n", tmp);
|
||||||
|
strcpy(bc->uu, tmp);
|
||||||
|
bc->uulen=strlen(bc->uu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MISDN_ASTERISK_TECH_PVT(ast)=NULL;
|
MISDN_ASTERISK_TECH_PVT(ast)=NULL;
|
||||||
p->ast=NULL;
|
p->ast=NULL;
|
||||||
|
|
||||||
|
@@ -1353,7 +1353,7 @@ static void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, ch
|
|||||||
|
|
||||||
if (MISDN_IE_DEBG) printf(" protocol=%d user-user%s\n", protocol, debug);
|
if (MISDN_IE_DEBG) printf(" protocol=%d user-user%s\n", protocol, debug);
|
||||||
|
|
||||||
l = user_len;
|
l = user_len+1;
|
||||||
p = msg_put(msg, l+3);
|
p = msg_put(msg, l+3);
|
||||||
if (nt)
|
if (nt)
|
||||||
*ntmode = p+1;
|
*ntmode = p+1;
|
||||||
|
@@ -797,6 +797,12 @@ static msg_t *build_disconnect (struct isdn_msg msgs[], struct misdn_bchannel *b
|
|||||||
|
|
||||||
enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc);
|
enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc);
|
||||||
if (nt) enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt?1:5, 8 ,nt,bc);
|
if (nt) enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt?1:5, 8 ,nt,bc);
|
||||||
|
|
||||||
|
if (bc->uulen) {
|
||||||
|
int protocol=4;
|
||||||
|
enc_ie_useruser(&disconnect->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
|
||||||
|
cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu);
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("Building DISCONNECT Msg\n");
|
printf("Building DISCONNECT Msg\n");
|
||||||
@@ -868,6 +874,12 @@ static msg_t *build_release (struct isdn_msg msgs[], struct misdn_bchannel *bc,
|
|||||||
|
|
||||||
if (bc->out_cause>= 0)
|
if (bc->out_cause>= 0)
|
||||||
enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
|
enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
|
||||||
|
|
||||||
|
if (bc->uulen) {
|
||||||
|
int protocol=4;
|
||||||
|
enc_ie_useruser(&release->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
|
||||||
|
cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu);
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("Building RELEASE Msg\n");
|
printf("Building RELEASE Msg\n");
|
||||||
@@ -918,6 +930,12 @@ static msg_t *build_release_complete (struct isdn_msg msgs[], struct misdn_bchan
|
|||||||
release_complete=(RELEASE_COMPLETE_t*)((msg->data+HEADER_LEN));
|
release_complete=(RELEASE_COMPLETE_t*)((msg->data+HEADER_LEN));
|
||||||
|
|
||||||
enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
|
enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
|
||||||
|
|
||||||
|
if (bc->uulen) {
|
||||||
|
int protocol=4;
|
||||||
|
enc_ie_useruser(&release_complete->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
|
||||||
|
cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu);
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("Building RELEASE_COMPLETE Msg\n");
|
printf("Building RELEASE_COMPLETE Msg\n");
|
||||||
|
Reference in New Issue
Block a user