aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-12-10mgcp: Test and implement re-transmission handlingHolger Hans Peter Freyther5-167/+230
MGCP is used over UDP and a response might be lost. The MGCP RFC asks for keeping a list of responses and then using the previous response to answer a duplicate request. I tried to conserve memory and just wanted to remember the last transaction identifier and result-code and re-generate the result from that. This made the code look bad and this is why the entire response will now be stored. It sadly increases the memory usage but can not be avoided at this time. Remove the msg->l3h pointer for the RQNT callback as strtok has modified the content of it.
2012-12-10mgcp: Change the flow of the code when handling a MGCP responseHolger Hans Peter Freyther1-11/+14
Attempt to detect a response and return only then. Remove one level of tabls in preparation for the re-transmission handling.
2012-12-10mgcp: Methods generating a response now include the endpoint pointerHolger Hans Peter Freyther2-38/+35
This is required for remembering the last result in a central place and is required to properly implement detection of re-transmissions.
2012-12-10mgcp: Add testdata for MDCX handlingHolger Hans Peter Freyther2-0/+21
2012-12-10mgcp: Test the second CRCX as a CRCX and not as a re-transmissionHolger Hans Peter Freyther2-2/+14
The second CRCX would be mostly ignored and be handled by the retransmission layer of MGCP.
2012-12-10mgcp: Fix a typo.. it is msg and not mgsHolger Hans Peter Freyther1-1/+1
2012-12-10mgcp: We do not need to check for talloc_freeHolger Hans Peter Freyther1-8/+4
Simplify the code and remove null check for the two strings.
2012-12-10bsc: Fix compiler warning and return from the method with a value.Holger Hans Peter Freyther1-2/+3
2012-12-03bsc: Send the USSD message after the location updating accept.Holger Hans Peter Freyther4-11/+25
Make sure to accept the phone first before sending the USSD message.
2012-12-03msc: Add debug messages when not sending a USSD welcome messageHolger Hans Peter Freyther1-1/+8
2012-12-03bsc: Fix a brown paper bug and most likely fix the USSD welcome issueHolger Hans Peter Freyther1-1/+1
2012-12-03bsc: Call the variable with a more appropriate name.Holger Hans Peter Freyther1-4/+4
2012-12-01Merge branch 'zecke/jolly-sms'Holger Hans Peter Freyther2-268/+197
MT-SMS: Manual test with VTY to phone. Also multiple SMS deliveries on the same lchan. Manual test with phone to phone. MO-SMS: Manual test with phone to phone but only a single SMS at a time, not testing the special 'CP-ACK' case. Forced CP timeout using the fakebts SMSTest, not causing a crash.
2012-12-01sms: Kill the linkid as we are using SAPI=3 all the timeHolger Hans Peter Freyther2-7/+3
For GSM (not GPRS) we will never use a SAPI!=3. Simplify the code and remove the link_id=0.
2012-12-01sms: Replaced the SMR process by new implementation in libosmocoreAndreas Eversberg2-87/+100
Rebased, tested and fixed by Holger Freyther. Release the transaction only once the SMC is asking for the release and set the cb's to NULL to catch a use after free early.
2012-12-01sms: Replaced the SMC process by new implementation in libosmocoreAndreas Eversberg2-171/+113
This has been rebased and fixed by Holger Freyther. The change of the debug area was split out in a previous commit and the is_mt was put back into the transaction code. The transaction is now freed from the RELEASE_REQ sent by the SMC layer and not inside the error path. When clearing the SMC instance we also clear the callbacks.
2012-12-01sms: Remove the susbcr_put_lchan logic from the SMS codeHolger Hans Peter Freyther1-22/+0
This should and does happen as part of the trans_free/msc_release_connection code. There is no easy way to determine that the lchan is now 'free' for other things.. Let the transaction code sort this out. This code just needs to make sure that transactions are always freed.
2012-12-01nitb: Release the channel if there is nothing on itHolger Hans Peter Freyther3-5/+21
This is more a work around and one still needs to implement a proper dispatch on the opening of the connection. If there is no operation left, no transaction and no silent call, close down the channel.
2012-12-01Merge branch 'zecke/mgcp-dtmf'Holger Hans Peter Freyther4-13/+111
2012-11-29mgcp: Begin handling of the RQNT message as needed for DTMFHolger Hans Peter Freyther4-13/+111
Introduce a callback for the request and forward the signalrequest to the callback. This is not a full implementation of MGCP RQNT.
2012-11-24use DLSMS and not DSMS in SMPP related code (merge with master)Harald Welte1-8/+8
2012-11-24tests: Fix build of 'db' test after smpp mergeHarald Welte1-2/+2
2012-11-24SMPP: fix handling of UDH / multi-part for 7-bit messagesHarald Welte1-14/+47
... I would have never believed it is such a broken mindfuck.
2012-11-24SMPP: add small utility program 'smpp_mirror'Harald Welte6-24/+357
This program binds as ESME transceiver to a SMSC and simply mirrors back all SMS that it receives.
2012-11-24SMPP: Implement support for MO SMSHarald Welte6-124/+585
Each ESME can have a number of prefix-matching routes, or it can be a 'default route' to whcih all otherwise unknown SMS destinations are routed.
2012-11-24SMPP: VTY configuration of SMPP code, authentication supportHarald Welte8-15/+505
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther7-74/+61
2012-11-21sms: Use the definitions from the libosmogsmHolger Hans Peter Freyther1-227/+5
Use the code that is shipped inside the libosmogsm library. Right now the signature (besides the static) and the implementation is the same. This makes using the libosmogsm SMC code more easy in the near future. For the gsm340_gen_oa we are now using a small wrapper to generate the proper type and numbering plan.
2012-11-16Merge branch 'laforge/smpp'Harald Welte11-4/+1063
2012-11-16SMPP: build the smpp interface only in case of ./configure --enable-smppHarald Welte4-4/+19
2012-11-16SMPP: fix subscriber reference leak.Harald Welte1-1/+1
subscr_get_by_* is already increasing the refcount, we shouldn't do that a second time (thanks, Holger).
2012-11-16SMPP: More logging in error cases, fix UDH in 7bit ASCIIHarald Welte1-1/+17
2012-11-16SMPP: More consistent logging / error reportingHarald Welte1-25/+53
2012-11-16SMPP: Implement ALERT NOTIFICATION on attach/detach of subscribersHarald Welte3-2/+78
2012-11-16SMPP: Deal with DCS according to 03.38 and respect TP-PIDHarald Welte1-12/+11
2012-11-16SMPP: Introduce wrapper macro to memset all structures to zeroHarald Welte1-8/+14
For some reason, libsmpp34 is too smart to zero out the entire structure to which it is unpacking. This introduces an ugly wrapper macro to work around. This needs discussion with the libsmpp34 maintainer.
2012-11-16SMPP: Introduce ESME reference coountingHarald Welte4-18/+64
In case a ESME disappears after SUBMIT-SM but before the MT-SMS is delivered (transaction mode), we have to make sure the esme structure still exists.
2012-11-16SMPP: Implement transaction mode for SUBMIT-SMHarald Welte4-1/+95
WARNING: if the ESME disconnects, osmo_esme gets freed, and sms->smpp.esme might point to invalid/unallocated memory!
2012-11-16Initial support of SMPP interface for MT-SMSHarald Welte9-2/+777
2012-11-16Makefile: just a slight re-order / breaking of a lineHarald Welte1-3/+7
2012-11-12mgcp: Print both receivd and expected address in the error statementHolger Hans Peter Freyther1-2/+4
The log statement is split into two because inet_ntoa works on an internal buffer and would print the last address twice.
2012-11-12nat: Move the ctrl handling code into a separate fileHolger Hans Peter Freyther4-281/+332
Move to the control command handling out of the main file into a dedicated module. There are still some calls embedded into the main code but it will be moved soon.
2012-11-12Merge branch 'zecke/mgcp-rtp-statistics'Holger Hans Peter Freyther8-28/+240
2012-11-12mgcp: Send the jitter statistics at the end of the callHolger Hans Peter Freyther4-4/+13
2012-11-12mgcp: Calculate the jitter with the formula/code from the appendixHolger Hans Peter Freyther3-1/+45
Use a usec timestamp for the local time. The seconds to usec will swap over to the lower bits but this appears to be correct. The CLOCK_MONOTONIC is used to fulfill the RFC 3550 requirement even if it is a bit slower than the gettimeofday. Make sure to initialize transit in a way that the first transit time will be 0. Otherwise the jitter will contain the difference of the localtime and the remote time.
2012-11-12mgcp: Calculate the packet loss as of Appendix A of RFC 3550Holger Hans Peter Freyther5-9/+101
Calculate the expected packages and packet loss as of RFC 3550. The values should be clamped but our packet loss counter is 32 bits and not 24 and we should clamp at other values but I am waiting for some issues first before dealing with that.
2012-11-12mgcp: Calculate the wrap around as of Appendix A in RFC 3550Holger Hans Peter Freyther2-1/+21
This is missing the probation and the dealing with a remote restart. For the remote restart we will simply write a log statement as this is unlikely to happen during a call or if it does happen the call will be taken down by the BSC anyway.
2012-11-12mgcp: Document a difference between RFC 3550 and this codeHolger Hans Peter Freyther1-0/+8
Explain why this code deals with only one source and that this is a limit of some equipment (e.g. the nanoBTS).
2012-11-12mgcp: Align the variable naming with Appendix A of RFC 3550Holger Hans Peter Freyther2-6/+8
Align the naming inside the mgcp_rtp_state with the naming inside the 'source' struct of the appendix. Make first_seq_no/base_seq a uint16_t. This is removing rules for alignments and reduces the struct from 40 bytes to 36.
2012-11-12mgcp: Include statistics at the end of a connectionHolger Hans Peter Freyther4-9/+46
Follow the MGCP specification and send the collected statistics at the end of a call. Right now this does not include jitter, packet loss and delay.