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
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
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
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
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
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
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
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
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
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
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
LCR supports emergency calling by sending the string 'emergency' as callee to
the SIP side.
This does the same
Change-Id: I5d0adb61dfa82e7ded5f41d9bc773d546112c9f1
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
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
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
Use osmo_mncc_name() in timer functions and in logging
the type of MNCC message sent to the socket.
Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
Use gsm48_cc_cause_name() in logging messages
Depends-On: I296f208581ce2550805f9d96e20f7319e1199023
Change-Id: I6e3541b66cb3407f0cb23fb6e00a04685fe90757
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
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
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
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
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
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
It's confusing to access the telnet interface and then see a prompt
that's not like the program name
Change-Id: Iba20c1c90e528d08bd362be39d86317569c253e6
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
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06
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
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
Besides sending the alerting request we should inform the
MS that there is in-band information now. We do not seem
to export these flags in protocol/gsm_04_08.h so hardcode
them for now (until I come up with good names for them).
Related: OS#1784
Change-Id: I80b1e1f4ca045bd63536476702a5812f27d9b36d
We are not using the RTP telephony-event here but the older dtmf
relay. We also only have a fixed DTMF duration for now.
Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
So far the remote_port has never been used. sofia-sip did the right
thing and put the port into the "Contact" and the rport option for
the via. But we would have never been able to connect a PBX on a
different port (as sofia-sip seems to parse the destination from the
to address).
Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c