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:
parent
5137d733f9
commit
34f700b584
2
libpri.h
2
libpri.h
@ -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
5
q931.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user