Too much GotoIf in dialplan? What is their maximum number?
exten => s,5,Set(Var_FROM_DOMAIN=${CUT(CUT(SIP_HEADER(TO),@,2),>,1)})
exten => s,6,GotoIF($[“${Var_FROM_DOMAIN}” = “callcentric.com”]?9:7)
exten => s,7,GotoIF($[“${Var_FROM_DOMAIN}” = “ss.callcentric.com”]?9:8)
exten => s,8,GotoIF($[“${Var_FROM_DOMAIN}” = “66.193.176.35”]?9:40)
exten => s,9,Set(Var_DN=${CUT(CUT(SIP_HEADER(TO),@,1),:,2)})
exten => s,10,GotoIF($[$[“${Var_DN}” = “11111111111111”] | $[“${Var_DN}” = “17772977179”]]?60:11)
exten => s,11,GotoIF($[“${Var_DN}” = “222222222222”]?50:12)
exten => s,12,GotoIF($[$[“${Var_DN}” = “333333333333”] | $[“${Var_DN}” = “17772296141”]]?90:13)
exten => s,13,GotoIF($[$[“${Var_DN}” = “444444444444”] | $[“${Var_DN}” = “17778555324”]]?112:40)
exten => s,14,GotoIF($[“${Var_DN}” = “5555555555555”]?113:40)
last is not executed. Why?
– Executing [s@incoming-callcentric:5] Set(“SIP/callcentricB8-0000019c”, “Var_FROM_DOMAIN=ss.callcentric.com”) in new stack
– Executing [s@incoming-callcentric:6] GotoIf(“SIP/callcentricB8-0000019c”, “0?9:7”) in new stack
– Goto (incoming-callcentric,s,7)
– Executing [s@incoming-callcentric:7] GotoIf(“SIP/callcentricB8-0000019c”, “1?9:8”) in new stack
– Goto (incoming-callcentric,s,9)
– Executing [s@incoming-callcentric:9] Set(“SIP/callcentricB8-0000019c”, “Var_DN=5555555555555”) in new stack
– Executing [s@incoming-callcentric:10] GotoIf(“SIP/callcentricB8-0000019c”, “0?60:11”) in new stack
– Goto (incoming-callcentric,s,11)
– Executing [s@incoming-callcentric:11] GotoIf(“SIP/callcentricB8-0000019c”, “0?50:12”) in new stack
– Goto (incoming-callcentric,s,12)
– Executing [s@incoming-callcentric:12] GotoIf(“SIP/callcentricB8-0000019c”, “0?90:13”) in new stack
– Goto (incoming-callcentric,s,13)
– Executing [s@incoming-callcentric:13] GotoIf(“SIP/callcentricB8-0000019c”, “0?112:40”) in new stack
– Goto (incoming-callcentric,s,40)
– Executing [s@incoming-callcentric:40] Dial