On Mon, Aug 5, 2019, at 8:35 AM, Fernando Pardo wrote: > Hello, everybody. I'm migrating a module I've developed for Asterisk 11 > to use it on Asterisk 16. One of the trickiest parts I haven't found a > way around is the removal of the ast_call_feature struct, which I used > to execute a function on transfers. > > This is what I do on Asterisk 11: > > - Define a global 'ast_call_feature *my_feature_transfer' > - Define a callback function 'int > TransferFromFeatureOperation(ast_channel *chan, ast_channel *peer, > ast_bridge_config*, const char*, int sense, void*)' > - On module load, I initialize my_feature_transfer with: > - feature_mask = AST_FEATURE_REDIRECT > - fname = ast_strdup("Attended Transfer") > - sname = "my_att_transfer" > - exten = 'T' > - default_exten = 'T' > - operation = &TransferFromFeatureOperation > - flags = AST_FEATURE_FLAG_NEEDSDTMF > ... and register it with 'ast_register_feature(icc_feature_transfer);' > - On module unload, I call > 'ast_unregister_feature(icc_feature_transfer)' and free fname. > > What would be the way to migrate this to Asterisk 16? I think it has > something to do with aco_option_register, but I'm not sure.
The aco_option_register function is used by modules to register some configuration handling logic. The bridge feature API is defined in bridge_features.h[1] but I'm not sure functionality you require (arbitrary adding of features) was ever added to it. [1] https://github.com/asterisk/asterisk/blob/master/include/asterisk/bridge_features.h -- 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 _______________________________________________ asterisk-app-dev mailing list asterisk-app-...@lists.digium.com http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev -- _____________________________________________________________________ -- 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