Hi zusammen,
nachdem ich nun das Problem mit dem Installieren des asterisk und des chan_capi gelöst habe. Schaffe ich es leider nicht die einzelnen Dateien richtig einzurichten.
[Edit]
Also.. das Ganze klappt jetz und wir können auch raustelefonieren. Das einzige Problem ist noch.. dass der vom Computer auf Festnetz anruft gehört wird, aber der, der vom Telefon spricht nicht ankommt. Woran kann das liegen, dass die Tonübermittelung fehlt?
modules.conf
iax.conf
extensions.conf
capi.conf
nachdem ich nun das Problem mit dem Installieren des asterisk und des chan_capi gelöst habe. Schaffe ich es leider nicht die einzelnen Dateien richtig einzurichten.
[Edit]
Also.. das Ganze klappt jetz und wir können auch raustelefonieren. Das einzige Problem ist noch.. dass der vom Computer auf Festnetz anruft gehört wird, aber der, der vom Telefon spricht nicht ankommt. Woran kann das liegen, dass die Tonübermittelung fehlt?
modules.conf
Code:
;
; Asterisk configuration file
;
; Module Loader configuration file
;
[modules]
autoload=yes
;
; If you want, load the GTK console right away.
; Don't load the KDE console since
; it's not as sophisticated right now.
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
;
; Intercom application is obsoleted by
; chan_oss. Don't load it.
;
noload => app_intercom.so
;
; Explicitly load the chan_modem.so early on to be sure
; it loads before any of the chan_modem_* 's afte rit
;
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_i4l.so
noload => chan_modem_bestdata.so
load => chan_capi.so
load => res_features.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
;
; Module names listed in "global" section will have symbols globally
; exported to modules loaded after them.
;
[global]
chan_capi.so=yes
chan_modem.so=no
iax.conf
Code:
; Inter-Asterisk eXchange driver definition
;
;
; General settings, like port number to bind to, and
; an option address (the default is to bind to all
; local addresses).
;
[general]
;bindport=4569
;bindaddr=192.168.0.1
;
; Set iaxcompat to yes if you plan to use layered
; switches. It incurs a small performance hit to enable it
;
;iaxcompat=yes
;
; For increased security against brute force password attacks
; enable "delayreject" which will delay the sending of authentication
; reject for REGREQ or AUTHREP if there is a password.
;
;delayreject=yes
;
; You may specify a global default AMA flag for iaxtel calls. It must be
; one of 'default', 'omit', 'billing', or 'documentation'. These flags
; are used in the generation of call detail records.
;
;amaflags=default
;
; You may specify a default account for Call Detail Records in addition
; to specifying on a per-user basis
;
;accountcode=lss0101
;
; You may specify a global default language for users.
; Can be specified also on a per-user basis
; If omitted, will fallback to english
;
;language=en
;
; Specify bandwidth of low, medium, or high to control which codecs are used
; in general.
;
bandwidth=low
;
; You can also fine tune codecs here using "allow" and "disallow" clauses
; with specific codecs. Use "all" to represent all formats.
;
;allow=all ; same as bandwidth=high
;disallow=g723.1 ; Hm... Proprietary, don't use it...
disallow=lpc10 ; Icky sound quality... Mr. Roboto.
;allow=gsm ; Always allow GSM, it's cool :)
;
; You can adjust several parameters relating to the jitter buffer.
; The jitter buffer's function is to compensate for varying
; network delay.
;
; All the jitter buffer settings except dropcount are in milliseconds.
; The jitter buffer works for INCOMING audio - the outbound audio
; will be dejittered by the jitter buffer at the other end.
;
; jitterbuffer=yes|no: global default as to whether you want
; the jitter buffer at all.
;
; dropcount: the jitter buffer is sized such that no more than "dropcount"
; frames would have been "too late" over the last 2 seconds.
; Set to a small number. "3" represents 1.5% of frames dropped
;
; maxjitterbuffer: a maximum size for the jitter buffer.
; Setting a reasonable maximum here will prevent the call delay
; from rising to silly values in extreme situations; you'll hear
; SOMETHING, even though it will be jittery.
;
; maxexcessbuffer: If conditions improve after a period of high jitter,
; the jitter buffer can end up bigger than necessary. If it ends up
; more than "maxexcessbuffer" bigger than needed, Asterisk will start
; gradually decreasing the amount of jitter buffering.
;
; minexcessbuffer: Sets a desired mimimum amount of headroom in
; the jitter buffer. If Asterisk has less headroom than this, then
; it will start gradually increasing the amount of jitter buffering.
;
; jittershrinkrate: when the jitter buffer is being gradually shrunk
; (or enlarged), how many millisecs shall we take off per 20ms frame
; received? Use a small number, or you will be able to hear it
; changing. An example: if you set this to 2, then the jitter buffer
; size will change by 100 millisecs per second.
jitterbuffer=no
;dropcount=2
;maxjitterbuffer=500
;maxexcessbuffer=80
;minexcessbuffer=10
;jittershrinkrate=1
;trunkfreq=20 ; How frequently to send trunk msgs (in ms)
;
;
; We can register with another IAX server to let him know where we are
; in case we have a dynamic IP address for example
;
; Register with tormenta using username marko and password secretpass
;
;register => marko:[email protected]
;
; Register joe at remote host with no password
;
;register => joe@remotehost:5656
;
; Register marko at tormenta.linux-support.net using RSA key "torkey"
;
;register => marko:[torkey]@tormenta.linux-support.net
;
; Sample Registration for iaxtel
;
; Visit http://www.iaxtel.com to register with iaxtel. Replace "user"
; and "pass" with your username and password for iaxtel. Incoming
; calls arrive at the "s" extension of "default" context.
;
;register => user:[email protected]
;
; Sample Registration for IAX + FWD
;
; To register using IAX with FWD, it must be enabled by visiting the URL
; http://www.fwdnet.net/index.php?section_id=112
;
; Note that you need an extension in you default context which matches
; your free world dialup number. Please replace "FWDNumber" with your
; FWD number and "passwd" with your password.
;
;register => FWDNumber:[email protected]
;
;
; You can disable authentication debugging to reduce the amount of
; debugging traffic.
;
;authdebug=no
;
; Finally, you can set values for your TOS bits to help improve
; performance. Valid values are:
; lowdelay -- Minimize delay
; throughput -- Maximize throughput
; reliability -- Maximize reliability
; mincost -- Minimize cost
; none -- No flags
;
tos=lowdelay
;
; If mailboxdetail is set to "yes", the user receives
; the actual new/old message counts, not just a yes/no
; as to whether they have messages. this can be set on
; a per-peer basis as well
;
;mailboxdetail=yes
;
; If regcontext is specified, Asterisk will dynamically
; create and destroy a NoOp priority 1 extension for a given
; peer who registers or unregisters with us. The actual extension
; is the 'regexten' parameter of the registering peer or its
; name if 'regexten' is not provided. More than one regexten may be supplied
; if they are separated by '&'. Patterns may be used in regexten.
;
;regcontext=iaxregistrations
;
; Guest sections for unauthenticated connection attempts. Just
; specify an empty secret, or provide no secret section.
;
[guest]
type=user
context=default
callerid="Guest IAX User"
;
; Trust Caller*ID Coming from iaxtel.com
;
[iaxtel]
type=user
context=default
auth=rsa
inkeys=iaxtel
;
; Trust Caller*ID Coming from iax.fwdnet.net
;
[iaxfwd]
type=user
context=default
auth=rsa
inkeys=freeworlddialup
;
; Further user sections may be added, specifying a context and a
; secret used for connections with that given authentication name.
; Limited IP based access control is allowed by use of "allow" and
; "deny" keywords. Multiple rules are permitted. Multiple permitted
; contexts may be specified, in which case the first will be the default.
; You can also override caller*ID so that when you receive a call you
; set the Caller*ID to be what you want instead of trusting what
; the remote user provides
;
; There are three authentication methods that are supported: md5, plaintext,
; and rsa. The least secure is "plaintext", which sends passwords cleartext
; across the net. "md5" uses a challenge/response md5 sum arrangement, but
; still requires both ends have plain text access to the secret. "rsa" allows
; unidirectional secret knowledge through public/private keys. If "rsa"
; authentication is used, "inkeys" is a list of acceptable public keys on the
; local system that can be used to authenticate the remote peer, separated by
; the ":" character. "outkey" is a single, private key to use to authenticate
; to the other side. Public keys are named /var/lib/asterisk/keys/<name>.pub
; while private keys are named /var/lib/asterisk/keys/<name>.key. Private
; keys should always be 3DES encrypted.
;
;
;[markster]
;type=user
;context=default
;context=local
;auth=md5,plaintext,rsa
;secret=markpasswd
;notransfer=yes ; Disable IAX native transfer
;jitterbuffer=yes ; Override global setting an enable jitter buffer
; ; for this user
;callerid="Mark Spencer" <(256) 428-6275>
;deny=0.0.0.0/0.0.0.0
;accountcode=markster0101
;permit=209.16.236.73/255.255.255.0
;language=en ; Use english as default language
;
; Peers may also be specified, with a secret and
; a remote hostname.
;
[demo]
type=peer
username=asterisk
secret=supersecret
host=216.207.245.47
;sendani=no
;host=asterisk.linux-support.net
;port=5036
;mask=255.255.255.255
;qualify=yes ; Make sure this peer is alive
;jitterbuffer=no ; Turn off jitter buffer for this peer
;
; Peers can remotely register as well, so that they can be
; mobile. Default IP's can also optionally be given but
; are not required. Caller*ID can be suggested to the other
; side as well if it is for example a phone instead of another
; PBX.
;
;[dynamichost]
;host=dynamic
;secret=mysecret
;mailbox=1234 ; Notify about mailbox 1234
;inkeys=key1:key2
;peercontext=local ; Default context to request for calls to peer
;defaultip=216.207.245.34
;callerid="Some Host" <(256) 428-6011>
;
;
;[biggateway]
;type=peer
;host=192.168.0.1
;context=*
;secret=myscret
;trunk=yes ; Use IAX2 trunking with this host
;
;
; Friends are a short cut for creating a user and
; a peer with the same values.
;
;[marko]
;type=friend
;host=dynamic
;regexten=1234
;secret=moofoo
;context=default
;permit=0.0.0.0/0.0.0.0
[christopherhuebel]
type=friend
username=christopherhuebel
host=dynamic
secret=anything
context=default
[michaelweis]
type=friend
username=michaelweis
host=dynamic
secret=anything
context=default
extensions.conf
Code:
;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
;
;
; The "General" category is for certain variables.
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified. Remember that all comments
; made in the file will be lost when that happens.
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no
; You can include other config files, use the #include command (without the ';')
; Note that this is different from the "include" command that includes contexts within
; other contexts. The #include command works in all asterisk configuration files.
;#include "filename.conf"
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=Zap/g2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider
;
; Any category other than "General" and "Globals" represent
; extension contexts, which are collections of extensions.
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal. In patterns, some characters have special meanings:
;
; X - any digit from 0-9
; Z - any digit from 1-9
; N - any digit from 2-9
; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
; . - wildcard, matches anything remaining (e.g. _9011. matches
; anything starting with 9011 excluding 9011 itself)
;
; For example the extension _NXXXXXX would match normal 7 digit dialings,
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension.
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred. One may include another
; context in the current one as well, optionally with a
; date and time. Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority,application(arg1,arg2,...)
;exten => someexten,priority,application,arg1|arg2...
;
; Timing list for includes is
;
; <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern. The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;
;
; Here are the entries you need to participate in the IAXTEL
; call routing system. Most IAXTEL numbers begin with 1-700, but
; there are exceptions. For more information, and to sign
; up, please go to [url]www.gnophone.com[/url] or [url]www.iaxtel.com[/url]
;
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)
;
; The SWITCH statement permits a server to share the dialplain with
; another server. Use with care: Reciprocal switch statements are not
; allowed (e.g. both A -> B and B -> A), and the switched server needs
; to be on-line or else dialing can be severly delayed.
;
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext
[trunkint]
;
; International long distance through trunk
;
exten => _9011.,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9011.,2,Congestion
[trunkld]
;
; Long distance context accessed through trunk
;
exten => _91NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91NXXNXXXXXX,2,Congestion
[trunklocal]
;
; Local seven-digit dialing accessed through trunk interface
;
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,2,Congestion
[trunktollfree]
;
; Long distance context accessed through trunk interface
;
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91800NXXXXXX,2,Congestion
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,2,Congestion
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,2,Congestion
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,2,Congestion
[international]
;
; Master context for international long distance
;
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
;
; Master context for long distance
;
ignorepat => 9
include => local
include => trunkld
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
;
; You can use an alternative switch type as well, to resolve
; extensions that are not known here, for example with remote
; IAX switching you transparently get access to the remote
; Asterisk PBX
;
; switch => IAX2/user:password@bigserver/local
[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
[demo]
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,2,Answer ; Answer the line
exten => s,3,DigitTimeout,5 ; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10 ; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats) ; Play a congratulatory message
exten => s,6,BackGround(demo-instruct) ; Play some instructions
exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
exten => 2,2,Goto(s,6)
exten => 3,1,SetLanguage(fr) ; Set language to french
exten => 3,2,Goto(s,5) ; Start with the congratulations
exten => 1000,1,Goto(default,s,1)
;
; We also create an example user, 1234, who is on the console and has
; voicemail, etc.
;
exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
; (but skip if channel is not up)
exten => 1234,2,Macro(stdexten,1234,${CONSOLE})
exten => 1235,1,Voicemail(u1234) ; Right to voicemail
exten => 1236,1,Dial(Console/dsp) ; Ring forever
exten => 1236,2,Voicemail(u1234) ; Unless busy
;
; # for when they're done with the demo
;
exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
exten => #,2,Hangup ; Hang them up.
;
; A timeout and "invalid extension rule"
;
exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; "That's not valid, try again"
;
; Create an extension, 500, for dialing the
; Asterisk demo.
;
exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
exten => 500,2,Dial(IAX2/[email protected]/s@default) ; Call the Asterisk demo
exten => 500,3,Playback(demo-nogo) ; Couldn't connect to the demo site
exten => 500,4,Goto(s,6) ; Return to the start over message.
;
; Create an extension, 600, for evaulating echo latency.
;
exten => 600,1,Playback(demo-echotest) ; Let them know what's going on
exten => 600,2,Echo ; Do the echo test
exten => 600,3,Playback(demo-echodone) ; Let them know it's over
exten => 600,4,Goto(s,6) ; Start over
;
; Give voicemail at extension 8500
;
exten => 8500,1,VoicemailMain
exten => 8500,2,Goto(s,6)
;
; Here's what a phone entry would look like (IXJ for example)
;
;exten => 1265,1,Dial(Phone/phone0,15)
;exten => 1265,2,Goto(s,5)
;[mainmenu]
;
; Example "main menu" context with submenu
;
;exten => s,1,Answer
;exten => s,2,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."
;exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Hangup
;include => default
;
;[submenu]
;exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
;exten => s,2,Wait,2
;exten => s,3,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..."
;exten => 1,1,Goto(default,steve,1)
;exten => 2,1,Goto(default,mark,2)
[default]
;
; By default we include the demo. In a production system, you
; probably don't want to have the demo there.
;
include => demo
;
; Extensions like the two below can be used for FWD, Nikotel, sipgate etc.
; Note that you must have a [sipprovider] section in sip.conf whereas
; the otherprovider.net example does not require such a peer definition
;
;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r)
;exten => _42X.,1,Dial(SIP/user:passwd@${EXTEN:2}@otherprovider.net,30,rT)
; Real extensions would go here. Generally you want real extensions to be 4 or 5
; digits long (although there is no such requirement) and start with a single
; digit that is fairly large (like 6 or 7) so that you have plenty of room to
; overlap extensions and menu options without conflict. You can alias them with
; names, too and use global variables
;exten => 6245,hint,SIP/Grandstream1&SIP/Xlite1 ; Channel hints for presence
;exten => 6245,1,Dial(SIP/Grandstream1,20,rt) ; permit transfer
;exten => 6245,1,Dial(${HINT},20,rtT) ; Use hint as listed
;exten => 6361,1,Dial(IAX2/JaneDoe,,rm) ; ring without time limit
;exten => 6389,1,Dial(MGCP/aaln/[email protected])
;exten => 6394,1,Dial(Local/6275/n) ; this will dial ${MARK}
;exten => 6275,1,Macro(stdexten,6275,${MARK}) ; assuming ${MARK} is something like Zap/2
;exten => mark,1,Goto(6275|1) ; alias mark to 6275
;exten => 6536,1,Macro(stdexten,6236,${WIL}) ; Ditto for wil
;exten => wil,1,Goto(6236|1)
;
; Some other handy things are an extension for checking voicemail via
; voicemailmain
;
;exten => 8500,1,VoicemailMain
;exten => 8500,2,Hangup
;
; Or a conference room (you'll need to edit meetme.conf to enable this room)
;
;exten => 8600,1,Meetme(1234)
;
; Or playing an announcement to the called party, as soon it answers
;
;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg))
;
; For more information on applications, just type "show applications" at your
; friendly Asterisk CLI prompt.
;
; 'show application <command>' will show details of how you
; use that particular application in this file, the dial plan.
;
exten => 6666,1,Dial(IAX2/christopherhuebel)
exten => 7777,1,Dial(IAX2/michaelweis)
exten => s,1,Dial(CAPI/123456789:b${EXTEN},30)
exten => _X.,1,Answer
exten => _X.,2,Dial(CAPI/908475:${EXTEN},,Ttr)
exten => _X.,3,Congestion
exten => _X.,4,Hangup
capi.conf
Code:
;
; CAPI config
;
;
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
[interfaces]
msn=908475
incomingmsn=*
controller=1
softdtmf=1
accountcode=
context=demo
;echosquelch=1
;echocancel=yes
;echotail=64
;callgroup=1
deflect=123456789
devices=2
;PointToPoint (55512-0)
;for outgoing calls use example 5551212
;and in dialplan you can use callerid like
;exten => _0XXX.,1,StripMSD,1
;exten => _XXX.,2,Dial,CAPI/55512${CALLERIDNUM}:bBYEXTENSION
;============================================================
;mode=immediate
;isdnmode=ptp
;msn=55512
;controller=2
;devices=30
exten => _0XXX.,1,StripMSD,1
exten => _XXX.,2,Dial,CAPI/908475${CALLERIDNUM}:bBYEXTENSION