Jonas Kellens
2016-Sep-02 09:26 UTC
[asterisk-users] Trouble getting peer variable (sip username) on 302 Moved Temporarily
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>
Administrator TOOTAI
2016-Sep-02 09:51 UTC
[asterisk-users] Trouble getting peer variable (sip username) on 302 Moved Temporarily
Le 02/09/2016 ? 11:26, Jonas Kellens a ?crit :> 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 ?From SIP_HEADER(TO) ? [...] -- Daniel
Max Grobecker
2016-Sep-03 14:35 UTC
[asterisk-users] Trouble getting peer variable (sip username) on 302 Moved Temporarily
Hi Jonas, Am 02.09.2016 um 11:26 schrieb Jonas Kellens:> [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 ?You can get some information out of the REDIRECTING function [1]. For example, your redirecting source (the called device that caused call diversion) is normally stored in REDIRECTING(from-num). [1] https://wiki.asterisk.org/wiki/display/AST/Function_REDIRECTING Greetings Max -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160903/ccd9b63a/attachment.pgp>
Jonas Kellens
2016-Sep-22 09:01 UTC
[asterisk-users] Trouble getting peer variable (sip username) on 302 Moved Temporarily
On 02-09-16 11:51, Administrator TOOTAI wrote:> Le 02/09/2016 ? 11:26, Jonas Kellens a ?crit : >> 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 ? > > From SIP_HEADER(TO) ? > > [...] >Hello SIP_HEADER(TO) is empty. So is SIP_HEADER(FROM). My dialplan : exten => _ZXX,n,NoOp(CallerIDnum = ${CALLERID(num)} CallerIDall = ${CALLERID(all)}) exten => _ZXX,n,NoOp(sipheaderto = ${SIP_HEADER(TO)}) exten => _ZXX,n,NoOp(sipheaderfrom = ${SIP_HEADER(FROM)}) On the Asterisk CLI : [Sep 22 09:43:04] -- Called SIP/nnsa135 [Sep 22 09:43:04] -- Got SIP response 302 "Moved Temporarily" back from 8.9.10.11:65466 [Sep 22 09:43:04] -- Now forwarding SIP/Incoming-00000bd9 to 'Local/208 at from-context' (thanks to SIP/nnsa135-00000be1) ... [Sep 22 09:43:04] -- Executing [208 at from-context:5] NoOp("Local/208 at from-context-00000079;2", "CallerIDnum = 09210 CallerIDall = "Cpss" <09210>") in new stack [Sep 22 09:43:04] -- Executing [208 at from-context:6] NoOp("Local/208 at from-context-00000079;2", "sipheaderto = ") in new stack [Sep 22 09:43:04] -- Executing [208 at from-context:7] NoOp("Local/208 at from-context-00000079;2", "sipheaderfrom = ") in new stack Any more ideas on how to get the value "nnsa135" (being the SIP username) please ? Kind regards.