annotate libutil/mncc_utils.c @ 124:7e04d28fae8b

sip-in: default use-100rel to no BulkVS servers act badly when we send a reliable 180 Ringing response to an incoming call, even though they advertise 100rel support in the Supported header in the INVITE packet, and we probably won't be implementing 100rel for outbound because doing per-the-spec PRACK as a UAC is just too burdensome. Therefore, we need to consider 100rel extension as not-really-supported in themwi-system-sw.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Oct 2022 15:54:50 -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 }