[asterisk-app-dev] Migrating ast_call_feature from Asterisk 11 to Asterisk 16
Fernando Pardo
fernickk at gmail.com
Mon Aug 5 06:35:30 CDT 2019
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.
Best regards,
Fernando Pardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20190805/ff5f11c4/attachment.html>
More information about the asterisk-app-dev
mailing list