[asterisk-dev] How to get SIP packet source ip address in asterisk application
Kai Hoerner
kai at ciphron.de
Mon Nov 16 01:28:13 CST 2009
Hi,
i suggest you leave the authentication to the asterisk SIP stack and
only let the authenticated peer enter the right context that contains
your call to Application().
if you really plan to implement authentication on your own (i see no
good reason for that) you should start by looking at the "ast_channel"
and "sip_pvt" structs. "sip_pvt" holds all information about the active
SIP "dialog" (i.e. "call" in this case)
channel->tech_pvt is a pointer from the ast_channel abstraction to the
SIP tech-specific object. (of type sip_pvt)
Before accessing any of its properties you want to check if the channel
is type SIP.
http://www.asterisk.org/doxygen/asterisk1.6.2/structsip__pvt.html
ast guy schrieb:
> Hi,
>
> I have made an application an asterisk. Can any one tell how do I get
> the source IP address of the SIP packets inside my app_Application()?
> Application only gets the ast_channel variable and *data passed to it.
>
> SIP Call is being forwarded to my application from some Service
> Provider. So when app_Applicaiton() is in execute state then I want to
> get the sip source packet ip address and then authenticate it.
>
> Regards,
> /ag
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
More information about the asterisk-dev
mailing list