Commit Graph

220 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 153ebbf6e2 call: Change to past tense and move code after the free
Reading the "releasing" log output sounded like one more message
had been sent and this code is waiting for something. Take a copy
of the call id and then print that the call has been released.
2016-03-26 06:22:06 +01:00
Holger Hans Peter Freyther aa41b0aafc call: Re-order includes from local to osmocom to system
Let's follow the self first, local next, osmocom, system order of
include files.
2016-03-26 06:22:06 +01:00
Holger Hans Peter Freyther e08887ec4e app: Release the call by releasing the initial request
This will then go through the release procedure of the relevant
call instead of letting it timeout on the initial leg.
2016-03-26 06:11:09 +01:00
Holger Hans Peter Freyther 4f8cafa5b0 call: Continue up to the point of call routing
We accept the call on MNCC and ask the core to select/create the
second leg of the call.
2016-03-23 17:41:23 +01:00
Holger Hans Peter Freyther bc4fed27e1 mncc: Add a timeout when issuing a MNCC command 2016-03-23 17:08:03 +01:00
Holger Hans Peter Freyther a0aa566ec4 mncc: Remember the IMSI as well 2016-03-23 17:07:00 +01:00
Holger Hans Peter Freyther dbe55c1eb5 mncc: Add logging messages about the leg on all points
With a bit more code the logging will print:

<0001> mncc.c:233 Created call(5001) with MNCC leg(2147483659) IMSI(274018000000001)
<0001> mncc.c:178 RTP set-up continuing with call with leg(2147483659)
<0001> mncc.c:65 Got response, stopping timer on leg(2147483659)
<0002> call.c:51 call(5001) releasing.

Use %zu for size_t arguments, e.g. returned from sizeof.
2016-03-23 17:05:16 +01:00
Holger Hans Peter Freyther 239a122842 doc: Update with some requirements and limitations 2016-03-23 17:02:32 +01:00
Holger Hans Peter Freyther c4d01f9a90 call: Add a backpointer from leg to call and drop the argument
Simplify the structure by either working with a call or just
a leg of it. No need to carry both pointers all the time.
2016-03-22 21:04:56 +01:00
Holger Hans Peter Freyther 29b556490f mncc: Dispatch setup and issue rtp create in response then continue
The code is not tested and might be broken. Parse the setup request
of a MO call, create a new "call" with a MNCC leg and then issue the
call to create a RTP socket. Once this has been done, release the call
as the code to open a second leg has not been written yet.
2016-03-22 21:04:56 +01:00
Holger Hans Peter Freyther 90e7139691 mncc: Handle the hello message from NITB
Make a simple version comparison and close the socket in case of a
version mismatch. Begin to dispatch messages coming from the NITB
and log (all) unhandled messages.
2016-03-22 21:04:56 +01: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 80095748f9 mncc: Add the protocol description from OpenBSC 2016-03-21 15:46:53 +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