[Serdev] Module creation
Jan Janak
jan at iptel.org
Tue Sep 13 07:00:36 UTC 2005
tm module exports t_gett function which will return the pointer to the
current transaction (struct cell*). The transaction context contains
on_negative attribute which contains the route number to be executed (0
if not set). Check t_on_negative function sources in tm module.
Jan.
On 12-09-2005 19:51, sendman wrote:
> Hi folks!
>
> I'm writing a new module for SER, which wil do routing task; well now I have
> a little problem.
>
> The module is do routing very well, using t_relay_to_udp function, but I
> don't now how to setup t_on_failure route directly inside the module...
>
> So is possible do something like:
>
> cmd_function t_on_failure_f;
>
> ...
>
> if (!(t_on_failure_f = find_export("t_on_failure",1,0))) {
> LOG(L_NOTICE, "mod_init(): This module requires tm module\n");
> return -5;
> }
>
> ...
>
> t_on_failure_f(msg,failure);
> t_relay_to_udp_f(msg,gw,foo));
>
>
>
> Best regards.
>
> -fs
> _______________________________________________
> Serdev mailing list
> serdev at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serdev
More information about the Serdev
mailing list