I am trying to get the external IP address of the connected devices. I did:
grep 'Added contact' /var/log/asterisk/full* | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'
but it gives me both the internal and external IPs. Also this does not seems to get all the connected devices.
VERBOSE[13539] res_pjsip_registrar.c: Added contact 'sip:203@342.413.532.345:48721;transport=TLS;rinstance=70df52f927ca6728;x-ast-orig-host=192.168.1.213:35279' to AOR '203' with expiration of 60 seconds
- Any idea how to get the external IP only?
- Is there other keywords / files to look at?