245 Commits

Author SHA1 Message Date
Pau Espin Pedrol
6f5534bd5f Drop use of deprecated vty is_config_node() cb
This callback was drepecated and is not ever called since
libosmocore.git 70ce871532ab21955e0955d7e230eae65438f047 (release 1.3.0).

See also libosmocore.git d31de237582f6fe3315d61bb9a488d4cda92654e.

Change-Id: I3809f9c0529004ff117e9e79ee81d30dca6e9bc4
2025-03-04 18:23:06 +01:00
Oliver Smith
249c720af9 Bump version: 1.7.0.1-50c5 → 1.7.1
Change-Id: I9d9c4eb38bcce81a38d61d20b4a071917d048f8e
1.7.1
2025-02-12 14:42:41 +01:00
Harald Welte
50c5684561 sip.c: permit early media with both 183 and 180
So far we only attempted to extract SDP (and hence enable early media)
when receiving a status code 183.  However, SDP can also be provided
with 180, see for example https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Codecs-and-Media/Early-Media/vs-183-vs-Early-Media_7143480/

Change-Id: Ia0072080c2e0bfb8b2bf751a248d3410a7723e79
Closes: OS#6559
2024-10-07 19:03:42 +02:00
Oliver Smith
7a3532e0eb Bump version: 1.6.3.12-6725 → 1.7.0
Change-Id: Ia741d0a574828da121693fa73f54f517ad9d2be2
1.7.0
2024-07-25 10:35:54 +02:00
Vadim Yanitskiy
aafbfd3144 README.md: cosmetic: fix a typo
Change-Id: I372e864c322d47bb8a76283222e1c4abb78ff165
2024-06-05 18:34:07 +07:00
Oliver Smith
d639836123 debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.

Do not fail if the user deleted the config file.

Be verbose when changing permissions.

Related: OS#4107
Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
2024-05-14 15:21:06 +02:00
Oliver Smith
22091130e2 contrib: remove rpm spec file
Related: https://osmocom.org/news/255
Related: OS#6446
Change-Id: I9e7a3beb861faab1b6852aa5b57847c590986976
2024-05-08 14:41:10 +02:00
Oliver Smith
58f3e032d0 .deb/.rpm: various fixes related to non-root
* Explicitly chown /var/lib/osmocom to osmocom:osmocom, instead of
  relying on systemd to do it when the service starts up. This does not
  work with the systemd versions in debian 10 and almalinux 8.
* deb: Use "useradd" instead of the interactive "adduser" perl script
  from Debian. This makes it consistent with how we do it in rpm, and
  avoids the dependency on "adduser".
* deb: Consistently use tabs through the file, instead of mixing tabs
  and spaces.
* deb: Remove support for the "dpkg-statoverride --list" logic. This
  seems to be a rather obscure feature to override permissions for
  certain files or directories, for which it does not seem to be a good
  idea to make the postinst script less maintainable. Something similar
  can be achieved by using your own Osmocom config file in a different
  path with different permissions.

Related: OS#4107
Change-Id: Ib129217f6aff713d1d0e7aa831b4b54823e9bade
2024-04-26 16:23:08 +02:00
Max
e3dd323579 .deb/.rpm: add osmocom user during package install
Create osmocom user & group during package installation.
Fix the configuration dir/files permission to match.

Related: OS#4107
Tweaked-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: I7826fedb1b055a282954e5774615245092ddae5d
2024-04-24 11:52:59 +02:00
Vadim Yanitskiy
6122400451 build: include README.md into the release tarball
Change-Id: I4e1f0fd213fcc9e3b7e4a34f3380504696b2e08b
2024-01-26 23:38:07 +07:00
Neels Hofmeyr
a8a5bcf2ed verbosely log MNCC and SDP
Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
2024-01-25 02:55:58 +01:00
Andreas Eversberg
ef0b0fd368 Use uniform log format for default config files
Related: OS#6272
Change-Id: I1b1ebca276184158d585815a62da3b91fa9c3081
2023-12-01 12:52:17 +01:00
Neels Hofmeyr
d50637eec6 forward SDP between SIP and MNCC
We have added support for sending SDP via MNCC a long time ago, but so
far the SDP section remained empty. Now, implement actually forwarding
SDP codec information between SIP and MNCC.

The aim is to let the MSC know about all codec choices the remote SIP
call leg has to offer, so that finding a codec match between local and
remote call leg becomes possible.

Store any SDP info contained in incoming SIP and MNCC messages, and send
the stored SDP to the other call leg in all outgoing SIP and MNCC
messages.

In sdp_create_file(), we used to compose fixed SDP -- instead, take the
other call leg's SDP as-is, only make sure to modify the mode (e.g.
"a=sendrecv") to reflect the current call hold state.

The RTP address and codec info in the MNCC structures is now essentially
a redundant / possibly less accurate copy of the SDP info, but leave all
of that as-is, for backwards compat.

There is codec checking that may reject unexpected codecs. The
overall/future aim is to leave all codec checking up to the MSC, but so
far just leave current behaviour unchanged, until we notice problems.

Related: SYS#5066
Related: osmo-ttcn3-hacks Ib2ae8449e673f5027f01d428d3718c006f76d93e
Change-Id: I3df5d06f38ee2d122706a9ebffde7db4f2bd6bae
2023-09-15 04:21:06 +02:00
Neels Hofmeyr
e148da87ed sdp_get_sdp_mode(): fix wrong return value
Change-Id: Id27eb82a018293cf54d068877dc222e1c7eab253
2023-09-13 22:49:07 +02:00
Neels Hofmeyr
da2c2207b2 drop misleading error message
call_sip_create() returns NULL only when memory allocation failed. Do
not log "No supported codec", just assert that a call was allocated,
like we usually do in such cases.

Related: SYS#5066
Change-Id: Id7fd16b92bbd10e886892d0c425cf1bc5d5429cf
2023-09-13 22:49:07 +02:00
Pau Espin Pedrol
a6fedff8a6 Bump version: 1.6.2.6-47e6-dirty → 1.6.3
Change-Id: I5263fa4d1c2edcd12a5521b5cc03753482ff76cc
1.6.3
2023-09-12 17:24:27 +02:00
Oliver Smith
47e6130cae debian: set compat level to 10
Related: OS#5958
Change-Id: Ib45ad7c44cdefa4c5acab2da09f24796253a133d
2023-04-25 16:48:33 +02:00
Vadim Yanitskiy
a0a5f7de75 tests: $(BUILT_SOURCES) is not defined, depend on osmo-sip-connector
Change-Id: I3aeaace814a209dade5323f30a5a91e4a9d73595
2023-03-30 02:13:00 +07:00
Oliver Smith
89180de32e sip: tweak log for release caused by status >= 300
Make it easier to spot when the sip server answers an invite with
anything that would cause osmo-sip-connector to release the call.

Related: SYS#6386
Change-Id: I64889d6ce174dc17d44d85aac12e7ee6e6b06164
2023-03-23 13:03:15 +01:00
Harald Welte
95312c53c2 doc: Expand the virtually empty user manual with some basics
Change-Id: Id42904a183b045eefac15a94139221a3bc65ecdd
2023-03-21 20:00:04 +01:00
Harald Welte
a935cbec7c doc: fix typo
Change-Id: Ie001645e9b44cb5e16090813ca4f053118ac39a4
2023-03-21 19:58:22 +01:00
arehbein
c65f13af46 Transition to use of 'telnet_init_default'
Related: OS#5809
Change-Id: Icc57c68337d55c6594c1c36e9bf41624d11dab0a
2023-02-25 17:48:58 +01:00
Pau Espin Pedrol
ec505be5ee Bump version: 1.6.1.2-44b4-dirty → 1.6.2
Change-Id: Id050891c8465cbb3bb81c9907de509009b7131ff
1.6.2
2023-02-07 17:47:29 +01:00
Keith Whyte
44b4a05032 Set MNCC_F_GCR field when the gcr is present
Commit bd66804082 established that the
MNCC field flag MNCC_F_GCR should be set when the GCR is present,
but did not set it.

Change-Id: Idad3210055a0d25be6220301b965e3d4c7323692
2022-10-03 02:36:54 +01:00
Max
8120b11eaa Set working directory in systemd service file
By default systemd will execute service with root directory
(or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it
to 'osmocom' subdir of state directory
(/var/lib for system instance) instead.

Related: OS#4821
Change-Id: Idad82186d6ef7f00487cf162306b0733886fc129
2022-09-09 22:49:04 +07:00
Pau Espin Pedrol
3f4625586f Bump version: 1.6.0.4-c0af → 1.6.1
Change-Id: I5e247667968d80be72bfe890c2afb3a25c7c105c
1.6.1
2022-06-28 18:29:49 +02:00
Oliver Smith
c0af8f90f9 contrib/testpbx: fix docker run --rm linter error
Fixes: SYS#5583
Change-Id: Ie3a9caa6d1e682e0080b3acc4a68d5ad3895629f
2022-06-20 12:26:22 +02:00
Harald Welte
2267178db3 Convert + Expand README file
README.md in-line with that of other osmocom CNI projects:
* markdown syntax
* link to manuals, issue tracker, gerrit contributions, etc.

Change-Id: Ieadbbe4d2963e713d569460d053460f4f99d40eb
2022-06-18 13:41:01 +02:00
Harald Welte
bf3b705a2b update git URLs (git -> https; gitea)
Change-Id: Ic45226b2de537fe4d45324fbe346bd7ed6db92fd
2022-06-18 13:36:59 +02:00
Pau Espin Pedrol
b3d5007a53 Add TODO-RELEASE
Change-Id: I32acbec597ff8bb79b3576f9d13ab051d5c5b938
2022-01-03 12:26:58 +01:00
Pau Espin Pedrol
03bc63a1da Bump version: 1.5.0.8-bd66 → 1.6.0
Change-Id: I72fa9fdc5c6f1c5cfc6e4cb0b7d0e8ea4557b1ab
1.6.0
2021-11-16 14:52:09 +01:00
Vadim Yanitskiy
bd66804082 mncc: rework passing GCR over the MNCC interface
Using *unpacked* 'struct osmo_gcr_parsed' in the MNCC PDUs makes
the protocol even more complicated than it currently is, and
moreover complicates implementing MNCCv8 in the ttcn3-sip-test.

Replace 'struct osmo_gcr_parsed' in 'struct gsm_mncc' with a
fixed-length buffer, which is supposed to hold the Global Call
Reference encoded as per 3GPP TS 29.205.

Check / indicate presence of GCR using the MNCC_F_GCR flag.

Change-Id: Iaff46732948f8f5d03e42f17c35cbac8a80af49b
Fixes: Id40d7e0fed9356f801b3627c118150055e7232b1
Related: OS#5164, OS#5282
2021-10-27 17:03:42 +03:00
Vadim Yanitskiy
f3eb44f54b sip: use osmo_{enc,dec}_gcr() from libosmocore
Change-Id: I46fa46fc79494d337f2f4657215b91c39207eea4
Depends: I06babb959fdc82f4e82d92260131d60c98b0abd2
Fixes: Id40d7e0fed9356f801b3627c118150055e7232b1
Related: OS#5164
2021-10-27 16:46:00 +03:00
Vadim Yanitskiy
5e178d2c55 sip: fix memory leak (x_gcr) in send_invite()
Change-Id: I6a2e5e15061010f6e62d0f3b0acd2c040dbe3249
Fixes: Id40d7e0fed9356f801b3627c118150055e7232b1
Related: OS#5164
2021-10-27 16:26:57 +03:00
Keith
364f237b42 MNCC v8: Implement Basic Support for Global Call Reference.
* Add GCR to mncc struct and therefore bump mncc version.
* Pass the GCR as a SIP Header to SIP UA and retrieve any such header
  from incoming SIP calls, passing the GCR on to MNCC

Related: #OS5164
Depends: osmo-msc I705c860e51637b4537cad65a330ecbaaca96dd5b
Change-Id: Id40d7e0fed9356f801b3627c118150055e7232b1
2021-10-05 20:30:16 +00:00
Oliver Smith
1c76aadeed debian/control: remove dh-systemd build-depend
Related: OS#5223
Change-Id: I769bf61a2f3a97d55c65999436d2cb079c9170a0
2021-09-01 16:07:07 +02:00
Neels Hofmeyr
e7d05f40ba SIP re-INVITE: log media connection
Change-Id: I2d11be9fe65aa76e044a91f88ba0e9a1d8e756ec
2021-06-01 04:17:49 +02:00
Neels Hofmeyr
0294e38243 SIP re-INVITE: fix media connection change detection
Use the correct variable in address comparison.
The type cast hid the incompatible type from the compiler.

Change-Id: I701150f22f0eb49fae821996358568d60a385035
2021-06-01 04:16:19 +02:00
Neels Hofmeyr
97c7916892 fix use-after-free in SIP re-INVITE
Copy the m_mode before freeing the parser.
Address sanitizer aborted with:

20210601033017695 DSIP INFO re-INVITE for call 854A5CDA8037073 (sip.c:192)
=================================================================
==8583==ERROR: AddressSanitizer: heap-use-after-free on address 0x612000003250 at pc 0x55c3b4624dc5 bp 0x7ffe8a4464d0 sp 0x7ffe8a4464c8
READ of size 8 at 0x612000003250 thread T0
    #0 0x55c3b4624dc4 in sdp_get_sdp_mode ../../../src/osmo-sip-connector/src/sdp.c:72
    #1 0x55c3b462be9e in sip_handle_reinvite ../../../src/osmo-sip-connector/src/sip.c:202
    #2 0x55c3b462d676 in nua_callback ../../../src/osmo-sip-connector/src/sip.c:397
[...]

Change-Id: I4c48832f01e61e98536de8f164ab5a3caa64f34a
2021-06-01 03:35:53 +02:00
Pau Espin Pedrol
d9e57e5f08 Bump version: 1.4.1.15-9484-dirty → 1.5.0
Change-Id: I2cafda295513b019cda424f09655061fa7a0fa10
1.5.0
2021-02-23 13:42:08 +01:00
Pau Espin Pedrol
9484ad9a87 mncc: Fix write len
Fixes bug introduced recently.

Closes: OS#4957
Fixes: 0f27b1bd39
Change-Id: Ibbff004e2b76fbfe8962d14628c916afb19f30e6
2021-02-02 16:32:55 +00:00
Pau Espin Pedrol
d2a85888aa .gitignore: Get rid of new autofoo tmp files
Change-Id: I5e0735c2e99e868f8cbfffc19ac005df7c289dd8
2021-02-02 16:42:12 +01:00
Pau Espin Pedrol
462ec86ff3 mncc: Log write error code
Change-Id: If7b49bee6fec3a188c978c0606c524776a577927
2021-02-02 16:41:44 +01:00
Oliver Smith
ad353b885e configure.ac: set -std=gnu11
Change-Id: Ic95981af622dd713638bec775514dc4ef25594d4
2021-01-28 09:29:00 +00:00
Alexander Couzens
1bd26902d2 mncc: mncc_create_remote_leg: use mncc_write instead of write direct to the fd
Change-Id: I870c16d7ee5e5424304f3c1c9fb78af418ae2577
2021-01-14 21:27:55 +01:00
Alexander Couzens
0f27b1bd39 mncc: Introduce mncc_rtp_write similiar to mncc_write
Concentrate the write() to the socket in 2 places.
One for struct gsm_mncc and one for struct gsm_mncc_rtp.
Improve debugging as now all function debug print the
MNCC primitiv.

Change-Id: Ia84602955b913a3bb13de7a6a92048799f2e1955
2021-01-14 21:27:50 +01:00
Alexander Couzens
ef646b07e2 mncc: add return code for write/send function
Allow to get errors back for the caller to clean up state.

Change-Id: Ic926d192c238ef84fb3ad2be27e507e010b0e93f
2021-01-14 03:41:34 +01:00
Alexander Couzens
3b95463d09 mncc: remove callref argument from mncc_write()
The callref is always included in the struct mncc argument.

Change-Id: Ia156010194c1f4334a4966d01aadfd02fa7097a8
2021-01-14 03:41:34 +01:00
Oliver Smith
e590dc15f4 contrib/jenkins: don't build osmo-gsm-manuals
Related: OS#4912
Change-Id: Iae17e6d6f4242f98676dd3a1b01c419ac7288047
2021-01-13 12:59:45 +01:00
Pau Espin Pedrol
05eea1ef0a contrib/jenkins: Enable parallel make in make distcheck
Change-Id: I17e1adac40ac01daee0dd83da0a6aaebd78ea0dc
Related: OS#4421
2020-10-12 19:46:19 +02:00