Using PJSIP, given and endpoint name, what is the most concise way to determine it’s real IP address? I have been using
asterisk -r -x 'database show registrar' and parsing out the
via_addr, but it seems that clients can lie about that and use an address that Asterisk will not see it’s socket connected to.
There is of course
asterisk -r -x "pjsip show aor <endpoint>" but that’s not a very nice format to have to parse, if there is something more concise.
It’s important to note that I am doing this query externally (hence the use of
asterisk -r -x and not in the context of an ongoing call,