Summary:ASTERISK-01011: Switch statement fails to process 3 digit dialplan
Reporter:fcs_1 (fcs_1)Labels:
Date Opened:2004-02-09 07:05:19.000-0600Date Closed:2011-06-07 14:05:02
Versions:Frequency of
Description:SWITCH from PBX B to PBX A that has a context with this statment "exten => _[123]XX,1,NoOp" causes SIP 484 error message to be displayed by PBX B SIP device.

Load: CVS-02/08/04-04-11:20:54

PBX A and PBX register with no problem pointing to each other from iax.conf.

I found this problem while attempting to merge dialplans using many macros and context entries on PBX A and one line switch on PBX B.  I reduced it all to a failure on a single NoOP statement and here is what I found.

PBX B has one line in extensions.conf context for originating station:

switch => IAX2/pbx:pass@

PBX A has one line in extensions.conf context

exten => _[123]XX,1,NoOp ; fails 484

I changed this line with the below listed tests.  This one fails everytime.

Testing shows:
exten => _[123]XX,1,NoOp ; fails 484
exten => _[123]XX.,1,NoOp ; success no 484
exten => _[123]XX#,1,NoOp ; success no 484
exten => 123,1,NoOp ; success no 484
exten => _[123]XXX,1,NoOp ; success no 484
exten => _[123]XXXX,1,NoOp ; success no 484
exten => _[123]XXXXX,1,NoOp ; success no 484
exten => _[123]XXXXXX,1,NoOp ; success no 484

There are many more combinations I did not test but this has wasted several days retest to realize it was not any of the other statments in macros and exten entries.

Comments:By: Brian West (bkw918) 2004-02-10 17:29:17.000-0600

exten => _[123]XX,1,NoOp

was that before this?

exten => 123,1,NoOp

Order does matter in some cases.

By: fcs_1 (fcs_1) 2004-02-10 20:20:34.000-0600

Each of the above NoOp lines was used solo.  No other lines at anytime during the test.  No overlap only one line.  The only reason for 1 line was to reduce the problem down to the error.  This obviously is not a real app just a test to find the problem and get the rest of the noise in the extensions.conf file out of the way.

By: Brian West (bkw918) 2004-02-11 16:49:28.000-0600

I think I talked to you about this on IRC.. if I recall you were doing a circular switch... but with diffrent context's which doesn't work no matter how hard you try.  But look at iax.conf.sample their is a note and feature added to allow layered switch setups like yours work.  Can you check that and see if it works?

; Set iaxcompat to yes if you plan to use layered
; switches.  It incurs a small performance hit to enable it

By: Brian West (bkw918) 2004-02-11 16:50:14.000-0600

in the end you had what is considered a layered switch (because of the diffrent context's) but those may or may not work unless you do the above.

By: fcs_1 (fcs_1) 2004-02-11 17:27:54.000-0600

BKW NO! Read the bug.  NOTHING else is in the extensions.conf except what you see. Nothing else get it.  No circular switches etc. Just one switch statment and one noop in the 2nd pbx period.  This is a bug.

I think it has to do with the processing of the [123] portion.  Something is not counting right.  A plan old 123 works.

edited on: 02-11-04 17:28

By: Brian West (bkw918) 2004-02-14 23:26:07.000-0600

but question does the local PBX have anything that would match anything on the remote pbx via the switch?

By: Brian West (bkw918) 2004-02-14 23:39:39.000-0600

I just tested this and I don't get a 484 it works fine.  Find kram or myself on IRC we want to look at this.

By: Brian West (bkw918) 2004-02-25 14:43:40.000-0600

I can't duplicate this.  When you get time find kram or myself so we can check this.  Till that time I'm going to close this bug.