[OpenSER-Devel] Newbie doubt
Daniel Cardoso Alves
dcardosoa at yahoo.com.br
Tue Jan 29 15:41:52 UTC 2008
Thank you very much...
This is a excelent way...
Thanks...
Jerome Martin <jmartin at longphone.fr> escreveu: Hi Daniel,
On Tue, 2008-01-29 at 10:35 -0300, Daniel Cardoso Alves wrote:
Firstly, thanks for your quickly reply. You indicated good docs.
When I said new function, I wanted say functions like force_rtp_proxy, sl_send_reply, rewritehostport, etc..., But I will make simple functions or simply change some function already existing.
This is relatively easy when adding some script-level functions to a module.
For instance, if you take a look at dialog.c in the dialog directory, you'll notice
several structure defining exported params, script functions, mi functions and stats.
Those structure are themselves referenced from a "module_exports exports" structure.
In order to add exported script functions, you should define the function with desired functionnality in
C and add it to the relevant "cmd" structure so it is exported to the script. I suggest you take a look at
the module of your choice and follow occurences of some exported functions in the source code. Notice
how the "cmd" structure maps the script function to a "callback" function in the code. Then follow that
C function definition to get a taste of how it is implemented, how it manipulates vars and such.
That's a very basic start, but I guess it is a start anyway. Hope this gets you on track.
Regards,
Jérôme Martin | LongPhone
Responsable Architecture Réseau
122, rue la Boetie | 75008 Paris
Tel : +33 (0)1 56 26 28 44
Fax : +33 (0)1 56 26 28 45
Mail : jmartin at longphone.fr
Web : www.longphone.com
---------------------------------
Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openser.org/pipermail/devel/attachments/20080129/5382108d/attachment.htm
More information about the Devel
mailing list