On Fri, 2006-06-30 at 06:22 +0500, Rehan AllahWala wrote:
> http://www.voip-info.org/wiki-Asterisk+variables
> 
> Has any one written or know of a variable to capture the from ip address of 
> the call from the 
> headers in extensions.conf ?

Well, it wouldnt be that hard to do, however looking just at sip you
have 4 potential IPs.

real IP for control
real IP for RTP
IP sent in headers (this can actually be more than two but generally
will be 1-2).

With a bad NAT configuration the real IPs wont match the IPs sent in
headers, generally those can be ignored and use the real ones instead.

Based on all this its my guess that you want the control (signalling) IP
since you want it in the dialplan, although after the call was up you
would have the media IP.

I do not know of anything, however this is not likely to be that hard to
do, the only caveat is that there isnt a generic way to do this, since
each channel is not guaranteed to be IP (alsa, oss, zap, etc cant report
this).  That means that it would require a small modification most
likely in chan_XXX to set a variable to report this.


What would be really cool is if you had CHAN(varname) much like
CDR(varname) and it contained all the channel specific properties.


-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
Belfast IE +44 28 9099 6461    DE +49 801 777 555 3402
Utrecht NL +31 306 553058      US WA +1 360 207 0479
US NY +1 516 687 5200          FreeWorldDialup: 635378
http://www.trxtel.com the VoIP provider that pays you!

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-biz mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-biz

Reply via email to