[Home]

Summary:ASTERISK-20626: Add Subscription Context to SIPshowpeer AMI event response
Reporter:Jaco Kroon (jkroon)Labels:
Date Opened:2012-10-30 06:01:36Date Closed:2012-11-13 13:45:45.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:1.8.15.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-sip-ami-SubscrContext.patch
Description:It would be advantageous for the manager command SIPshowpeer to return the subscribe context.
Comments:By: Jaco Kroon (jkroon) 2012-10-30 06:22:42.967-0500

With this patch I get an additional SubscrContext item back via the SIPshowpeer AMI manager command which is exactly what I'm looking for, for example:

SubscrContext: hints

By: Rusty Newton (rnewton) 2012-10-31 21:05:42.625-0500

Jaco, thanks for this. Does this apply against trunk?

By: Jaco Kroon (jkroon) 2012-11-01 00:04:44.023-0500

$ patch -p1 < ~/asterisk-sip-ami-SubscrContext.patch
patching file channels/chan_sip.c
Hunk #1 succeeded at 19877 with fuzz 2 (offset 2195 lines).

Inspected the code and it's correct, so yes, it applies correctly in spite of the offset.  Seems one or two additional lines got added as well just above this point which causes the fuzz (MD5SecretExist, amongst others, from memory), none of the new code added the subscribecontext to the block.

By: Matt Jordan (mjordan) 2012-11-08 15:30:46.618-0600

Any reason why you'd abbreviate the word "Subscribe"?  Dropping the -ibe doesn't seem to but a lot, and "SubscribeContext" is slightly more readable.

By: Jaco Kroon (jkroon) 2012-11-19 05:08:40.117-0600

gabriel ~ # asterisk -rx "sip show peer 102" | grep Subs
 Subscr.Cont. : hints
 Subscriptions: Yes

So no, no real reason, would you like me to upload an updated patch or are you willing to make that modificiation to the patch yourself?  Either which way ...

By: Matt Jordan (mjordan) 2012-11-19 08:14:09.801-0600

Nope, no problem - this was added to trunk in r376219.