May be this
```sh
#!/bin/sh
get_answer ()
{
value=$1
question=$2
if [ "${value}" = "ask" ]; then
echo -n "$question"
read value
fi
ANSWER=$(echo ${value} | grep -o -e '[YyNn]' | sed -e 's/Y/y/' -e
's/N/n/')
}
get_answer ask "My question?"
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2019#issuecomment-516653478