You have to set the flag to where you allow the function to be called
On Wed, Jul 5, 2017 at 4:04 PM Cléviton Mendes de Araújo <
clevitonmendes(a)gmail.com> wrote:
Thanks David for your attention.
That content does not clarify at all one essential question in which block
sections of the cfg script I can allowing the exported functions of my
module.
Or put it another way, what care should I take when allowing my exported
functions to be called from the one script block section?
Regards,
CMA
Date: Wed, 5 Jul 2017 00:01:05 +0200
From: David Villasmil <david.villasmil.work(a)gmail.com>
To: "Kamailio (SER) - Development Mailing List" <sr-dev(a)lists.kamailio.org
Subject: Re: [sr-dev] Route Blocks?
Message-ID: <CAFGRPVpkAufkJ+w=
6Drw3O1v1LbbShQU9kh68YktraOTNAJtDQ(a)mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
An excerpt from:
https://www.kamailio.org/dokuwiki/doku.php/development:write-module
It reads:
*flags* *int* - Can't have a structure without flags! The flags tell the
script when it is legal to call the function. The flag values can be
“or'ed” together if the function can be called from more then one routing
section of the openser.cfg script. i.e. *REQUEST_ROUTE | ONREPLY_ROUTE*
- *REQUEST_ROUTE* - The function can be called in the request route
section of the openser.cfg script.
- *FAILURE_ROUTE* - The function can be called in the failure route
section of the openser.cfg script.
- *ONREPLY_ROUTE* - The function can be called in the reply route
section of the openser.cfg script.
- *BRANCH_ROUTE* - The function can be called in the branch route
section of the openser.cfg script.
ᐧ
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
On Tue, Jul 4, 2017 at 4:36 PM, Cléviton Mendes de Araújo <
clevitonmendes(a)gmail.com> wrote:
> Hi Folks
> Let me do one design question about
to writing code module when write it.
> What’s conditions to allow an module
exported function may be running
from
> Kamailio route blocks?
> Why can I running an module function
from REQUST_ROUTE and isn’t from
> REPLY_ROUTE block?
> What restricts me to run from one
block and not another?
> Best regards
> CMA
>
_______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev(a)lists.kamailio.org
>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev