For OpenBSC it made sense to have a /tmp/bsc_mncc file to share for
external MNCC, but now that we have an MSC osmo-sip-connector
communicates with that, so rename the socket file to avoid confusion.
Change-Id: I5e0dbf1aafe1b9c3776c49a08a76d64dd4fe9cc5
Use osmo_mncc_name() in timer functions and in logging
the type of MNCC message sent to the socket.
Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
Use gsm48_cc_cause_name() in logging messages
Depends-On: I296f208581ce2550805f9d96e20f7319e1199023
Change-Id: I6e3541b66cb3407f0cb23fb6e00a04685fe90757
Fixes following compilation warning:
osmo-sip-connector/src/mncc.c: In function ‘check_disc_ind’:
osmo-sip-connector/src/mncc.c:517:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (other_leg)
^~
Fixes: 008915ee41 ("Implement Cause Mapping")
Change-Id: I5bdbc29a3f82bdc92b156c1f7df68c9503f85f8f
Adds cause field to the call_leg and sip_call_leg structs.
Translates the SIP status to MNCC cause and vice versa and
uses this information in the SIP/MNCC messages at call leg
release time.
Change-Id: Ic1b80dff7e583cd6fff2b662bc6cc4bad3f81cd4
Implements a cause_map, mapping the SIP status codes
to GSM48_CC_CAUSE_* that are defined in libosmocore.
The map at the same time implements the Q.850 cause texts
that are subsequently used in the SIP Reason: header.
Implements two functions cause2status() and status2cause()
to read the map and return the the mapped status.
The mapping mostly follows the implemention in the LCR program,
so that any implementation relying on that mapping should
continue to work as expected with osmo-sip-connector.
Change-Id: Id82be8603a30a6aec28fc0258236c1746973db58
The .tarball-version file should contain the *source version* uniquely
identifying the git commit, and not the Debian package name.
With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct
.tarball-version file in the .tar.xz of the nightly source packages.
Change-Id: Ia277b1d41c3f5b81a2c909320d23c2e763feac28
Related: OS#3449
GSM 04.08 10.5.4.11 (Table 10.85) states:
Coding standards other than the standard defined for the
GSM PLMNS shall not be used if the cause can be represented
with the GSM standardized coding.
This patch adds cause coding GSM PLMS (3) and sets cause
location to "public network serving the local user" (2)
This prevents UE that pay attention to this from treating
all call termination as an error and paves the way to
adding correct cause mapping from Table 10.86
Also replaces use of magic numbers with enum constants.
Change-Id: I5d3fe3f0c9e8de26dd0c73b10b7e4fc63dff3952
Links libosmocore (libosmogsm) for access to osmo_mncc_name()
Remove reference to get_mncc_name() in src/mncc_protocol.h
Uses osmo_mncc_name() to output to debug log
which MNCC_* message was received.
Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
sofia-sip allows applications to register a log backend function
which will be called every time the library wants to log something.
We register such a call-back and make it log using the libosmocore logging
framework.
The problem is that sofia-sip has its own log level management, and by
the time the message hits libosmocore, we don't know which log level we
shall use :(
Change-Id: Ib269b6b50f9d79bbd13acc43a626834921f05edb
Related: OS#3105
In Change-Id Iba20c1c90e528d08bd362be39d86317569c253e6 we changed the
prompt, but didn't update osmoappdesc.py
Change-Id: I7c7868bda2195e5e67b2db5824caee8fbfb5a3b6
It's confusing to access the telnet interface and then see a prompt
that's not like the program name
Change-Id: Iba20c1c90e528d08bd362be39d86317569c253e6
We normally use the 'const' modifier whenever using read-only input
data, let's do so in the mncc parser/handler, too.
Change-Id: Ide24feb536c04fe7ef08c62b4498fdd95605b58c
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale.
Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
Change-Id: I7e9f19755f55b274def9d757f72f2a08a01a4cce
rfc4867 8.2:
octet-align: Permissible values are 0 and 1. If 1, octet-aligned
operation SHALL be used. If 0 or if not present,
bandwidth-efficient operation is employed.
We don't have any support for AMR BE mode, but if we don't
send this the other end expects BE mode and can't decode the stream
Change-Id: I938758ac4ec55db9223e3da6c3c277e8fa670055
Parse the media from session in progress and if present in alerting
connect the call early. Sadly this sets RTP to the sendrecv mode even
if we would like to keep it as recvonly.
Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b
Related: OS#1784
Besides sending the alerting request we should inform the
MS that there is in-band information now. We do not seem
to export these flags in protocol/gsm_04_08.h so hardcode
them for now (until I come up with good names for them).
Related: OS#1784
Change-Id: I80b1e1f4ca045bd63536476702a5812f27d9b36d
We are not using the RTP telephony-event here but the older dtmf
relay. We also only have a fixed DTMF duration for now.
Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
So far the remote_port has never been used. sofia-sip did the right
thing and put the port into the "Contact" and the rport option for
the via. But we would have never been able to connect a PBX on a
different port (as sofia-sip seems to parse the destination from the
to address).
Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
We are using glib to benefit from the sofia-sip-glib eventloop
integration and set a poll func (evpoll) to be called by glib
to integrate with the rest of libosmocore.
Sofia-sip will use IP_RECVERR to enable error reporting on the
socket and then sets SU_WAIT_ERR (mapped to POLLERR if not using
kqueue) in the internal events flag of the socket. This will
be registered with a su_wait (mapped to struct pollfd) and then
glib will be called with g_source_add_poll. At this point the
the fd->events will still have the POLLERR bit set.
Before glib is calling its internal poll routine or our one
it will copy all registered fd into an array and mask the
events flags:
/* In direct contradiction to the Unix98 spec, IRIX runs into
* difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
* flags in the events field of the pollfd while it should
* just ignoring them. So we mask them out here.
*/
events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
This leads to the POLLERR flag never been set in the revents
of the struct poll_fd and as such we never put them in the
exceptionset and as such:
static int tport_base_wakeup(tport_t *self, int events)
{
int error = 0;
if (events & SU_WAIT_ERR)
error = tport_error_event(self);
tport_base_wakeup will never call tport_error_event. And the error
will be stuck in the socket data forever and recvmsg will return
a zero length packet. And this will repeat until the end of time.
As a first hack I mapped SU_WAIT_ERR to POLLPRI but when using
select the Linux kernel will not put the socket error into the
except queue unless the sockopt SOCK_SELECT_ERR_QUEUE is used.
One option is to use poll and then map the select requirements
to poll. Right now I just signal POLLERR as well to trigger
tport_error_event. This will result in extra syscalls for each
received UDP message right now.
Change-Id: I5bec4a7b70f421ab670e649e5bc1ea6faf59707c