Hi I have a weird problem with IAX2 trunking between 2 new servers
when a call is made the call fails because of the varible ${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX} is being set to a value that I cannot find anywhere in the configs see below @CONTEXT is added
[s@macro-dialout-trunk:29] Dial(“Local/xxx@from-internal-00000abc;2”, “IAX2/to_aber/xxx@CONTEXT,300,b(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^xxx^xxx^1^1660836863^xxxxxxx^xxxxxx)”) in new stack
in macro-dialout-trunk the line that created this is…
Executing [s@macro-dialout-trunk:29] Dial("PJSIP/6002-00000002", "IAX2/iaxname/456,300,Tb(func-apply-sipheaders^s^1,(4))U(sub-send-obroute-email^456^##88456^4^1660842320^Oberon^6002)") in new stack
That’s what you should be seeing, the outbound dialed digits in this case are 456 but in your case appear to be xxx@CONTEXT. There is something in the global variables that’s confusing the IAX dial string with a PJISP dial string. Do you have any custom global vars set? Maybe recreate the IAX trunk and see if you get the same issue?
OUT_4_SUFFIX=@Gradwell
OUT_5_SUFFIX=@Gradwell_OLD_server <<< no OUT_3 trunk been del;eted
OUT_3_SUFFIX=@Gamma_copy_1 <<< no OUT_3 trunk been del;eted
OUT_1_SUFFIX=@Gamma <<<< mine
[root@freepbx ~]# asterisk -rx “dialplan show globals” |grep OUT_
OUT_6=AMP:SIP/[email protected]
OUT_4_SUFFIX=@xxxxxxx
OUT_4=PJSIP
OUT_2=IAX2/to_card
OUT_1=IAX2/to_aber
OUT_5_SUFFIX=@xxxxxxx_OLD_server
OUT_5=PJSIP
OUT_3_SUFFIX=@xxxxxxx_copy_1
OUT_3=PJSIP
OUT_1_SUFFIX=@CONTEXT <<<< my problem one
Seems Just a apply config may not rewrite these in the dialplan globals
so now no CALLED CONTEXT : CONTEXT in the iax2 debug
So sorted . but took a restart
so from this I learn that if a customer “cleans” up a system be careful if adding IAX trunk after a sip trunk is deleted if first trunk programmed was a PJSIP one