Hello I am having issues getting the following to work. The if will not switch extensions.
exten => s,1,Noop(Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf)
exten => s,n,NoOp(Incoming call from extension ${AMPUSER})
exten => s,n,Set(GLOBAL(911CB)=${AMPUSER})
exten => s,n,NoOp(Setting return emergency destination to ${911CB})
exten => s,n,GotoIf($[${911CB} = "0"]?user0)
exten => s,n,GotoIf($[${911CB} = "5001"]?user1)
;exten => s,n,MacroExit
exten => s,n,(user0)GoSub(func-set-sipheader,s,1(Geolocation-Routing,no))
exten => s,n,GoSub(func-set-sipheader,s,1(Geolocation,<https://emergency.bandwidth.com/locations/5008554/GL-test-0001?loc=Test%20Call>))
exten => s,n,GoSub(func-set-sipheader,s,1(P-Asserted-Identity,<sip:[email protected]:5060>))
exten => s,n,NoOp(Location set to Test Call)
exten => s,n,MacroExit
exten => s,n,(user1)GoSub(func-set-sipheader,s,1(Geolocation-Routing,no))
exten => s,n,GoSub(func-set-sipheader,s,1(Geolocation,<https://emergency.bandwidth.com/locations/5008554/GL-test-0001?loc=Front%20Office>))
exten => s,n,GoSub(func-set-sipheader,s,1(P-Asserted-Identity,<sip:[email protected]:5060>))
exten => s,n,NoOp(Location set to Front Office)
exten => s,n,MacroExit