[asterisk-users] Call forwarding from Phones and getting the referrer IP

Scott Griepentrog sgriepentrog at digium.com
Tue Oct 28 10:41:48 CDT 2014


After a quick perusal of the chan_sip.c code (from svn trunk), I'm not
seeing where the address (p->sa) logged in that message is passed to the
redirecting functions handling the 302, thus it is unlikely there is a way
to obtain it other than reading the log.

It wouldn't be hard to set a channel variable with that value however,
should you want to patch the code, possibly even submit that.


On Tue, Oct 28, 2014 at 7:05 AM, Ishfaq Malik <ish at pack-net.co.uk> wrote:

> On 24 October 2014 16:51, Ishfaq Malik <ish at pack-net.co.uk> wrote:
>
>> Hi
>>
>> I'm using asterisk 1.8 but I'm sure this applies to other versions.
>>
>> If someone puts a call divert on a handset such as a Snom phone I get
>> this type of SIP message on receipt of an inbound call:
>>
>> Got SIP response 302 "Moved Temporarily" back from xxx.xxx.xxx.xxx:xxxxx
>>
>> Which then triggers a local channel to make the call.
>>
>> Is there any way I can access that IP address inside my dialplan? I've
>> done a ChanDump and there's no sign of it.
>>
>> Regards
>>
>> Ish
>>
>>
> Bumping this as I originally sent it late on Friday. If anyone has any
> idea, please let me know.
>
>
> Thanks in Advance
>
> Ish
> --
>
> Ishfaq Malik
> Department: VOIP Support
> Company: Packnet Limited
> t: +44 (0)845 004 4994
> f: +44 (0)161 660 9825
> e: ish at pack-net.co.uk
> w: http://www.pack-net.co.uk
>
> Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
> 37 Ducie Street
> Manchester, M1 2JW
> COMPANY REG NO. 04920552
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
[image: Digium logo]
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20141028/0ad41e39/attachment.html>


More information about the asterisk-users mailing list