Commit Graph

177 Commits

Author SHA1 Message Date
Pau Espin f56af15181 Bump version: 1.2.0.25-ff8a → 1.3.0
Change-Id: I3d3d048380753431c313cffa82de430dfbd3b93c
2019-08-08 17:54:49 +02:00
Pau Espin ff8a4ed3d6 Require newer libosmocore 1.0.0
Use of osmo_mncc_name() requires libosmocore 0.12.0
Use of gsm48_cc_cause_name() requires libosmocore 1.0.0

Change-Id: I466140a9c1e05c191fe1b079cf3615fd6ac5fb8c
2019-08-08 17:54:11 +02:00
Keith Whyte eb0a93e037 In hold/retrieve/reinvite, add check that other_leg exists
We should always check that the other leg did not somehow
dissapear before accessing it.

Change-Id: I947aab6c0cc5019929bde1c7012e1a8c3d3472a5
2019-08-07 13:10:51 +02:00
Keith Whyte b43c296f19 Logging: Make use of Levels, clarify some messages
Up to now most logging is on LDEBUG, lets make more use of Log Levels.
reserve NOTICE for unusual events
INFO: normal call setup/teardown
DEBUG, well.. it's DEBUG

* BYE is not an Error.
* 4XX or 5XX response to INVITE is not an Error don't log as such.
* 183 does not necessarily mean "ringing".
Change those log messages for clarity.

Change-Id: Ie0014043d93303a87cbb8bb351e439ff78651cbe
2019-08-07 13:09:44 +02:00
Keith Whyte f9a0f3af42 Handle case where SIP side hangsup while MNCC is on hold
Change-Id: Ie32690e036180e6b80a1b59177c1a72a6fd78d15
2019-08-07 02:16:07 +02:00
Keith Whyte 5311868c26 Cosmetic: Logging and Comments, spelling and clarity changes
Also removes a comment in sdp_create_file() about the
IP address in o= and c= having to be the same.
It is completely legal in SDP and often normal for the
originator and the connection information IP to be different.

Change-Id: I057573467c335fc27ead391c0bb4c775f2f6ba0a
2019-08-07 02:16:07 +02:00
Keith Whyte a2b7c8e29f Define hold/retrieve functions for MO calls
My original patch that introduced this functionality,
bd2d14bd4a
only did so for MT calls.

Change-Id: Ifd42ed94053f6a38abfe6d6b18e2fe3582d037bb
2019-08-06 17:48:37 +00:00
Keith Whyte 5f79d5a319 Fix bug with MO calls not connecting.
Fixes a bug I introduced in 5f73c2033b
where we would not call mncc_call_leg_connect() on receiving 200 from
SIP side, and therefore never send MNCC_SETUP_RSP to the MS

Fixes: 5f73c2033b

Change-Id: Ic7cc56c0d68a27eb1229c0c4aa1fa54d00b660b6
2019-08-06 17:40:17 +00:00
Keith Whyte a5b65505f9 inet_ntoa() is deprecated, use inet_ntop() instead
Change-Id: If6a96ede7d5e73884c32fbfdb03052e2bda50a77
2019-08-06 16:53:29 +02:00
Keith Whyte 279e910a4a Following from previous commit, assume other->ip is network byte order
Change-Id: I3641a843a3b4a9b2686c1a07d48f52527dce46a2
2019-08-06 15:00:02 +02:00
Keith Whyte 1f1f3f6fb9 IPs stored in the call struct are NETWORK byte order
As far as I can make out, the intention is to always store ip address in the call struct
in network byte order, whereas the ip address sent on MNCC are in host byte order.

Change-Id: I89ef26aa32a672f394699251cf560b53ae01a814
2019-08-06 14:38:32 +02:00
Pau Espin d0a8fa9062 Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its
parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However,
definition in C file doesn't contain "(void)", which means number of
parameters is undefined and thus compiler doesn't complain. Let's remove
parameters from all callers before enforcing "(void)" on it.
API osmo_stats_vty_add_cmds never had a param list but has seem problem
(no "void"), so some users decided to pass a parameter to it.

Change-Id: Ie519d4a4064a95803c33fd6969b53e1ef27045b7
Related: OS#4138
2019-08-05 17:50:01 +00:00
Keith Whyte ab5b4311b0 Only send update to MNCC if media info changed.
Do not send an MNCC_RTP_CONNECT as a result of a SIP re-INVITE,
unless the media connection information has changed.

Change-Id: I7c48300092a309e50a8fe091b30e395e7c72de9d
2019-08-05 19:08:42 +02:00
Keith Whyte ba7450cf26 Add support for MNCC HOLD/RETRIEVE
Handle MO hold and retrieve and pass this to the SIP side.

Handle the 200 from the SIP side in response to our HOLD-ing re-INVITE.

With this commit we now handle MO hold and therefore also handle
call-waiting and swapping.

Change-Id: Ife7bdab20cde92b7ce550215bab28b36a0f302e9
2019-08-05 19:08:34 +02:00
Keith Whyte bd2d14bd4a Prepare to support MO Call HOLD
Add function pointers to the call_leg struct for call hold and retrieve.

Add function to send re-INVITE to SIP side when MNCC side puts call on HOLD/RETRIEVES.

Add MNCC/SIP CC_HOLD to call states.

Change-Id: I2595626dfa50eb2f8e29a02540b708c9c1dce88c
2019-08-05 19:05:43 +02:00
Keith Whyte 5f73c2033b Handle SIP re-INVITEs
SIP end points can send periodic re-INVITES. Previous to this commit,
the osmo-sip-connector would send a new call SETUP to the MSC for each
re-INVITE.

Add a function to find if we already handle this call based on the nua handle.
Use this function to detect and respond with an ACK to re-INVITES.

Add a function to extract the media mode from the SDP.
In the case the re-INVITE has a=sendonly (HOLD) respond with a=recvonly

In the case that the re-INVITE changes the media connection ip/port,
forward this to the MNCC side with an MNCC_RTP_CONNECT

Change-Id: I4083ed50d0cf1b302b80354fe0c2b73fc6e14fed
2019-08-05 19:05:40 +02:00
Keith Whyte f9a2a414ef Add media mode parameter to sdp_create_file()
This enables call hold implemented by subsequent commits

Prior to this commit, osmo-sip-connector would not send
any media mode attribute in the sdp. After this commit
we will by default always include a=sendrecv.

Given that a media mode attribute of "sendrecv" is default
and implicit it its absense, this does not represent any
functional change.

Change-Id: Ib4212d0174955042e7d80d3744ce632a4942ccb2
2019-08-01 09:38:55 +02:00
Oliver Smith a35a7e70bb contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: Ie2e181a6e74053c407f7ed3db17631ae041c9754
2019-07-10 13:25:00 +02:00
Oliver Smith a137cdaaa4 debian: create -doc subpackage with pdf manuals
I have verified, that the resulting debian packages build in my own OBS
namespace (see the -doc packages):
https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/
https://build.opensuse.org/project/show/home:osmith42

Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci)
Related: OS#3899
Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2
2019-05-29 12:14:22 +02:00
Oliver Smith 356b3c6722 Cosmetic: debian: build-depends in multiple lines
Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84
2019-05-22 14:00:16 +02:00
Daniel Willmann de4c6f0ef1 Properly indent config file
osmo-config-merge expects only one space indentation for each level and
the VTY also outputs the config formatted like that.

Change-Id: I9c7a5bc6b3eae955288dada80abc856779ca9336
2019-04-29 12:27:58 +02:00
Harald Welte 73f99bc442 MNCC: Do not continue with B leg if A leg is cancelled.
In case we receive MNCC_RTP_CREATE after MNCC_DISC_IND,
check if the call is already marked in_release
and if so, send MNCC_REJ_REQ and do not proceed with
the B leg.

Related: OS#3518
Change-Id: I0eca9a741f7924c2fc32c503dd1a0fc083f94f37
2019-04-21 08:03:38 +00:00
Rafael Diniz 38ab0528b6 Added daemonize feature to osmo-sip-connector
Change-Id: I400fb5a2619f348cc60e8c9016154afa60424e66
2019-04-18 20:29:59 -03:00
Keith Whyte c90829c395 Support Emergency Calling
LCR supports emergency calling by sending the string 'emergency' as callee to
the SIP side.

This does the same

Change-Id: I5d0adb61dfa82e7ded5f41d9bc773d546112c9f1
2019-03-19 16:25:35 +00:00
Harald Welte e9113f21f6 cosmetic: use OSMO_STRLCPY_ARRAY() instead of osmo_strlcpy()
This saves us the extra sizeof().

Change-Id: If329f122017c0c5b5222e46d55f39731c5bdf662
2019-02-14 22:52:21 +01:00
Keith Whyte db2336a9f5 Support International Caller ID
When the SIP call source contains + as first character,
set the TON to International so that the MS displays
caller ID correctly

Change-Id: Idcfa31aff90e04dd0aa3583957f288889b1bbefe
2019-02-14 22:51:58 +01:00
Harald Welte 336add4990 Bump version: 1.1.0 → 1.2.0
Change-Id: Ia3926179b9020ba597d8dda727da89a20ff4bdce
2019-01-21 18:54:09 +01:00
Oliver Smith 0c232d89bf contrib: fix makedistcheck with disabled systemd
EXTRA_DIST files need to be distributed, no matter if the systemd option
is configured or not.

Change-Id: I1169c1c6d99628d2cbed67cac3ed675d778597b0
2018-12-06 13:43:26 +01:00
Oliver Smith 0241f7be95 contrib/jenkins.sh: build and publish manuals
Add new environment variables WITH_MANUALS and PUBLISH to control if
the manuals should be built and uploaded. Describe all environment vars
on top of the file.

When WITH_MANUALS is set, install osmo-gsm-manuals like any other
dependency and add --enable-manuals to the configure flags (for "make"
and "make distcheck"). Add the bin subdir of the installed files to
PATH, so osmo-gsm-manuals-check-depends can be used by ./configure.

Related: OS#3385
Change-Id: I4cf9d3c21f3912eac3c51bae1ac7b2ad0845c947
2018-12-05 13:09:22 +01:00
Oliver Smith 8a6754597a Fix DISTCHECK_CONFIGURE_FLAGS override
Set AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am instead of
DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from the
automake manual, as otherwise the flag can't be changed by the user
anymore.

Related: OS#3718
Change-Id: I6aadee1ab05b4caec0857e476190db7b83c85984
2018-12-04 15:32:11 +01:00
Oliver Smith d0b07dab40 build manuals moved here from osmo-gsm-manuals.git
Moved to doc/manuals/, with full commit history, in preceding merge commit.
Now incorporate in the build system.

Build with:

$ autoreconf -fi
$ ./configure --enable-manuals
$ make

Shared files from osmo-gsm-manuals.git are found automatically if
- the repository is checked out in ../osmo-gsm-manuals; or
- if it osmo-gsm-manuals was installed with "make install"; or
- OSMO_GSM_MANUALS_DIR is set.

Related: OS#3385
Change-Id: I1317131ed6765fec996344fc6ed08350187b615b
2018-11-27 18:34:56 +01:00
Neels Hofmeyr 161695c389 Merge history from osmo-gsm-manuals.git
Change-Id: Ia3eed1030966e0ed9f3e0bfdaa3939cfcec1f70a
2018-11-27 18:34:40 +01:00
Neels Hofmeyr 1b26e8e61e sip-connector: update vty reference
Change-Id: I79b91847337b6022f8f750533301b3bf0eb086df
2018-11-27 18:34:29 +01:00
Philipp Maier 3130f0776a running: Add note about DTMF support
osmo-sip-connector does not yet support full DTMF support. The current
implementation only supports DTMF tones to be send from MNCC to SIP,
but not in the opposite direction.

Change-Id: I578e50b0a42d88b05cf6da80443b71494b5eb26f
Related: OS#2777
2018-11-27 18:34:29 +01:00
Daniel Willmann a001c591b3 osmo-sip-connector: Explicitly note OsmoMSC config with external MNCC
Change-Id: Ia186ea48b1012e65dc6446c839fdb548d44b6a6c
2018-11-27 18:34:29 +01:00
Vadim Yanitskiy 2e331aed4e OsmoSIPConnector: fix: avoid OsmoMGW/OsmoSIPcon confusion
Change-Id: If20700d94775e91f174a1a07e00820ef0a91cd2f
2018-11-27 18:34:29 +01:00
Daniel Willmann a3a28acaa1 Add manual for OsmoSIPConnector
Ticket: OS#1684
Change-Id: I70d3014deb459e0b91a9a92c60710b994153538e
2018-11-27 18:34:29 +01:00
Daniel Willmann b79fde2dc1 Add VTY reference for osmo-sip-connector
Ticket: OS#1684
Change-Id: I1045c20dd7234d425836ba93fa292a35ccddc7fd
2018-11-27 18:34:29 +01:00
Neels Hofmeyr ceb4cfdfb2 Importing history from osmo-gsm-manuals.git
Change-Id: I4ed6bb3991c16fd041a73d263f43efcd0071f875
2018-11-27 18:34:18 +01:00
Keith Whyte 8c0f6d2f75 Allow GSM340_PLAN_UNKNOWN on MNCC originated leg.
Allows dialing of numbers with GSM340_PLAN_UNKNOWN,
for example a number beginning with '*'

Change-Id: I8d71cac5b169e3b19675b9b9626e6993f3acd979
2018-11-12 17:07:06 +01:00
Neels Hofmeyr 5ff4c53fad configure.ac: add --enable-sanitize
Add --enable-sanitize to ./configure, as a copy-paste from libosmocore.

When building libosmocore with --enable-sanitize, osmo-sip-connector cannot be
linked if it doesn't include asan as well.

This is particularly annoying to me when using sanitize.opts in osmo-dev. I'd
have to turn off *all* asan everywhere just to include the osmo-sip-connector
dep that was recently added.

Change-Id: I18761802db2f29d9f0c7f269197d5b5e191142c5
2018-11-05 05:15:19 +01:00
Oliver Smith d9c059e92a Add --version cmdline option
Related: OS#3577
Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365
2018-10-16 17:02:55 +02:00
Oliver Smith f0c2b31df9 vty: make 'show calls summary' more userfriendly
Display a table with one row per call (instead of two lines per call),
and display the phone numbers of the people making the calls instead of
internal IDs. This should make the VTY command friendlier for end users,
especially if they have bigger networks. There is still the 'show calls'
command with all the verbose output.

Example output:

OsmoSIPcon> show calls summary
No active calls.

OsmoSIPcon> show calls summary
ID    From                             To                               State
----- -------------------------------- -------------------------------- ----------
 5001 101                              100                              PROCEEDING

OsmoSIPcon> show calls summary
ID    From                             To                               State
----- -------------------------------- -------------------------------- ----------
 5001 101                              100                              CONNECTED

Relates: OS#1680
Change-Id: I2092d58d80a34e6083f618593b92bb9e838aa906
2018-10-08 12:42:57 +00:00
Daniel Willmann baa5d7bdad Fix mncc socket name
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
2018-10-05 13:49:31 +02:00
Oliver Smith d4eb8babd0 cosmetic: call.h: spaces -> tabs for consistency
Change-Id: I1ae638af50fa3741e84e421687270d2177e1be2d
2018-10-04 11:35:45 +02:00
Keith Whyte d195c09228 Logging: Further use of osmo_mncc_name() in logging
Use osmo_mncc_name() in timer functions and in logging
the type of MNCC message sent to the socket.

Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
2018-10-02 13:24:53 +01:00
Oliver Smith 8a695c42a8 Fix typo in -h: s/hekp/help
Change-Id: I5336212845acc221d50d0aa306cccc13723b9868
2018-09-21 12:50:42 +02:00
Pau Espin e3fb258284 Install sample cfg file to /etc/osmocom
Change-Id: I48ddd65125f25ac9f2d03bd43e7ab0a0bcf18196
2018-09-12 20:29:17 +02:00
Pau Espin b47fc45642 Install systemd services with autotools
Change-Id: I672f49f1034554ce62347ff9493eca18340deb3a
2018-09-10 16:09:56 +02:00
Pau Espin 3233e0d9df debian: Use osmo-sip-connector.service from contrib
Use a symlink to avoid duplicating content.
Remove nonsense Wants= line on itself.

Change-Id: I556a91e012692c4073b4b832bccce0c850f684f8
2018-09-06 15:18:08 +02:00