The tests below are using "SIP" and "IAX" -- the only change I make is search/replace SIP with IAX. Yes, I comment out the lines I am not using when testing a line. Both are through VoicePulse Connect... all calls worked fine other than Caller ID. Calls are being made from standard copper landline and forwarded to Vonage, but I also tried in reverse (vonage to landline) -- asterisk box obviously in between.
I am using Asterisk 1.4.4
Yes, I am aware setting the "name" does not work through to standard phone systems -- I included it merely for completion, as I found setting "name" on SIP seemed to pass through the number for some reason.
[voicepulse-in]
exten => _XX.,1,Answer
exten => _XX.,n,Dial(Local/12031234567@fw-outgoing/n)
exten => _XX.,n,Hangup
[fw-outgoing]
;;; SIP: I see the number the original person called from
;;; IAX: I see 203-653-9999
;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=2036539999)
;;; SIP: I see "2036539998" on both name and number
;;; IAX: I see info from person that called
exten => _1NXXNXXXXXX,1,Set(CALLERID(name)=2036539998)
;;; SIP: I see 2036539997 for the name & number
;;; IAX: 203-653-9997 for both name and number
;exten => _1NXXNXXXXXX,1,SetCallerID(2036539997)
;;; SIP: I see "VoicePulse, Inc." and Voicepulse #
;;; Documentation says this is removed in 1.4 (although above version
;;; seems to work)
;;;
;;; IAX: I see 203-653-9996 for both name & number
;exten => _1NXXNXXXXXX,1,SetCallerID("Joe" <2036539996>)
;;; SIP: I see "Voicepulse, Inc" and voicepulse # just as above
;;; IAX: I see 203-653-9995 for name and number
;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=2036539995)
;exten => _1NXXNXXXXXX,n,Set(CALLERID(name)=Joe)
exten => _1NXXNXXXXXX,n,Dial(SIP/${VOICEPULSE_GATEWAY_OUT_A}/${EXTEN})
exten => _1NXXNXXXXXX,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|500)
exten => _1NXXNXXXXXX,500,Dial(SIP/${VOICEPULSE_GATEWAY_OUT_B}/${EXTEN})