[Users] default behaviour

samuel samu60 at gmail.com
Tue Aug 22 09:28:46 CEST 2006


t_relay will create a transaction which will be "alive" in the reply
and failure block.So, effectively, when calling t_relay in the main
route blocks you are handling the message.

Samuel.

2006/8/22, Mark Kent <mark at noc.mainstreet.net>:
> As an educational tool, I'm trying to write a pure proxy using
> openser.  This proxy doesn't have users or domains or gateways,
> it just shuffles messages that happen to land on it.
>
> I'm starting with REGISTER where I have simply this:
>
>   t_on_reply("10");
>   t_on_failure("10");
>   t_relay();
>
> The onreply and onfailure callbacks just log stuff.
>
> The openser cookbook says:
>
>   The implicit action after execution of the main route block is to drop
>   the SIP request. To send a reply or forward the request, explicit
>   actions must be called inside the route block.
>
> To find what happens in other route blocks (onreply, etc.), I searched
> the cookbook for "implicit" and learned:
>
>   implicit action for branch_route is to forward the request.
>
>   implicit action for onreply_route is to send the reply upstream
>   according to Via header
>
> And that's all there is.  Is there more written somewhere else?
>
> What I noticed is that informational responses (1xx) are not relayed
> by openser, but Final (200) or Client Error (401) are relayed.
> Is this conclusion correct?
>
> This implicit behaviour seems a little odd to me;  I would
> think that if I've got a t_on_reply out there then I'm saying
> "Hey, I'll handle it" but in fact I cannot handle it (t_relay is
> not allowed in an onreply block).
>
> So, I must be missing something in my understanding...
> I'ld appreciate it if someone could clarify for me.
>
> Thanks,
> -mark
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>




More information about the sr-users mailing list