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"><<a href="mailto:kai@ciphron.de">kai@ciphron.de</a>></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 "ast_channel"<br>
and "sip_pvt" structs. "sip_pvt" holds all information about the active<br>
SIP "dialog" (i.e. "call" in this case)<br>
<br>
channel->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">> Hi,<br>
><br>
> I have made an application an asterisk. Can any one tell how do I get<br>
> the source IP address of the SIP packets inside my app_Application()?<br>
> Application only gets the ast_channel variable and *data passed to it.<br>
><br>
> SIP Call is being forwarded to my application from some Service<br>
> Provider. So when app_Applicaiton() is in execute state then I want to<br>
> get the sip source packet ip address and then authenticate it.<br>
><br>
> Regards,<br>
> /ag<br>
><br>
</div></div>> _______________________________________________<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>
><br>
><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>