[Asterisk-Users] Problem with IAX trunking

Peter Spikings peter.spikings at power.net.uk
Fri May 13 02:17:27 MST 2005


Hi all,

I'm trying to get IAX2 trunking between two * boxes and am having
extreme difficulty :) What happens is when the sending * server (the one
initiating the call) receives the ACCEPT back from the receiving server
it immediately replies with INVAL. I've checked the code and it seems to
be not matching the accept packet with the relevant item in the iaxs
array due to the following condition in the match function evaluating as
false:

if ((cur->peercallno == callno) ||
                        ((dcallno == cur->callno) && !cur->peercallno)) 

dcallno and cur->callno are identical and >=16384 indicating a trunk
call but cur->peercallno is non-zero hence it fails.

I'm using Asterisk 1.0.7 on both servers. From the code this looks like
a bug but the fact that Google searches show no-one having the same
problem suggests a config problem ;) I'll attach the configs and
ethereal traces of this happening.

Now it gets more interesting :) If I change type=friend to type=peer in
both config files the call goes through fine but upon closer inspection
it seems to trunk in the outgoing direction only. The streams coming
back when two calls are made seem to be in their own packets with low
call numbers (<16384).

If anyone would like further information then just ask :) If it turns
out to be a bug then I'd be happy to attempt a fix.

Many thanks,

Peter Spikings

This message has been comprehensively scanned for viruses,
please visit http://virus.e2e-filter.com/ for details.
-------------- next part --------------
Frame 1 (110 bytes on wire, 110 bytes captured)
    Arrival Time: May 13, 2005 09:54:04.252924000
    Time delta from previous packet: 0.000000000 seconds
    Time since reference or first frame: 0.000000000 seconds
    Frame Number: 1
    Packet Length: 110 bytes
    Capture Length: 110 bytes
    Protocols in frame: eth:ip:udp:iax2
Ethernet II, Src: 00:50:da:b2:3f:aa, Dst: 00:90:fb:08:2a:db
    Destination: 00:90:fb:08:2a:db (Portwell_08:2a:db)
    Source: 00:50:da:b2:3f:aa (3com_b2:3f:aa)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 10.10.8.253 (10.10.8.253), Dst Addr: 10.10.8.252 (10.10.8.252)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x10 (DSCP 0x04: Unknown DSCP; ECN: 0x00)
        0001 00.. = Differentiated Services Codepoint: Unknown (0x04)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 96
    Identification: 0x0014 (20)
    Flags: 0x04 (Don't Fragment)
        0... = Reserved bit: Not set
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x145d (correct)
    Source: 10.10.8.253 (10.10.8.253)
    Destination: 10.10.8.252 (10.10.8.252)
User Datagram Protocol, Src Port: 4569 (4569), Dst Port: 4569 (4569)
    Source port: 4569 (4569)
    Destination port: 4569 (4569)
    Length: 76
    Checksum: 0x7a39 (correct)
Inter-Asterisk eXchange v2
    Packet type: Full packet (1)
        .100 0000 0000 0000 = Source call: 16384
        .000 0000 0000 0000 = Destination call: 0
        0... .... .... .... = Retransmission: False
        Timestamp: 12
        Outbound seq.no.: 0
        Inbound seq.no.: 0
        Type: IAX (6)
            IAX type: NEW (1)
            Information Element: Protocol version (0x0B)
                IE id: Protocol version (0x0B)
                Length: 2
                Protocol version: 0x0002
            Information Element: Number/extension being called (0x01)
                IE id: Number/extension being called (0x01)
                Length: 3
                Number/extension being called: 601
            Information Element: Calling number (0x02)
                IE id: Calling number (0x02)
                Length: 3
                Calling number: 299
            Information Element: Name of caller (0x04)
                IE id: Name of caller (0x04)
                Length: 14
                Name of caller: Peter Spikings
            Information Element: Desired language (0x0A)
                IE id: Desired language (0x0A)
                Length: 2
                Desired language: en
            Information Element: Desired codec format (0x09)
                IE id: Desired codec format (0x09)
                Length: 4
                Desired codec format: GSM compression (0x00000002)
            Information Element: Actual codec capability (0x08)
                IE id: Actual codec capability (0x08)
                Length: 4
                Actual codec capability: 0x0000f802
                    .... .... .... .... .... .... .... ...0 = G.723.1 compression: Not supported
                    .... .... .... .... .... .... .... ..1. = GSM compression: Supported
                    .... .... .... .... .... .... .... .0.. = Raw mu-law data (G.711): Not supported
                    .... .... .... .... .... .... .... 0... = Raw A-law data (G.711): Not supported
                    .... .... .... .... .... .... ...0 .... = G.726 compression: Not supported
                    .... .... .... .... .... .... ..0. .... = ADPCM: Not supported
                    .... .... .... .... .... .... .0.. .... = Raw 16-bit Signed Linear (8000 Hz) PCM: Not supported
                    .... .... .... .... .... .... 0... .... = LPC10, 180 samples/frame: Not supported
                    .... .... .... .... .... ...0 .... .... = G.729a Audio: Not supported
                    .... .... .... .... .... ..0. .... .... = SPEEX Audio: Not supported
                    .... .... .... .... .... .0.. .... .... = iLBC Free compressed Audio: Not supported
                    .... .... .... ...0 .... .... .... .... = JPEG images: Not supported
                    .... .... .... ..0. .... .... .... .... = PNG images: Not supported
                    .... .... .... .0.. .... .... .... .... = H.261 video: Not supported
                    .... .... .... 0... .... .... .... .... = H.263 video: Not supported
            Information Element: CPE ADSI capability (0x0C)
                IE id: CPE ADSI capability (0x0C)
                Length: 2
                CPE ADSI capability: 0x0002
            Information Element: Date/Time (0x1F)
                IE id: Date/Time (0x1F)
                Length: 4
                data: 0x0aad4ec2

Frame 2 (60 bytes on wire, 60 bytes captured)
    Arrival Time: May 13, 2005 09:54:04.373663000
    Time delta from previous packet: 0.120739000 seconds
    Time since reference or first frame: 0.120739000 seconds
    Frame Number: 2
    Packet Length: 60 bytes
    Capture Length: 60 bytes
    Protocols in frame: eth:ip:udp:iax2
Ethernet II, Src: 00:90:fb:08:2a:db, Dst: 00:50:da:b2:3f:aa
    Destination: 00:50:da:b2:3f:aa (3com_b2:3f:aa)
    Source: 00:90:fb:08:2a:db (Portwell_08:2a:db)
    Type: IP (0x0800)
    Trailer: 00004F0B5210
Internet Protocol, Src Addr: 10.10.8.252 (10.10.8.252), Dst Addr: 10.10.8.253 (10.10.8.253)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x10 (DSCP 0x04: Unknown DSCP; ECN: 0x00)
        0001 00.. = Differentiated Services Codepoint: Unknown (0x04)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 40
    Identification: 0x0202 (514)
    Flags: 0x04 (Don't Fragment)
        0... = Reserved bit: Not set
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x12a7 (correct)
    Source: 10.10.8.252 (10.10.8.252)
    Destination: 10.10.8.253 (10.10.8.253)
User Datagram Protocol, Src Port: 4569 (4569), Dst Port: 4569 (4569)
    Source port: 4569 (4569)
    Destination port: 4569 (4569)
    Length: 20
    Checksum: 0xeff3 (correct)
Inter-Asterisk eXchange v2
    Packet type: Full packet (1)
        .000 0000 0000 0010 = Source call: 2
        .100 0000 0000 0000 = Destination call: 16384
        0... .... .... .... = Retransmission: False
        Timestamp: 12
        Outbound seq.no.: 0
        Inbound seq.no.: 1
        Type: IAX (6)
            IAX type: ACK (4)


** (process:9269): WARNING **: IAX Packet 3 from circuit ids 3->1conflicts with earlier call with circuit ids 1->2
Frame 3 (60 bytes on wire, 60 bytes captured)
    Arrival Time: May 13, 2005 09:54:04.253254000
    Time delta from previous packet: -0.120409000 seconds
    Time since reference or first frame: 0.000330000 seconds
    Frame Number: 3
    Packet Length: 60 bytes
    Capture Length: 60 bytes
    Protocols in frame: eth:ip:udp:iax2
Ethernet II, Src: 00:90:fb:08:2a:db, Dst: 00:50:da:b2:3f:aa
    Destination: 00:50:da:b2:3f:aa (3com_b2:3f:aa)
    Source: 00:90:fb:08:2a:db (Portwell_08:2a:db)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 10.10.8.252 (10.10.8.252), Dst Addr: 10.10.8.253 (10.10.8.253)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x10 (DSCP 0x04: Unknown DSCP; ECN: 0x00)
        0001 00.. = Differentiated Services Codepoint: Unknown (0x04)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 46
    Identification: 0x0203 (515)
    Flags: 0x04 (Don't Fragment)
        0... = Reserved bit: Not set
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x12a0 (correct)
    Source: 10.10.8.252 (10.10.8.252)
    Destination: 10.10.8.253 (10.10.8.253)
User Datagram Protocol, Src Port: 4569 (4569), Dst Port: 4569 (4569)
    Source port: 4569 (4569)
    Destination port: 4569 (4569)
    Length: 26
    Checksum: 0xa6df (correct)
Inter-Asterisk eXchange v2
    Packet type: Full packet (1)
        .100 0000 0000 0000 = Source call: 16384
        .100 0000 0000 0000 = Destination call: 16384
        0... .... .... .... = Retransmission: False
        Timestamp: 13
        Outbound seq.no.: 0
        Inbound seq.no.: 1
        Type: IAX (6)
            IAX type: ACCEPT (7)
            Information Element: Desired codec format (0x09)
                IE id: Desired codec format (0x09)
                Length: 4
                Desired codec format: GSM compression (0x00000002)

Frame 4 (54 bytes on wire, 54 bytes captured)
    Arrival Time: May 13, 2005 09:54:04.253368000
    Time delta from previous packet: 0.000114000 seconds
    Time since reference or first frame: 0.000444000 seconds
    Frame Number: 4
    Packet Length: 54 bytes
    Capture Length: 54 bytes
    Protocols in frame: eth:ip:udp:iax2
Ethernet II, Src: 00:50:da:b2:3f:aa, Dst: 00:90:fb:08:2a:db
    Destination: 00:90:fb:08:2a:db (Portwell_08:2a:db)
    Source: 00:50:da:b2:3f:aa (3com_b2:3f:aa)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 10.10.8.253 (10.10.8.253), Dst Addr: 10.10.8.252 (10.10.8.252)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x10 (DSCP 0x04: Unknown DSCP; ECN: 0x00)
        0001 00.. = Differentiated Services Codepoint: Unknown (0x04)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 40
    Identification: 0x0015 (21)
    Flags: 0x04 (Don't Fragment)
        0... = Reserved bit: Not set
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x1494 (correct)
    Source: 10.10.8.253 (10.10.8.253)
    Destination: 10.10.8.252 (10.10.8.252)
User Datagram Protocol, Src Port: 4569 (4569), Dst Port: 4569 (4569)
    Source port: 4569 (4569)
    Destination port: 4569 (4569)
    Length: 20
    Checksum: 0xaffc (correct)
Inter-Asterisk eXchange v2
    Packet type: Full packet (1)
        .100 0000 0000 0000 = Source call: 16384
        .100 0000 0000 0000 = Destination call: 16384
        0... .... .... .... = Retransmission: False
        Timestamp: 0
        Outbound seq.no.: 0
        Inbound seq.no.: 0
        Type: IAX (6)
            IAX type: INVAL (10)

-------------- next part --------------

; 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.
;
disallow=all
;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=100
;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:secretpass at tormenta.linux-support.net

;
; Register joe at remote host with no password
;
;register => joe at 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:pass at iaxtel.com

register => asterisk1:[asterisk1]@10.10.8.252
;
; 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:passwd at iax.fwdnet.net
;
;
; 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

[asterisk2]
type=friend
inkeys=asterisk2
outkey=asterisk1
auth=rsa
context=international
host=dynamic
trunk=yes
permit=10.10.8.252/255.255.255.255
-------------- next part --------------

; 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.
;
;disallow=all
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=300
;maxexcessbuffer=300
minexcessbuffer=100
;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:secretpass at tormenta.linux-support.net

;
; Register joe at remote host with no password
;
;register => joe at 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:pass at iaxtel.com
register => asterisk2:[asterisk2]@10.10.8.253
;
; 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:passwd at iax.fwdnet.net
;
;
; 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

[asterisk1]
type=friend
inkeys=asterisk1
outkey=asterisk2
auth=rsa
context=international
host=dynamic
permit=10.10.8.253/255.255.255.255
trunk=yes


More information about the asterisk-users mailing list