[asterisk-users] Trouble getting peer variable (sip username) on 302 Moved Temporarily

Jonas Kellens jonas.kellens at telenet.be
Fri Sep 2 04:26:10 CDT 2016


Hello

when setting a local forward (in this case to extension 23) on a SIP 
phone, I see the following on the Asterisk CLI :


[Aug 31 14:59:34]     -- Got SIP response 302 "Moved Temporarily" back 
from 11.22.33.44:40670
[Aug 31 14:59:34]     -- Now forwarding 
Local/myaccount184 at CallFromQueue-000007f4;2 to 'Local/23 at from-internal' 
(thanks to SIP/myaccount184-00003729)


Question : how can I read the variable which contains the value 
'myaccount184' in the context from-internal ?


The following variables I've tried are empty :

ChannelPeerip=${CHANNEL(peerip)}
Channelrecvip=${CHANNEL(recvip)}
Channelfrom=${CHANNEL(from)}
Channeluri=${CHANNEL(uri)}
Channeluseragent=${CHANNEL(useragent)})


You can see this on the CLI output here :

[Aug 31 14:59:34]     -- Executing [23 at from-internal:7] 
NoOp("Local/23 at from-internal-000007f5;2", "ChannelPeerip= Channelrecvip= 
Channelfrom=") in new stack
[Aug 31 14:59:34]     -- Executing [23 at from-internal:8] 
NoOp("Local/23 at from-internal-000007f5;2", "Channeluri= 
Channeluseragent=") in new stack





Anyone knows the correct variable to read ?



Kind regards

Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160902/2cf73c46/attachment.html>


More information about the asterisk-users mailing list