You have to set the flag to where you allow the function to be called<br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 5, 2017 at 4:04 PM Cléviton Mendes de Araújo <<a href="mailto:clevitonmendes@gmail.com">clevitonmendes@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><p class="MsoNormal">Thanks David for your attention.<br></p><div><p class="MsoNormal"><span lang="EN">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.<br>
<br>
Or put it another way, what care should I take when allowing my exported functions to be called from the one script block section?</span><span lang="EN-US"><br>
<br>
<br>
</span><span lang="EN">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN">CMA</span><span lang="EN-US"><br>
<br>
<br>
Date: Wed, 5 Jul 2017 00:01:05 +0200<br>
From: David Villasmil <</span><a href="mailto:david.villasmil.work@gmail.com" target="_blank"><span lang="EN-US">david.villasmil.work@gmail.com</span></a><span lang="EN-US">><br>
To: "Kamailio (SER) - Development Mailing List" <</span><a href="mailto:sr-dev@lists.kamailio.org" target="_blank"><span lang="EN-US">sr-dev@lists.kamailio.org</span></a><span lang="EN-US">><br>
Subject: Re: [sr-dev] Route Blocks?<br>
Message-ID:<span style="color:#1f497d"> </span><CAFGRPVpkAufkJ+w=</span><a href="mailto:6Drw3O1v1LbbShQU9kh68YktraOTNAJtDQ@mail.gmail.com" target="_blank"><span lang="EN-US">6Drw3O1v1LbbShQU9kh68YktraOTNAJtDQ@mail.gmail.com</span></a><span lang="EN-US">><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
An excerpt from:<br>
<br>
</span><a href="https://www.kamailio.org/dokuwiki/doku.php/development:write-module" target="_blank"><span lang="EN-US">https://www.kamailio.org/dokuwiki/doku.php/development:write-module</span></a><span lang="EN-US"><br>
<br>
It reads:<br>
<br>
*flags* *int* - Can't have a structure without flags! </span>The flags tell the</p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal"><br>
script when it is legal to call the function. The flag values can be<br>
“or'ed” together if the function can be called from more then one routing<br></p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal">
section of the openser.cfg script. i.e. *REQUEST_ROUTE | ONREPLY_ROUTE*<br>
<br>
   - *REQUEST_ROUTE* - The function can be called in the request route</p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal"><br>
   section of the openser.cfg script.<br></p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal">
   - *FAILURE_ROUTE* - The function can be called in the failure route</p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal"><br>
   section of the openser.cfg script.<br></p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal">
   - *ONREPLY_ROUTE* - The function can be called in the reply route</p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal"><br>
   section of the openser.cfg script.<br></p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal">
   - *BRANCH_ROUTE* - The function can be called in the branch route</p></div></div></div></blockquote></div></div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="m_6597094898219288902quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_6597094898219288902m_8490165409548008322WordSection1"><div><p class="MsoNormal"><br>
   section of the openser.cfg script.<br>
<br>
<span style="font-family:"Gadugi",sans-serif">ᐧ</span><br>
<br>
Regards,<br>
<br>
David Villasmil<br>
email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
phone: <a href="tel:%2B34669448337" target="_blank">+34669448337</a><br>
<br>
On Tue, Jul 4, 2017 at 4:36 PM, Cléviton Mendes de Araújo <<br>
<a href="mailto:clevitonmendes@gmail.com" target="_blank">clevitonmendes@gmail.com</a>> wrote:<br>
<br>
> Hi Folks<br>
><br>
> Let me do one design question about to writing code module when write it.<br>
><br>
> What’s conditions to allow an module exported function may be running from<br>
> Kamailio route blocks?<br>
><br>
> Why can I running an module function from REQUST_ROUTE and isn’t from<br>
> REPLY_ROUTE block?<br>
><br>
> What restricts me to run from one block and not another?<br>
><br>
> Best regards<br>
><br>
> CMA<br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Development Mailing List<br>
> <a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
><br>
<br>
<u></u><u></u></p></div></div></div></blockquote></div></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>