Skip to main content

Problem with IAX extension

Posted by chris on Sat, 06/12/2010

Asterisk: 1.6.0.28
MTE: 6.0.1.81

I created an IAX extension and have am having a problem with outbound dialing. For some reason, tl-set-myvariables seems to think it's a ZAP/DAHDI channel:

-- Executing [s@macro-tl-dialout-base:14] Macro("IAX2/XXXXXXXXXX-Chris-12985", "tl-set-myvariables") in new stack
-- Executing [s@macro-tl-set-myvariables:1] Set("IAX2/XXXXXXXXXX-Chris-12985", "MY_CHAN=XXXXXXXXXX-Chris-12985") in new stack
-- Executing [s@macro-tl-set-myvariables:2] NoOp("IAX2/XXXXXXXXXX-Chris-12985", "THECHANNEL=IAX2/XXXXXXXXXX-Chris-12985") in new stack
-- Executing [s@macro-tl-set-myvariables:3] Set("IAX2/XXXXXXXXXX-Chris-12985", "zap=1") in new stack

Anybody have any thoughts/ideas on what's going wrong?


Submitted by chris on Sat, 06/12/2010 Permalink

exten => s,1,Set(MY_CHAN=${CUT(CHANNEL,/,2)})
exten => s,n,NoOp(THECHANNEL=${CHANNEL})
exten => s,n,Set(zap=${REGEX("^[Zap/|DAHDI/]" ${CHANNEL})})

Submitted by eeman on Sat, 06/12/2010 Permalink

it appears to be a bug in REGEX, did you know that all versions of 1.6.0.x greater than 1.6.0.15 have dtmf passthrough issues?

i have 1.6.2.8 at home i can test an iax2 extension with.

Submitted by chris on Sat, 06/12/2010 Permalink

I thought the dtmf bug had been fixed in 1.6.0.28. It hasn't popped up as an issue yet, so I'll keep my fingers crossed. Do 1.6.2.8 and Thirdlane MTE work together well enough for production?

Submitted by eeman on Sat, 06/12/2010 Permalink

i haven't tested it in production... just at my house which obviously doesn't use all the features. I am still using 1.4.x in production. Just keep in mind that you are going to want to install and use the cli_aliases.conf file so that restart and reload will work from the GUI (they ditched the syntax but you can now alias for support). At least in the 1.6.2 branch you'll have context-based parking.

Submitted by eeman on Sun, 06/13/2010 Permalink

ok I've tested this and I believe the syntax of the regular expression is at fault here...

if you change
exten => s,n,Set(zap=${REGEX("^[Zap/|DAHDI/]" ${CHANNEL})})

to instead

exten => s,n,Set(zap=${REGEX("^Zap/|^DAHDI/" ${CHANNEL})})

you get the results expected

I submitted the change this morning. Go ahead and patch your script. Perl Regular Expressions are my achilles heel, otherwise I probably would have caught it as soon as you posted the code.