ok, now I could find a way to get into this<div><br></div><div>reading the asterisk's source code I realized that creating my own ast_switch and registering it on my context is a good solution to my problem.</div><div>
<div><br></div><div><br></div><div><br></div>Saludos!<br> Juan<br>
<br></div><div><br><br><div class="gmail_quote">2010/12/15 Juan Ramírez <span dir="ltr"><<a href="mailto:juanantonio.ram@gmail.com">juanantonio.ram@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div><br></div><div>I'm writing an asterisk module and I was wondering if I can hook an outgoing call made by a SIP or IAX peer without getting into the dialplan</div><div><br></div><div>The use case is below:</div>
<div><br></div><div>1- User makes a call through a SIP phone 94444444</div><div>2- My module gets the call and makes a request to a database checking if the prefix '9' is allowed</div><div>3- If it's allowed then continue, else reject the call</div>
<div><br></div><div>I don't know (yet) how to get into the step two.</div><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div><br clear="all"><div><br></div>Saludos!<br> Juan<br><br>
</div>
</blockquote></div><br></div>