Commit Graph

18 Commits

Author SHA1 Message Date
Alexander Couzens 632156a4a8 exit if the sip agent failed to start
When the sip agent start fails (i.e. port can not bind
because IP doesn't exist) exit the sip-connector

Relates: OS#4197
Change-Id: I22ed16c77391b4f270df498dda587ed657279390
2019-11-23 08:07:01 +00:00
Pau Espin d0a8fa9062 Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds
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
2019-08-05 17:50:01 +00:00
Rafael Diniz 38ab0528b6 Added daemonize feature to osmo-sip-connector
Change-Id: I400fb5a2619f348cc60e8c9016154afa60424e66
2019-04-18 20:29:59 -03:00
Oliver Smith d9c059e92a Add --version cmdline option
Related: OS#3577
Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365
2018-10-16 17:02:55 +02:00
Oliver Smith 8a695c42a8 Fix typo in -h: s/hekp/help
Change-Id: I5336212845acc221d50d0aa306cccc13723b9868
2018-09-21 12:50:42 +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 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
Neels Hofmeyr c403ed69cd log VTY telnet bind only once
After libosmocore 55dc2edc89c1a85187ef8aafc09f7d922383231f which outputs
'telnet at <ip> <port>' from telnet_init_dynif(), there's no need to log the
telnet VTY bind here anymore.

Change-Id: I7db7f7a2e61ba676c2712bcc149a5fd5a69b80b2
2016-09-26 22:56:27 +02:00
Holger Hans Peter Freyther 550264987f sip: Start the application even if sofia-sip is broken
In case of solely managing the application through the VTY we
want/need to have the application running besides a wrong config
has been entered. SIP will be broken but a user will be able to
see the log message and can fix it.
2016-05-07 11:52:24 +02:00
Holger Hans Peter Freyther 45f0fa09d2 call/app: Hook the MNCC disconnect event in the app and release calls
In case the MNCC server is crashing we need to release all calls,
use the event emitted by the MNCC connection and iterate over all
calls and call the release function.
2016-03-22 16:32:48 +01:00
Holger Hans Peter Freyther 10e22bd6f4 call: Introduce a structure for representing a call
Right now a call has two legs, the initial one and the remote. In
general this will allow a SIP to SIP, SIP to MNCC and MNCC to MNCC
structure in the future.
2016-03-22 16:32:48 +01:00
Holger Hans Peter Freyther 90881b6a5a sip: Introduce source file to setup sofia sip
This code is capable of creating an agent that will bind on the
configured local address. The next steps are to configure the
library in terms of allowed features and prepare call handling.
2016-03-22 16:32:48 +01:00
Holger Hans Peter Freyther 9d12a7c34c mncc: Add code to manage the mncc connection for CC
Connect, re-connect and read messages from the MNCC socket. Dispatch
the event in case the system got disconnected.

Move the app definition to app.h and use it everywhere. Begin with a
new call for mncc.
2016-03-21 17:00:02 +01:00
Holger Hans Peter Freyther 11713d88e4 vty: Work on configuration of the MNCC to SIP gateway
We will add addressing by IMSI but right now let's focus on the
minimum of what needs to be there.
2016-03-21 15:39:41 +01:00
Holger Hans Peter Freyther 5b0d4618df telnet: Use the dynamic interface for binding the VTY
This way one can bind the interface to another ip address.
2016-03-21 11:48:02 +01:00
Holger Hans Peter Freyther c1879e47ba logging: Define default logging categories 2016-03-21 11:47:25 +01:00
Holger Hans Peter Freyther a1909e6c80 Initial commit for a MNCC to SIP gateway (and maybe auth GW too)
* It is written in C and using libosmovty and other data structures
* It is using sofia-sip for the SIP handling as a good library for
such a task
* It is using glib for the sofia-sip event loop integration. In the
future we can write our own root context but right now that looks
like a necessary evil. No glib usage is allowed in this code and
only sofia-glib is linked.
2016-03-21 09:54:37 +01:00