TT#170203 add support for REFER

Also take this opportunity to renumber the method codes for easier
maintenance.

Change-Id: I8e7998deb2e2998eb308121ad94e6d68c9eae5b0
mr11.0
Richard Fuchs 4 years ago
parent 359d7aca5d
commit f5a7735f21

@ -1629,6 +1629,10 @@ void cdr_parse_entry(med_entry_t *e)
{
e->method = MED_BYE;
}
else if (strcmp(e->sip_method, MSG_REFER) == 0)
{
e->method = MED_REFER;
}
else
{
e->method = MED_UNRECOGNIZED;

@ -5,6 +5,7 @@
#define MSG_INVITE "INVITE"
#define MSG_BYE "BYE"
#define MSG_REFER "REFER"
#define CDR_STATUS_OK "ok"
#define CDR_STATUS_BUSY "busy"

@ -69,9 +69,10 @@ extern int mediator_lockfd;
extern sig_atomic_t mediator_shutdown;
typedef enum {
MED_INVITE = 1,
MED_BYE = 2,
MED_UNRECOGNIZED = 3
MED_UNRECOGNIZED = 0,
MED_INVITE,
MED_BYE,
MED_REFER,
} med_method_t;

@ -273,12 +273,13 @@ static int medredis_remove_mappings(const char* cid, char* key, const char *meth
}
// delete cid from acc:meth::$METHOD and handle acc::index::meth mappings
char *methods[2];
char *methods[3];
int num_methods;
if (!method || !method[0]) {
methods[0] = "acc:meth::INVITE";
methods[1] = "acc:meth::BYE";
num_methods = 2;
methods[2] = "acc:meth::REFER";
num_methods = 3;
}
else {
method_key = g_strdup_printf("acc:meth::%s", method);

Loading…
Cancel
Save