Commit Graph

6 Commits

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
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
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
Holger Hans Peter Freyther 2a7cfb5c93 sip/sdp: Hack to get a GSM codec call connected
Extract IP and port once we have received the INVITE. In the near
future we need to improve this!
2016-03-31 16:28:21 +02:00
Holger Hans Peter Freyther 80880d45b7 sip: Refactor sdp file creation and implement alert+connect
The codec negotiation is still a huge todo and the initial version
will be far from perfect. We will use whatever MNCC has decided on
and then see if it is compatible in the end.
2016-03-26 22:11:06 +01:00
Holger Hans Peter Freyther 392313ff73 sdp: Extract SDP traversing into a separate module
The code will still know about SIP and the sip_call_leg but is
now separate of the call handling logic.
2016-03-26 20:02:06 +01:00