On Tuesday 25 March 2008 07:51:13 Mindaugas Kezys wrote:
> How can I get peerip, recvip, from, uri, useragent, peername,
> t38passthrough variables in (within) my custom Asterisk application?
>
> I can't use chan_sip.c internal structures (such as sip_pvt) in my custom
> application, because there's no chan_sip.h and I can't include it into my
> application (maybe there's other way?).
>
> I can do like this:
>
> exten => _X,1,Set(PEERIP=${SIPCHANINFO(peerip)})
> exten => _X,2,custom_app
char buf[80];
pbx_substitute_variables_helper(chan, "${SIPCHANINFO(peerip)}", buf,
sizeof(buf));
BTW, this is exactly how res_config_curl works.
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users