Trying to run this Shell command to get the domain from the from SIP header: exten => s,n,Set(UWIPDEST=${SHELL(${SIP_HEADER(From)} | sed -e 's/;.*//' | grep -q "@domain.com" && echo "555.555.555.555" || echo "666.666.666.666")})
39876 [2024-07-08 16:22:50] WARNING[1162][C-000a9f74] pbx_variables.c: Error in extension logic (missing '}')
39877 [2024-07-08 16:22:50] WARNING[1162][C-000a9f74] pbx_variables.c: Error in extension logic (missing '}')
39878 [2024-07-08 16:22:50] WARNING[1162][C-000a9f74] pbx_functions.c: Can't find trailing parenthesis for function 'SIP_HEADER(From'?
39879 [2024-07-08 16:22:50] WARNING[1162][C-000a9f74] pbx_functions.c: Can't find trailing parenthesis for function 'SHELL("Doe, John" <sip:[email protected]>;tag=519e66763d4641ef821705056ba958f'?
I think maybe the issue is because there is a semicolon in the from header, but I am not sure? All I am really trying to do is see is if the from header contains βdomain.comβ if it does make the variable ${UWIPDEST} 555.555.555.555, otherwise make it 666.666.666.666.