diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 9424c117bf..4c00a9ba22 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -9398,7 +9398,9 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha return 0; } - if ((colname = strchr(peername, ':'))) + if ((colname = strchr(peername, ':'))) /*! \todo : will be removed after the 1.4 relese */ + *colname++ = '\0'; + else if ((colname = strchr(peername, '|'))) *colname++ = '\0'; else colname = "ip"; @@ -9446,7 +9448,7 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha struct ast_custom_function iaxpeer_function = { .name = "IAXPEER", .synopsis = "Gets IAX peer information", - .syntax = "IAXPEER([:item])", + .syntax = "IAXPEER([|item])", .read = function_iaxpeer, .desc = "If peername specified, valid items are:\n" "- ip (default) The IP address.\n" diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7e6a3300af..f36d3abd4f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9980,7 +9980,9 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha char *colname; char iabuf[INET_ADDRSTRLEN]; - if ((colname = strchr(data, ':'))) + if ((colname = strchr(data, ':'))) /*! \todo Will be deprecated after 1.4 */ + *colname++ = '\0'; + else if ((colname = strchr(data, '|'))) *colname++ = '\0'; else colname = "ip"; @@ -10039,7 +10041,7 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha struct ast_custom_function sippeer_function = { .name = "SIPPEER", .synopsis = "Gets SIP peer information", - .syntax = "SIPPEER([:item])", + .syntax = "SIPPEER([|item])", .read = function_sippeer, .desc = "Valid items are:\n" "- ip (default) The IP address.\n"