[SR-Users] Register Transaction Callback function
Daniel-Constantin Mierla
miconda at gmail.com
Fri Nov 25 08:22:20 CET 2011
Hello,
On 11/23/11 6:37 PM, Bruno Bresciani wrote:
> Hello,
>
> 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?
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.
Cheers,
Daniel
>
> Cheers,
>
> 2011/11/23 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>
>
> Hello,
>
>
> 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...
>
> 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.
>
> 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20111125/a589abb5/attachment-0001.htm>
More information about the sr-users
mailing list