Module: kamailio
Branch: master
Commit: 30a17aeb598f65d44d4a28407f52e4f60a64978c
URL:
https://github.com/kamailio/kamailio/commit/30a17aeb598f65d44d4a28407f52e4f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2019-02-19T08:32:32+01:00
Merge pull request #1859 from sergey-vb/sergey-vb-fix-redirection_number
sipt: $sipt(redirection_number) evaluates the value as a numerical value
---
Modified: src/modules/sipt/ss7_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/30a17aeb598f65d44d4a28407f52e4f…
Patch:
https://github.com/kamailio/kamailio/commit/30a17aeb598f65d44d4a28407f52e4f…
---
diff --git a/src/modules/sipt/ss7_parser.c b/src/modules/sipt/ss7_parser.c
index 90ff897d01..4d390c8341 100644
--- a/src/modules/sipt/ss7_parser.c
+++ b/src/modules/sipt/ss7_parser.c
@@ -384,8 +384,8 @@ int isup_get_redirection_number(unsigned char *buf, int len, char*
sb_buf)
sbparamlen = (buf[offset+1] & 0xFF) - 2;
while ((sbparamlen > 0) && (buf[offset] != 0)) {
- sb_buf[sb_i]=(buf[offset+4+sb_j] & 0x0F) + '\x30';
- sb_buf[sb_i+1]=(buf[offset+4+sb_j]>>4 & 0x0F) +
'\x30';
+ sb_buf[sb_i]="0123456789ABCDEF"[(buf[offset+4+sb_j] &
0x0F)];
+ sb_buf[sb_i+1]="0123456789ABCDEF"[(buf[offset+4+sb_j]
>>4 & 0x0F)];
sb_i=sb_i+2;
sbparamlen--;
sb_j++;