summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2012-11-13 19:42:13 +0000
committerJonathan Rose <jrose@digium.com>2012-11-13 19:42:13 +0000
commite62bab81319500aed584c41a5f36550cced3fd3f (patch)
tree00d8c9b6c9bf28dd17e530a5d0cc08f9c28795d2 /channels/chan_sip.c
parentc42d9d0d62f15bb7d69fa20b8b201f9484de7738 (diff)
chan_sip: Add SubscribeContext field to SIPshowpeer AMI response
The new field is will show up within the response if the requested peer has a subscribe context set. (closes issue ASTERISK-20626) Reported by: Jaco Kroon Patches: asterisk-sip-ami-SubscrContext.patch uploaded by jkroon (license 5671) -with modifications by jrose to conform to style guidelines Review: https://reviewboard.asterisk.org/r/2195/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c939df955..a0b1c2ff0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -19876,6 +19876,9 @@ static char *_sip_show_peer(int type, int fd, struct mansession *s, const struct
astman_append(s, "RemoteSecretExist: %s\r\n", ast_strlen_zero(peer->remotesecret)?"N":"Y");
astman_append(s, "MD5SecretExist: %s\r\n", ast_strlen_zero(peer->md5secret)?"N":"Y");
astman_append(s, "Context: %s\r\n", peer->context);
+ if (!ast_strlen_zero(peer->subscribecontext)) {
+ astman_append(s, "SubscribeContext: %s\r\n", peer->subscribecontext);
+ }
astman_append(s, "Language: %s\r\n", peer->language);
astman_append(s, "ToneZone: %s\r\n", peer->zone[0] != '\0' ? peer->zone : "<Not set>");
if (!ast_strlen_zero(peer->accountcode))