[asterisk-dev] [Code Review] 2774: res_pjsip: Allow for subscription handlers to specify if they handle the default Accept type for an event package
Mark Michelson
reviewboard at asterisk.org
Tue Aug 20 17:16:02 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2774/
-----------------------------------------------------------
Review request for Asterisk Developers and Joshua Colp.
Bugs: ASTERISK-22067
https://issues.asterisk.org/jira/browse/ASTERISK-22067
Repository: Asterisk
Description
-------
res_pjsip_pubsub was being too strict when handling incoming SUBSCRIBE requests. If there was no Accept header present, then the request would be rejected with a 489 Bad Event.
Every event package has a default type to use if no Accept header is present in a SUBSCRIBE. So a request should potentially be allowed if one of the subscription handlers registered for a particular event package provides the default type. As such, the ast_sip_subscription_handler has been modified to indicate if it handles the default type for a particular event package.
Diffs
-----
/trunk/include/asterisk/res_pjsip_pubsub.h 397192
/trunk/res/res_pjsip_exten_state.c 397192
/trunk/res/res_pjsip_mwi.c 397192
/trunk/res/res_pjsip_pubsub.c 397192
Diff: https://reviewboard.asterisk.org/r/2774/diff/
Testing
-------
I ran a SIPp scenario that subscribed to MWI for a particular mailbox but did not provide any Accept headers. With the change in place, the SUBSCRIBE was allowed and MWI was indicated as expected.
Thanks,
Mark Michelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130820/df9cba9a/attachment.htm>
More information about the asterisk-dev
mailing list