Permalink
Browse files

sync of openbts

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6168 19bc5d8c-e614-43d4-8b26-e1612bc8e597
  • Loading branch information...
1 parent 903c3e4 commit ad37cb3b19f2db57a0439e96e4ec6738a5b5e514 kurtis.heimerl committed Aug 14, 2013
Showing with 19,283 additions and 1,673 deletions.
  1. +2 −0 AUTHORS
  2. +0 −4 AsteriskConfig/README.AsteriskConf
  3. +0 −148 AsteriskConfig/cdr.conf
  4. +0 −57 AsteriskConfig/extensions.conf
  5. +0 −733 AsteriskConfig/indications.conf
  6. +0 −69 AsteriskConfig/logger.conf
  7. +0 −36 AsteriskConfig/modules.conf
  8. +0 −91 AsteriskConfig/sip.conf
  9. +638 −124 CLI/CLI.cpp
  10. +13 −17 CLI/CLI.h
  11. +8 −2 COPYING
  12. +150 −35 Control/CallControl.cpp
  13. +13 −16 Control/CallControl.h
  14. +56 −29 Control/ControlCommon.cpp
  15. +17 −17 Control/ControlCommon.h
  16. +36 −27 Control/DCCHDispatch.cpp
  17. +3 −0 Control/Makefile.am
  18. +195 −55 Control/MobilityManagement.cpp
  19. +4 −14 Control/MobilityManagement.h
  20. +12 −3 Control/RRLPServer.cpp
  21. +23 −0 Control/RRLP_PDU_Test.cpp
  22. +344 −40 Control/RadioResource.cpp
  23. +27 −17 Control/RadioResource.h
  24. +199 −0 Control/SMSCB.cpp
  25. +16 −18 Control/SMSControl.cpp
  26. +9 −15 Control/SMSControl.h
  27. +119 −18 Control/TMSITable.cpp
  28. +23 −15 Control/TMSITable.h
  29. +369 −53 Control/TransactionTable.cpp
  30. +139 −20 Control/TransactionTable.h
  31. +370 −0 GPRS/BSSG.cpp
  32. +116 −0 GPRS/BSSG.h
  33. +618 −0 GPRS/BSSGMessages.cpp
  34. +523 −0 GPRS/BSSGMessages.h
  35. +669 −0 GPRS/ByteVector.cpp
  36. +382 −0 GPRS/ByteVector.h
  37. +59 −0 GPRS/CS4.txt
  38. +918 −0 GPRS/FEC.cpp
  39. +284 −0 GPRS/FEC.h
  40. +696 −0 GPRS/GPRSCLI.cpp
  41. +103 −0 GPRS/GPRSExport.h
  42. +129 −0 GPRS/GPRSInternal.h
  43. +161 −0 GPRS/GPRSRLC.h
  44. +69 −0 GPRS/GPRSTDMA.h
  45. +2,570 −0 GPRS/MAC.cpp
  46. +522 −0 GPRS/MAC.h
  47. +1,127 −0 GPRS/MSInfo.cpp
  48. +601 −0 GPRS/MSInfo.h
  49. +63 −0 GPRS/Makefile.am
  50. +108 −0 GPRS/MsgBase.cpp
  51. +216 −0 GPRS/MsgBase.h
  52. +83 −0 GPRS/RLC.cpp
  53. +1,330 −0 GPRS/RLCEngine.cpp
  54. +260 −0 GPRS/RLCEngine.h
  55. +481 −0 GPRS/RLCHdr.h
  56. +197 −0 GPRS/RLCMessages.cpp
  57. +1,547 −0 GPRS/RLCMessages.h
  58. +214 −0 GPRS/RList.h
  59. +136 −0 GPRS/ScalarTypes.h
  60. +1,445 −0 GPRS/TBF.cpp
  61. +522 −0 GPRS/TBF.h
  62. +138 −0 GPRS/makefile.pat
  63. +60 −0 GPRS/makefile.tests
  64. +151 −0 GPRS/notes.txt
Sorry, we could not display the entire diff because it was too big.
View
2 AUTHORS
@@ -190,3 +190,5 @@ Alon Levy, alonlevy1@gmail.com
RRLPMessages.h
RRLPTest.cpp
+Pat Thompson
+ GPRS/*
View
0 AsteriskConfig/Makefile.am
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
4 AsteriskConfig/README.AsteriskConf
@@ -1,4 +0,0 @@
-This file contains example Asterisk configuration files for the OpenBTS Asterisk server.
-
-This file does not contain REAL configuration files, since those would include real IMSIs.
-
View
148 AsteriskConfig/cdr.conf
@@ -1,148 +0,0 @@
-;
-; Asterisk Call Detail Record engine configuration
-;
-; CDR is Call Detail Record, which provides logging services via a variety of
-; pluggable backend modules. Detailed call information can be recorded to
-; databases, files, etc. Useful for billing, fraud prevention, compliance with
-; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more.
-;
-
-[general]
-
-; Define whether or not to use CDR logging. Setting this to "no" will override
-; any loading of backend CDR modules. Default is "yes".
-;enable=yes
-
-; Define whether or not to log unanswered calls. Setting this to "yes" will
-; report every attempt to ring a phone in dialing attempts, when it was not
-; answered. For example, if you try to dial 3 extensions, and this option is "yes",
-; you will get 3 CDR's, one for each phone that was rung. Default is "no". Some
-; find this information horribly useless. Others find it very valuable. Note, in "yes"
-; mode, you will see one CDR, with one of the call targets on one side, and the originating
-; channel on the other, and then one CDR for each channel attempted. This may seem
-; redundant, but cannot be helped.
-;unanswered = no
-
-; Define the CDR batch mode, where instead of posting the CDR at the end of
-; every call, the data will be stored in a buffer to help alleviate load on the
-; asterisk server. Default is "no".
-;
-; WARNING WARNING WARNING
-; Use of batch mode may result in data loss after unsafe asterisk termination
-; ie. software crash, power failure, kill -9, etc.
-; WARNING WARNING WARNING
-;
-;batch=no
-
-; Define the maximum number of CDRs to accumulate in the buffer before posting
-; them to the backend engines. 'batch' must be set to 'yes'. Default is 100.
-;size=100
-
-; Define the maximum time to accumulate CDRs in the buffer before posting them
-; to the backend engines. If this time limit is reached, then it will post the
-; records, regardless of the value defined for 'size'. 'batch' must be set to
-; 'yes'. Note that time is in seconds. Default is 300 (5 minutes).
-;time=300
-
-; The CDR engine uses the internal asterisk scheduler to determine when to post
-; records. Posting can either occur inside the scheduler thread, or a new
-; thread can be spawned for the submission of every batch. For small batches,
-; it might be acceptable to just use the scheduler thread, so set this to "yes".
-; For large batches, say anything over size=10, a new thread is recommended, so
-; set this to "no". Default is "no".
-;scheduleronly=no
-
-; When shutting down asterisk, you can block until the CDRs are submitted. If
-; you don't, then data will likely be lost. You can always check the size of
-; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on
-; submission of CDR data during asterisk shutdown, set this to "yes". Default
-; is "yes".
-;safeshutdown=yes
-
-; Normally, CDR's are not closed out until after all extensions are finished
-; executing. By enabling this option, the CDR will be ended before executing
-; the "h" extension so that CDR values such as "end" and "billsec" may be
-; retrieved inside of of this extension.
-;endbeforehexten=no
-
-;
-;
-; CHOOSING A CDR "BACKEND" (what kind of output to generate)
-;
-; To choose a backend, you have to make sure either the right category is
-; defined in this file, or that the appropriate config file exists, and has the
-; proper definitions in it. If there are any problems, usually, the entry will
-; silently ignored, and you get no output.
-;
-; Also, please note that you can generate CDR records in as many formats as you
-; wish. If you configure 5 different CDR formats, then each event will be logged
-; in 5 different places! In the example config files, all formats are commented
-; out except for the cdr-csv format.
-;
-; Here are all the possible back ends:
-;
-; csv, custom, manager, odbc, pgsql, radius, sqlite, tds
-; (also, mysql is available via the asterisk-addons, due to licensing
-; requirements)
-; (please note, also, that other backends can be created, by creating
-; a new backend module in the source cdr/ directory!)
-;
-; Some of the modules required to provide these backends will not build or install
-; unless some dependency requirements are met. Examples of this are pgsql, odbc,
-; etc. If you are not getting output as you would expect, the first thing to do
-; is to run the command "make menuselect", and check what modules are available,
-; by looking in the "2. Call Detail Recording" option in the main menu. If your
-; backend is marked with XXX, you know that the "configure" command could not find
-; the required libraries for that option.
-;
-; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv
-; file, define the [csv] category in this file. No database necessary. The example
-; config files are set up to provide this kind of output by default.
-;
-; To get custom csv CDR records, make sure the cdr_custom.conf file
-; is present, and contains the proper [mappings] section. The advantage to
-; using this backend, is that you can define which fields to output, and in
-; what order. By default, the example configs are set up to mimic the cdr-csv
-; output. If you don't make any changes to the mappings, you are basically generating
-; the same thing as cdr-csv, but expending more CPU cycles to do so!
-;
-; To get manager events generated, make sure the cdr_manager.conf file exists,
-; and the [general] section is defined, with the single variable 'enabled = yes'.
-;
-; For odbc, make sure all the proper libs are installed, that "make menuselect"
-; shows that the modules are available, and the cdr_odbc.conf file exists, and
-; has a [global] section with the proper variables defined.
-;
-; For pgsql, make sure all the proper libs are installed, that "make menuselect"
-; shows that the modules are available, and the cdr_pgsql.conf file exists, and
-; has a [global] section with the proper variables defined.
-;
-; For logging to radius databases, make sure all the proper libs are installed, that
-; "make menuselect" shows that the modules are available, and the [radius]
-; category is defined in this file, and in that section, make sure the 'radiuscfg'
-; variable is properly pointing to an existing radiusclient.conf file.
-;
-; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory,
-; which is usually /var/log/asterisk. Of course, the proper libraries should be available
-; during the 'configure' operation.
-;
-; For tds logging, make sure the proper libraries are available during the 'configure'
-; phase, and that cdr_tds.conf exists and is properly set up with a [global] category.
-;
-; Also, remember, that if you wish to log CDR info to a database, you will have to define
-; a specific table in that databse to make things work! See the doc directory for more details
-; on how to create this table in each database.
-;
-
-[csv]
-usegmtime=yes ; log date/time in GMT. Default is "no"
-loguniqueid=yes ; log uniqueid. Default is "no
-loguserfield=yes ; log user field. Default is "no
-
-;[radius]
-;usegmtime=yes ; log date/time in GMT
-;loguniqueid=yes ; log uniqueid
-;loguserfield=yes ; log user field
-; Set this to the location of the radiusclient-ng configuration file
-; The default is /etc/radiusclient-ng/radiusclient.conf
-;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf
View
57 AsteriskConfig/extensions.conf
@@ -1,57 +0,0 @@
-[globals]
-
-
-[default]
-; This is the context for handsets that are allowed to attached via open registration.
-; Normally, this context is only used for testing.
-
-; These are test extensions that you might want to disable after installation.
-
-; Create an extension, 2600, for evaluating echo latency.
-exten => 2600,1,Answer() ; Do the echo test
-exten => 2600,n,Echo ; Do the echo test
-exten => 2600,n,Hangup
-
-; The 2101 extension is used for factory testing with zoiper.
-exten => 2101,1,Dial(SIP/zoiper)
-
-; The 2100 extension is for factory testing with the test SIM.
-exten => 2100,1,Dial(SIP/IMSI001010000000000)
-
-
-
-[outbound-trunk]
-; If you had an external trunk, you would dial it here.
-exten => _N.,1,Answer()
-
-
-
-
-
-[phones]
-; This is the context for handsets provisioned through the realtime database.
-; This assumes that OpenBTS units all are running their SIP interfaces on port 5062.
-exten => _N.,1,Set(Name=${ODBC_SQL(select dial from dialdata_table where exten = \"${EXTEN}\")})
-exten => _N.,n,GotoIf($["${Name}" = ""] ?outbound-trunk,${EXTEN},1)
-exten => _N.,n,Set(IPAddr=${ODBC_SQL(select ipaddr from sip_buddies where name = \"${Name}\")})
-exten => _N.,n,GotoIf($["${IPAddr}" = ""] ?outbound-trunk,${EXTEN},1)
-exten => _N.,n,Dial(SIP/${Name}@${IPAddr}:5062)
-
-
-
-[sip-local]
-; This context is the union of all of the in-network contexts.
-include => default
-include => phones
-
-
-
-
-[sip-external]
-; This is the top-level context that gives access to out-of-network calling.
-; also includes the in-network calling.
-include => sip-local
-include => outbound-trunk
-
-
-
View
733 AsteriskConfig/indications.conf
@@ -1,733 +0,0 @@
-; indications.conf
-; Configuration file for location specific tone indications
-; used by the pbx_indications module.
-;
-; NOTE:
-; When adding countries to this file, please keep them in alphabetical
-; order according to the 2-character country codes!
-;
-; The [general] category is for certain global variables.
-; All other categories are interpreted as location specific indications
-;
-;
-[general]
-country=us ; default location
-
-
-; [example]
-; description = string
-; The full name of your country, in English.
-; alias = iso[,iso]*
-; List of other countries 2-letter iso codes, which have the same
-; tone indications.
-; ringcadence = num[,num]*
-; List of durations the physical bell rings.
-; dial = tonelist
-; Set of tones to be played when one picks up the hook.
-; busy = tonelist
-; Set of tones played when the receiving end is busy.
-; congestion = tonelist
-; Set of tones played when there is some congestion (on the network?)
-; callwaiting = tonelist
-; Set of tones played when there is a call waiting in the background.
-; dialrecall = tonelist
-; Not well defined; many phone systems play a recall dial tone after hook
-; flash.
-; record = tonelist
-; Set of tones played when call recording is in progress.
-; info = tonelist
-; Set of tones played with special information messages (e.g., "number is
-; out of service")
-; 'name' = tonelist
-; Every other variable will be available as a shortcut for the "PlayList" command
-; but will not be used automatically by Asterisk.
-;
-;
-; The tonelist itself is defined by a comma-separated sequence of elements.
-; Each element consist of a frequency (f) with an optional duration (in ms)
-; attached to it (f/duration). The frequency component may be a mixture of two
-; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2).
-; The implicit modulation depth is fixed at 90%, though.
-; If the list element starts with a !, that element is NOT repeated,
-; therefore, only if all elements start with !, the tonelist is time-limited,
-; all others will repeat indefinitely.
-;
-; concisely:
-; element = [!]freq[+|*freq2][/duration]
-; tonelist = element[,element]*
-;
-; Please note that SPACES ARE NOT ALLOWED in tone lists!
-;
-
-[at]
-description = Austria
-ringcadence = 1000,5000
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-dial = 420
-busy = 420/400,0/400
-ring = 420/1000,0/5000
-congestion = 420/200,0/200
-callwaiting = 420/40,0/1960
-dialrecall = 420
-; RECORDTONE - not specified
-record = 1400/80,0/14920
-info = 950/330,1450/330,1850/330,0/1000
-stutter = 380+420
-
-[au]
-description = Australia
-; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf
-; Normal Ring
-ringcadence = 400,200,400,2000
-; Distinctive Ring 1 - Forwarded Calls
-; 400,400,200,200,400,1400
-; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall
-; 400,400,200,2000
-; Distinctive Ring 3 - Multiple Subscriber Number 1
-; 200,200,400,2200
-; Distinctive Ring 4 - Selective Ring 1 + Centrex
-; 400,2600
-; Distinctive Ring 5 - Selective Ring 3
-; 400,400,200,400,200,1400
-; Distinctive Ring 6 - Multiple Subscriber Number 2
-; 200,400,200,200,400,1600
-; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy
-; 200,400,200,400,200,1600
-; Tones
-dial = 413+438
-busy = 425/375,0/375
-ring = 413+438/400,0/200,413+438/400,0/2000
-; XXX Congestion: Should reduce by 10 db every other cadence XXX
-congestion = 425/375,0/375,420/375,0/375
-callwaiting = 425/200,0/200,425/200,0/4400
-dialrecall = 413+438
-; Record tone used for Call Intrusion/Recording or Conference
-record = !425/1000,!0/15000,425/360,0/15000
-info = 425/2500,0/500
-; Other Australian Tones
-; The STD "pips" indicate the call is not an untimed local call
-std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100
-; Facility confirmation tone (eg. Call Forward Activated)
-facility = 425
-; Message Waiting "stutter" dialtone
-stutter = 413+438/100,0/40
-; Ringtone for calls to Telstra mobiles
-ringmobile = 400+450/400,0/200,400+450/400,0/2000
-
-[bg]
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-description = Bulgaria
-ringdance = 1000,4000
-;
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/250,0/250
-callwaiting = 425/150,0/150,425/150,0/4000
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-record = 1400/425,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-stutter = 425/1500,0/100
-
-[br]
-description = Brazil
-ringcadence = 1000,4000
-dial = 425
-busy = 425/250,0/250
-ring = 425/1000,0/4000
-congestion = 425/250,0/250,425/750,0/250
-callwaiting = 425/50,0/1000
-; Dialrecall not used in Brazil standard (using UK standard)
-dialrecall = 350+440
-; Record tone is not used in Brazil, use busy tone
-record = 425/250,0/250
-; Info not used in Brazil standard (using UK standard)
-info = 950/330,1400/330,1800/330
-stutter = 350+440
-
-[be]
-description = Belgium
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,3000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/3000
-congestion = 425/167,0/167
-callwaiting = 1400/175,0/175,1400/175,0/3500
-; DIALRECALL - not specified
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440"
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-info = 900/330,1400/330,1800/330,0/1000
-stutter = 425/1000,0/250
-
-[ch]
-description = Switzerland
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/200,0/200,425/200,0/4000
-; DIALRECALL - not specified
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-; RECORDTONE - not specified
-record = 1400/80,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-stutter = 425+340/1100,0/1100
-
-[cl]
-description = Chile
-; According to specs from Telefonica CTC Chile
-ringcadence = 1000,3000
-dial = 400
-busy = 400/500,0/500
-ring = 400/1000,0/3000
-congestion = 400/200,0/200
-callwaiting = 400/250,0/8750
-dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
-record = 1400/500,0/15000
-info = 950/333,1400/333,1800/333,0/1000
-stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
-
-[cn]
-description = China
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 450
-busy = 450/350,0/350
-ring = 450/1000,0/4000
-congestion = 450/700,0/700
-callwaiting = 450/400,0/4000
-dialrecall = 450
-record = 950/400,0/10000
-info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400
-; STUTTER - not specified
-stutter = 450+425
-
-[cz]
-description = Czech Republic
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425/330,0/330,425/660,0/660
-busy = 425/330,0/330
-ring = 425/1000,0/4000
-congestion = 425/165,0/165
-callwaiting = 425/330,0/9000
-; DIALRECALL - not specified
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660
-; RECORDTONE - not specified
-record = 1400/500,0/14000
-info = 950/330,0/30,1400/330,0/30,1800/330,0/1000
-; STUTTER - not specified
-stutter = 425/450,0/50
-
-[de]
-description = Germany
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425
-busy = 425/480,0/480
-ring = 425/1000,0/4000
-congestion = 425/240,0/240
-callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0
-; DIALRECALL - not specified
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-; RECORDTONE - not specified
-record = 1400/80,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-stutter = 425+400
-
-[dk]
-description = Denmark
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0
-; DIALRECALL - not specified
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-; RECORDTONE - not specified
-record = 1400/80,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-; STUTTER - not specified
-stutter = 425/450,0/50
-
-[ee]
-description = Estonia
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425
-busy = 425/300,0/300
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-; CALLWAIT not in accordance to ITU
-callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600
-; DIALRECALL - not specified
-dialrecall = 425/650,0/25
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-; INFO not in accordance to ITU
-info = 950/650,0/325,950/325,0/30,1400/1300,0/2600
-; STUTTER not specified
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-
-[es]
-description = Spain
-ringcadence = 1500,3000
-dial = 425
-busy = 425/200,0/200
-ring = 425/1500,0/3000
-congestion = 425/200,0/200,425/200,0/200,425/200,0/600
-callwaiting = 425/175,0/175,425/175,0/3500
-dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425
-record = 1400/500,0/15000
-info = 950/330,0/1000
-dialout = 500
-
-
-[fi]
-description = Finland
-ringcadence = 1000,4000
-dial = 425
-busy = 425/300,0/300
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/150,0/150,425/150,0/8000
-dialrecall = 425/650,0/25
-record = 1400/500,0/15000
-info = 950/650,0/325,950/325,0/30,1400/1300,0/2600
-stutter = 425/650,0/25
-
-[fr]
-description = France
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1500,3500
-; Dialtone can also be 440+330
-dial = 440
-busy = 440/500,0/500
-ring = 440/1500,0/3500
-; CONGESTION - not specified
-congestion = 440/250,0/250
-callwait = 440/300,0/10000
-; DIALRECALL - not specified
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330
-stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440
-
-[gr]
-description = Greece
-ringcadence = 1000,4000
-dial = 425/200,0/300,425/700,0/800
-busy = 425/300,0/300
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/150,0/150,425/150,0/8000
-dialrecall = 425/650,0/25
-record = 1400/400,0/15000
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
-stutter = 425/650,0/25
-
-[hu]
-description = Hungary
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1250,3750
-dial = 425
-busy = 425/300,0/300
-ring = 425/1250,0/3750
-congestion = 425/300,0/300
-callwaiting = 425/40,0/1960
-dialrecall = 425+450
-; RECORDTONE - not specified
-record = 1400/400,0/15000
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
-stutter = 350+375+400
-
-[il]
-description = Israel
-ringcadence = 1000,3000
-dial = 414
-busy = 414/500,0/500
-ring = 414/1000,0/3000
-congestion = 414/250,0/250
-callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000
-dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414
-record = 1400/500,0/15000
-info = 1000/330,1400/330,1800/330,0/1000
-stutter = !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414
-
-
-[in]
-description = India
-ringcadence = 400,200,400,2000
-dial = 400*25
-busy = 400/750,0/750
-ring = 400*25/400,0/200,400*25/400,0/2000
-congestion = 400/250,0/250
-callwaiting = 400/200,0/100,400/200,0/7500
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,0/1000
-stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-
-[it]
-description = Italy
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-dial = 425/200,0/200,425/600,0/1000
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000
-dialrecall = 470/400,425/400
-record = 1400/400,0/15000
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
-stutter = 470/400,425/400
-
-[lt]
-description = Lithuania
-ringcadence = 1000,4000
-dial = 425
-busy = 425/350,0/350
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/150,0/150,425/150,0/4000
-; DIALRECALL - not specified
-dialrecall = 425/500,0/50
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
-; STUTTER - not specified
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-
-[jp]
-description = Japan
-ringcadence = 1000,2000
-dial = 400
-busy = 400/500,0/500
-ring = 400+15/1000,0/2000
-congestion = 400/500,0/500
-callwaiting = 400+16/500,0/8000
-dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,0
-stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
-
-[mx]
-description = Mexico
-ringcadence = 2000,4000
-dial = 425
-busy = 425/250,0/250
-ring = 425/1000,0/4000
-congestion = 425/250,0/250
-callwaiting = 425/200,0/600,425/200,0/10000
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-record = 1400/500,0/15000
-info = 950/330,0/30,1400/330,0/30,1800/330,0/1000
-stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-
-[my]
-description = Malaysia
-ringcadence = 2000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/400,0/200
-congestion = 425/500,0/500
-
-[nl]
-description = Netherlands
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-ringcadence = 1000,4000
-; Most of these 425's can also be 450's
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/250,0/250
-callwaiting = 425/500,0/9500
-; DIALRECALL - not specified
-dialrecall = 425/500,0/50
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-stutter = 425/500,0/50
-
-[no]
-description = Norway
-ringcadence = 1000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/200,0/200
-callwaiting = 425/200,0/600,425/200,0/10000
-dialrecall = 470/400,425/400
-record = 1400/400,0/15000
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
-stutter = 470/400,425/400
-
-[nz]
-description = New Zealand
-;NOTE - the ITU has different tonesets for NZ, but according to some residents there,
-; this is, indeed, the correct way to do it.
-ringcadence = 400,200,400,2000
-dial = 400
-busy = 400/250,0/250
-ring = 400+450/400,0/200,400+450/400,0/2000
-congestion = 400/375,0/375
-callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200
-dialrecall = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
-record = 1400/425,0/15000
-info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400
-stutter = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
-unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400
-
-[ph]
-
-; reference http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-
-description = Philippines
-ringcadence = 1000,4000
-dial = 425
-busy = 480+620/500,0/500
-ring = 425+480/1000,0/4000
-congestion = 480+620/250,0/250
-callwaiting = 440/300,0/10000
-; DIALRECALL - not specified
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-; INFO - not specified
-info = !950/330,!1400/330,!1800/330,0
-; STUTTER - not specified
-stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-
-
-[pl]
-description = Poland
-ringcadence = 1000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/500,0/500
-callwaiting = 425/150,0/150,425/150,0/4000
-; DIALRECALL - not specified
-dialrecall = 425/500,0/50
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-; 950/1400/1800 3x0.33 on 1.0 off repeated 3 times
-info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000
-; STUTTER - not specified
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-
-[pt]
-description = Portugal
-ringcadence = 1000,5000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/5000
-congestion = 425/200,0/200
-callwaiting = 440/300,0/10000
-dialrecall = 425/1000,0/200
-record = 1400/500,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-
-[ru]
-; References:
-; http://www.minsvyaz.ru/site.shtml?id=1806
-; http://www.aboutphone.info/lib/gost/45-223-2001.html
-description = Russian Federation / ex Soviet Union
-ringcadence = 1000,4000
-dial = 425
-busy = 425/350,0/350
-ring = 425/1000,0/4000
-congestion = 425/175,0/175
-callwaiting = 425/200,0/5000
-record = 1400/400,0/15000
-info = 950/330,1400/330,1800/330,0/1000
-dialrecall = 425/400,0/40
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-
-[se]
-description = Sweden
-ringcadence = 1000,5000
-dial = 425
-busy = 425/250,0/250
-ring = 425/1000,0/5000
-congestion = 425/250,0/750
-callwaiting = 425/200,0/500,425/200,0/9100
-dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-record = 1400/500,0/15000
-info = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0
-stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
-; stutter = 425/320,0/20 ; Real swedish standard, not used for now
-
-[sg]
-description = Singapore
-; Singapore
-; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf
-; Frequency specs are: 425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz
-ringcadence = 400,200,400,2000
-dial = 425
-ring = 425*24/400,0/200,425*24/400,0/2000 ; modulation should be 100%, not 90%
-busy = 425/750,0/750
-congestion = 425/250,0/250
-callwaiting = 425*24/300,0/200,425*24/300,0/3200
-stutter = !425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425
-info = 950/330,1400/330,1800/330,0/1000 ; not currently in use acc. to reference
-dialrecall = 425*24/500,0/500,425/500,0/2500 ; unspecified in IDA reference, use repeating Holding Tone A,B
-record = 1400/500,0/15000 ; unspecified in IDA reference, use 0.5s tone every 15s
-; additionally defined in reference
-nutone = 425/2500,0/500
-intrusion = 425/250,0/2000
-warning = 425/624,0/4376 ; end of period tone, warning
-acceptance = 425/125,0/125
-holdinga = !425*24/500,!0/500 ; followed by holdingb
-holdingb = !425/500,!0/2500
-
-[th]
-description = Thailand
-ringcadence = 1000,4000
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-dial = 400*50
-busy = 400/500,0/500
-ring = 420/1000,0/5000
-congestion = 400/300,0/300
-callwaiting = 1000/400,10000/400,1000/400
-; DIALRECALL - not specified - use special dial tone instead.
-dialrecall = 400*50/400,0/100,400*50/400,0/100
-; RECORDTONE - not specified
-record = 1400/500,0/15000
-; INFO - specified as an announcement - use special information tones instead
-info = 950/330,1400/330,1800/330
-; STUTTER - not specified
-stutter = !400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400
-
-[uk]
-description = United Kingdom
-ringcadence = 400,200,400,2000
-; These are the official tones taken from BT SIN350. The actual tones
-; used by BT include some volume differences so sound slightly different
-; from Asterisk-generated ones.
-dial = 350+440
-; Special dial is the intermittent dial tone heard when, for example,
-; you have a divert active on the line
-specialdial = 350+440/750,440/750
-; Busy is also called "Engaged"
-busy = 400/375,0/375
-; "Congestion" is the Beep-bip engaged tone
-congestion = 400/400,0/350,400/225,0/525
-; "Special Congestion" is not used by BT very often if at all
-specialcongestion = 400/200,1004/300
-unobtainable = 400
-ring = 400+450/400,0/200,400+450/400,0/2000
-callwaiting = 400/100,0/4000
-; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones
-specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
-; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it
-; is and I've not used a payphone for years)
-creditexpired = 400/125,0/125
-; These two are used to confirm/reject service requests on exchanges that
-; don't do voice announcements.
-confirm = 1400
-switching = 400/200,0/400,400/2000,0/400
-; This is the three rising tones Doo-dah-dee "Special Information Tone",
-; usually followed by the BT woman saying an appropriate message.
-info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
-; Not listed in SIN350
-record = 1400/500,0/60000
-stutter = 350+440/750,440/750
-
-[us]
-description = United States / North America
-ringcadence = 2000,4000
-dial = 350+440
-busy = 480+620/500,0/500
-ring = 440+480/2000,0/4000
-congestion = 480+620/250,0/250
-callwaiting = 440/300,0/10000
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,0
-stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-
-[us-old]
-description = United States Circa 1950/ North America
-ringcadence = 2000,4000
-dial = 600*120
-busy = 500*100/500,0/500
-ring = 420*40/2000,0/4000
-congestion = 500*100/250,0/250
-callwaiting = 440/300,0/10000
-dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,0
-stutter = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120
-
-[tw]
-description = Taiwan
-; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html
-; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html
-; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm
-; http://www.pbx-manufacturer.com/ky120dx.htm
-; http://www.nettwerked.net/tones.txt
-; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm
-;
-; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off
-; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off
-; ringing tone 440+480Hz 1 sec. on ,2 sec. off
-;
-ringcadence = 1000,4000
-dial = 350+440
-busy = 480+620/500,0/500
-ring = 440+480/1000,0/2000
-congestion = 480+620/250,0/250
-callwaiting = 350+440/250,0/250,350+440/250,0/3250
-dialrecall = 300/1500,0/500
-record = 1400/500,0/15000
-info = !950/330,!1400/330,!1800/330,0
-stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
-
-[ve]
-; Tone definition source for ve found on
-; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
-description = Venezuela / South America
-ringcadence = 1000,4000
-dial = 425
-busy = 425/500,0/500
-ring = 425/1000,0/4000
-congestion = 425/250,0/250
-callwaiting = 400+450/300,0/6000
-dialrecall = 425
-record = 1400/500,0/15000
-info = !950/330,!1440/330,!1800/330,0/1000
-
-
-[za]
-description = South Africa
-; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm
-; (definitions for other countries can also be found there)
-; Note, though, that South Africa uses two switch types in their network --
-; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere.
-; The former use 383+417 in dial, ringback etc. The latter use 400*33
-; I've provided both, uncomment the ones you prefer
-ringcadence = 400,200,400,2000
-; dial/ring/callwaiting for the Siemens switches:
-dial = 400*33
-ring = 400*33/400,0/200,400*33/400,0/2000
-callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250
-; dial/ring/callwaiting for the Alcatel switches:
-; dial = 383+417
-; ring = 383+417/400,0/200,383+417/400,0/2000
-; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250
-congestion = 400/250,0/250
-busy = 400/500,0/500
-dialrecall = 350+440
-; XXX Not sure about the RECORDTONE
-record = 1400/500,0/10000
-info = 950/330,1400/330,1800/330,0/330
-stutter = !400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33
View
69 AsteriskConfig/logger.conf
@@ -1,69 +0,0 @@
-;
-; Logging Configuration
-;
-; In this file, you configure logging to files or to
-; the syslog system.
-;
-; "logger reload" at the CLI will reload configuration
-; of the logging system.
-
-[general]
-; Customize the display of debug message time stamps
-; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS)
-; see strftime(3) Linux manual for format specifiers
-;dateformat=%F %T
-;
-; This appends the hostname to the name of the log files.
-;appendhostname = yes
-;
-; This determines whether or not we log queue events to a file
-; (defaults to yes).
-;queue_log = no
-;
-; This determines whether or not we log generic events to a file
-; (defaults to yes).
-;event_log = no
-;
-;
-; For each file, specify what to log.
-;
-; For console logging, you set options at start of
-; Asterisk with -v for verbose and -d for debug
-; See 'asterisk -h' for more information.
-;
-; Directory for log files is configures in asterisk.conf
-; option astlogdir
-;
-[logfiles]
-;
-; Format is "filename" and then "levels" of debugging to be included:
-; debug
-; notice
-; warning
-; error
-; verbose
-; dtmf
-;
-; Special filename "console" represents the system console
-;
-; We highly recommend that you DO NOT turn on debug mode if you are simply
-; running a production system. Debug mode turns on a LOT of extra messages,
-; most of which you are unlikely to understand without an understanding of
-; the underlying code. Do NOT report debug messages as code issues, unless
-; you have a specific issue that you are attempting to debug. They are
-; messages for just that -- debugging -- and do not rise to the level of
-; something that merit your attention as an Asterisk administrator. Debug
-; messages are also very verbose and can and do fill up logfiles quickly;
-; this is another reason not to have debug mode on a production system unless
-; you are in the process of debugging a specific issue.
-;
-;debug => debug
-console => notice,warning,error
-;console => notice,warning,error,debug
-;messages => notice,warning,error
-;full => notice,warning,error,debug,verbose
-
-;syslog keyword : This special keyword logs to syslog facility
-;
-;syslog.local0 => notice,warning,error
-;
View
36 AsteriskConfig/modules.conf
@@ -1,36 +0,0 @@
-;
-; Asterisk configuration file
-;
-; Module Loader configuration file
-;
-
-[modules]
-autoload=yes
-;
-; Any modules that need to be loaded before the Asterisk core has been
-; initialized (just after the logger has been initialized) can be loaded
-; using 'preload'. This will frequently be needed if you wish to map all
-; module configuration files into Realtime storage, since the Realtime
-; driver will need to be loaded before the modules using those configuration
-; files are initialized.
-;
-; An example of loading ODBC support would be:
-;preload => res_odbc.so
-;preload => res_config_odbc.so
-;
-; Uncomment the following if you wish to use the Speech Recognition API
-;preload => res_speech.so
-;
-; If you want, load the GTK console right away.
-;
-noload => pbx_gtkconsole.so
-;load => pbx_gtkconsole.so
-;
-noload => res_musiconhold.so
-;load => res_musiconhold.so
-;
-; Load either OSS or ALSA, not both
-; By default, load OSS only (automatically) and do not load ALSA
-;
-noload => chan_alsa.so
-;noload => chan_oss.so
View
91 AsteriskConfig/sip.conf
@@ -1,91 +0,0 @@
-[general]
-bindport=5060 ; asterisk 1.6
- ; UDP Port to bind to (SIP standard port for unencrypted UDP
- ; and TCP sessions is 5060)
- ; bindport is the local UDP port that Asterisk will listen on
-bindaddr=0.0.0.0 ; asterisk 1.6
- ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
- ; You can specify port here too, like 123.123.123.123:5080
-udpbindaddr=0.0.0.0 ; asterisk 1.8
- ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
- ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
-
-tos_sip=cs3 ; Sets TOS for SIP packets.
-tos_audio=ef ; Sets TOS for RTP audio packets.
-tos_video=af41 ; Sets TOS for RTP video packets.
-tos_text=af41 ; Sets TOS for RTP text packets.
-
-cos_sip=3 ; Sets 802.1p priority for SIP packets.
-cos_audio=5 ; Sets 802.1p priority for RTP audio packets.
-cos_video=4 ; Sets 802.1p priority for RTP video packets.
-cos_text=3 ; Sets 802.1p priority for RTP text packets.
-
-maxexpiry=3600 ; Maximum allowed time of incoming registrations
- ; and subscriptions (seconds)
-minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
-defaultexpiry=3600 ; Default length of incoming/outgoing registration
-dynamic_exclude_static=yes ; Disallow all dynamic hosts from registering
- ; as any IP address used for staticly defined
- ; hosts. This helps avoid the configuration
- ; error of allowing your users to register at
- ; the same address as a SIP provider.
-use_q850_reason=yes ; Set to yes add Reason header and use Reason header if it is available.
-
-;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
- ; Defaults to 100 ms
-;timert1=500 ; Default T1 timer
- ; Defaults to 500 ms or the measured round-trip
- ; time to a peer (qualify=yes).
-;timerb=32000 ; Call setup timer. If a provisional response is not received
- ; in this amount of time, the call will autocongest
- ; Defaults to 64*timert1
-rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
- ; on the audio channel
- ; when we're not on hold. This is to be able to hangup
- ; a call in the case of a phone disappearing from the net,
- ; like a powerloss or grandma tripping over a cable.
-rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
- ; on the audio channel
- ; when we're on hold (must be > rtptimeout)
-
-;allowguest=no ; Allow or reject guest calls (default is yes)
-autocreatepeer=yes ; The Autocreatepeer option allows,
- ; if set to Yes, any SIP ua to register with your Asterisk PBX as a peer.
- ; This peer's settings will be based on global options.
- ; The peer's name will be based on the user part of the Contact: header field's URL.
-
-context=phones ; Default context for incoming calls
-allowoverlap=no ; Disable overlap dialing support. (Default is yes)
-
-disallow=all ; need to disallow=all before we can use allow=
-allow=gsm ; GSM
-allow=ulaw ; ISDN US
-allow=alaw ; ISDN EU
-
-relaxdtmf=yes ; Relax dtmf handling
-dtmfmode=auto ; Set default dtmfmode for sending DTMF. Default: rfc2833
- ; Other options:
- ; info : SIP INFO messages (application/dtmf-relay)
- ; shortinfo : SIP INFO messages (application/dtmf)
- ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
- ; auto : Use rfc2833 if offered, inband otherwise
-
-
-; Zoiper is used as a fixture for factory testing.
-[zoiper]
-secret=3078923984
-callerid=2101
-canreinvite=no
-type=friend
-context=sip-local
-host=dynamic
-dtmfmode=auto
-
-; This is a test SIM provided with the BTS.
-[IMSI001010000000000]
-callerid=2100
-canreinvite=no
-type=friend
-context=sip-local
-host=dynamic
-
View
762 CLI/CLI.cpp
@@ -1,25 +1,18 @@
/*
* Copyright 2009, 2010 Free Software Foundation, Inc.
* Copyright 2010 Kestrel Signal Processing, Inc.
+* Copyright 2011, 2012 Range Networks, Inc.
*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
+* This software is distributed under multiple licenses;
+* see the COPYING file in the main directory for licensing
+* information for this specific distribuion.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
@@ -30,6 +23,8 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
+#include <time.h>
+#include <algorithm>
#include <config.h>
@@ -45,6 +40,14 @@
#include <TMSITable.h>
#include <RadioResource.h>
#include <CallControl.h>
+#include <NeighborTable.h>
+#include <Defines.h>
+#include <GPRSExport.h>
+#include <MAC.h>
+
+namespace SGSN {
+ extern int sgsnCLI(int argc, char **argv, std::ostream &os);
+};
#include <Globals.h>
@@ -79,13 +82,8 @@ static const char* standardResponses[] = {
int Parser::execute(char* line, ostream& os) const
{
- // escape to the shell?
- if (line[0]=='!') {
- os << endl;
- int retVal = system(line+1);
- os << endl << "External call returned " << retVal << endl;
- return SUCCESS;
- }
+ LOG(INFO) << "executing console command: " << line;
+
// tokenize
char *argv[mMaxArgs];
int argc = 0;
@@ -149,7 +147,14 @@ int uptime(int argc, char** argv, ostream& os)
{
if (argc!=1) return BAD_NUM_ARGS;
os.precision(2);
- os << "Unix time " << time(NULL) << endl;
+
+ time_t now = time(NULL);
+ const char* timestring = ctime(&now);
+ // no endl since ctime includes a "\n" in the string
+ os << "Unix time " << now << ", " << timestring;
+
+ os << "watchdog timer expires in " << (gWatchdogRemaining() / 60) << " minutes" << endl;
+
int seconds = gBTS.uptime();
if (seconds<120) {
os << "uptime " << seconds << " seconds, frame " << gBTS.time() << endl;
@@ -167,6 +172,7 @@ int uptime(int argc, char** argv, ostream& os)
}
float days = hours / 24.0F;
os << "uptime " << days << " days, frame " << gBTS.time() << endl;
+
return SUCCESS;
}
@@ -192,8 +198,6 @@ int showHelp(int argc, char** argv, ostream& os)
if (c%cols==0) os << endl;
}
if (c%cols!=0) os << endl;
- os << endl << "Lines starting with '!' are escaped to the shell." << endl;
- os << endl << "Use <cntrl-A>, <D> to detach from \"screen\", *not* <cntrl-C>." << endl << endl;
return SUCCESS;
}
@@ -248,9 +252,10 @@ int dumpTMSIs(const char* filename)
fileout.open(filename, ios::out); // erases existing!
// FIXME -- Check that the file really opened.
// Fake an argument list to call printTMSIs.
- char* subargv[] = {"tmsis", NULL};
+ const char* subargv[] = {"tmsis", NULL};
int subargc = 1;
- return tmsis(subargc, subargv, fileout);
+ // (pat) Cast makes gcc happy about const conversion.
+ return tmsis(subargc, const_cast<char**>(subargv), fileout);
}
@@ -286,12 +291,10 @@ int isIMSI(const char *imsi)
{
if (!imsi)
return 0;
-
- size_t imsiLen = strlen(imsi);
- if (imsiLen != 15)
+ if (strlen(imsi) != 15)
return 0;
- for (size_t i = 0; i < imsiLen; i++) {
+ for (unsigned i = 0; i < strlen(imsi); i++) {
if (!isdigit(imsi[i]))
return 0;
}
@@ -347,6 +350,7 @@ int sendsimple(int argc, char** argv, ostream& os)
return SUCCESS;
}
+
/** Submit an SMS for delivery to an IMSI. */
int sendsms(int argc, char** argv, ostream& os)
{
@@ -377,47 +381,29 @@ int sendsms(int argc, char** argv, ostream& os)
return SUCCESS;
}
-/** DEBUGGING: Sends a special sms that triggers a RRLP message to an IMSI. */
-int sendrrlp(int argc, char** argv, ostream& os)
-{
- if (argc!=3) return BAD_NUM_ARGS;
-
- char *IMSI = argv[1];
-
- UDPSocket sock(0,"127.0.0.1",gConfig.getNum("SIP.Local.Port"));
- unsigned port = sock.port();
- unsigned callID = random();
-
- // Just fake out a SIP message.
- const char form[] = "MESSAGE sip:IMSI%s@localhost SIP/2.0\nVia: SIP/2.0/TCP localhost;branch=z9hG4bK776sgdkse\nMax-Forwards: 2\nFrom: RRLP@localhost:%d;tag=49583\nTo: sip:IMSI%s@localhost\nCall-ID: %d@127.0.0.1:5063\nCSeq: 1 MESSAGE\nContent-Type: text/plain\nContent-Length: %lu\n\n%s\n";
-
- char txtBuf[161];
- snprintf(txtBuf,160,"RRLP%s",argv[2]);
- char outbuf[1500];
- snprintf(outbuf,1499,form,IMSI,port,IMSI,callID,strlen(txtBuf),txtBuf);
- sock.write(outbuf);
- sleep(2);
- sock.write(outbuf);
- sock.close();
- os << "RRLP Triggering message submitted for delivery" << endl;
-
- return SUCCESS;
-}
-
-
/** Print current usage loads. */
int printStats(int argc, char** argv, ostream& os)
{
+ // FIXME -- This needs to take GPRS channels into account. See #762.
if (argc!=1) return BAD_NUM_ARGS;
+ os << "== GSM ==" << endl;
os << "SDCCH load: " << gBTS.SDCCHActive() << '/' << gBTS.SDCCHTotal() << endl;
os << "TCH/F load: " << gBTS.TCHActive() << '/' << gBTS.TCHTotal() << endl;
os << "AGCH/PCH load: " << gBTS.AGCHLoad() << ',' << gBTS.PCHLoad() << endl;
// paging table size
os << "Paging table size: " << gBTS.pager().pagingEntryListSize() << endl;
os << "Transactions: " << gTransactionTable.size() << endl;
// 3122 timer current value (the number of seconds an MS should hold off the next RACH)
- os << "T3122: " << gBTS.T3122() << " ms" << endl;
+ os << "T3122: " << gBTS.T3122() << " ms (target " << gConfig.getNum("GSM.Radio.PowerManager.TargetT3122") << " ms)" << endl;
+ os << "== GPRS ==" << endl;
+ // (pat) We are not using dynamic channel allocation so I removed GPRS.Channels.Max until such time as we do.
+ // Also I did not understand what is the point of printing out something that is in the config?
+ //os << "chans mn/mx/dn/up: "
+ // << gConfig.getNum("GPRS.Channels.Min") << '/' << gConfig.getNum("GPRS.Channels.Max")
+ // << '/' << gConfig.getNum("GPRS.Multislot.Max.Downlink") << '/' << gConfig.getNum("GPRS.Multislot.Max.Uplink") << endl;
+ os << "current PDCHs: " << GPRS::gL2MAC.macActiveChannels() << endl;
+ os << "utilization: " << 100 * GPRS::gL2MAC.macComputeUtilization() << "%" << endl;
return SUCCESS;
}
@@ -438,20 +424,26 @@ int cellID(int argc, char** argv, ostream& os)
if (argc!=5) return BAD_NUM_ARGS;
// Safety check the args!!
- char* MCC = argv[1];
- char* MNC = argv[2];
- if (strlen(MCC)!=3) {
+ if (!gConfig.isValidValue("GSM.Identity.MCC", argv[1])) {
os << "MCC must be three digits" << endl;
return BAD_VALUE;
}
- int MNCLen = strlen(MNC);
- if ((MNCLen<2)||(MNCLen>3)) {
+ if (!gConfig.isValidValue("GSM.Identity.MNC", argv[2])) {
os << "MNC must be two or three digits" << endl;
return BAD_VALUE;
}
+ if (!gConfig.isValidValue("GSM.Identity.LAC", argv[3])) {
+ os << "Invalid value for LAC" << endl;
+ return BAD_VALUE;
+ }
+ if (!gConfig.isValidValue("GSM.Identity.CI", argv[4])) {
+ os << "Invalid value for CI" << endl;
+ return BAD_VALUE;
+ }
+
gTMSITable.clear();
- gConfig.set("GSM.Identity.MCC",MCC);
- gConfig.set("GSM.Identity.MNC",MNC);
+ gConfig.set("GSM.Identity.MCC",argv[1]);
+ gConfig.set("GSM.Identity.MNC",argv[2]);
gConfig.set("GSM.Identity.LAC",argv[3]);
gConfig.set("GSM.Identity.CI",argv[4]);
return SUCCESS;
@@ -461,23 +453,20 @@ int cellID(int argc, char** argv, ostream& os)
/** Print table of current transactions. */
-int calls(int argc, char** /*argv*/, ostream& os)
+int calls(int argc, char** argv, ostream& os)
{
- if (argc > 2)
- return BAD_NUM_ARGS;
-
- //fix later -kurtis
- //bool showAll = (argc == 2);
- //size_t count = gTransactionTable.dump(os,showAll);
- size_t count = gTransactionTable.dump(os);
+ bool showAll = false;
+ if (argc==2) showAll = true;
+ if (argc>2) return BAD_NUM_ARGS;
+ size_t count = gTransactionTable.dump(os,showAll);
os << endl << count << " transactions in table" << endl;
return SUCCESS;
}
/** Print or modify the global configuration table. */
-int config(int argc, char** argv, ostream& os)
+int rawconfig(int argc, char** argv, ostream& os)
{
// no args, just print
if (argc==1) {
@@ -498,23 +487,354 @@ int config(int argc, char** argv, ostream& os)
if (i!=(argc-1)) val.append(" ");
}
bool existing = gConfig.defines(argv[1]);
- if (gConfig.isStatic(argv[1])) {
- os << argv[1] << " is static; change takes effect on restart" << endl;
+ string previousVal;
+ if (existing) {
+ previousVal = gConfig.getStr(argv[1]);
}
if (!gConfig.set(argv[1],val)) {
- os << argv[1] << " change failed" << endl;
- return BAD_VALUE;
+ os << "DB ERROR: " << argv[1] << " change failed" << endl;
+ return FAILURE;
+ }
+ if (gConfig.isStatic(argv[1])) {
+ os << argv[1] << " is static; change takes effect on restart" << endl;
}
if (!existing) {
os << "defined new config " << argv[1] << " as \"" << val << "\"" << endl;
- // Anything created by the CLI is optional.
- //gConfig.makeOptional(argv[1]);
} else {
- os << "changed " << argv[1] << " to \"" << val << "\"" << endl;
+ os << argv[1] << " changed from \"" << previousVal << "\" to \"" << val << "\"" << endl;
+ }
+ return SUCCESS;
+}
+
+int trxfactory(int argc, char** argv, ostream& os)
+{
+ if (argc!=1) return BAD_NUM_ARGS;
+
+ signed val = gTRX.ARFCN(0)->getFactoryCalibration("sdrsn");
+ if (val == 0 || val == 65535) {
+ os << "Reading factory calibration not supported on this radio." << endl;
+ return SUCCESS;
+ }
+ os << "Factory Information" << endl;
+ os << " SDR Serial Number = " << val << endl;
+
+ val = gTRX.ARFCN(0)->getFactoryCalibration("rfsn");
+ os << " RF Serial Number = " << val << endl;
+
+ val = gTRX.ARFCN(0)->getFactoryCalibration("band");
+ os << " GSM.Radio.Band = ";
+ if (val == 0) {
+ os << "multi-band";
+ } else {
+ os << val;
+ }
+ os << endl;
+
+ val = gTRX.ARFCN(0)->getFactoryCalibration("rxgain");
+ os << " GSM.Radio.RxGain = " << val << endl;
+
+ val = gTRX.ARFCN(0)->getFactoryCalibration("txgain");
+ os << " TRX.TxAttenOffset = " << val << endl;
+
+ val = gTRX.ARFCN(0)->getFactoryCalibration("freq");
+ os << " TRX.RadioFrequencyOffset = " << val << endl;
+
+ return SUCCESS;
+}
+
+/** Audit the current configuration. */
+int audit(int argc, char** argv, ostream& os)
+{
+ ConfigurationKeyMap::iterator mp;
+ stringstream ss;
+
+ // value errors
+ mp = gConfig.mSchema.begin();
+ while (mp != gConfig.mSchema.end()) {
+ if (!gConfig.isValidValue(mp->first, gConfig.getStr(mp->first))) {
+ ss << mp->first << " \"" << gConfig.getStr(mp->first) << "\" (\"" << mp->second.getDefaultValue() << "\")" << endl;
+ }
+ mp++;
+ }
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| ERROR : Invalid Values [key current-value (default)] |" << endl;
+ os << "| To use the default value again, execute: rmconfig key |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+
+ // factory calibration warnings
+ signed sdrsn = gTRX.ARFCN(0)->getFactoryCalibration("sdrsn");
+ if (sdrsn != 0 && sdrsn != 65535) {
+ string factoryValue;
+ string configValue;
+
+ factoryValue = gConfig.mSchema["GSM.Radio.Band"].getDefaultValue();
+ configValue = gConfig.getStr("GSM.Radio.Band");
+ // only warn on band changes if the unit is not multi-band
+ if (gTRX.ARFCN(0)->getFactoryCalibration("band") != 0 && configValue.compare(factoryValue) != 0) {
+ ss << "GSM.Radio.Band \"" << configValue << "\" (\"" << factoryValue << "\")" << endl;
+ }
+
+ factoryValue = gConfig.mSchema["GSM.Radio.RxGain"].getDefaultValue();
+ configValue = gConfig.getStr("GSM.Radio.RxGain");
+ if (configValue.compare(factoryValue) != 0) {
+ ss << "GSM.Radio.RxGain \"" << configValue << "\" (\"" << factoryValue << "\")" << endl;
+ }
+
+ factoryValue = gConfig.mSchema["TRX.TxAttenOffset"].getDefaultValue();
+ configValue = gConfig.getStr("TRX.TxAttenOffset");
+ if (configValue.compare(factoryValue) != 0) {
+ ss << "TRX.TxAttenOffset \"" << configValue << "\" (\"" << factoryValue << "\")" << endl;
+ }
+
+ factoryValue = gConfig.mSchema["TRX.RadioFrequencyOffset"].getDefaultValue();
+ configValue = gConfig.getStr("TRX.RadioFrequencyOffset");
+ if (configValue.compare(factoryValue) != 0) {
+ ss << "TRX.RadioFrequencyOffset \"" << configValue << "\" (\"" << factoryValue << "\")" << endl;
+ }
+
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| WARNING : Factory Radio Calibration [key current-value (factory)] |" << endl;
+ os << "| To use the factory value again, execute: rmconfig key |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+ }
+
+ // cross check warnings
+ vector<string> allWarnings;
+ vector<string> warnings;
+ vector<string>::iterator warning;
+ mp = gConfig.mSchema.begin();
+ while (mp != gConfig.mSchema.end()) {
+ warnings = gConfig.crossCheck(mp->first);
+ allWarnings.insert(allWarnings.end(), warnings.begin(), warnings.end());
+ mp++;
+ }
+ sort(allWarnings.begin(), allWarnings.end());
+ allWarnings.erase(unique(allWarnings.begin(), allWarnings.end() ), allWarnings.end());
+ warning = allWarnings.begin();
+ while (warning != allWarnings.end()) {
+ ss << *warning << endl;
+ warning++;
+ }
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| WARNING : Cross-Check Values |" << endl;
+ os << "| To quiet these warnings, follow the advice given. |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+
+ // site-specific values
+ mp = gConfig.mSchema.begin();
+ while (mp != gConfig.mSchema.end()) {
+ if (mp->second.getVisibility() == ConfigurationKey::CUSTOMERSITE) {
+ if (gConfig.getStr(mp->first).compare(gConfig.mSchema[mp->first].getDefaultValue()) == 0) {
+ ss << mp->first << " \"" << gConfig.mSchema[mp->first].getDefaultValue() << "\"" << endl;
+ }
+ }
+ mp++;
+ }
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| WARNING : Site Values Which Are Still Default [key current-value] |" << endl;
+ os << "| These should be set to fit your installation: config key value |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+
+ // non-default values
+ mp = gConfig.mSchema.begin();
+ while (mp != gConfig.mSchema.end()) {
+ if (mp->second.getVisibility() != ConfigurationKey::CUSTOMERSITE) {
+ if (gConfig.getStr(mp->first).compare(gConfig.mSchema[mp->first].getDefaultValue()) != 0) {
+ ss << mp->first << " \"" << gConfig.getStr(mp->first) << "\" (\"" << mp->second.getDefaultValue() << "\")" << endl;
+ }
+ }
+ mp++;
+ }
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| INFO : Non-Default Values [key current-value (default)] |" << endl;
+ os << "| To use the default value again, execute: rmconfig key |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+
+ // unknown pairs
+ ConfigurationRecordMap pairs = gConfig.getAllPairs();
+ ConfigurationRecordMap::iterator mp2 = pairs.begin();
+ while (mp2 != pairs.end()) {
+ if (!gConfig.keyDefinedInSchema(mp2->first)) {
+ // also kindly ignore SIM.Prog keys for now so the users don't kill their ability to program SIMs
+ string family = "SIM.Prog.";
+ if (mp2->first.substr(0, family.size()) != family) {
+ ss << mp2->first << " \"" << mp2->second.value() << "\"" << endl;
+ }
+ }
+ mp2++;
+ }
+ if (ss.str().length()) {
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << "| INFO : Custom/Deprecated Key/Value Pairs [key current-value] |" << endl;
+ os << "| To clean up any extraneous keys, execute: rmconfig key |" << endl;
+ os << "+---------------------------------------------------------------------+" << endl;
+ os << ss.str();
+ os << endl;
+ ss.str("");
+ }
+
+ return SUCCESS;
+}
+
+/** Print or modify the global configuration table. */
+int _config(string mode, int argc, char** argv, ostream& os)
+{
+ // no args, just print
+ if (argc==1) {
+ ConfigurationKeyMap::iterator mp = gConfig.mSchema.begin();
+ while (mp != gConfig.mSchema.end()) {
+ if (mode.compare("customer") == 0) {
+ if (mp->second.getVisibility() == ConfigurationKey::CUSTOMER ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERSITE ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERTUNE ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERWARN) {
+ ConfigurationKey::printKey(mp->second, gConfig.getStr(mp->first), os);
+ }
+ } else if (mode.compare("developer") == 0) {
+ ConfigurationKey::printKey(mp->second, gConfig.getStr(mp->first), os);
+ }
+ mp++;
+ }
+ return SUCCESS;
+ }
+
+ // one arg
+ if (argc==2) {
+ // matches exactly? print single key
+ if (gConfig.keyDefinedInSchema(argv[1])) {
+ ConfigurationKey::printKey(gConfig.mSchema[argv[1]], gConfig.getStr(argv[1]), os);
+ ConfigurationKey::printDescription(gConfig.mSchema[argv[1]], os);
+ os << endl;
+ // ...otherwise print all similar keys
+ } else {
+ int foundCount = 0;
+ ConfigurationKeyMap matches = gConfig.getSimilarKeys(argv[1]);
+ ConfigurationKeyMap::iterator mp = matches.begin();
+ while (mp != matches.end()) {
+ if (mode.compare("customer") == 0) {
+ if (mp->second.getVisibility() == ConfigurationKey::CUSTOMER ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERSITE ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERTUNE ||
+ mp->second.getVisibility() == ConfigurationKey::CUSTOMERWARN) {
+ ConfigurationKey::printKey(mp->second, gConfig.getStr(mp->first), os);
+ foundCount++;
+ }
+ } else if (mode.compare("developer") == 0) {
+ ConfigurationKey::printKey(mp->second, gConfig.getStr(mp->first), os);
+ foundCount++;
+ }
+ mp++;
+ }
+ if (!foundCount) {
+ os << argv[1] << " - no keys matched";
+ if (mode.compare("customer") == 0) {
+ os << ", developer/factory keys can be accessed with \"devconfig.\"";
+ } else if (mode.compare("developer") == 0) {
+ os << ", custom keys can be accessed with \"rawconfig.\"";
+ }
+ os << endl;
+ }
+ }
+ return SUCCESS;
+ }
+
+ // >1 args: set new value
+ string val;
+ for (int i=2; i<argc; i++) {
+ val.append(argv[i]);
+ if (i!=(argc-1)) val.append(" ");
+ }
+ if (!gConfig.keyDefinedInSchema(argv[1])) {
+ os << argv[1] << " is not a valid key, change failed. If you're trying to define a custom key/value pair (e.g. the Log.Level.Filename.cpp pairs), use \"rawconfig.\"" << endl;
+ return SUCCESS;
+ }
+ if (mode.compare("customer") == 0) {
+ if (gConfig.mSchema[argv[1]].getVisibility() == ConfigurationKey::DEVELOPER) {
+ os << argv[1] << " should only be changed by developers. Use \"devconfig\" if you are ABSOLUTELY sure this needs to be changed." << endl;
+ return SUCCESS;
+ }
+ if (gConfig.mSchema[argv[1]].getVisibility() == ConfigurationKey::FACTORY) {
+ os << argv[1] << " should only be set once by the factory. Use \"devconfig\" if you are ABSOLUTELY sure this needs to be changed." << endl;
+ return SUCCESS;
+ }
}
+ if (!gConfig.isValidValue(argv[1], val)) {
+ os << argv[1] << " new value \"" << val << "\" is invalid, change failed.";
+ if (mode.compare("developer") == 0) {
+ os << " To override the configuration value checks, use \"rawconfig.\"";
+ }
+ os << endl;
+ return SUCCESS;
+ }
+
+ string previousVal = gConfig.getStr(argv[1]);
+ if (val.compare(previousVal) == 0) {
+ os << argv[1] << " is already set to \"" << val << "\", nothing changed" << endl;
+ return SUCCESS;
+ }
+// TODO : removing of default values from DB disabled for now. Breaks webui.
+// if (val.compare(gConfig.mSchema[argv[1]].getDefaultValue()) == 0) {
+// if (!gConfig.remove(argv[1])) {
+// os << argv[1] << " storing new value (default) failed" << endl;
+// return SUCCESS;
+// }
+// } else {
+ if (!gConfig.set(argv[1],val)) {
+ os << "DB ERROR: " << argv[1] << " could not be updated" << endl;
+ return FAILURE;
+ }
+// }
+ vector<string> warnings = gConfig.crossCheck(argv[1]);
+ vector<string>::iterator warning = warnings.begin();
+ while (warning != warnings.end()) {
+ os << "WARNING: " << *warning << endl;
+ warning++;
+ }
+ if (gConfig.isStatic(argv[1])) {
+ os << argv[1] << " is static; change takes effect on restart" << endl;
+ }
+ os << argv[1] << " changed from \"" << previousVal << "\" to \"" << val << "\"" << endl;
+
return SUCCESS;
}
+/** Print or modify the global configuration table. Customer access. */
+int config(int argc, char** argv, ostream& os)
+{
+ return _config("customer", argc, argv, os);
+}
+
+/** Print or modify the global configuration table. Developer/factory access. */
+int devconfig(int argc, char** argv, ostream& os)
+{
+ return _config("developer", argc, argv, os);
+}
+
/** Disable a configuration key. */
int unconfig(int argc, char** argv, ostream& os)
{
@@ -540,10 +860,44 @@ int unconfig(int argc, char** argv, ostream& os)
return SUCCESS;
}
-/** Dump current configuration to a file. */
-int configsave(int argc, char** argv, ostream& os)
+
+/** Set a configuration value back to default or remove from table if custom key. */
+int rmconfig(int argc, char** argv, ostream& os)
{
- os << "obsolete" << endl;
+ if (argc!=2) return BAD_NUM_ARGS;
+
+ if (!gConfig.defines(argv[1])) {
+ os << argv[1] << " is not in the table" << endl;
+ return BAD_VALUE;
+ }
+
+ // TODO : removing of default values from DB disabled for now. Breaks webui.
+ if (gConfig.keyDefinedInSchema(argv[1])) {
+ if (!gConfig.set(argv[1],gConfig.mSchema[argv[1]].getDefaultValue())) {
+ os << "DB ERROR: " << argv[1] << " could not be set back to the default value" << endl;
+ return FAILURE;
+ }
+
+ os << argv[1] << " set back to its default value" << endl;
+ vector<string> warnings = gConfig.crossCheck(argv[1]);
+ vector<string>::iterator warning = warnings.begin();
+ while (warning != warnings.end()) {
+ os << "WARNING: " << *warning << endl;
+ warning++;
+ }
+ if (gConfig.isStatic(argv[1])) {
+ os << argv[1] << " is static; change takes effect on restart" << endl;
+ }
+ return SUCCESS;
+ }
+
+ if (!gConfig.remove(argv[1])) {
+ os << "DB ERROR: " << argv[1] << " could not be removed from the configuration table" << endl;
+ return FAILURE;
+ }
+
+ os << argv[1] << " removed from the configuration table" << endl;
+
return SUCCESS;
}
@@ -554,22 +908,29 @@ int regperiod(int argc, char** argv, ostream& os)
{
if (argc==1) {
os << "T3212 is " << gConfig.getNum("GSM.Timer.T3212") << " minutes" << endl;
- os << "SIP registration period is " << gConfig.getNum("SIP.RegistrationPeriod")/60 << " minutes" << endl;
+ os << "SIP registration period is " << gConfig.getNum("SIP.RegistrationPeriod") << " minutes" << endl;
return SUCCESS;
}
if (argc>3) return BAD_NUM_ARGS;
unsigned newT3212 = strtol(argv[1],NULL,10);
- if ((newT3212<6)||(newT3212>1530)) {
+ if (!gConfig.isValidValue("GSM.Timer.T3212", argv[1])) {
os << "valid T3212 range is 6..1530 minutes" << endl;
return BAD_VALUE;
}
- // By defuault, make SIP registration period 1.5x the GSM registration period.
- unsigned SIPRegPeriod = newT3212*90;
+ // By default, make SIP registration period 1.5x the GSM registration period.
+ unsigned SIPRegPeriod = newT3212 * 1.5;
+ char SIPRegPeriodStr[10];
+ sprintf(SIPRegPeriodStr, "%u", SIPRegPeriod);
if (argc==3) {
- SIPRegPeriod = 60*strtol(argv[2],NULL,10);
+ SIPRegPeriod = strtol(argv[2],NULL,10);
+ sprintf(SIPRegPeriodStr, "%s", argv[2]);
+ }
+ if (!gConfig.isValidValue("SIP.RegistrationPeriod", SIPRegPeriodStr)) {
+ os << "valid SIP registration range is 6..2298 minutes" << endl;
+ return BAD_VALUE;
}
// Set the values in the table and on the GSM beacon.
@@ -612,25 +973,29 @@ int page(int argc, char **argv, ostream& os)
gBTS.pager().dump(os);
return SUCCESS;
}
+ return BAD_NUM_ARGS;
+}
+
+
+int testcall(int argc, char **argv, ostream& os)
+{
if (argc!=3) return BAD_NUM_ARGS;
char *IMSI = argv[1];
- if (strlen(IMSI)>15) {
+ if (strlen(IMSI)!=15) {
os << IMSI << " is not a valid IMSI" << endl;
return BAD_VALUE;
}
- Control::TransactionEntry dummy(
- gConfig.getStr("SIP.Proxy.SMS").c_str(),
+ Control::TransactionEntry *transaction = new Control::TransactionEntry(
+ gConfig.getStr("SIP.Proxy.Speech").c_str(),
GSM::L3MobileIdentity(IMSI),
NULL,
- GSM::L3CMServiceType::UndefinedType,
+ GSM::L3CMServiceType::TestCall,
GSM::L3CallingPartyBCDNumber("0"),
GSM::Paging);
- gBTS.pager().addID(GSM::L3MobileIdentity(IMSI),GSM::SDCCHType,dummy,1000*atoi(argv[2]));
+ Control::initiateMTTransaction(transaction,GSM::TCHFType,1000*atoi(argv[2]));
return SUCCESS;
}
-
-
int endcall(int argc, char **argv, ostream& os)
{
if (argc!=2) return BAD_NUM_ARGS;
@@ -650,33 +1015,59 @@ int endcall(int argc, char **argv, ostream& os)
void printChanInfo(unsigned transID, const GSM::LogicalChannel* chan, ostream& os)
{
os << setw(2) << chan->CN() << " " << chan->TN();
- os << " " << setw(8) << chan->typeAndOffset();
+ os << " " << setw(9) << chan->typeAndOffset();
os << " " << setw(12) << transID;
+ os << " " << setw(6) << chan->active();
+ os << " " << setw(5) << chan->recyclable();
char buffer[200];
snprintf(buffer,199,"%5.2f %4d %5d %4d",
100.0*chan->FER(), (int)round(chan->RSSI()),
chan->actualMSPower(), chan->actualMSTiming());
os << " " << buffer;
+
+ if (!chan->SACCH()) {
+ os << endl;
+ return;
+ }
+
const GSM::L3MeasurementResults& meas = chan->SACCH()->measurementResults();
- if (!meas.MEAS_VALID()) {
- snprintf(buffer,199,"%5d %5.2f",
- meas.RXLEV_FULL_SERVING_CELL_dBm(),
- 100.0*meas.RXQUAL_FULL_SERVING_CELL_BER());
- os << " " << buffer;
- } else {
- os << " ----- ------";
+
+ if (meas.MEAS_VALID()) {
+ os << endl;
+ return;
}
+
+ snprintf(buffer,199,"%5d %5.2f",
+ meas.RXLEV_FULL_SERVING_CELL_dBm(),
+ 100.0*meas.RXQUAL_FULL_SERVING_CELL_BER());
+ os << " " << buffer;
+
+ if (meas.NO_NCELL()==0) {
+ os << endl;
+ return;
+ }
+ unsigned CN = meas.BCCH_FREQ_NCELL(0);
+ std::vector<unsigned> ARFCNList = gNeighborTable.ARFCNList();
+ if (CN>=ARFCNList.size()) {
+ LOG(NOTICE) << "BCCH index " << CN << " does not match ARFCN list of size " << ARFCNList.size();
+ os << endl;
+ return;
+ }
+ snprintf(buffer,199,"%8u %8d",ARFCNList[CN],meas.RXLEV_NCELL_dBm(0));
+ os << " " << buffer;
os << endl;
}
int chans(int argc, char **argv, ostream& os)
{
- if (argc!=1) return BAD_NUM_ARGS;
+ bool showAll = false;
+ if (argc==2) showAll = true;
+ if (argc>2) return BAD_NUM_ARGS;
- os << "CN TN chan transaction UPFER RSSI TXPWR TXTA DNLEV DNBER" << endl;
- os << "CN TN type id pct dB dBm sym dBm pct" << endl;
+ os << "CN TN chan transaction active recyc UPFER RSSI TXPWR TXTA DNLEV DNBER Neighbor Neighbor" << endl;
+ os << "CN TN type id pct dB dBm sym dBm pct ARFCN dBm" << endl;
//gPhysStatus.dump(os);
//os << endl << "Old data reporting: " << endl;
@@ -685,10 +1076,12 @@ int chans(int argc, char **argv, ostream& os)
GSM::SDCCHList::const_iterator sChanItr = gBTS.SDCCHPool().begin();
while (sChanItr != gBTS.SDCCHPool().end()) {
const GSM::SDCCHLogicalChannel* sChan = *sChanItr;
- if (sChan->active()) {
+ if (sChan->active() || showAll) {
Control::TransactionEntry *trans = gTransactionTable.find(sChan);
- if (trans) printChanInfo(trans->ID(),sChan,os);
- else printChanInfo(0,sChan,os);
+ int tid = 0;
+ if (trans) tid = trans->ID();
+ printChanInfo(tid,sChan,os);
+ //if (showAll) printChanInfo(tid,sChan->SACCH(),os);
}
++sChanItr;
}
@@ -697,10 +1090,12 @@ int chans(int argc, char **argv, ostream& os)
GSM::TCHList::const_iterator tChanItr = gBTS.TCHPool().begin();
while (tChanItr != gBTS.TCHPool().end()) {
const GSM::TCHFACCHLogicalChannel* tChan = *tChanItr;
- if (tChan->active()) {
+ if (tChan->active() || showAll) {
Control::TransactionEntry *trans = gTransactionTable.find(tChan);
- if (trans) printChanInfo(trans->ID(),tChan,os);
- else printChanInfo(0,tChan,os);
+ int tid = 0;
+ if (trans) tid = trans->ID();
+ printChanInfo(tid,tChan,os);
+ //if (showAll) printChanInfo(tid,tChan->SACCH(),os);
}
++tChanItr;
}
@@ -727,7 +1122,21 @@ int power(int argc, char **argv, ostream& os)
int min = atoi(argv[1]);
int max = atoi(argv[2]);
- if (min>max) return BAD_VALUE;
+ if (min>max) {
+ os << "Min is larger than max" << endl;
+ return BAD_VALUE;
+ }
+
+ if (!gConfig.isValidValue("GSM.Radio.PowerManager.MinAttenDB", argv[1])) {
+ os << "Invalid new value for min. It must be in range (";
+ os << gConfig.mSchema["GSM.Radio.PowerManager.MinAttenDB"].getValidValues() << ")" << endl;
+ return BAD_VALUE;
+ }
+ if (!gConfig.isValidValue("GSM.Radio.PowerManager.MaxAttenDB", argv[2])) {
+ os << "Invalid new value for max. It must be in range (";
+ os << gConfig.mSchema["GSM.Radio.PowerManager.MaxAttenDB"].getValidValues() << ")" << endl;
+ return BAD_VALUE;
+ }
gConfig.set("GSM.Radio.PowerManager.MinAttenDB",argv[1]);
gConfig.set("GSM.Radio.PowerManager.MaxAttenDB",argv[2]);
@@ -748,6 +1157,12 @@ int rxgain(int argc, char** argv, ostream& os)
if (argc==1) return SUCCESS;
if (argc!=2) return BAD_NUM_ARGS;
+ if (!gConfig.isValidValue("GSM.Radio.RxGain", argv[1])) {
+ os << "Invalid new value for RX gain. It must be in range (";
+ os << gConfig.mSchema["GSM.Radio.RxGain"].getValidValues() << ")" << endl;
+ return BAD_VALUE;
+ }
+
int newGain = gTRX.ARFCN(0)->setRxGain(atoi(argv[1]));
os << "new RX gain is " << newGain << " dB" << endl;
@@ -756,6 +1171,49 @@ int rxgain(int argc, char** argv, ostream& os)
return SUCCESS;
}
+int txatten(int argc, char** argv, ostream& os)
+{
+ os << "current TX attenuation is " << gConfig.getNum("TRX.TxAttenOffset") << " dB" << endl;
+ if (argc==1) return SUCCESS;
+ if (argc!=2) return BAD_NUM_ARGS;
+
+ if (!gConfig.isValidValue("TRX.TxAttenOffset", argv[1])) {
+ os << "Invalid new value for TX attenuation. It must be in range (";
+ os << gConfig.mSchema["TRX.TxAttenOffset"].getValidValues() << ")" << endl;
+ return BAD_VALUE;
+ }
+
+ int newAtten = gTRX.ARFCN(0)->setTxAtten(atoi(argv[1]));
+ os << "new TX attenuation is " << newAtten << " dB" << endl;
+
+ gConfig.set("TRX.TxAttenOffset",newAtten);
+
+ return SUCCESS;
+}
+
+
+int freqcorr(int argc, char** argv, ostream& os)
+{
+ os << "current freq. offset is " << gConfig.getNum("TRX.RadioFrequencyOffset") << endl;
+ if (argc==1) return SUCCESS;
+ if (argc!=2) return BAD_NUM_ARGS;
+
+ if (!gConfig.isValidValue("TRX.RadioFrequencyOffset", argv[1])) {
+ os << "Invalid new value for freq. offset It must be in range (";
+ os << gConfig.mSchema["TRX.RadioFrequencyOffset"].getValidValues() << ")" << endl;
+ return BAD_VALUE;
+ }
+
+ int newOffset = gTRX.ARFCN(0)->setFreqOffset(atoi(argv[1]));
+ os << "new freq. offset is " << newOffset << endl;
+
+ gConfig.set("TRX.RadioFrequencyOffset",newOffset);
+
+ return SUCCESS;
+}
+
+
+
int noise(int argc, char** argv, ostream& os)
{
if (argc!=1) return BAD_NUM_ARGS;
@@ -767,9 +1225,50 @@ int noise(int argc, char** argv, ostream& os)
return SUCCESS;
}
+int sysinfo(int argc, char** argv, ostream& os)
+{
+ if (argc!=1) return BAD_NUM_ARGS;
+
+ const GSM::L3SystemInformationType1 *SI1 = gBTS.SI1();
+ if (SI1) os << *SI1 << endl;
+ const GSM::L3SystemInformationType2 *SI2 = gBTS.SI2();
+ if (SI2) os << *SI2 << endl;
+ const GSM::L3SystemInformationType3 *SI3 = gBTS.SI3();
+ if (SI3) os << *SI3 << endl;
+ const GSM::L3SystemInformationType4 *SI4 = gBTS.SI4();
+ if (SI4) os << *SI4 << endl;
+ const GSM::L3SystemInformationType5 *SI5 = gBTS.SI5();
+ if (SI5) os << *SI5 << endl;
+ const GSM::L3SystemInformationType6 *SI6 = gBTS.SI6();
+ if (SI6) os << *SI6 << endl;
+
+ return SUCCESS;
+}
+
+
+int neighbors(int argc, char** argv, ostream& os)
+{
+
+ os << "host C0 BSIC" << endl;
+ char cmd[200];
+ sprintf(cmd,"sqlite3 -separator ' ' %s 'select IPADDRESS,C0,BSIC from neighbor_table'",
+ gConfig.getStr("Peering.NeighborTable.Path").c_str());
+ FILE *result = popen(cmd,"r");
+ char *line = (char*)malloc(200);
+ while (!feof(result)) {
+ if (!fgets(line, 200, result)) break;
+ os << line;
+ }
+ free(line);
+ os << endl;
+ pclose(result);
+ return SUCCESS;
+}
+
+
int crashme(int argc, char** argv, ostream& os)
{
- char *nullp = 0x0;
+ char *nullp = 0x0;
// we actually have to output this,
// or the compiler will optimize it out
os << *nullp;
@@ -781,9 +1280,15 @@ int stats(int argc, char** argv, ostream& os)
{
char cmd[200];
- if (argc==2)
+ if (argc==2) {
+ if (strcmp(argv[1],"clear")==0) {
+ gReports.clear();
+ os << "stats table (gReporting) cleared" << endl;
+ return SUCCESS;
+ }
sprintf(cmd,"sqlite3 %s 'select name||\": \"||value||\" events over \"||((%lu-clearedtime)/60)||\" minutes\" from reporting where name like \"%%%s%%\";'",
gConfig.getStr("Control.Reporting.StatsTable").c_str(), time(NULL), argv[1]);
+ }
else if (argc==1)
sprintf(cmd,"sqlite3 %s 'select name||\": \"||value||\" events over \"||((%lu-clearedtime)/60)||\" minutes\" from reporting;'",
gConfig.getStr("Control.Reporting.StatsTable").c_str(), time(NULL));
@@ -809,30 +1314,39 @@ void Parser::addCommands()
{
addCommand("uptime", uptime, "-- show BTS uptime and BTS frame number.");
addCommand("help", showHelp, "[command] -- list available commands or gets help on a specific command.");
- addCommand("exit", exit_function, "[wait] -- exit the application, either immediately, or waiting for existing calls to clear with a timeout in seconds");
+ addCommand("shutdown", exit_function, "[wait] -- shut down or restart OpenBTS, either immediately, or waiting for existing calls to clear with a timeout in seconds");
addCommand("tmsis", tmsis, "[\"clear\"] or [\"dump\" filename] -- print/clear the TMSI table or dump it to a file.");
addCommand("sendsms", sendsms, "IMSI src# message... -- send direct SMS to IMSI, addressed from source number src#.");
addCommand("sendsimple", sendsimple, "IMSI src# message... -- send SMS to IMSI via SIP interface, addressed from source number src#.");
- //apparently non-function now -kurtis
- //addCommand("sendrrlp", sendrrlp, "<IMSI> <hexstring> -- send RRLP message <hexstring> to <IMSI>.");
addCommand("load", printStats, "-- print the current activity loads.");
addCommand("cellid", cellID, "[MCC MNC LAC CI] -- get/set location area identity (MCC, MNC, LAC) and cell ID (CI)");
addCommand("calls", calls, "-- print the transaction table");
+ addCommand("rawconfig", rawconfig, "[] OR [patt] OR [key val(s)] -- print the current configuration, print configuration values matching a pattern, or set/change a configuration value");
+ addCommand("trxfactory", trxfactory, "-- print the radio's factory calibration and meta information");
+ addCommand("audit", audit, "-- audit the current configuration for troubleshooting");
addCommand("config", config, "[] OR [patt] OR [key val(s)] -- print the current configuration, print configuration values matching a pattern, or set/change a configuration value");
- addCommand("configsave", configsave, "<path> -- write the current configuration to a file");
+ addCommand("devconfig", devconfig, "[] OR [patt] OR [key val(s)] -- print the current configuration, print configuration values matching a pattern, or set/change a configuration value");
addCommand("regperiod", regperiod, "[GSM] [SIP] -- get/set the registration period (GSM T3212), in MINUTES");
addCommand("alarms", alarms, "-- show latest alarms");
addCommand("version", version,"-- print the version string");
- addCommand("page", page, "[IMSI time] -- dump the paging table or page the given IMSI for the given period");
+ addCommand("page", page, "print the paging table");
addCommand("chans", chans, "-- report PHY status for active channels");
addCommand("power", power, "[minAtten maxAtten] -- report current attentuation or set min/max bounds");
addCommand("rxgain", rxgain, "[newRxgain] -- get/set the RX gain in dB");
+ addCommand("txatten", txatten, "[newTxAtten] -- get/set the TX attenuation in dB");
+ addCommand("freqcorr", freqcorr, "[newOffset] -- get/set the new radio frequency offset");
addCommand("noise", noise, "-- report receive noise level in RSSI dB");
- addCommand("unconfig", unconfig, "key -- remove a config value");
+ addCommand("rmconfig", rmconfig, "key -- set a configuration value back to its default or remove a custom key/value pair");
+ addCommand("unconfig", unconfig, "key -- disable a configuration key by setting an empty value");
addCommand("notices", notices, "-- show startup copyright and legal notices");
addCommand("endcall", endcall,"trans# -- terminate the given transaction");
+ addCommand("testcall", testcall, "IMSI time -- initiate a TCHF test call to a given IMSI with a given paging time");
+ addCommand("sysinfo", sysinfo, "-- print current system information messages");
+ addCommand("neighbors", neighbors, "-- dump the neighbor table");
+ addCommand("gprs", GPRS::gprsCLI,"GPRS mode sub-command. Type: gprs help for more");
+ addCommand("sgsn", SGSN::sgsnCLI,"SGSN mode sub-command. Type: sgsn help for more");
addCommand("crashme", crashme, "force crash of OpenBTS for testing purposes");
- addCommand("stats", stats,"[patt] -- print all, or selected, performance statistics");
+ addCommand("stats", stats,"[patt] OR clear -- print all, or selected, performance counters, OR clear all counters");
}
View
30 CLI/CLI.h
@@ -1,25 +1,15 @@
/*
-* Copyright 2008 Free Software Foundation, Inc.
+* Copyright 2009 Free Software Foundation, Inc.
*
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
+* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribuion.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
*/
@@ -71,7 +61,13 @@ class Parser {
private:
- /** Parse and execute a command string. */
+ /**
+ Parse and execute a command string.
+ @line a writeable copy of the original line
+ @cline the original line
+ @os output stream
+ @return status code
+ */
int execute(char* line, std::ostream& os) const;
};
View
10 COPYING
@@ -693,6 +693,14 @@ Interaction; Use with the GNU General Public License"). This exemption of
interfaces other than the GSM air interface from the requirements of Section 13
is an additional permission granted to you.
+2. GSM "A5" cipher stream generation libraries
+
+Notwithstanding any other provision of this License, you have
+permission to link the Program with GSM "A5" cipher-stream generation
+libraries provided under any license that allows redistribution of