annotate libutil/mncc_utils.c @ 160:4b35a5a400f1

mgw/dtmf_defs.h: reduce DTMF_MIN_FRAMES to 5 (100 ms)
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 Oct 2022 13:05:26 -0800
parents dbc0a8677b69
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /* simple utility functions for MNCC */
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 #include <sys/types.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 #include <sys/socket.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <stdio.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdint.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdlib.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "../include/mncc.h"
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include "../include/gsm48_const.h"
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 mncc_set_cause(msg, loc, val)
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 struct gsm_mncc *msg;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 {
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 msg->fields |= MNCC_F_CAUSE;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 msg->cause.coding = GSM48_CAUSE_CODING_GSM;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 msg->cause.location = loc;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 msg->cause.value = val;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 }