Thanks, I will give it a try!<br><br>/ag<br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 8:28 AM, Kai Hoerner <span dir="ltr">&lt;<a href="mailto:kai@ciphron.de">kai@ciphron.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
i suggest you leave the authentication to the asterisk SIP stack and<br>
only let the authenticated peer enter the right context that contains<br>
your call to Application().<br>
<br>
<br>
if you really plan to implement authentication on your own (i see no<br>
good reason for that) you should start by looking at the &quot;ast_channel&quot;<br>
and &quot;sip_pvt&quot; structs. &quot;sip_pvt&quot; holds all information about the active<br>
SIP &quot;dialog&quot; (i.e. &quot;call&quot; in this case)<br>
<br>
channel-&gt;tech_pvt is a pointer from the ast_channel abstraction to the<br>
SIP tech-specific object. (of type sip_pvt)<br>
Before accessing any of its properties you want to check if the channel<br>
is type SIP.<br>
<br>
<a href="http://www.asterisk.org/doxygen/asterisk1.6.2/structsip__pvt.html" target="_blank">http://www.asterisk.org/doxygen/asterisk1.6.2/structsip__pvt.html</a><br>
<br>
<br>
ast guy schrieb:<br>
<div><div></div><div class="h5">&gt; Hi,<br>
&gt;<br>
&gt;  I have made an application an asterisk. Can any one tell how do I get<br>
&gt; the source IP address of the SIP packets inside my app_Application()?<br>
&gt; Application only gets the ast_channel variable and *data passed to it.<br>
&gt;<br>
&gt; SIP Call is being forwarded to my application from some Service<br>
&gt; Provider. So when app_Applicaiton() is in execute state then I want to<br>
&gt; get the sip source packet ip address and then authenticate it.<br>
&gt;<br>
&gt; Regards,<br>
&gt; /ag<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
&gt;<br>
&gt; asterisk-dev mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</blockquote></div><br>