IAX SIP URI Dialing

I recently set up a small FreePBX box using a Raspberry Pi & IncrediblePBX. To my surprise I found that it couldn’t make outbound calls to third party sip providers out of box. I eventually stumbled upon a guide on this site that explained how to accomplish said functionality by adding the content in first spoiler below to /etc/asterisk/extensions_custom.conf & adding some domain names to another conf. I got it working with SIP extensions but not IAX.

Here’s the bread and butter…
[macro-uridial]

exten => s,1,NoOp(calling remote SIP peer ${ARG1})

exten => s,2,Set(CALLERID=${OUTCID_1})

exten => s,3,Dial(SIP/${ARG1},120,tr)

exten => s,4,Congestion()

[enable-sipuri-dialing]

exten => _.,1,NoOp(outbound call to ${EXTEN}@${SIPDOMAIN})

exten => _.,n,GotoIf($[${LEN(${SIPDOMAIN})} = 0]?skipuri)

exten => _.,n,Set(SIPDOMAINNOPORT=$["${SIPDOMAIN}" : “(.*):”])

exten => _.,n,ExecIf($[ “${SIPDOMAINNOPORT}” = “” ] ?Set(SIPDOMAINNOPORT=${SIPDOMAIN}))

exten => _.,n,GotoIf($[${SIPDOMAINNOPORT} = ${URI_NAME1}]?skipuri)

exten => _.,n,GotoIf($[${SIPDOMAINNOPORT} = ${URI_NAME2}]?skipuri)

exten => _.,n,GotoIf($[${SIPDOMAINNOPORT} = ${URI_NAME3}]?skipuri)

exten => _.,n,NoOp(domain [${SIPDOMAINNOPORT}] is remote, treating as SIP URI)

exten => _.,n,Macro(uridial,${EXTEN}@${SIPDOMAIN})

exten => _.,n,HangUp()

exten => _.,n(skipuri),NoOp(continuing normal dialplan execution [${SIPDOMAIN}])

exten => _.,n,Goto(from-internal,${EXTEN},1)

exten => h,1,HangUp()

Outgoing Call from SIP Ext:
== Using SIP VIDEO TOS bits 136
== Using SIP VIDEO CoS mark 6
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] NoOp(“SIP/2000-00000006”, “outbound call to [email protected]”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/2000-00000006”, “0?skipuri”) in new stack
– Executing [[email protected]:3] Set(“SIP/2000-00000006”, “SIPDOMAINNOPORT=”) in new stack
– Executing [someuser,@enable-sipuri-dialing:4] ExecIf(“SIP/2000-00000006”, “1 ?Set(SIPDOMAINNOPORT=sip.linphone.org)”) in new stack
– Executing [[email protected]:5] GotoIf(“SIP/2000-00000006”, “0?skipuri”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/2000-00000006”, “0?skipuri”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/2000-00000006”, “0?skipuri”) in new stack
– Executing [[email protected]:8] NoOp(“SIP/2000-00000006”, “domain [sip.linphone.org] is remote, treating as SIP URI”) in new stack
– Executing [[email protected]:9] Macro(“SIP/2000-00000006”, "uridial,[email protected]") in new stack
– Executing [[email protected]:1] NoOp(“SIP/2000-00000006”, “calling remote SIP peer [email protected]”) in new stack
– Executing [[email protected]:2] Set(“SIP/2000-00000006”, “CALLERID=5555555555”) in new stack
– Executing [[email protected]:3] Dial(“SIP/2000-00000006”, “SIP/[email protected],120,tr”) in new stack
== Using SIP VIDEO TOS bits 136
== Using SIP VIDEO CoS mark 6
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/[email protected]
== Spawn extension (macro-uridial, s, 3) exited non-zero on ‘SIP/2000-00000006’ in macro ‘uridial’
== Spawn extension (enable-sipuri-dialing, someuser, 9) exited non-zero on ‘SIP/2000-00000006’
– Executing [[email protected]:1] Hangup(“SIP/2000-00000006”, “”) in new stack
== Spawn extension (enable-sipuri-dialing, h, 1) exited non-zero on ‘SIP/2000-00000006’

Outgoing Call from IAX Ext.
– Accepting AUTHENTICATED call from 192.168.1.3:
– > requested format = gsm,
– > requested prefs = (),
– > actual format = ulaw,
– > host prefs = (ulaw|alaw|gsm|h264|h263p|h263|h261),
– > priority = mine
– Executing [[email protected]@enable-sipuri-dialing:1] NoOp(“IAX2/43633-484”, “outbound call to [email protected]@”) in new stack – Executing [[email protected]@enable-sipuri-dialing:2] GotoIf(“IAX2/43633-484”, “1?skipuri”) in new stack – Goto (enable-sipuri-dialing,[email protected],11)
– Executing [[email protected][email protected]:11] NoOp(“IAX2/43633-484”, “continuing normal dialplan execution []”) in new stack – Executing [[email protected]@enable-sipuri-dialing:12] Goto(“IAX2/43633-484”, "from-internal,[email protected],1") in new stack – Goto (from-internal,[email protected],1)
– Executing [[email protected]:1] Hangup(“IAX2/43633-484”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘IAX2/43633-484’
– Hungup ‘IAX2/43633-484’

Do any asterisk masters know what modifications need to be made in order to get IAX sip uri dialing.