Hello,
On 05/31/07 15:25, lariny guy wrote:
Hi all,
I would write a new module for OpenSER. The module has to capture SIP
messages sent to openser, retrieve them into a text file and re-send
them to openser!
Can you give me an idea of how to do that, especially get SIP messages
sent to openser and retrieve them into text file
I don't see a real use case for the moment, it might be some behind or
there is kind of exercising, however, you have to look at some simple
modules to see the interface and how it interacts with the configuration
file. Such modules can be xlog, dispatcher. You have to export a
function in your module, that function will get as first parameter the
SIP request received by OpenSER. You have to make it work in route and
onreply_route blocks. Inside the sip message structure (struct sip_msg)
you have two fields, 'buf' and 'len' where the content and lengts of
received message are stored. Taking those, you can then write in a file.
To send, you can do usual C socked sending functions.
Cheers,
Daniel
Thank you in advance
------------------------------------------------------------------------
*All new Yahoo! Mail *
<http://us.rd.yahoo.com/evt=40705/*http://mrd.mail.yahoo.com/try_beta?.intl=ca>
------------------------------------------------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.
------------------------------------------------------------------------
_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel
_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel