Is there any "easy" way to add a custom subscribe handler? I have a set of users with Polycom phones that attempt to Events that Asterisk/PJSIP doesn't recognize, "call-info" and "as-feature-event". It just generates a warning, but it got me wondering if I could add my own handlers for those that didn't actually do anything but simply responded with a 200 OK. Yes, I can probably stop the phones from subscribing, but this is more academic at this point. I assume there are things that I could do if I wanted to make changes and recompile, but is there an easier way to add a handler? I am a little confused about whether there is a subscribe handler in front of res_pjsip_pubsub, or if that is the first place that a SUBSCRIBE could get caught. -Trey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170301/48589082/attachment.html>
On Wed, Mar 1, 2017, at 04:02 PM, Trey Hilyard wrote:> Is there any "easy" way to add a custom subscribe handler? I have a set > of > users with Polycom phones that attempt to Events that Asterisk/PJSIP > doesn't recognize, "call-info" and "as-feature-event". It just generates > a > warning, but it got me wondering if I could add my own handlers for those > that didn't actually do anything but simply responded with a 200 OK. > > Yes, I can probably stop the phones from subscribing, but this is more > academic at this point. I assume there are things that I could do if I > wanted to make changes and recompile, but is there an easier way to add a > handler? I am a little confused about whether there is a subscribe > handler > in front of res_pjsip_pubsub, or if that is the first place that a > SUBSCRIBE could get caught.The res_pjsip_pubsub module itself provides a framework for registering support for event types (ast_sip_register_subscription_handler) and handles the subscription lifetime. Callbacks are invoked on the various things. Subscription requested, terminated, etc. There are also functions for sending a NOTIFY and such. There's also another framework for handling PUBLISH. This all does require writing a C module though and building it with Asterisk. There's no external mechanism to implement such things. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Hi all, Is there a way with Polycom phones or alternatives, to configure a specific SIP server for such as-feature-event or call-info events ? If positive, maybe a third party SIP server (Kamailio, ...) supporting those events would allow such implementation. Looking at Yealink phone Admin guide, it seems possible to set a Yealink phone to handle such event Notify/Subscribe communicating with a dedicated SIP server. It seems rather "expensive" though. Thoughts ? Best regards Le mer. 1 mars 2017 à 21:21, Joshua Colp <jcolp at digium.com> a écrit :> On Wed, Mar 1, 2017, at 04:02 PM, Trey Hilyard wrote: > > Is there any "easy" way to add a custom subscribe handler? I have a set > > of > > users with Polycom phones that attempt to Events that Asterisk/PJSIP > > doesn't recognize, "call-info" and "as-feature-event". It just generates > > a > > warning, but it got me wondering if I could add my own handlers for those > > that didn't actually do anything but simply responded with a 200 OK. > > > > Yes, I can probably stop the phones from subscribing, but this is more > > academic at this point. I assume there are things that I could do if I > > wanted to make changes and recompile, but is there an easier way to add a > > handler? I am a little confused about whether there is a subscribe > > handler > > in front of res_pjsip_pubsub, or if that is the first place that a > > SUBSCRIBE could get caught. > > The res_pjsip_pubsub module itself provides a framework for registering > support for event types (ast_sip_register_subscription_handler) and > handles the subscription lifetime. Callbacks are invoked on the various > things. Subscription requested, terminated, etc. There are also > functions for sending a NOTIFY and such. > > There's also another framework for handling PUBLISH. > > This all does require writing a C module though and building it with > Asterisk. There's no external mechanism to implement such things. > > -- > Joshua Colp > Digium, Inc. | Senior Software Developer > 445 Jan Davis Drive NW - Huntsville, AL 35806 - US > Check us out at: www.digium.com & www.asterisk.org > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190115/b85519cb/attachment.html>
A site question: which of the following RFC would describe as-feature-event ? [1] https://www.iana.org/assignments/sip-events/sip-events.xhtml Le mer. 1 mars 2017 à 21:03, Trey Hilyard <kctrey at gmail.com> a écrit :> Is there any "easy" way to add a custom subscribe handler? I have a set of > users with Polycom phones that attempt to Events that Asterisk/PJSIP > doesn't recognize, "call-info" and "as-feature-event". It just generates a > warning, but it got me wondering if I could add my own handlers for those > that didn't actually do anything but simply responded with a 200 OK. > > Yes, I can probably stop the phones from subscribing, but this is more > academic at this point. I assume there are things that I could do if I > wanted to make changes and recompile, but is there an easier way to add a > handler? I am a little confused about whether there is a subscribe handler > in front of res_pjsip_pubsub, or if that is the first place that a > SUBSCRIBE could get caught. > > -Trey > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190115/404692d9/attachment.html>
On Tue, Jan 15, 2019, at 9:29 AM, Olivier wrote:> A site question: which of the following RFC would describe as-feature-event ? > > [1] https://www.iana.org/assignments/sip-events/sip-events.xhtmlIf I recall correctly it doesn't have a spec, it's one of the custom things Broadsoft has done from their platform. -- Joshua C. Colp Digium - A Sangoma Company | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org