Re: [OpenSIPS-Devel] RFC: adding new callback mechanism into core API
Bogdan-Andrei Iancu wrote: > Hi Maxim, > > So, the nathelper is interested in the destination IP or in the > destination URI ? > > May I ask what is the nathelper extension that require this feature ? > because depending on what the purpose is, maybe other solutions are > available. Hi Bogdan, We need this for the auto-bridging extension, so that it can allocate proper IP address for the RTP media. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sa...@sippysoft.com Skype: SippySoft ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] RFC: adding new callback mechanism into core API
Hi Maxim, So, the nathelper is interested in the destination IP or in the destination URI ? May I ask what is the nathelper extension that require this feature ? because depending on what the purpose is, maybe other solutions are available. Thanks and regards, Bogdan Maxim Sobolev wrote: > Here is the pre-final patch along those lines: > > http://sobomax.sippysoft.com/opensips_rtpproxy_multihome.diff > > Any comments or suggestions are welcome. > > Maxim Sobolev wrote: > >> Gang, >> >> We have some new functionality for the nathelper planned that would need >> to know final destination URI for the message to work properly. >> Currently this means that we have to require script writer to invoke >> this function only after all URI transformations have been applied, >> which might quite significantly complicate script logic. Moreover it >> might be even impossible in some cases to do so, for example when using >> t_relay() function, which uses transaction state to determine message >> destination. >> >> Therefore, I see the need for a callback mechanism in core, allowing >> callback functions to be registered on per-message basis and then to be >> executed in some well-defined points of message processing. The >> mechanism could be sufficiently generic to allow different uses. One of >> the other use that I have in mind is destructor callback, which is to be >> called when the message structure is being freed, so that modules would >> be able to release any resources allocated (memory, connections, >> descriptors, etc). >> >> Any comments and suggestions are welcome. >> > > Regards, > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] RFC: adding new callback mechanism into core API
Here is the pre-final patch along those lines: http://sobomax.sippysoft.com/opensips_rtpproxy_multihome.diff Any comments or suggestions are welcome. Maxim Sobolev wrote: > Gang, > > We have some new functionality for the nathelper planned that would need > to know final destination URI for the message to work properly. > Currently this means that we have to require script writer to invoke > this function only after all URI transformations have been applied, > which might quite significantly complicate script logic. Moreover it > might be even impossible in some cases to do so, for example when using > t_relay() function, which uses transaction state to determine message > destination. > > Therefore, I see the need for a callback mechanism in core, allowing > callback functions to be registered on per-message basis and then to be > executed in some well-defined points of message processing. The > mechanism could be sufficiently generic to allow different uses. One of > the other use that I have in mind is destructor callback, which is to be > called when the message structure is being freed, so that modules would > be able to release any resources allocated (memory, connections, > descriptors, etc). > > Any comments and suggestions are welcome. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sa...@sippysoft.com Skype: SippySoft ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] RFC: adding new callback mechanism into core API
Gang, We have some new functionality for the nathelper planned that would need to know final destination URI for the message to work properly. Currently this means that we have to require script writer to invoke this function only after all URI transformations have been applied, which might quite significantly complicate script logic. Moreover it might be even impossible in some cases to do so, for example when using t_relay() function, which uses transaction state to determine message destination. Therefore, I see the need for a callback mechanism in core, allowing callback functions to be registered on per-message basis and then to be executed in some well-defined points of message processing. The mechanism could be sufficiently generic to allow different uses. One of the other use that I have in mind is destructor callback, which is to be called when the message structure is being freed, so that modules would be able to release any resources allocated (memory, connections, descriptors, etc). Any comments and suggestions are welcome. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sa...@sippysoft.com Skype: SippySoft ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel