[asterisk-users] Dial(PJSIP/xx) - finding the IP address it connected to

Kingsley Tart kingsley at dns99.co.uk
Thu Nov 4 09:49:49 CDT 2021

On Thu, 2021-11-04 at 10:10 -0300, Joshua C. Colp wrote:
> > Do you know whether it is possible to get the remote_addr from the
> > AMI?
> I don't know off the top of my head. AMI actions and events are
> documented on the wiki[1], so you could look there and see. 
> [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Command+Reference


I've managed to establish that there are no events that convey this
information, getting a list of channels doesn't include that in the
data and I didn't manage to find any of the PJSIP AMI commands that
returned it, so I think it isn't possible.

The only way I can think is to externally have tcpdump running
capturing all SIP traffic and watch this and match up with the Call-Id. 
It seems messy but I can't think of any other way (aside from doing an
ngrep for local originated INVITEs but that amounts to much the same


More information about the asterisk-users mailing list