Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show both caller name and phone number on incoming calls #215

Open
LatinSuD opened this issue Aug 21, 2020 · 0 comments
Open

Show both caller name and phone number on incoming calls #215

LatinSuD opened this issue Aug 21, 2020 · 0 comments

Comments

@LatinSuD
Copy link

LatinSuD commented Aug 21, 2020

I would like that incoming calls showed both name and phone number.

For example, if From header is:
"John Doe" <sip:666@192.168.1.2>
I would like that call popup showed something like this:
"John Doe - 666"

I created a script that does it (hopefully).
Just set as your incoming call script.

echo action=continue
echo caller_name=$(
  if [[ "$SIP_FROM" =~ ^\"[^\"]*\" ]]; then
          echo "$SIP_FROM" | sed -r 's/^"([^"]*)".*/\1/' | sed 's/[^-_0-9a-zA-ZñÑ ]/./g'
          echo " - "
  fi
  echo "$SIP_FROM_USER" | sed 's/[^0-9a-zA-Z ]/./g'
)
@LatinSuD LatinSuD changed the title Show both caller name and phone Show both caller name and phone number on incoming calls Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants