Changeset 10367

Show
Ignore:
Timestamp:
10/05/10 18:31:39 (3 years ago)
Author:
mbrevda
Message:

re #4566 - add bootsrap; rework web to use it; design isnt final, this is the idea though; Setting are still being pulled from amportal.conf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/astetc/cdr_mysql.conf

    r9484 r10367  
    1414hostname = localhost 
    1515dbname=asteriskcdrdb  
    16 password = AMPDBPASS 
    17 user = AMPDBUSER 
     16password = fpbx 
     17user = freepbx 
    1818userfield=1 
    1919;port=3306  
  • freepbx/trunk/amp_conf/astetc/indications.conf

    r2834 r10367  
    1 ; indications.conf 
    2 ; Configuration file for location specific tone indications 
    3 ; used by the pbx_indications module. 
    4 
    5 ; NOTE: 
    6 ;    When adding countries to this file, please keep them in alphabetical 
    7 ;    order according to the 2-character country codes! 
    8 
    9 ; The [general] category is for certain global variables. 
    10 ; All other categories are interpreted as location specific indications 
    11 
    12 
     1;--------------------------------------------------------------------------------; 
     2; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ; 
     3; this file must be done via the web gui.                                        ; 
     4;--------------------------------------------------------------------------------; 
     5 
    136[general] 
    14 country=us    ; default location 
    15  
    16  
    17 ; [example] 
    18 ; description = string 
    19 ;      The full name of your country, in English. 
    20 ; alias = iso[,iso]* 
    21 ;      List of other countries 2-letter iso codes, which have the same 
    22 ;      tone indications. 
    23 ; ringcadence = num[,num]* 
    24 ;      List of durations the physical bell rings. 
    25 ; dial = tonelist 
    26 ;      Set of tones to be played when one picks up the hook. 
    27 ; busy = tonelist 
    28 ;      Set of tones played when the receiving end is busy. 
    29 ; congestion = tonelist 
    30 ;      Set of tones played when there is some congestion (on the network?) 
    31 ; callwaiting = tonelist 
    32 ;      Set of tones played when there is a call waiting in the background. 
    33 ; dialrecall = tonelist 
    34 ;      Not well defined; many phone systems play a recall dial tone after hook 
    35 ;      flash. 
    36 ; record = tonelist 
    37 ;      Set of tones played when call recording is in progress. 
    38 ; info = tonelist 
    39 ;      Set of tones played with special information messages (e.g., "number is 
    40 ;      out of service") 
    41 ; 'name' = tonelist 
    42 ;      Every other variable will be available as a shortcut for the "PlayList" command 
    43 ;      but will not be used automatically by Asterisk. 
    44 
    45 
    46 ; The tonelist itself is defined by a comma-separated sequence of elements. 
    47 ; Each element consist of a frequency (f) with an optional duration (in ms) 
    48 ; attached to it (f/duration). The frequency component may be a mixture of two 
    49 ; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2). 
    50 ; The implicit modulation depth is fixed at 90%, though. 
    51 ; If the list element starts with a !, that element is NOT repeated, 
    52 ; therefore, only if all elements start with !, the tonelist is time-limited, 
    53 ; all others will repeat indefinitely. 
    54 
    55 ; concisely: 
    56 ;   element = [!]freq[+|*freq2][/duration] 
    57 ;   tonelist = element[,element]* 
    58 
    59 ; Please note that SPACES ARE NOT ALLOWED in tone lists! 
    60 
    61  
    62 [at] 
    63 description = Austria 
    64 ringcadence = 1000,5000 
    65 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    66 dial = 420 
    67 busy = 420/400,0/400 
    68 ring = 420/1000,0/5000 
    69 congestion = 420/200,0/200 
    70 callwaiting = 420/40,0/1960 
    71 dialrecall = 420 
    72 ; RECORDTONE - not specified 
    73 record = 1400/80,0/14920 
    74 info = 950/330,1450/330,1850/330,0/1000 
    75 stutter = 380+420 
    76  
    77 [au] 
    78 description = Australia 
    79 ; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf 
    80 ; Normal Ring 
    81 ringcadence = 400,200,400,2000 
    82 ; Distinctive Ring 1 - Forwarded Calls 
    83 ; 400,400,200,200,400,1400 
    84 ; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall 
    85 ; 400,400,200,2000 
    86 ; Distinctive Ring 3 - Multiple Subscriber Number 1 
    87 ; 200,200,400,2200 
    88 ; Distinctive Ring 4 - Selective Ring 1 + Centrex 
    89 ; 400,2600 
    90 ; Distinctive Ring 5 - Selective Ring 3 
    91 ; 400,400,200,400,200,1400 
    92 ; Distinctive Ring 6 - Multiple Subscriber Number 2 
    93 ; 200,400,200,200,400,1600 
    94 ; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy 
    95 ; 200,400,200,400,200,1600 
    96 ; Tones 
    97 dial = 413+438 
    98 busy = 425/375,0/375 
    99 ring = 413+438/400,0/200,413+438/400,0/2000 
    100 ; XXX Congestion: Should reduce by 10 db every other cadence XXX 
    101 congestion = 425/375,0/375,420/375,0/375 
    102 callwaiting = 425/200,0/200,425/200,0/4400 
    103 dialrecall = 413+438 
    104 ; Record tone used for Call Intrusion/Recording or Conference 
    105 record = !425/1000,!0/15000,425/360,0/15000 
    106 info = 425/2500,0/500 
    107 ; Other Australian Tones 
    108 ; The STD "pips" indicate the call is not an untimed local call 
    109 std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100 
    110 ; Facility confirmation tone (eg. Call Forward Activated) 
    111 facility = 425 
    112 ; Message Waiting "stutter" dialtone 
    113 stutter = 413+438/100,0/40 
    114 ; Ringtone for calls to Telstra mobiles 
    115 ringmobile = 400+450/400,0/200,400+450/400,0/2000 
    116  
    117 [bg] 
    118 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    119 description = Bulgaria 
    120 ringdance = 1000,4000 
    121 dial = 425 
    122 busy = 425/500,0/500 
    123 ring = 425/1000,0/4000 
    124 congestion = 425/250,0/250 
    125 callwaiting = 425/150,0/150,425/150,0/4000 
    126 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 
    127 record = 1400/425,0/15000 
    128 info = 950/330,1400/330,1800/330,0/1000 
    129 stutter = 425/1500,0/100 
    130  
    131 [br] 
    132 description = Brazil 
    133 ringcadence = 1000,4000 
    134 dial = 425 
    135 busy = 425/250,0/250 
    136 ring = 425/1000,0/4000 
    137 congestion = 425/250,0/250,425/750,0/250 
    138 callwaiting = 425/50,0/1000 
    139 ; Dialrecall not used in Brazil standard (using UK standard) 
    140 dialrecall = 350+440 
    141 ; Record tone is not used in Brazil, use busy tone 
    142 record = 425/250,0/250 
    143 ; Info not used in Brazil standard (using UK standard) 
    144 info = 950/330,1400/330,1800/330 
    145 stutter = 350+440 
    146  
    147 [be] 
    148 description = Belgium 
    149 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    150 ringcadence = 1000,3000 
    151 dial = 425 
    152 busy = 425/500,0/500 
    153 ring = 425/1000,0/3000 
    154 congestion = 425/167,0/167 
    155 callwaiting = 1400/175,0/175,1400/175,0/3500 
    156 ; DIALRECALL - not specified 
    157 dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440" 
    158 ; RECORDTONE - not specified 
    159 record = 1400/500,0/15000 
    160 info = 900/330,1400/330,1800/330,0/1000 
    161 stutter = 425/1000,0/250 
    162  
    163 [ch] 
    164 description = Switzerland 
    165 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    166 ringcadence = 1000,4000 
    167 dial = 425 
    168 busy = 425/500,0/500 
    169 ring = 425/1000,0/4000 
    170 congestion = 425/200,0/200 
    171 callwaiting = 425/200,0/200,425/200,0/4000 
    172 ; DIALRECALL - not specified 
    173 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 
    174 ; RECORDTONE - not specified 
    175 record = 1400/80,0/15000 
    176 info = 950/330,1400/330,1800/330,0/1000 
    177 stutter = 425+340/1100,0/1100 
    178  
    179 [cl] 
    180 description = Chile 
    181 ; According to specs from Telefonica CTC Chile 
    182 ringcadence = 1000,3000 
    183 dial = 400 
    184 busy = 400/500,0/500 
    185 ring = 400/1000,0/3000 
    186 congestion = 400/200,0/200 
    187 callwaiting = 400/250,0/8750 
    188 dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 
    189 record = 1400/500,0/15000 
    190 info = 950/333,1400/333,1800/333,0/1000 
    191 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 
    192  
    193 [cn] 
    194 description = China 
    195 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    196 ringcadence = 1000,4000 
    197 dial = 450 
    198 busy = 450/350,0/350 
    199 ring = 450/1000,0/4000 
    200 congestion = 450/700,0/700 
    201 callwaiting = 450/400,0/4000 
    202 dialrecall = 450 
    203 record = 950/400,0/10000 
    204 info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400 
    205 ; STUTTER - not specified 
    206 stutter = 450+425 
    207  
    208 [cz] 
    209 description = Czech Republic 
    210 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    211 ringcadence = 1000,4000 
    212 dial = 425/330,0/330,425/660,0/660 
    213 busy = 425/330,0/330 
    214 ring = 425/1000,0/4000 
    215 congestion = 425/165,0/165 
    216 callwaiting = 425/330,0/9000 
    217 ; DIALRECALL - not specified 
    218 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660 
    219 ; RECORDTONE - not specified 
    220 record = 1400/500,0/14000 
    221 info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 
    222 ; STUTTER - not specified 
    223 stutter = 425/450,0/50 
    224  
    225 [de] 
    226 description = Germany 
    227 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    228 ringcadence = 1000,4000 
    229 dial = 425 
    230 busy = 425/480,0/480 
    231 ring = 425/1000,0/4000 
    232 congestion = 425/240,0/240 
    233 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 
    234 ; DIALRECALL - not specified 
    235 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 
    236 ; RECORDTONE - not specified 
    237 record = 1400/80,0/15000 
    238 info = 950/330,1400/330,1800/330,0/1000 
    239 stutter = 425+400 
    240  
    241 [dk] 
    242 description = Denmark 
    243 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    244 ringcadence = 1000,4000 
    245 dial = 425 
    246 busy = 425/500,0/500 
    247 ring = 425/1000,0/4000 
    248 congestion = 425/200,0/200 
    249 callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0 
    250 ; DIALRECALL - not specified 
    251 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 
    252 ; RECORDTONE - not specified 
    253 record = 1400/80,0/15000 
    254 info = 950/330,1400/330,1800/330,0/1000 
    255 ; STUTTER - not specified 
    256 stutter = 425/450,0/50 
    257  
    258 [ee] 
    259 description = Estonia 
    260 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    261 ringcadence = 1000,4000 
    262 dial = 425 
    263 busy = 425/300,0/300 
    264 ring = 425/1000,0/4000 
    265 congestion = 425/200,0/200 
    266 ; CALLWAIT not in accordance to ITU 
    267 callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600 
    268 ; DIALRECALL - not specified 
    269 dialrecall = 425/650,0/25 
    270 ; RECORDTONE - not specified 
    271 record = 1400/500,0/15000 
    272 ; INFO not in accordance to ITU 
    273 info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 
    274 ; STUTTER not specified 
    275 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 
    276  
    277 [es] 
    278 description = Spain 
    279 ringcadence = 1500,3000 
    280 dial = 425 
    281 busy = 425/200,0/200 
    282 ring = 425/1500,0/3000 
    283 congestion = 425/200,0/200,425/200,0/200,425/200,0/600 
    284 callwaiting = 425/175,0/175,425/175,0/3500 
    285 dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 
    286 record = 1400/500,0/15000 
    287 info = 950/330,0/1000 
    288 dialout = 500 
    289  
    290  
    291 [fi] 
    292 description = Finland 
    293 ringcadence = 1000,4000 
    294 dial = 425 
    295 busy = 425/300,0/300 
    296 ring = 425/1000,0/4000 
    297 congestion = 425/200,0/200 
    298 callwaiting = 425/150,0/150,425/150,0/8000 
    299 dialrecall = 425/650,0/25 
    300 record = 1400/500,0/15000 
    301 info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 
    302 stutter = 425/650,0/25 
    303  
    304 [fr] 
    305 description = France 
    306 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    307 ringcadence = 1500,3500 
    308 ; Dialtone can also be 440+330 
    309 dial = 440 
    310 busy = 440/500,0/500 
    311 ring = 440/1500,0/3500 
    312 ; CONGESTION - not specified 
    313 congestion = 440/250,0/250 
    314 callwait = 440/300,0/10000 
    315 ; DIALRECALL - not specified 
    316 dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 
    317 ; RECORDTONE - not specified 
    318 record = 1400/500,0/15000 
    319 info = !950/330,!1400/330,!1800/330 
    320 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 
    321  
    322 [gr] 
    323 description = Greece 
    324 ringcadence = 1000,4000 
    325 dial = 425/200,0/300,425/700,0/800 
    326 busy = 425/300,0/300 
    327 ring = 425/1000,0/4000 
    328 congestion = 425/200,0/200 
    329 callwaiting = 425/150,0/150,425/150,0/8000 
    330 dialrecall = 425/650,0/25 
    331 record = 1400/400,0/15000 
    332 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 
    333 stutter = 425/650,0/25 
    334  
    335 [hu] 
    336 description = Hungary 
    337 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    338 ringcadence = 1250,3750 
    339 dial = 425 
    340 busy = 425/300,0/300 
    341 ring = 425/1250,0/3750 
    342 congestion = 425/300,0/300 
    343 callwaiting = 425/40,0/1960 
    344 dialrecall = 425+450 
    345 ; RECORDTONE - not specified 
    346 record = 1400/400,0/15000 
    347 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 
    348 stutter = 350+375+400 
    349  
    350 [il] 
    351 description = Israel 
    352 ringcadence = 1000,3000 
    353 dial = 414 
    354 busy = 414/500,0/500 
    355 ring = 414/1000,0/3000 
    356 congestion = 414/250,0/250 
    357 callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000 
    358 dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414 
    359 record = 1400/500,0/15000 
    360 info = 1000/330,1400/330,1800/330,0/1000 
    361 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 
    362  
    363  
    364 [in] 
    365 description = India 
    366 ringcadence = 400,200,400,2000 
    367 dial = 400*25 
    368 busy = 400/750,0/750 
    369 ring = 400*25/400,0/200,400*25/400,0/2000 
    370 congestion = 400/250,0/250 
    371 callwaiting = 400/200,0/100,400/200,0/7500 
    372 dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 
    373 record = 1400/500,0/15000 
    374 info = !950/330,!1400/330,!1800/330,0/1000 
    375 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 
    376  
    377 [it] 
    378 description = Italy 
    379 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    380 ringcadence = 1000,4000 
    381 dial = 425/200,0/200,425/600,0/1000 
    382 busy = 425/500,0/500 
    383 ring = 425/1000,0/4000 
    384 congestion = 425/200,0/200 
    385 callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000 
    386 dialrecall = 470/400,425/400 
    387 record = 1400/400,0/15000 
    388 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 
    389 stutter = 470/400,425/400 
    390  
    391 [lt] 
    392 description = Lithuania 
    393 ringcadence = 1000,4000 
    394 dial = 425 
    395 busy = 425/350,0/350 
    396 ring = 425/1000,0/4000 
    397 congestion = 425/200,0/200 
    398 callwaiting = 425/150,0/150,425/150,0/4000 
    399 ; DIALRECALL - not specified 
    400 dialrecall = 425/500,0/50 
    401 ; RECORDTONE - not specified 
    402 record = 1400/500,0/15000 
    403 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 
    404 ; STUTTER - not specified 
    405 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 
    406  
    407 [jp] 
    408 description = Japan 
    409 ringcadence = 1000,2000 
    410 dial = 400 
    411 busy = 400/500,0/500 
    412 ring = 400+15/1000,0/2000 
    413 congestion = 400/500,0/500 
    414 callwaiting = 400+16/500,0/8000 
    415 dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400 
    416 record = 1400/500,0/15000 
    417 info = !950/330,!1400/330,!1800/330,0 
    418 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 
    419  
    420 [mx] 
    421 description = Mexico 
    422 ringcadence = 2000,4000 
    423 dial = 425 
    424 busy = 425/250,0/250 
    425 ring = 425/1000,0/4000 
    426 congestion = 425/250,0/250 
    427 callwaiting = 425/200,0/600,425/200,0/10000 
    428 dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 
    429 record = 1400/500,0/15000 
    430 info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 
    431 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 
    432  
    433 [my] 
    434 description = Malaysia 
    435 ringcadence = 2000,4000 
    436 dial = 425 
    437 busy = 425/500,0/500 
    438 ring = 425/400,0/200 
    439 congestion = 425/500,0/500 
    440  
    441 [nl] 
    442 description = Netherlands 
    443 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    444 ringcadence = 1000,4000 
    445 ; Most of these 425's can also be 450's 
    446 dial = 425 
    447 busy = 425/500,0/500 
    448 ring = 425/1000,0/4000 
    449 congestion = 425/250,0/250 
    450 callwaiting = 425/500,0/9500 
    451 ; DIALRECALL - not specified 
    452 dialrecall = 425/500,0/50 
    453 ; RECORDTONE - not specified 
    454 record = 1400/500,0/15000 
    455 info = 950/330,1400/330,1800/330,0/1000 
    456 stutter = 425/500,0/50 
    457  
    458 [no] 
    459 description = Norway 
    460 ringcadence = 1000,4000 
    461 dial = 425 
    462 busy = 425/500,0/500 
    463 ring = 425/1000,0/4000 
    464 congestion = 425/200,0/200 
    465 callwaiting = 425/200,0/600,425/200,0/10000 
    466 dialrecall = 470/400,425/400 
    467 record = 1400/400,0/15000 
    468 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 
    469 stutter = 470/400,425/400 
    470  
    471 [nz] 
    472 description = New Zealand 
    473 ;NOTE - the ITU has different tonesets for NZ, but according to some residents there, 
    474 ;      this is, indeed, the correct way to do it. 
    475 ringcadence = 400,200,400,2000 
    476 dial = 400 
    477 busy = 400/250,0/250 
    478 ring = 400+450/400,0/200,400+450/400,0/2000 
    479 congestion = 400/375,0/375 
    480 callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200 
    481 dialrecall = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,400 
    482 record = 1400/425,0/15000 
    483 info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400 
    484 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 
    485 unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400 
    486  
    487 [pl] 
    488 description = Poland 
    489 ringcadence = 1000,4000 
    490 dial = 425 
    491 busy = 425/500,0/500 
    492 ring = 425/1000,0/4000 
    493 congestion = 425/500,0/500 
    494 callwaiting = 425/150,0/150,425/150,0/4000 
    495 ; DIALRECALL - not specified 
    496 dialrecall = 425/500,0/50 
    497 ; RECORDTONE - not specified 
    498 record = 1400/500,0/15000 
    499 ; 950/1400/1800 3x0.33 on 1.0 off  repeated 3 times  
    500 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 
    501 ; STUTTER - not specified 
    502 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 
    503  
    504 [pt] 
    505 description = Portugal 
    506 ringcadence = 1000,5000 
    507 dial = 425 
    508 busy = 425/500,0/500 
    509 ring = 425/1000,0/5000 
    510 congestion = 425/200,0/200 
    511 callwaiting = 440/300,0/10000 
    512 dialrecall = 425/1000,0/200 
    513 record = 1400/500,0/15000 
    514 info = 950/330,1400/330,1800/330,0/1000 
    515 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 
    516  
    517 [ru] 
    518 description = Russia / ex Soviet Union 
    519 ringcadence = 800,3200 
    520 dial = 425 
    521 busy = 425/350,0/350 
    522 ring = 425/800,0/3200 
    523 congestion = 425/350,0/350 
    524 callwaiting = 425/200,0/5000 
    525 dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 
    526 record = 1400/500,0/15000 
    527 info = !950/330,!1400/330,!1800/330,0 
    528  
    529 [se] 
    530 description = Sweden 
    531 ringcadence = 1000,5000 
    532 dial = 425 
    533 busy = 425/250,0/250 
    534 ring = 425/1000,0/5000 
    535 congestion = 425/250,0/750 
    536 callwaiting = 425/200,0/500,425/200,0/9100 
    537 dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 
    538 record = 1400/500,0/15000 
    539 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 
    540 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 
    541 ; stutter = 425/320,0/20        ; Real swedish standard, not used for now 
    542  
    543 [sg] 
    544 description = Singapore 
    545 ; Singapore 
    546 ; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf  
    547 ; Frequency specs are:   425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz 
    548 ringcadence = 400,200,400,2000 
    549 dial        = 425 
    550 ring        = 425*24/400,0/200,425*24/400,0/2000     ; modulation should be 100%, not 90% 
    551 busy        = 425/750,0/750 
    552 congestion  = 425/250,0/250 
    553 callwaiting = 425*24/300,0/200,425*24/300,0/3200 
    554 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 
    555 info        = 950/330,1400/330,1800/330,0/1000       ; not currently in use acc. to reference 
    556 dialrecall  = 425*24/500,0/500,425/500,0/2500        ; unspecified in IDA reference, use repeating Holding Tone A,B 
    557 record      = 1400/500,0/15000                       ; unspecified in IDA reference, use 0.5s tone every 15s 
    558 ; additionally defined in reference 
    559 nutone      = 425/2500,0/500 
    560 intrusion   = 425/250,0/2000 
    561 warning     = 425/624,0/4376                         ; end of period tone, warning 
    562 acceptance  = 425/125,0/125 
    563 holdinga    = !425*24/500,!0/500                     ; followed by holdingb 
    564 holdingb    = !425/500,!0/2500 
    565  
    566 [th] 
    567 description = Thailand 
    568 ringcadence = 1000,4000 
    569 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    570 dial = 400*50 
    571 busy = 400/500,0/500 
    572 ring = 420/1000,0/5000 
    573 congestion = 400/300,0/300 
    574 callwaiting = 1000/400,10000/400,1000/400 
    575 ; DIALRECALL - not specified - use special dial tone instead. 
    576 dialrecall = 400*50/400,0/100,400*50/400,0/100 
    577 ; RECORDTONE - not specified 
    578 record = 1400/500,0/15000 
    579 ; INFO - specified as an announcement - use special information tones instead 
    580 info = 950/330,1400/330,1800/330 
    581 ; STUTTER - not specified 
    582 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 
    583  
    584 [uk] 
    585 description = United Kingdom 
    586 ringcadence = 400,200,400,2000 
    587 ; These are the official tones taken from BT SIN350. The actual tones 
    588 ; used by BT include some volume differences so sound slightly different 
    589 ; from Asterisk-generated ones. 
    590 dial = 350+440 
    591 ; Special dial is the intermittent dial tone heard when, for example, 
    592 ; you have a divert active on the line 
    593 specialdial = 350+440/750,440/750 
    594 ; Busy is also called "Engaged" 
    595 busy = 400/375,0/375 
    596 ; "Congestion" is the Beep-bip engaged tone 
    597 congestion = 400/400,0/350,400/225,0/525 
    598 ; "Special Congestion" is not used by BT very often if at all 
    599 specialcongestion = 400/200,1004/300 
    600 unobtainable = 400 
    601 ring = 400+450/400,0/200,400+450/400,0/2000 
    602 callwaiting = 400/100,0/4000 
    603 ; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones 
    604 specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000 
    605 ; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it 
    606 ; is and I've not used a payphone for years) 
    607 creditexpired = 400/125,0/125 
    608 ; These two are used to confirm/reject service requests on exchanges that 
    609 ; don't do voice announcements. 
    610 confirm = 1400 
    611 switching = 400/200,0/400,400/2000,0/400 
    612 ; This is the three rising tones Doo-dah-dee "Special Information Tone", 
    613 ; usually followed by the BT woman saying an appropriate message. 
    614 info = 950/330,0/15,1400/330,0/15,1800/330,0/1000 
    615 ; Not listed in SIN350 
    616 record = 1400/500,0/60000 
    617 stutter = 350+440/750,440/750 
     7country=us 
    6188 
    6199[us] 
     
    63020stutter = !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 
    63121 
    632 [us-old] 
    633 description = United States Circa 1950/ North America 
    634 ringcadence = 2000,4000 
    635 dial = 600*120 
    636 busy = 500*100/500,0/500 
    637 ring = 420*40/2000,0/4000 
    638 congestion = 500*100/250,0/250 
    639 callwaiting = 440/300,0/10000 
    640 dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 
    641 record = 1400/500,0/15000 
    642 info = !950/330,!1400/330,!1800/330,0 
    643 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 
    64422 
    645 [tw] 
    646 description = Taiwan 
    647 ; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html 
    648 ; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html 
    649 ; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm 
    650 ; http://www.pbx-manufacturer.com/ky120dx.htm 
    651 ; http://www.nettwerked.net/tones.txt 
    652 ; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm 
    653 ; 
    654 ; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off 
    655 ; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off 
    656 ; ringing tone 440+480Hz 1 sec. on ,2 sec. off 
    657 ; 
    658 ringcadence = 1000,4000 
    659 dial = 350+440 
    660 busy = 480+620/500,0/500 
    661 ring = 440+480/1000,0/2000 
    662 congestion = 480+620/250,0/250 
    663 callwaiting = 350+440/250,0/250,350+440/250,0/3250 
    664 dialrecall = 300/1500,0/500 
    665 record = 1400/500,0/15000 
    666 info = !950/330,!1400/330,!1800/330,0 
    667 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 
    668  
    669 [ve] 
    670 ; Tone definition source for ve found on  
    671 ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 
    672 description = Venezuela / South America 
    673 ringcadence = 1000,4000 
    674 dial = 425 
    675 busy = 425/500,0/500 
    676 ring = 425/1000,0/4000 
    677 congestion = 425/250,0/250 
    678 callwaiting = 400+450/300,0/6000 
    679 dialrecall = 425 
    680 record = 1400/500,0/15000 
    681 info = !950/330,!1440/330,!1800/330,0/1000 
    682  
    683  
    684 [za] 
    685 description = South Africa 
    686 ; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm 
    687 ; (definitions for other countries can also be found there) 
    688 ; Note, though, that South Africa uses two switch types in their network -- 
    689 ; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere. 
    690 ; The former use 383+417 in dial, ringback etc.  The latter use 400*33 
    691 ; I've provided both, uncomment the ones you prefer 
    692 ringcadence = 400,200,400,2000 
    693 ; dial/ring/callwaiting for the Siemens switches: 
    694 dial = 400*33 
    695 ring = 400*33/400,0/200,400*33/400,0/2000 
    696 callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250 
    697 ; dial/ring/callwaiting for the Alcatel switches: 
    698 ; dial = 383+417 
    699 ; ring = 383+417/400,0/200,383+417/400,0/2000 
    700 ; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250 
    701 congestion = 400/250,0/250 
    702 busy = 400/500,0/500 
    703 dialrecall = 350+440 
    704 ; XXX Not sure about the RECORDTONE 
    705 record = 1400/500,0/10000 
    706 info = 950/330,1400/330,1800/330,0/330 
    707 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 
    708  
  • freepbx/trunk/amp_conf/astetc/manager.conf

    r10122 r10367  
    1616displayconnects=no ;only effects 1.6+ 
    1717 
    18 [AMPMGRUSER
    19 secret = AMPMGRPASS 
     18[admin
     19secret = amp111 
    2020deny=0.0.0.0/0.0.0.0 
    2121permit=127.0.0.1/255.255.255.0 
  • freepbx/trunk/amp_conf/htdocs/admin/config.php

    r10122 r10367  
    1212//GNU General Public License for more details. 
    1313 
    14 // This is ugly, but it is the only way I can think of to get the menu sections localized. MC 
    15 if (false) { 
    16 _("Internal Options & Configuration"); 
    17 _("Inbound Call Control"); 
    18 _("Module Admin"); 
    19 _("System Administration"); 
    20 _("Third Party Addon"); 
    21 } 
    22  
    23 /* benchmark */ 
    24 function microtime_float() { list($usec,$sec) = explode(' ',microtime()); return ((float)$usec+(float)$sec); } 
    25 $benchmark_starttime = microtime_float(); 
    26 /*************/ 
    27  
    2814$type = isset($_REQUEST['type'])?$_REQUEST['type']:'setup'; 
    2915$display = isset($_REQUEST['display'])?$_REQUEST['display']:''; 
     
    4531} 
    4632 
    47 // determine module type to show, default to 'setup' 
    48 $type_names = array( 
    49   'tool'=>_('Tools'), 
    50   'setup'=>_('Setup'), 
    51   'cdrcost'=>_('Call Cost'), 
    52 ); 
    53  
    54 include('header.php'); 
     33include('bootstrap.php'); 
     34 
     35//send headers 
     36@header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');  
     37@header('Expires: Sat, 01 Jan 2000 00:00:00 GMT');  
     38@header('Cache-Control: post-check=0, pre-check=0',false);  
     39@header('Pragma: no-cache');  
     40header('Content-type: text/html; charset=utf-8'); 
     41 
     42// always run a session 
     43@session_start(); 
     44 
     45//include view helpers for this page, which includes authentication as well 
     46include('libraries/framework_view.functions.php'); 
     47 
    5548/* If there is an action request then some sort of update is usually being done. 
    5649   This will protect from cross site request forgeries unless disabled. 
     
    7265// handle special requests 
    7366if (isset($_REQUEST['handler'])) { 
    74   switch ($_REQUEST['handler']) { 
    75     case 'cdr': 
    76       include('cdr/cdr.php'); 
    77       break; 
    78     case 'cdr_export_csv': 
    79       include('cdr/export_csv.php'); 
    80       break; 
    81     case 'cdr_export_pdf': 
    82       include('cdr/export_pdf.php'); 
    83       break; 
    84     case 'reload': 
    85       /** AJAX handler for reload event 
    86        */ 
    87       include_once('common/json.inc.php'); 
    88       $response = do_reload(); 
    89       $json = new Services_JSON(); 
    90       header("Content-type: application/json"); 
    91       echo $json->encode($response); 
    92     break; 
    93     case 'file': 
    94       /** Handler to pass-through file requests  
    95        * Looks for "module" and "file" variables, strips .. and only allows normal filename characters. 
    96        * Accepts only files of the type listed in $allowed_exts below, and sends the corresponding mime-type,  
    97        * and always interprets files through the PHP interpreter. (Most of?) the freepbx environment is available, 
    98        * including $db and $astman, and the user is authenticated. 
    99        */ 
    100       if (!isset($_REQUEST['module']) || !isset($_REQUEST['file'])) { 
    101         die_freepbx("unknown"); 
    102       } 
    103       //TODO: this could probably be more efficient 
    104       $module = str_replace('..','.', preg_replace('/[^a-zA-Z0-9-\_\.]/','',$_REQUEST['module'])); 
    105       $file = str_replace('..','.', preg_replace('/[^a-zA-Z0-9-\_\.]/','',$_REQUEST['file'])); 
    106        
    107       $allowed_exts = array( 
    108         '.js' => 'text/javascript', 
    109         '.js.php' => 'text/javascript', 
    110         '.css' => 'text/css', 
    111         '.css.php' => 'text/css', 
    112         '.html.php' => 'text/html', 
    113         '.jpg.php' => 'image/jpeg', 
    114         '.jpeg.php' => 'image/jpeg', 
    115         '.png.php' => 'image/png', 
    116         '.gif.php' => 'image/gif', 
    117       ); 
    118       foreach ($allowed_exts as $ext=>$mimetype) { 
    119         if (substr($file, -1*strlen($ext)) == $ext) { 
    120           $fullpath = 'modules/'.$module.'/'.$file; 
    121           if (file_exists($fullpath)) { 
    122             // file exists, and is allowed extension 
    123  
    124             // image, css, js types - set Expires to an hour in advance so the client does 
    125             // not keep checking for them. Replace from header.php 
    126             if (!$amp_conf['DEVEL']) { 
    127               @header('Expires: '.gmdate('D, d M Y H:i:s', time()+3600).' GMT', true); 
    128               @header('Cache-Control: ',true);  
    129               @header('Pragma: ', true);  
    130             } 
    131             @header("Content-type: ".$mimetype); 
    132             include($fullpath); 
    133             exit(); 
    134           } 
    135           break; 
    136         } 
    137       } 
    138       die_freepbx("not allowed"); 
    139     break; 
    140   } 
    141   exit(); 
    142 
    143  
    144 if (!$quietmode) { 
     67  $module = isset($_REQUEST['module']) ? $_REQUEST['module'] : false; 
     68  $file = isset($_REQUEST['file']) ? $_REQUEST['file'] : false; 
     69  fileRequestHandler($_REQUEST['handler'], $module, $file); 
     70  unset($module, $file); 
     71} elseif (!$quietmode)  { //notifications 
     72  frameworkPasswordCheck(); 
    14573  module_run_notification_checks(); 
    14674} 
    14775 
    148 $framework_asterisk_running =  checkAstMan(); 
    149  
     76 
     77// determine module type to show, default to 'setup' 
     78$type_names = array( 
     79  'tool'=>_('Tools'), 
     80  'setup'=>_('Setup'), 
     81  'cdrcost'=>_('Call Cost'), 
     82); 
    15083// get all enabled modules 
    15184// active_modules array used below and in drawselects function and genConf function 
    152 $active_modules = module_getinfo(false, MODULE_STATUS_ENABLED); 
    153  
    15485$fpbx_menu = array(); 
    155  
    15686 
    15787// pointer to current item in $fpbx_menu, if applicable 
     
    16292if(is_array($active_modules)){ 
    16393  foreach($active_modules as $key => $module) { 
    164     //include module functions 
    165     if ((!$restrict_mods || isset($restrict_mods[$key])) && is_file("modules/{$key}/functions.inc.php")) { 
    166       require_once("modules/{$key}/functions.inc.php"); 
    167     } 
    168      
     94 
    16995    //create an array of module sections to display 
    17096    // stored as [items][$type][$category][$name] = $displayvalue 
     
    181107        } 
    182108 
    183         if (!$framework_asterisk_running &&  
    184             ((isset($item['needsenginedb']) && strtolower($item['needsenginedb'] == 'yes')) ||  
    185             (isset($item['needsenginerunning']) && strtolower($item['needsenginerunning'] == 'yes'))) 
    186            ) 
    187         { 
    188           $item['disabled'] = true; 
    189         } else { 
    190           $item['disabled'] = false; 
    191         } 
    192  
     109        //set the module 'type' 
    193110        if (!in_array($item['type'], $types)) { 
    194111          $types[] = $item['type']; 
    195112        } 
    196113         
     114        //set the 'controller' 
    197115        if (!isset($item['display'])) { 
    198116          $item['display'] = $itemKey; 
     
    258176} 
    259177 
     178// setup locale - we do this again at the mottom of this file, not sure why -MB 
     179set_language(); 
     180 
    260181// load the component from the loaded modules 
    261182if ( $display != '' && isset($configpageinits) && is_array($configpageinits) ) { 
     
    274195  $currentcomponent->buildconfigpage(); 
    275196} 
     197 
    276198 
    277199//  note: we buffer all the output from the 'page' being loaded.. 
     
    406328  $template['amp_conf'] = &$amp_conf; 
    407329  $template['reload_needed'] = check_reload_needed(); 
    408   $template['benchmark_starttime'] = $benchmark_starttime; 
     330  if ($amp_conf['DEVEL']) { 
     331    $template['benchmark_starttime'] = $benchmark_starttime; 
     332  } 
    409333 
    410334  showview('freepbx', $template); 
  • freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php

    r10286 r10367  
    771771    foreach($destination as $dest){ 
    772772      $selected=($goto==$dest['destination'])?'SELECTED ':' '; 
    773     // This is ugly, but I can't think of another way to do localization for this child object 
    774         if(dgettext('amp',"Terminate Call") == $dest['category']) { 
     773    // This is ugly, but I can't think of another way to do localization for this child object 
     774        if(isset($dest['category']) && dgettext('amp',"Terminate Call") == $dest['category']) { 
    775775          $child_label_text = dgettext('amp',$dest['description']); 
    776776      } 
     
    932932function dbug_write($txt,$check=''){ 
    933933  global $amp_conf; 
    934   $append=FILE_APPEND
     934  $append=true
    935935  //optionaly ensure that dbug file is smaller than $max_size 
    936936  if($check){ 
    937937    $max_size=52428800;//hardcoded to 50MB. is that bad? not enough? 
    938938    $size=filesize($amp_conf['FPBXDBUGFILE']); 
    939     $append=(($size > $max_size)?'':FILE_APPEND); 
    940   } 
    941   file_put_contents($amp_conf['FPBXDBUGFILE'],$txt, $append); 
     939    $append=(($size > $max_size)?false:true); 
     940  } 
     941  if($append) { 
     942    file_put_contents($amp_conf['FPBXDBUGFILE'],$txt, FILE_APPEND); 
     943  } else { 
     944    file_put_contents($amp_conf['FPBXDBUGFILE'],$txt); 
     945  } 
     946   
    942947} 
    943948/** Log an error to the (database-based) log 
  • freepbx/trunk/amp_conf/htdocs/admin/header.php

    r10294 r10367  
    1212//GNU General Public License for more details. 
    1313 
    14 @header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');  
    15 @header('Expires: Sat, 01 Jan 2000 00:00:00 GMT');  
    16 @header('Cache-Control: post-check=0, pre-check=0',false);  
    17 @header('Pragma: no-cache');  
    18 header('Content-type: text/html; charset=utf-8'); 
     14 
    1915//session_cache_limiter('public, no-store');  
    2016 
    21 // include base functions 
    22 require_once('functions.inc.php'); 
    23  
    24 // get settings 
    25 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 
    26 $asterisk_conf  = parse_asterisk_conf($amp_conf["ASTETCDIR"]."/asterisk.conf"); 
    27 if (!$skip_astman) { 
    28   require_once('common/php-asmanager.php'); 
    29   $astman = new AGI_AsteriskManager(); 
    30  
    31   // attempt to connect to asterisk manager proxy 
    32   if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":" . $amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    33     // attempt to connect directly to asterisk, if no proxy or if proxy failed 
    34     if (!$res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":" . $amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 
    35       // couldn't connect at all 
    36       unset( $astman ); 
    37     } 
    38   } 
    39 } 
    40  
    41 // connect to database 
    42 require_once('common/db_connect.php'); //PEAR must be installed 
    43  
    44 // setup locale 
    45 set_language(); 
    46  
    47 // default password check, first for Asterisk Manager, then for ARI 
    48 if (!$quietmode && !isset($_REQUEST['handler'])) { 
    49   $nt = notifications::create($db); 
    50   if ($amp_conf['AMPMGRPASS'] == $amp_conf_defaults['AMPMGRPASS'][1]) { 
    51     $nt->add_warning('core', 'AMPMGRPASS', _("Default Asterisk Manager Password Used"), _("You are using the default Asterisk Manager password that is widely known, you should set a secure password")); 
    52   } else { 
    53     $nt->delete('core', 'AMPMGRPASS'); 
    54   } 
    55 } 
    56  
    57 if (!$quietmode && !isset($_REQUEST['handler'])) { 
    58   $nt = notifications::create($db); 
    59   if ($amp_conf['ARI_ADMIN_PASSWORD'] == $amp_conf_defaults['ARI_ADMIN_PASSWORD'][1]) { 
    60     $nt->add_warning('ari', 'ARI_ADMIN_PASSWORD', _("Default ARI Admin password Used"), _("You are using the default ARI Admin password that is widely known, you should change to a new password. Do this in amportal.conf")); 
    61   } else { 
    62     $nt->delete('ari', 'ARI_ADMIN_PASSWORD'); 
    63   } 
    64 } 
    65  
    66 // always run a session 
    67 @session_start(); 
    68  
    69 // do authentication - header_auth exits if unauthorized 
    70 include('header_auth.php'); 
    71  
    72  
    73 /** Loads a view (from the views/ directory) with a number of named parameters created as local variables. 
    74  * @param  string   The name of the view. 
    75  * @param  array    The parameters to pass. Note that the key will be turned into a variable name for use by the view. 
    76  *                  For example, passing array('foo'=>'bar'); will create a variable $foo that can be used by 
    77  *                  the code in the view. 
    78  */ 
    79 function loadview($viewname, $parameters = false) { 
    80   ob_start(); 
    81   showview($viewname, $parameters); 
    82   $contents = ob_get_contents(); 
    83   ob_end_clean(); 
    84   return $contents; 
    85 } 
    86 /** Outputs the contents of a view. 
    87  * @param  string   The name of the view. 
    88  * @param  array    The parameters to pass. Note that the key will be turned into a variable name for use by the view. 
    89  *                  For example, passing array('foo'=>'bar'); will create a variable $foo that can be used by 
    90  *                  the code in the view. 
    91  */ 
    92 function showview($viewname, $parameters = false) { 
    93   if (is_array($parameters)) { 
    94     extract($parameters); 
    95   } 
    96    
    97   $viewname = str_replace('..','.',$viewname); // protect against going to subdirectories 
    98   if (file_exists('views/'.$viewname.'.php')) { 
    99     include('views/'.$viewname.'.php'); 
    100   } 
    101 } 
    102  
    103 // setup locale 
    104 function set_language() { 
    105   if (extension_loaded('gettext')) { 
    106     if (isset($_COOKIE['lang'])) { 
    107       setlocale(LC_ALL,  $_COOKIE['lang']); 
    108       putenv("LANGUAGE=".$_COOKIE['lang']); 
    109     } else { 
    110       setlocale(LC_ALL,  'en_US'); 
    111     } 
    112     bindtextdomain('amp','./i18n'); 
    113     bind_textdomain_codeset('amp', 'utf8'); 
    114     textdomain('amp'); 
    115   } 
    116 } 
    117  
    11817?> 
  • freepbx/trunk/amp_conf/htdocs/admin/header_auth.php

    r7790 r10367  
    11<?php 
    22 
    3 if (isset($_REQUEST['logout'])) { 
    4   // logging out.. 
    5   // remove the user 
    6   unset($_SESSION['AMP_user']); 
    7   // flag to prompt for pw again 
    8   $_SESSION['logout'] = true;  
    93 
    10   showview('loggedout'); 
    11   exit; 
    12 } 
    13  
    14 switch (strtolower($amp_conf['AUTHTYPE'])) { 
    15   case 'database': 
    16     if (!isset($_SESSION['AMP_user']) && isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) && !isset($_REQUEST['logout'])) { 
    17       if (isset($_SESSION['logout']) && $_SESSION['logout']) { 
    18         // workaround for HTTP-auth - just tried to logout, don't allow a log in (with the same credentials) 
    19         unset($_SESSION['logout']); 
    20         // afterwards, this falls through to the !AMP_user check below, and sends 401 header, which causes the browser to re-prompt the user 
    21       } else { 
    22         // not logged in, and have provided a user/pass 
    23         $_SESSION['AMP_user'] = new ampuser($_SERVER['PHP_AUTH_USER']); 
    24          
    25         if (!$_SESSION['AMP_user']->checkPassword(sha1($_SERVER['PHP_AUTH_PW']))) { 
    26           // failed, one last chance -- fallback to amportal.conf db admin user 
    27           if (($_SERVER['PHP_AUTH_USER'] == $amp_conf['AMPDBUSER']) && ($_SERVER['PHP_AUTH_PW'] == $amp_conf['AMPDBPASS'])) { 
    28    
    29             // password succesfully matched amportal.conf db admin user  
    30    
    31             // set admin access 
    32             $_SESSION['AMP_user']->setAdmin(); 
    33           } else { 
    34             // password failed and admin user fall-back failed 
    35             unset($_SESSION['AMP_user']); 
    36           } 
    37         } // else, succesfully logged in 
    38       }  
    39     } 
    40  
    41     if (!isset($_SESSION['AMP_user'])) { 
    42       // not logged in, send headers 
    43       @header('WWW-Authenticate: Basic realm="FreePBX '._('Administration').'"'); 
    44       @header('HTTP/1.0 401 Unauthorized'); 
    45       showview("unauthorized"); 
    46       exit; 
    47     } 
    48   break; 
    49   case 'webserver': 
    50     // handler for apache doing authentication 
    51     if ((!isset($_SESSION['AMP_user']) || ($_SESSION['AMP_user']->username != $_SERVER['PHP_AUTH_USER'])) && !isset($_REQUEST['logout'])) { 
    52       // not logged in, or username has changed;  and not trying to log out 
    53        
    54       if (isset($_SESSION['logout']) && $_SESSION['logout']) { 
    55         // workaround for HTTP-auth - just tried to logout, don't allow a log in (with the same credentials) 
    56         unset($_SESSION['logout']); 
    57         // afterwards, this falls through to the !AMP_user check below, and sends 401 header, which causes the browser to re-prompt the user 
    58       } else { 
    59         $_SESSION['AMP_user'] = new ampuser($_SERVER['PHP_AUTH_USER']); 
    60          
    61         if ($_SESSION['AMP_user']->username == $amp_conf['AMPDBUSER']) { 
    62           // admin user, grant full access 
    63           $_SESSION['AMP_user']->setAdmin(); 
    64         } 
    65       } 
    66     } 
    67  
    68     if (!isset($_SESSION['AMP_user'])) { 
    69       // not logged in, send headers 
    70       @header('WWW-Authenticate: Basic realm="FreePBX '._('Administration').'"'); 
    71       @header('HTTP/1.0 401 Unauthorized'); 
    72       showview("unauthorized"); 
    73       exit; 
    74     } 
    75   case 'none': 
    76   default: 
    77     if (!isset($_SESSION['AMP_user'])) { 
    78       $_SESSION['AMP_user'] = new ampuser($amp_conf['AMPDBUSER']); 
    79       $_SESSION['AMP_user']->setAdmin(); 
    80     } 
    81   break; 
    82 } 
    834 
    845?> 
  • freepbx/trunk/amp_conf/htdocs/admin/page.modules.php

    r10122 r10367  
    4545if (!$quietmode) { 
    4646  ?> 
    47   <script type="text/javascript" src="common/tabber-minimized.js"></script> 
     47  <script type="text/javascript" src="assets/js/tabber-minimized.js"></script> 
    4848  <script type="text/javascript"> 
    4949  function toggleInfoPane(pane) { 
  • freepbx/trunk/amp_conf/htdocs/admin/views/freepbx_admin.php

    r10285 r10367  
    3838    } 
    3939  } 
     40} 
     41 
     42// This is ugly, but it is the only way I can think of to get the menu sections localized. MC 
     43if (false) { 
     44_("Internal Options & Configuration"); 
     45_("Inbound Call Control"); 
     46_("Module Admin"); 
     47_("System Administration"); 
     48_("Third Party Addon"); 
    4049} 
    4150 
  • modules/branches/2.9/core/functions.inc.php

    r10364 r10367  
    58965896 
    58975897function core_devices_configpageinit($dispnum) { 
    5898   global $currentcomponent
     5898  global $currentcomponent, $amp_conf
    58995899  global $amp_conf; 
    59005900