Change the way we store the callednum from INFORMATION messages

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@42 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Martin Pycko 2003-06-05 21:15:56 +00:00
parent 5137d733f9
commit 34f700b584
2 changed files with 2 additions and 5 deletions

View File

@ -179,6 +179,8 @@
#define PRI_LAYER_1_V120_RATE_ADAPT 0x28 #define PRI_LAYER_1_V120_RATE_ADAPT 0x28
#define PRI_LAYER_1_X31_RATE_ADAPT 0x29 #define PRI_LAYER_1_X31_RATE_ADAPT 0x29
#define PRI_COPY_DIGITS_CALLED_NUMBER
typedef struct q931_call q931_call; typedef struct q931_call q931_call;
typedef struct pri_event_generic { typedef struct pri_event_generic {

5
q931.c
View File

@ -785,13 +785,8 @@ static void dump_redirecting_subaddr(q931_ie *ie, int len, char prefix)
static int receive_called_party_number(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len) static int receive_called_party_number(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)
{ {
#ifdef SKIP_OVERLAP_SUPPORT
/* copy digits to call->callednum */ /* copy digits to call->callednum */
q931_get_number(call->callednum, sizeof(call->callednum), ie->data + 1, len - 3); q931_get_number(call->callednum, sizeof(call->callednum), ie->data + 1, len - 3);
#else
/* append new digits to call->callednum */
q931_get_number(call->callednum + strlen(call->callednum), sizeof(call->callednum) - strlen(call->callednum), ie->data + 1, len - 3);
#endif
call->calledplan = ie->data[0] & 0x7f; call->calledplan = ie->data[0] & 0x7f;
return 0; return 0;
} }