astcc documentation

Upload: ff

Post on 08-Jan-2016

8 views

Category:

Documents


0 download

DESCRIPTION

Aster CC for Asterisk

TRANSCRIPT

  • The asterisk calling card system

    Compiled by: Anil Madikonda

    [email protected]

  • Table of contents:

    Description............................................................................................................ 3 Requirements .............................................................................................................3 Download ASTCC .....................................................................................................4 Installing Perl on Unix ...............................................................................................5 ASTCC Setup Check List:..........................................................................................6 Step by Step Install of ASTCC?: ................................................................................7 Manual Install: ...........................................................................................................8 Astcc-config.conf .......................................................................................................8 Astcc-exten.conf ........................................................................................................9 Installing the database in MySQL :...........................................................................11

    Mysql database Structure:.....................................................................................11 FAQ .....................................................................................................................14 BUGS...................................................................................................................14

    BRANDS .........................................................................................................15 CARDS ............................................................................................................15 TRUNKS..........................................................................................................15 ROUTES ..........................................................................................................15 CONFIGURE ...................................................................................................15 IAX and SIP FRIENDS ....................................................................................15 PROBLEMS.....................................................................................................15 OTHER NOTES...............................................................................................16

    Comments: ...............................................................................................................17 A kind of solution for RTP cuts before time (last_minute) ................................17 Brands ..............................................................................................................17 Astcc prefix with VoIpjet..................................................................................18 Re: Table changes & brands .............................................................................18 Table changes & brands....................................................................................18 Re: diff to support firstused and expiration .......................................................18 astcc .................................................................................................................18 Re: diff to support firstused and expiration .......................................................19 more user doc ...................................................................................................19 diff to support firstused and expiration..............................................................19

    .............................................................................................................20

    ...........................................................................................................21

  • Description

    !"#!

    Requirements $%

    &

    ''

    "#!

  • Download ASTCC

    ()(' export CVSROOT=:pserver:[email protected]:/usr/cvsroot cvs login ## (password is anoncvs) cvs co astcc

  • Installing Perl on Unix "#! *+,"#!-."/,)"#!0 "!1)+,,0 "0 "),0 " ) -, ,.'22-3.4Just tried this for Debian and it seems to work for me: "apt-get install libdbd-mysql". Then you don't need to do the cpan things... Helped me a lot. 5-367.4 apt-get install libdbd-mysql-perl 5 1 81'6" 63$3$3''*3$3**"#!,,,

    )93$3

    *3$*3''3:)3$,81)3$)'

    ';+6,';3$6(70>$,';" !,3$3''*1)"#!,3$3''*,"#!)3$"#!+, )''22,

  • ASTCC Setup Check List:

    (

    ,,*

    "

    6,

    ,

    ,2,2226:)

    )))

    2,22626

  • Step by Step Install of ASTCC?: 3(,

    ++

    make install

    *

    6626

    62,22626

    2,2226

    2,22266

  • Manual Install:

    If there is any problem create them and copy files manually as under. 2,222,2262662,226262,2226BBB2,22

    72,2226'

    ,2,2226

    '

    Astcc-config.conf :':CC,D>DED&DD>DDD>D>DF,D97DDDDD97:

    1DGH

  • Astcc-exten.conf

    ::6,6:6::1D;IHH%%%%%%%%%)J)3-)K4!!703"5)K47%75.1D;IHH%%%%%%%%%)L)/:: 6:1D;JLGF)J)1D;JLGF)L)3-.1D;JLGF)G)/:1C$!7C):11D;IHH%%%%%%%%%)J)3-)K4!!703"5)$!7)J.1D;IHH%%%%%%%%%)L)/:9BB1D;BB)J)1D;BB)L)3-.1D;BB)G)/:)1D;IJ%%%%%%%%)J)3-)K4!!703"5)K47%75.1D;IJ%%%%%%%%)L)/:)1D;IJ%%%%%%%%)J)3-)K4!!703"5))F.1D;IJ%%%%%%%%)L)/

    61

    1D;IBB)J)1D;IBB)L)3-)K4!!703"5)K47%7'L5)G.1D;IBB)G)/

    /BBM)D3-BB.)+7%7'L+-.

    A1

    DD

  • 8N3703LDOFBPLG8N3L70"7DQ8N3 078%DR:6exten => s,1,Answer exten => s,2,Wait,1 exten => s,3,Playback(ss-noservice) exten => s,4,Wait(30) exten => s,5,Hangup >>exten => 213,1,Answer exten => 213,2,DeadAGI(astcc.agi) exten => 213,3,Hangup :)1D;%%%%%%)J)3-)K4!!703"5)K47%75.1D;%%%%%%)L)/1D;%%%%%%)J)3- 2K47%75.D;J6:include = /var/lib/astcc/astcc-exten.conf 966),)

  • Installing the database in MySQL :

    Create the astcc db using phpmyadmin and import the following database sql file

    Mysql database Structure: 66"#!SLG6666/'3'

    66,,GLG&S6666@@66077$!7@@- `name` varchar(40) NOT NULL default '', `language` varchar(10) default NULL, `inc` char(3) default '30', `publishednum` varchar(40) default NULL, `did` varchar(40) default NULL, `markup` int(11) default NULL, `days` char(3) default '0', `fee` int(11) default NULL, PRIMARY KEY (`name`) .9 7D"":66663@@6670>@@(!7-+7

  • 70>@@(!7-+JLLJOOSGOJGF&OP&GJ&P+)++)JHHHH)H)P)JH)LHH&H&JLJ&F&H&)HHHHHHHHHHHHHH)HHHHHHHHHHHHHH)!!)+7@@(!7-+JJSOSLBP&BSBL&G&BPJO+)++)JHHHH)H)P)JH)LHH&H&JLJ&F&H&)HHHHHHHHHHHHHH)HHHHHHHHHHHHHH)!!)+7@@(!7-+JR+)++)++)J)GH)L.:6666@@66077$!7@@- `name` char(40) NOT NULL default '', `username` char(40) default NULL, `secret` char(40) NOT NULL default '',

  • `context` char(40) NOT NULL default '', `ipaddr` char(20) NOT NULL default '', `port` int(6) NOT NULL default '0', `regseconds` int(11) default '0', PRIMARY KEY (`name`) .9 7D"":6666@@66077$!7@@- `name` char(40) NOT NULL default '', `tech` char(10) default NULL, `path` char(40) NOT NULL default '', PRIMARY KEY (`name`), KEY `pk_trunks` (`name`) .9 7D"":66663@@6670>@@(!7-++)+ +)+1+.:

  • FAQ #'JNT 2U

    'N) !V -.71)),1),-.#'H+H

    U

    ')NW#'N )33))"-J2JHHJX.$U'$)

    J./,BBUK47%7'L5UU'9)K47%75K47%7'5

    ,)-.L./UU',*3-.G.N%II8U'03>

    J ,*,L G F J6& L6P G6B F6

    >

    BUGS

    -LHH&6HP6JP.+9,1,1PHH):6.-KWDDH.4 $maxmins = 600; 54 $maxmins = int(($credit - $adjconn) / $adjcost); 5

  • ,+),PP,,83,Y"

    92970!Z0!,-W3$.

    -U.9))21

    ) %) ),

    !0/,81)"1KJH) )+[HJJ&LR+-++.)JHHH-J2JHH09,)))198%

    3$/)) 3$,,JL-.C7C,

    +

    )Y),Y)Y

    ++*))21L

  • $30),++),))0 )),,3)

    -.',)

    'LB2LHH&'3

    N6,,,1,

    ,6),1))))3W,1) )++

  • Comments:

    !" #$!$ % $& '% $(

    BBLH)LHH&\HB'GO'H&]

    /^,-.

    ,,7PHGH

  • "")!$*+ ,-).$

    JOBL"LO)LHH&\HF'FG'LP]

    -''.(W/U(W)HJJHJJ47%75)+HJJ7%7U

    $/#$",0$1 #!

    #$",0$1 #!

    NHL")LHH&\LG'HH'JH]

    /)++'077$!7- pattern char(40) NOT NULL default '', comment char(80) default NULL, country char(40) default NULL, city char(40) default NULL, type char(10) default NULL, trunks char(80) default NULL, connectcost int(11) NOT NULL default '0', includedseconds int(11) NOT NULL default '0', cost int(11) NOT NULL default '0', PRIMARY KEY (pattern) .G'))+U

    $/ ))! ! $$*)!

    ,HSZ)LHH&\LJ'GP'GP]

    ) I have a patch up on bugs.digium.com that accomplishes what you're looking for (and more). I put installation instructions there. '222I,IUIDHHHGLPO) !77_

    ""

    8HG3)LHHF\HS'JB'LP]

    3,71PHHH,LHHH

  • $/ ))! ! $$*)!

    8LO>)LHHF\JJ'JO'HL]

    N(U3,1"N/707-1I-1.DH1I-1.;1I--...DCK6;*-K..:

  • ""2 $/

    ,+"*)W3$3''#!-3'66*6.#!3

    3

    +,!!'

    2,226N,-6.

    66

    2,2226

    6

    #!+$2,222*8,LHHF2HO2JG'

    810!Q7$6#!0!Q7Z02)+11

  • "!$$, /

    /6$

    6!

  • 6

    6/

  • 60

    6