Hi,
As i am working on to develop custom API through cpp module.
Plan :
- Create Custom NamedList Variable through-out the call regardless of channel
- Store set of value through some module like CustomDriver,CustomChannel, miscellaneous module.May be each module would push some value into customnamed list variable
- Access through Custom module or copy parameters to new message to dispatch.
Because some module like chan.notify /call.answered doesn't have much information to process next message but at the same time need some message other than common value like billid,caller,called etc.
So in this cases in which class header( Whether YATE_API NamedList public section?) i need to define or initialize the named list . So that assign and access through out module.
NamedList Creation:NamedList* customdataList = new NamedList("");
CustomDriver NamedList Assign:CustomDriver::msgExecute(Message& msg)
customdataList->addparam("customheader","customvalue");
CustomChannelHandler Function :Here have doubt on access the NamedList out of these two.
customdataList->getValue("customheader");
or
NamedList* tmp = YOBJECT(NamedList,"customdataList");
tmp ->getValue("customheader");
or
NamedPointer* ss = new NamedPointer("customdataList");
NamedList* tmp = YOBJECT(NamedList,ss);
tmp ->getValue("customheader");
I know i mis-understand some functionalities. Second parameter of YOBJECT required pointer, but i don't know how to create pointer with specific string.I tried exact string, YSTRING but everything gives me error as well or no output.