[asterisk-commits] jrose: trunk r376219 - in /trunk: CHANGES channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 13 13:42:20 CST 2012


Author: jrose
Date: Tue Nov 13 13:42:13 2012
New Revision: 376219

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376219
Log:
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/

Modified:
    trunk/CHANGES
    trunk/channels/chan_sip.c

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=376219&r1=376218&r2=376219
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Nov 13 13:42:13 2012
@@ -13,6 +13,9 @@
 
 AMI (Asterisk Manager Interface)
 ------------------
+ * The SIPshowpeer action will now include a 'SubscribeContext' field for a peer
+   in its response if the peer has a subscribe context set.
+
  * The SIPqualifypeer action now acknowledges the request once it has established
    that the request is against a known peer. It also issues a new event,
    'SIPqualifypeerdone', once the qualify action has been completed.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=376219&r1=376218&r2=376219
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Nov 13 13:42:13 2012
@@ -19876,6 +19876,9 @@
 		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))




More information about the asterisk-commits mailing list