Commit Graph

192 Commits

Author SHA1 Message Date
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
Keith Whyte cddf0d175e Log using GSM48 Cause Value strings
Use gsm48_cc_cause_name() in logging messages

Depends-On: I296f208581ce2550805f9d96e20f7319e1199023
Change-Id: I6e3541b66cb3407f0cb23fb6e00a04685fe90757
2018-09-04 12:02:18 +02:00
Keith Whyte 5b1621bf53 Cosmetic: correct spelling error in logging
Change-Id: I1f323a738f2c8ff21984b574a0ff47fe175e9161
2018-09-04 12:01:22 +02:00
Keith Whyte 741c51bb61 Logging: Add debug logging for status/causes
Adds some DEBUG level logging for SIP status and MNCC causes.

Change-Id: Ib56e34ba079c7927e932c1b29d3e8341b8099ae0
2018-09-04 12:01:22 +02:00
Pau Espin 5a7a957536 jenkins.sh: Use --enable-werror option
Change-Id: I8cfad742e6ce766b022ecdf4c78495accc9405d0
2018-09-03 13:19:41 +02:00
Pau Espin c2a71184f8 configure.ac: Introduce --enable-werror option
Change-Id: I1666df1721ba9acc950612558e07a1a2e7b2bb85
2018-09-03 13:18:32 +02:00
Pau Espin 87b19a06d7 mncc: Fix missing conditional clause
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
2018-09-03 11:30:42 +02:00
Keith Whyte 008915ee41 Implement Cause Mapping
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
2018-08-31 19:11:45 +02:00
Keith Whyte 503d8fdb64 Add SIP <-> MNCC Cause Map
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
2018-08-31 16:22:17 +02:00
Keith Whyte 6fc496eba3 Use htonl, not ntohl before inet_ntoa()
Change-Id: I805864759c287ad4e1d74e5f6ee16bf2d6a1b01f
2018-08-28 07:22:30 -04:00
Keith Whyte 0cfe4763a4 Logging: Log RTP IP in dotted quad format.
in check_rtp_create() log the IP address in
human readable dotted quad format.

Change-Id: I298b13836cc6b9c5888f931deca61132d31da035
2018-08-28 07:18:26 -04:00
Harald Welte ff4675516e debian/rules: Don't overwrite .tarball-version
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
2018-08-06 11:19:22 +02:00
Keith Whyte 6d398fea1d Add Cause to DISCONNECT and RELEASE Requests
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
2018-05-28 15:20:26 +00:00
Keith Whyte 911d4d5e15 Logging: Log mncc_names in mncc_data()
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
2018-05-24 16:56:41 +02:00
Pau Espin 55faf38675 Bump version: 1.1.0.11-11a0-dirty → 1.1.1
Change-Id: Iefb8ada270a7a34d5db1c1e3c94f72a02e2dd609
2018-05-06 17:45:55 +02:00
Harald Welte 11a0de04b6 use osmo_init_logging2() to avoid allocating from NULL context
This requires libosmocore I216837780e9405fdaec8059c63d10699c695b360 or
later to work.

Change-Id: Id704689c9ad35a0db97aedae014e8b36eb1f86e2
2018-04-15 22:15:25 +02:00
Harald Welte 6369f30c4d sip: Register log callback function with sofia-sip
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
2018-04-15 22:12:42 +02:00
Harald Welte 65fa803f0c osmoappdesc: Fix VTY prompt to use OsmoSIPcon, not old OsmoMNCC
In Change-Id Iba20c1c90e528d08bd362be39d86317569c253e6 we changed the
prompt, but didn't update osmoappdesc.py

Change-Id: I7c7868bda2195e5e67b2db5824caee8fbfb5a3b6
2018-03-27 15:51:02 +02:00
Harald Welte a6a34fd718 Call the program "OsmoSIPcon" (also in vty)
It's confusing to access the telnet interface and then see a prompt
that's not like the program name

Change-Id: Iba20c1c90e528d08bd362be39d86317569c253e6
2018-03-23 19:35:59 +01:00
Harald Welte fd203f6a97 mncc: use 'const' to denote read-only input buffer/message
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
2018-03-19 10:03:26 +01:00
Harald Welte 05cd0f2628 comments
Change-Id: Icf0e9211a4e93eb1b05b5a5d68f9ba766982da8d
2018-03-19 10:00:01 +01:00
Pau Espin cdc5e591bb contrib: jenkins.sh: Disable doxygen in libosmocore build
Change-Id: I7befa0cb4e72a6ad086e3c2d290546dbf22f1676
2018-02-20 20:23:10 +01:00
Pau Espin df62bb330e contrib: Add systemd service file
Change-Id: I36dd16b75beb4d9bd8081aca6e44c5b72e58fead
2018-02-16 17:04:30 +01:00
Harald Welte b18bbf3fd8 debian/control: Fix URLs for homepage / git
Change-Id: Ib431d5dcaf78cc31dbfaa4fd13105ec62142e9be
2018-02-09 11:17:29 +01:00
Harald Welte 4954fee4c6 mncc.c: Ensure proper string buffer NUL termination
Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb
Fixes: Coverity CID#92223
2017-11-07 20:55:12 +00:00
Neels Hofmeyr dd9909db1d vty: skip installing cmds now always installed by default
vty_install_default() and install_default() will soon be deprecated.

Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06
2017-11-01 00:52:58 +01:00
Harald Welte 8706a688ff Tag/Release Version 1.1.0
Change-Id: Id3876b2d940b5612788760dfeabe308f43d42ae2
2017-10-28 18:20:02 +02:00
Harald Welte 5094bf1eab configure.ac: Depend on latest upstream libosmo-*
Change-Id: I9bb7ced1197effb1082a57b2ed060d94ab9648c8
2017-10-28 18:20:01 +02:00
Harald Welte 94ae40aae6 Fix git-version-gen
It seems we didn't import a proper/clean git-version-gen into the
repository.  Let's fix this.

Change-Id: I5132d10b3ed5a75e562cdd74db02eda68d828a08
2017-10-28 18:20:00 +02:00
Neels Hofmeyr 4abdb313e3 jenkins: use osmo-clean-workspace.sh before and after build
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale.

Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
Change-Id: I7e9f19755f55b274def9d757f72f2a08a01a4cce
2017-10-27 22:54:50 +02:00
Neels Hofmeyr 535df15bc5 vty: install default commands for SIP,MNCC,APP_NODE
Change-Id: Iee51881cc07d56209647fb4f505f8f6be6b885f0
2017-09-19 03:30:03 +02:00
Keith Whyte b603272787 sdp.c Send octet-align in fmtp
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
2017-09-03 18:30:53 +00:00
Max 148df95d42 Fix build after recent libosmocore update
Change-Id: Idd1eba7ed0c5454de29d86a8bb72beb24d03ef2a
2017-09-01 10:19:18 +02:00
Max 9d1ac29a48 Use release helper from libosmocore
Change-Id: I1a65695d6191aa7647b9872e58da4a00bbad59e2
Related: OS#1861
2017-08-26 05:56:55 +00:00
Max 6cb76c7ee5 Add git review config
Change-Id: I60f6b29998954b0698e523efaa766f8bb895cdf7
2017-08-25 18:38:05 +02:00
Holger Hans Peter Freyther 417f254216 mncc/sip: Attempt to parse the media from session in progress
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
2017-03-23 09:01:45 +00:00