Index: channels/chan_iax2.c =================================================================== --- channels/chan_iax2.c (revision 122799) +++ channels/chan_iax2.c (working copy) @@ -11751,6 +11751,10 @@ if (!strcasecmp(args, "osptoken")) ast_copy_string(buf, pvt->osptoken, buflen); + else if (!strcasecmp(args, "peerip")) + ast_copy_string(buf, pvt->addr.sin_addr.s_addr ? ast_inet_ntoa(pvt->addr.sin_addr) : "", buflen); + else if (!strcasecmp(args, "peername")) + ast_copy_string(buf, pvt->username, buflen); else res = -1; Index: funcs/func_channel.c =================================================================== --- funcs/func_channel.c (revision 122799) +++ funcs/func_channel.c (working copy) @@ -227,6 +227,8 @@ "\n" "chan_iax2 provides the following additional options:\n" "R/W osptoken Get or set the OSP token information for a call\n" + "R/O peerip Get the peer's ip address\n" + "R/O peername Get the peer's username\n" "\n" "Additional items may be available from the channel driver providing\n" "the channel; see its documentation for details.\n"