Hello,transactions are created for requests, you can use register_tmcb( 0, 0, TMCB_REQUEST_IN, your_callback_function, 0, 0 ) to get the callback executed for each new transaction. In this case you don't need to provide a valid sip message. You should register such callback in mod init.
I have no a valid sip msg struture on my functions exported. I want get only the call-id of specific transaction created by t_relay() (or other tm functions such as t_newtran()). If I understood, I have that declare a global sip msg struture and give it to function register_tmcb?
Cheers,
2011/11/23 Daniel-Constantin Mierla <miconda@gmail.com>
Hello,the callback is for specific transaction, which is created by t_relay() (or other tm functions such as t_newtran()). At the moment a module registers a callback, the transaction may not be created yet, so giving the sip message it required to build a list callbacks attached to message id -- once the transaction for that request is created, the callabacks list will be linked to it.
On 11/23/11 1:49 PM, Bruno Bresciani wrote:
Hi All,
Why in the kamailio 3.1.2 I have to give a sip_msg parameter to function register_tmcb when I want register a function of my module with TMCB_RESPONSE_OUT parameter? I can't understand this behavior...
Is it any problem to give this parameter? you should have a valid sip msg structure in your functions exported for config usage.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda