Asterisk 1.4.5 + voicepulse / incoming calls fail

I am running Asterisk 1.4.5 on CentOS 5. I use the RPMs from the ATrpm site. and the latest Asterisk-gui pulled from the trunk using svn.

I use voicepulse (IAX) as my ITSP and have 2 softphones. I configured everything with the gui. Outbound calls work, but inbound calls fail with this message

[Jun 23 09:33:50] NOTICE[7216] chan_iax2.c: Rejected connect attempt from 64.61.93.90, who was trying to reach ‘1330zzzzzzz@’

(I anonomized the phone number. The 64… number is connect02.voicepulse.com).

Also, just before this message was this one which looks good:

[Jun 23 09:32:54] VERBOSE[7212] logger.c: – Registered IAX2 to ‘64.61.93.90’, who sees us as IP.IP.IP.IP:4569 with no messages waiting

(I anonomized my external IP address. I have a static IP address)

My actual configuration changes just 2 files – users.conf and extensions.conf

Here are the differences (minus comments and empty lines, etc.) for extensions.conf.

105c97,98
< TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)

TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)
trunk_1 = IAX2/trunk_1
558,562c515,544
< ;
< ; An extension like the one below can be used for FWD, Nikotel, sipgate etc.
< ; Note that you must have a [sipprovider] section in sip.conf
< ;
< ;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,r)


[asterisk_guitools]
exten = executecommand,1,System(${command})
exten = executecommand,n,Hangup()
exten = record_vmenu,1,Answer
exten = record_vmenu,n,Playback(vm-intro)
exten = record_vmenu,n,Record(${var1})
exten = record_vmenu,n,Playback(vm-saved)
exten = record_vmenu,n,Playback(vm-goodbye)
exten = record_vmenu,n,Hangup
exten = play_file,1,Answer
exten = play_file,n,Playback(${var1})
exten = play_file,n,Hangup
hasbeensetup = Y

[DID_trunk_1]
include = default
exten = _X.,1,Goto(default|6000|1)
exten = s,1,Goto(default|6000|1)

[numberplan-custom-1]
plancomment = DialPlan1
include = default
exten = _1XXXXXXXXXX,1,Macro(trunkdial,${trunk_1}/${EXTEN:0})
comment = _1XXXXXXXXXX,1,Long Distance,standard
exten = _8XXXXXXX,1,Macro(trunkdial,${trunk_1}/1330${EXTEN:1})
comment = _8XXXXXXX,1,Local7,standard
exten = _330XXXXXXXX,1,Macro(trunkdial,${trunk_1}/1${EXTEN:0})
comment = _330XXXXXXXX,1,Local330,standard
exten = _8330XXXXXXX,1,Macro(trunkdial,${trunk_1}/1${EXTEN:1})
comment = _8330XXXXXXX,1,Local10,standard

Likewise for users.conf.

59a52

localextenlength = 4
60a54,126
[trunk_1]
disallow = g729
allow = ulaw,alaw,gsm,ilbc,speex,g726,adpcm,lpc10
callerid = YYYYYYYYYY
contact = Jim Ramsey
context = DID_trunk_1
dialformat = ${EXTEN:1}
fromdomain =
fromuser = UUUUUUUU
group =
hasexten = no
hasiax = yes
hassip = no
host = connect02.voicepulse.com
insecure =
port = 4569
provider =
registeriax = yes
registersip = no
secret = PPPPPPPP
trunkname = Custom - Connect VP
trunkstyle = customvoip
username = UUUUUUUU

[6000]
callwaiting = yes
cid_number = YYYYYYYYYY
context = numberplan-custom-1
email =
fullname = Teacher
group =
hasagent = no
hasdirectory = yes
hasiax = yes
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 6000
secret = SSSSSS
threewaycalling = yes
zapchan =
vmsecret = 6000
registeriax = yes
registersip = yes
canreinvite = no
nat = yes
dtmfmode = rfc2833

[6001]
callwaiting = yes
cid_number = 6001
context = numberplan-custom-1
email =
fullname = FiatSpyder
group =
hasagent = no
hasdirectory = yes
hasiax = yes
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 6001
secret = SSSSSS
threewaycalling = yes
zapchan =
vmsecret = 6001
registeriax = yes
registersip = yes
canreinvite = no
nat = yes
dtmfmode = rfc2833

OK. I now have a working configuration. A key difference is that I didn’t use the gui. In fact, I propably can’t use is anymore without having it break what I have working.

Much of iax.conf, sip.conf, and extensions.conf come from the configuration files provided by Voice Pulse – though extensions.conf does use a key macro from the 1.4.5 file. users.conf is only used to define stations not trunks.

extensions.conf:

    ; Sample /etc/asterisk/extensions.conf
    ; Created September 1, 2004
    ; Updated May 3, 2006
    ;
    ; Copyright (c) 2003-2006 VoicePulse Inc.
    ; VoicePulse is a registered trademark of VoicePulse Inc.
    ;
    ; =========================================================
    ; QUICKSTART WITH VOICEPULSE CONNECT FOR ASTERISK
    ;
    ; * Login to your VoicePulse Connect for Asterisk account:
    ;   http://connect.voicepulse.com/
    ;
    ; * Go to the API page to see your API key
    ;
    ; * Do a text search & replace in this file:
    ;   - Replace MY_API_KEY with your API key
    ;   - There should be 1 occurrence
    ;   - Don't replace VOICEPULSE_API_KEY by mistake!
    ;
    ; * Test your incoming and outgoing calls using the test
    ;   programs mentioned in sip.conf and iax.conf
    ;
    ; * Incoming calls should read back your number and any
    ;   digits you press
    ;
    ; * After testing, modify the OUTGOING CONTEXT and
    ;   INCOMING CONTEXT per your requirements.
    ; 
    ; =========================================================


    ; ---------------------------------------------------------
    ; GENERAL SETTINGS
    ;
    ; ---------------------------------------------------------
    
[general]
static=yes
writeprotect=no




    ; ---------------------------------------------------------
    ; GLOBAL SETTINGS
    ;
    ; ---------------------------------------------------------

[globals]

    ; .........................................................
    ; API Settings
    ;
    ; MY_API_KEY is the key found in your Account Center.
    ;
    ; VOICEPULSE_API_PREFIX is to prevent naming conflicts
    ; between your own variables and the ones returned by the
    ; VoicePulse API.  When you run an API macro, like
    ; [macro-voicepulseflexrate], it will set a number of local
    ; variables based on the response.  These variable names
    ; will be prefixed with the VOICEPULSE_API_PREFIX that is
    ; defined below.
    ;
    ; To access the variables set by the API, you can refer to
    ; them by doing:
    ;
    ; ${VOICEPULSE_FLEXRATE}
    ;
    ; This is a variable "FLEXRATE" returned by the API and
    ; prefixed with "VOICEPULSE_" defined below.
    ;
    ; .........................................................

VOICEPULSE_API_KEY=VCGikCSRlxj6khVM2Na2VxKbhvaTQ6uJWyIZheUOFAs8khe6znRyWT4KqEBi8f9N5KOltI2Hip2JIueo1dbQBIgDnQ615YGdbWFertn3x4g%3d
VOICEPULSE_API_PREFIX=VOICEPULSE_

    ; .........................................................
    ; Peers
    ; .........................................................

VOICEPULSE_GATEWAY_OUT_A=voicepulse03
VOICEPULSE_GATEWAY_OUT_B=voicepulse02


;JRjr start ============== from 1.4.5

[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(${ARG1},u)	; 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(${ARG1},b)		; 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

;JRjr end ================ from 1.4.5



    ; ---------------------------------------------------------
    ; VOICEPULSE FLEXRATE MACRO
    ;
    ; This macro will return realtime pricing so you may do
    ; your own least cost routing between VoicePulse and your
    ; other termination providers.
    ;
    ; To use this macro, use the following line in your
    ; outgoing context:
    ;
    ; exten => _XX.,n,Macro(voicepulseflexrate,${VOICEPULSE_API_KEY},${EXTEN})
    ;
    ; The macro will set the VOICEPULSE_FLEXRATE variable to
    ; a decimal value.  Test the value of that variable against 
    ; your other providers' flat rate value to determine if the 
    ; VoicePulse rate is lower and where to send the call.  One
    ; way to do this is using the GotoIf() command:
    ;
    ; exten => _XX.,n,GotoIf($[${VOICEPULSE_FLEXRATE} < 0.013]?outgoing|${EXTEN}|1:otheritsp-outgoing|${EXTEN}|1)
    ;
    ; This statement assumes you are using a provider with a
    ; flat $0.013 rate to the US.  The statement checks if the
    ; VOICEPULSE_FLEXRATE is lower.  If so, send the call through
    ; VoicePulse using the [outgoing] context (as configured 
    ; in this sample file).  Otherwise, send the call through
    ; some other ITSP using the [otheritsp-outgoing] context
    ; (which does not exist in this sample file).
    ;
    ; Copyright (c) 2006 V-o-i-c-e-P-u-l-s-e Inc.
    ;
    ; ---------------------------------------------------------

[macro-voicepulseflexrate]
exten => s,1,Set(${VOICEPULSE_API_PREFIX}FLEXRATE=999)
exten => s,2,Set(${VOICEPULSE_API_PREFIX}FLEX_RATE=999)
exten => s,n,Set(VoicePulsePostData=ApiKey=${ARG1}&PhoneNumber=${ARG2})
exten => s,n,Set(VoicePulseResponse=${CURL(https://connect.voicepulse.com/secure/services/Api0605.asmx/AstGetFlexRate|${VoicePulsePostData})})
exten => s,n,Macro(voicepulseparseresponse,${VoicePulseResponse})

[macro-voicepulseparseresponse]
exten => s,1,Set(VoicePulseTemp=${ARG1})
exten => s,n,Set(VoicePulseTemp=${CUT(VoicePulseTemp,>,2-)})
exten => s,n,Set(VoicePulseTemp=${CUT(VoicePulseTemp,>,2-)})
exten => s,n,Set(VoicePulseTemp=${CUT(VoicePulseTemp,<,1)})
exten => s,n,Set(VoicePulseCounter=${FIELDQTY(VoicePulseTemp,~)})
exten => s,n,While($[${VoicePulseCounter} > 0])
exten => s,n,Set(VoicePulsePair=${CUT(VoicePulseTemp,~,${VoicePulseCounter})})
exten => s,n,Set(VoicePulseKey=${CUT(VoicePulsePair,=,1)})
exten => s,n,Set(VoicePulseValue=${CUT(VoicePulsePair,=,2)})
exten => s,n,Set(${VOICEPULSE_API_PREFIX}${VoicePulseKey}=${VoicePulseValue})
exten => s,n,Set(VoicePulseCounter=$[${VoicePulseCounter}-1])
exten => s,n,EndWhile()




    ; ---------------------------------------------------------
    ; OUTGOING CONTEXT
    ;
    ; [outgoing] is the context referred to by the test users
    ; [iaxuser] in iax.conf or [sipuser] in sip.conf.  
    ; This is where your custom outgoing call processing should 
    ; go.
    ; ---------------------------------------------------------

[outgoing]
;JRjr start ============== voicepulse
include => default

    ;
    ;  8-digit local 8NXX XXXX -> 1 330 NXX XXXX
    ;
exten => _8NXXXXXX,1,Set(CALLERID(num)=330YYYYYYY)
exten => _8NXXXXXX,n,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_A}/1330${EXTEN:1})
exten => _8NXXXXXX,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?1330${EXTEN:1}|500)
exten => _8NXXXXXX,500,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_B}/1330${EXTEN:1})


;JRjr end ================ voicepulse

    ; .........................................................
    ; NANPA calls
    ; .........................................................
    
    ; Set your CallerID number
;JRjr start ============== voicepulse
;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=7323395100)
exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=330YYYYYYY)
;JRjr end ================ voicepulse

    ; .........................................................
    ; LEAST COST ROUTING
    ;
    ; Uncommenting the lines below will:
    ; - Tell Asterisk that your non-VoicePulse flat rate for
    ;   calls is $0.02
    ; - Look up the realtime rate VoicePulse will charge for 
    ;   this call
    ; - Print the rate to the Asterisk CLI
    ; - Check which rate is lower
    ; - If the non-VoicePulse rate is lower, it will send your
    ;   call through the other provider
    ; - If the VoicePulse rate is lower, it will go to the next
    ;   priority below and send the call through VoicePulse
    ;
    ; exten => _1NXXNXXXXXX,n,Set(OTHER_PROVIDERS_FLAT_RATE=0.02)
    ; exten => _1NXXNXXXXXX,n,Macro(voicepulseflexrate,${VOICEPULSE_API_KEY},${EXTEN})
    ; exten => _1NXXNXXXXXX,n,Verbose(The rate is ${VOICEPULSE_FLEXRATE})
    ; exten => _1NXXNXXXXXX,n,GotoIf($[${VOICEPULSE_FLEXRATE} > ${OTHER_PROVIDERS_FLAT_RATE}]?${EXTEN}|700)
    ; exten => _1NXXNXXXXXX,700,Dial(IAX2/SomeOtherProvider)
    ; .........................................................

    ; Send your call to VoicePulse using IAX2
exten => _1NXXNXXXXXX,n,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_A}/${EXTEN})
exten => _1NXXNXXXXXX,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|500)
exten => _1NXXNXXXXXX,500,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_B}/${EXTEN})

    ; Send your call to VoicePulse using SIP
    ; exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@${VOICEPULSE_GATEWAY_OUT_A})
    ; exten => _1NXXNXXXXXX,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|500)
    ; exten => _1NXXNXXXXXX,500,Dial(SIP/${EXTEN}@${VOICEPULSE_GATEWAY_OUT_B})
    


    ; .........................................................
    ; International calls
    ; .........................................................
    
    ; Set your CallerID number
;JRjr start ============== voicepulse
;exten => _011XXXX.,1,Set(CALLERID(num)=7323395100)
exten => _011XXXX.,1,Set(CALLERID(num)=330YYYYYYY)
;JRjr end ================ voicepulse

    ; .........................................................
    ; LEAST COST ROUTING
    ;
    ; Uncommenting the lines below will:
    ; - Tell Asterisk that your non-VoicePulse flat rate for
    ;   international calls is $0.50
    ; - Look up the realtime rate VoicePulse will charge for 
    ;   this call
    ; - Print the rate to the Asterisk CLI
    ; - Check which rate is lower
    ; - If the non-VoicePulse rate is lower, it will send your
    ;   call through the other provider
    ; - If the VoicePulse rate is lower, it will go to the next
    ;   priority below and send the call through VoicePulse
    ;
    ; exten => _011XXXX,n,Set(OTHER_PROVIDERS_FLAT_RATE=0.50)
    ; exten => _011XXXX,n,Macro(voicepulseflexrate,${VOICEPULSE_API_KEY},${EXTEN})
    ; exten => _011XXXX,n,Verbose(The rate is ${VOICEPULSE_FLEXRATE})
    ; exten => _011XXXX,n,GotoIf($[${VOICEPULSE_FLEXRATE} > ${OTHER_PROVIDERS_FLAT_RATE}]?${EXTEN}|700)
    ; exten => _011XXXX,700,Dial(IAX2/SomeOtherProvider)
    ; .........................................................

    ; Send your call to VoicePulse using IAX2
exten => _011XXXX.,n,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_A}/${EXTEN})
exten => _011XXXX.,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|500)
exten => _011XXXX.,500,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_B}/${EXTEN})

    ; Send your call to VoicePulse using SIP
    ; exten => _011XXXX.,n,Dial(SIP/${EXTEN}@${VOICEPULSE_GATEWAY_OUT_A})
    ; exten => _011XXXX.,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|500)
    ; exten => _011XXXX.,500,Dial(SIP/${EXTEN}@${VOICEPULSE_GATEWAY_OUT_B})




    ; ---------------------------------------------------------
    ; INCOMING CONTEXT
    ;
    ; [voicepulse-in] is the context referred to by the 
    ; [voicepulse] user in iax.conf or the 
    ; [connect01.voicepulse.com] peer in sip.conf.  
    ;
    ; This is where your custom incoming call processing should 
    ; go.
    ;
    ; IMPORTANT: Incoming calls from VoicePulse will have an
    ; extension of country code + number, so calls from US
    ; numbers will be 1 + area code + number (11 digits).
    ; ---------------------------------------------------------

[voicepulse-in]   ; <-- Should match the context you have 
                  ;     under [voicepulse] in iax.conf
                  ;     or [voicepulse01] in sip.conf

    ; .........................................................
    ; This section catches calls coming in through VoicePulse.
    ;
    ; The extension used below will catch your incoming calls
    ; regardless of what phone numbers are on your VoicePulse
    ; Connect for Asterisk account:
    ;
    ; exten => _XX.
    ;
    ; If you would like to route your calls based on different
    ; incoming phone numbers (YOUR numbers, not the caller's 
    ; number), use:
    ;
    ; exten => _17325550000,1,Dial(SIP/sipuser)
    ; exten => _17325550001,1,Dial(IAX2/iaxuser)
    ; exten => _17325550002,1,Dial(SIP/john)
    ; ...
    ; ...
    ; ...
    ;
    ; Copyright (c) 2006 V-o-i-c-e-P-u-l-s-e Inc.
    ;
    ; For sample purposes, this section will ring your test
    ; SIP phone and IAX phones at the same time.  For this to
    ; work:
    ; - You must have a test phone setup using the test user
    ;   found at the end of sip.conf or iax.conf
    ; - You must order a phone number on your account
    ; - You must dial that phone number from a different phone
    ;
    ; .........................................................

;JRjr start ============== voicepulse
exten => _XX.,1,Dial(SIP/6000&IAX2/6000)
;JRjr end ================ voicepulse




    ; ---------------------------------------------------------
    ; BANNED CONTEXT
    ;
    ; This context is used by unauthorized incoming or
    ; outgoing calls
    ; ---------------------------------------------------------

[banned]
exten => i,1,Hangup
exten => t,1,Hangup

iax.conf:

    ; Sample /etc/asterisk/iax.conf
    ; Created September 1, 2004
    ; Updated May 3, 2006
    ;
    ; Copyright (c) 2003-2006 VoicePulse Inc.
    ; VoicePulse is a registered trademark of VoicePulse Inc.
    ;
    ; =========================================================
    ; QUICKSTART WITH VOICEPULSE CONNECT FOR ASTERISK
    ; 
    ; * Login to your VoicePulse Connect for Asterisk account:
    ;   http://connect.voicepulse.com/
    ;
    ; * Go to the Credentials page to see your device login and
    ;   device password.  Your device login and passwords are
    ;   NOT THE SAME AS YOUR WEBSITE LOGIN AND PASSWORD.
    ;
    ; * Do a text search & replace in this file:
    ;   - Replace MY_DEVICE_LOGIN with your device login
    ;   - Replace MY_DEVICE_PASSWORD with your device password
    ;   - There should be 4 occurrences of each
    ;
    ; * Download the VoicePulse Connect public keys by typing:
    ; 
    ;   cd /var/lib/asterisk/keys
    ;   wget http://connect.voicepulse.com/keys/voicepulse20060419.pub
    ; 
    ; =========================================================


    ; ---------------------------------------------------------
    ; GENERAL SETTINGS
    ;
    ; ---------------------------------------------------------
    
[general]

;JRjr start ============== asterisk 1.4
disallow=lpc10			; Icky sound quality...  Mr. Roboto.

; 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 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.
;
; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels
; we don't want to do jitterbuffering on the switch, since the endpoints
; can each handle this.  However, some endpoints may have poor jitterbuffers 
; themselves, so this option will force * to always jitterbuffer, even in this
; case.
;
; 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.
;
; resyncthreshold: when the jitterbuffer notices a significant change in delay
; that continues over a few frames, it will resync, assuming that the change in
; delay was caused by a timestamping mix-up. The threshold for noticing a
; change in delay is measured as twice the measured jitter plus this resync
; threshold.
; Resyncing can be disabled by setting this parameter to -1.
;
; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer
; should return in a row. Since some clients do not send CNG/DTX frames to
; indicate silence, the jitterbuffer will assume silence has begun after
; returning this many interpolations. This prevents interpolating throughout
; a long silence.
;

jitterbuffer=no
forcejitterbuffer=no
;maxjitterbuffer=1000
;maxjitterinterps=10
;resyncthreshold=1000

; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
; then we cancel the whole thing (that's enough time for one retransmission
; only).  This is used to keep things from stalling for a long time for a host
; that is not available, but would be ill advised for bad connections.  In
; addition to 'yes' or 'no' you can also specify a number of milliseconds.
; See 'qualify' for individual peers to turn on for just a specific peer.
;
autokill=yes
;JRjr end ================ asterisk 1.4

    ; .........................................................
    ; The entire "register =>" line below should be on one line
    ; (with no carriage returns in the middle):
    ; .........................................................
    
register => UUUUUUUUUU:PPPPPPPPPP@connect03.voicepulse.com
register => UUUUUUUUUU:PPPPPPPPPP@connect02.voicepulse.com




    ; ---------------------------------------------------------
    ; IAX INCOMING USER
    ;
    ; This is the user for incoming calls from:
    ; connect01.voicepulse.com
    ; ---------------------------------------------------------
    
[voicepulse]           ; <-- Name must be [voicepulse]
context=voicepulse-in  ; <-- Should match the context you
                       ;     are using in extensions.conf
                       ;     to handle incoming calls
type=user
host=connect01.voicepulse.com
qualify=yes
notransfer=yes
disallow=all           ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10

    ; .........................................................
    ; RSA AUTHENTICATION
    ;
    ; Optional:
    ; To use RSA authentication on incoming calls, do the
    ; following from a shell prompt: 
    ;
    ; cd /var/lib/asterisk/keys
    ; wget http://connect.voicepulse.com/keys/voicepulse20060419.pub
    ;
    ; .........................................................

;auth=rsa
;inkeys=voicepulse20060419




    ; ---------------------------------------------------------
    ; IAX OUTBOUND PEER
    ;
    ; This is the peer for outbound calls to:
    ; connect01.voicepulse.com
    ; ---------------------------------------------------------

[voicepulse01]
type=peer
host=connect01.voicepulse.com
username=UUUUUUUUUU
secret=PPPPPPPPPP
qualify=yes
notransfer=yes
auth=md5
disallow=all                    ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10




    ; ---------------------------------------------------------
    ; IAX OUTBOUND PEER
    ;
    ; This is the peer for outbound calls to:
    ; connect02.voicepulse.com
    ; ---------------------------------------------------------

[voicepulse02]
type=peer
host=connect02.voicepulse.com
username=UUUUUUUUUU
secret=PPPPPPPPPP
qualify=yes
notransfer=yes
auth=md5
disallow=all                    ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10




    ; ---------------------------------------------------------
    ; IAX OUTBOUND PEER
    ;
    ; This is the peer for outbound calls to:
    ; connect03.voicepulse.com
    ; ---------------------------------------------------------

[voicepulse03]
type=peer
host=connect03.voicepulse.com
username=UUUUUUUUUU
secret=PPPPPPPPPP
qualify=yes
notransfer=yes
auth=md5
disallow=all                    ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10




    ; ---------------------------------------------------------
    ; IAX INCOMING USER -- UNAUTHENTICATED CALLS
    ;
    ; This is the user for unauthenticated calls
    ; ---------------------------------------------------------

[guest]
type=user
context=banned
auth=none




    ; ---------------------------------------------------------
    ; IAX REGISTERED USER -- FOR TESTING IAX ENDPOINTS
    ;
    ; This is a test user.  You can use Dan Toma's DIAX Software
    ; Phone to test your Asterisk configuration.  Set the
    ; following in the DIAX > Config > Registration menu option:
    ; 
    ;   Server: <your Asterisk server IP address>
    ;   Username: iaxuser
    ;   Password: iaxpassword
    ; 
    ; You can get DIAX at: 
    ; http://www.laser.com/dante/diax/diax.html
    ; ---------------------------------------------------------

[iaxuser]
type=friend
context=outgoing
auth=md5
secret=iaxpassword
notransfer=1
host=dynamic
allow=all

sip.conf:

    ; Sample /etc/asterisk/sip.conf
    ; Created September 1, 2004
    ; Updated May 3, 2006
    ;
    ; Copyright (c) 2003-2006 VoicePulse Inc.
    ; VoicePulse is a registered trademark of VoicePulse Inc.
    ;
    ; =========================================================
    ; QUICKSTART WITH VOICEPULSE CONNECT FOR ASTERISK
    ; 
    ; * Login to your VoicePulse Connect for Asterisk account:
    ;   http://connect.voicepulse.com/
    ;
    ; * Go to the Credentials page to see your device login and
    ;   device password.  Your device login and passwords are
    ;   NOT THE SAME AS YOUR WEBSITE LOGIN AND PASSWORD.
    ;
    ; * Do a text search & replace in this file:
    ;   - Replace MY_DEVICE_LOGIN with your device login
    ;   - Replace MY_DEVICE_PASSWORD with your device password
    ;   - There should be 6 occurrences of the login and 
    ;     4 occurrences of the password
    ;
    ; * Download the VoicePulse Connect public keys by typing:
    ; 
    ;   cd /var/lib/asterisk/keys
    ;   wget http://connect.voicepulse.com/keys/voicepulse20060419.pub
    ; 
    ; =========================================================


    ; ---------------------------------------------------------
    ; GENERAL SETTINGS
    ;
    ; ---------------------------------------------------------
    
[general]

    ; .........................................................
    ; Handle unknown calls
    ; .........................................................

context=banned

    ; .........................................................
    ; The entire "register =>" line below should be on one line
    ; (with no carriage returns in the middle):
    ; .........................................................
    
register => UUUUUUUUUU:PPPPPPPPPP@connect03.voicepulse.com
register => UUUUUUUUUU:PPPPPPPPPP@connect02.voicepulse.com
    



    ; ---------------------------------------------------------
    ; SIP PEER
    ;
    ; This is the peer for incoming and outgoing calls from/to:
    ; connect01.voicepulse.com
    ; ---------------------------------------------------------
    
[voicepulse01]              ; <-- Name must be [voicepulse01]
context=voicepulse-in       ; <-- Should match the context you
                            ;     are using in extensions.conf
                            ;     to handle incoming calls
type=peer
host=connect01.voicepulse.com
qualify=yes
canreinvite=no
username=UUUUUUUUUU
fromuser=UUUUUUUUUU
secret=PPPPPPPPPP
insecure=port,invite
disallow=all                ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10




    ; ---------------------------------------------------------
    ; SIP PEER
    ;
    ; This is the peer for incoming and outgoing calls from/to:
    ; connect02.voicepulse.com
    ; ---------------------------------------------------------
    
[voicepulse02]              ; <-- Name must be [voicepulse01]
context=voicepulse-in       ; <-- Should match the context you
                            ;     are using in extensions.conf
                            ;     to handle incoming calls
type=peer
host=connect02.voicepulse.com
qualify=yes
canreinvite=no
username=UUUUUUUUUU
fromuser=UUUUUUUUUU
secret=PPPPPPPPPP
insecure=port,invite
disallow=all                ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10




    ; ---------------------------------------------------------
    ; SIP PEER
    ;
    ; This is the peer for incoming and outgoing calls from/to:
    ; connect03.voicepulse.com
    ; ---------------------------------------------------------
    
[voicepulse03]              ; <-- Name must be [voicepulse01]
context=voicepulse-in       ; <-- Should match the context you
                            ;     are using in extensions.conf
                            ;     to handle incoming calls
type=peer
host=connect03.voicepulse.com
qualify=yes
canreinvite=no
username=UUUUUUUUUU
fromuser=UUUUUUUUUU
secret=PPPPPPPPPP
insecure=port,invite
disallow=all                ; <-- List supported codecs
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g726
allow=adpcm
allow=lpc10





    ; ---------------------------------------------------------
    ; REGISTERED USER -- FOR TESTING SIP ENDPOINTS
    ;
    ; This is a test user.  You can use Counterpath's X-Lite
    ; Phone to test your Asterisk configuration.  Configure the
    ; following settings:
    ;
    ;   Menu > System Settings > Sip Proxy > [default]
    ;
    ;   Enabled: Yes
    ;   Display Name: sipuser
    ;   User Name: sipuser
    ;   Authorization User: sipuser
    ;   Password: sippassword
    ;   SIP Proxy: <your Asterisk server IP address>
    ;
    ; You can get X-Lite at: 
    ; http://www.counterpath.com/
    ; ---------------------------------------------------------

[sipuser]
type=friend
host=dynamic
secret=sippassword
context=outgoing
canreinvite=no
allow=all

users.conf

;
; User configuration
;
; Creating entries in users.conf is a "shorthand" for creating individual
; entries in each configuration file.  Using users.conf is not intended to 
; provide you with as much flexibility as using the separate configuration
; files (e.g. sip.conf, iax.conf, etc) but is intended to accelerate the
; simple task of adding users.  Note that creating individual items (e.g.
; custom SIP peers, IAX friends, etc.) will allow you to override specific 
; parameters within this file.  Parameter names here are the same as they
; appear in the other configuration files.  There is no way to change the
; value of a parameter here for just one subsystem.
;

[general]
;
; Full name of a user
;
fullname = New User
;
; Starting point of allocation of extensions
;
userbase = 6000
;
; Create voicemail mailbox and use use macro-stdexten
;
hasvoicemail = yes
;
; Set voicemail mailbox 6000 password to 1234
;
vmsecret = 1234
;
; Create SIP Peer
;
hassip = yes
;
; Create IAX friend
;
hasiax = yes
;
; Create H.323 friend
;
;hash323 = yes
;
; Create manager entry
;
hasmanager = no
;
; Remaining options are not specific to users.conf entries but are general.
;
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1


;[6000]
;fullname = Joe User
;email = joe@foo.bar
;secret = 1234
;zapchan = 1
;hasvoicemail = yes
;vmsecret = 1234
;hassip = yes
;hasiax = no
;hash323 = no
;hasmanager = no
;callwaiting = no
;context = international

[6000]
fullname = Teacher
context = outgoing
secret = SSSSSSSS
hasiax = yes
registeriax = yes
transfer = yes
hassip = yes
registersip = yes
canreinvite = no
hasvoicemail = yes
mailbox = 6000
vmsecret = 6000
hasmanager = no
callwaiting = yes
host = dynamic
zapchan = 
dtmfmode = rfc2833

[6001]
fullname = FiatSpyder
context = outgoing
secret = SSSSSSSS
hasiax = yes
registeriax = yes
transfer = yes
hassip = yes
registersip = yes
canreinvite = no
hasvoicemail = yes
mailbox = 6001
vmsecret = 6001
hasmanager = no
callwaiting = yes
host = dynamic
zapchan = 
dtmfmode = rfc2833