Commit Graph

233 Commits (master)

Author SHA1 Message Date
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

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 a6fedff8a6 Bump version: → 1.6.3
Change-Id: I5263fa4d1c2edcd12a5521b5cc03753482ff76cc
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
Alexander Rehbein c65f13af46 Transition to use of 'telnet_init_default'
Related: OS#5809
Change-Id: Icc57c68337d55c6594c1c36e9bf41624d11dab0a
2023-02-25 17:48:58 +01:00
Pau Espin ec505be5ee Bump version: → 1.6.2
Change-Id: Id050891c8465cbb3bb81c9907de509009b7131ff
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 3f4625586f Bump version: → 1.6.1
Change-Id: I5e247667968d80be72bfe890c2afb3a25c7c105c
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 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 b3d5007a53 Add TODO-RELEASE
Change-Id: I32acbec597ff8bb79b3576f9d13ab051d5c5b938
2022-01-03 12:26:58 +01:00
Pau Espin 03bc63a1da Bump version: → 1.6.0
Change-Id: I72fa9fdc5c6f1c5cfc6e4cb0b7d0e8ea4557b1ab
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 Whyte 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.5.0
Change-Id: I2cafda295513b019cda424f09655061fa7a0fa10
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 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 05eea1ef0a contrib/jenkins: Enable parallel make in make distcheck
Change-Id: I17e1adac40ac01daee0dd83da0a6aaebd78ea0dc
Related: OS#4421
2020-10-12 19:46:19 +02:00
Pau Espin cebab664a8 sdp: Don't select addresses failing to parse
Change-Id: Ibfc308bdfab77d0032d8f20c2f0df913e336b75b
2020-09-18 00:32:01 +02:00
Pau Espin b6cb607d12 mncc: Support IPv6 addresses (new version mncc 7)
Change-Id: I3b1bebbcc9e36be43d8d055c8d28cbb38ff21b37
2020-09-10 17:08:19 +02:00
Alexander Couzens f678caa819 Revert "sip: Specify invite contact tag"
This reverts commit 52b2afce2c.
The contact header is generated by the original sofia-sip library.
By adding the contact header explicit as user header it violates the
SIP RFC because sofia will add the Contact header to the BYE message as

Let's fix the bugs in the freeswitch sofia-sip and make it compatible
(not bug compatible) with the original sofia-sip.

Change-Id: I712f17fecbc372d1e486e80673a548e281b37800
2020-09-05 23:13:55 +02:00
Matt Johnson 52b2afce2c sip: Specify invite contact tag
Version 1.12.12 of libsofia-sip-ua no longer automatically generates a
contact header element from the local ip address and port. Specifying
the contact tag does not break operation with the existing
library (1.12.11), but allows for operation on a system with
freeswitch 1.10.4 or later installed, which is built against this new
version of libsofia-sip-ua.

Change-Id: I5c35c5a4bad2fbe76c22ac6d7ee37c832e0ba246
2020-08-13 19:31:58 +00:00
Vadim Yanitskiy 39a2e19309 debian/control: change maintainer to the Osmocom team / mailing list
Change-Id: Id7a258c52e72101920a1c0de5534a2ed9f488203
2020-08-13 14:59:51 +00:00
Harald Welte 79d76480ac Bump version: → 1.4.1
Change-Id: I66c64cae47e32a16ef605348d02884172ef04d70
2020-08-13 12:38:17 +02:00
Oliver Smith e02b4dc84c EXTRA_DIST: debian, contrib/*
Change-Id: Ifee945e89b8b3d1a9ef9cf57e36cad306c244657
2020-05-22 13:46:54 +02:00
Oliver Smith d02c8f72b1 contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build
with CentOS 8 etc.

Related: OS#4550
Change-Id: I387b41b6c524cd3f6baad7e89b4b6b347d9998ac
2020-05-19 15:49:42 +02:00
Oliver Smith afb705309f contrib: import RPM spec
Copy the RPM spec file from:

Related: OS#4550
Change-Id: I00f13acd541ec492e4671cf88c92010f5cf61e9e
2020-05-14 11:53:26 +02:00
Pau Espin e58ead7ac4 Bump version: 1.3.1 → 1.4.0
Change-Id: Ia6693372994791bac4ab86808729f5e568dd9176
2020-01-02 21:35:01 +01:00
Neels Hofmeyr 037c6c1ba8 logging from sofia: add missing newline
Sometimes, logging from sofia lacks the final newline character, messing up log
output. First snprintf() to a buffer, add '\n' if necessary and then log.

Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5
2019-12-17 13:52:21 +00:00
Oliver Smith 18cf9f39c5 switch to python 3
Make build and external tests work with python3, so we can drop
the python2 dependency.

This should be merged shortly after osmo-python-tests was migrated to
python3, and the jenkins build slaves were (automatically) updated to
have the new osmo-python-tests installed.

Related: OS#2819
Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7
Change-Id: Ic913e336a5a962fe9515479b03eecdbef0917721
2019-12-11 09:43:11 +01:00