Summary:ASTERISK-06909: Channel variables do not get created when forwarding a call as a result of 302 "Moved Temporarily" response
Reporter:raarts (raarts)Labels:
Date Opened:2006-05-06 04:57:22Date Closed:2006-05-16 18:36:30
Versions:Frequency of
Description:I am using a Thomson ST2030. It has a feature: Transfer to Voicemail which generates a 302 "Moved Temporarily" on every call.

When asterisk receives the reponse it tries to do a call forward to the named extension on the Local channel. In my dialplan it looks as follows:

-- Executing Dial("SIP/demobv122-ec3a", "SIP/netland167|20|Tt") in new stack
-- Called netland167
-- Got SIP response 302 "Moved Temporarily" back from
-- Now forwarding SIP/demobv122-ec3a to 'Local/*256112@phone' (thanks to SIP/netland167-f1a9)
-- Executing Goto("Local/*256112@phone-da72,2", "-phone|*256112|1") in new stack
-- Goto (-phone,*256112,1)

my phone context is:

exten => _.,1,Goto(${company}-phone,${EXTEN},1)

This depends on channel variables that are specified with setvar in sip.conf

But it seems like the variables are not created and attached to the Local channel when the forward is happening.
Comments:By: Russell Bryant (russell) 2006-05-06 08:22:26

Please create your variables with two leading underscores:


This tells Asterisk that this variable should be inherited by any channels created as children of the original channel.  This should fix your issue.  Please test and verify it.  Thanks

By: raarts (raarts) 2006-05-07 08:47:42

Ok, I tried it. It does not work. Not for one and not for two underscores.

By: Serge Vecher (serge-v) 2006-05-15 14:34:46

raarts: you will need to capture some debug information in order to diagnose this further.
1. Please attach the relevant snippet of sip.conf
2. Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
3. Save complete log to file and _attach_ said file to the bug.
4. As an alternative, please use Set() diaplan command http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Set

By: Joshua C. Colp (jcolp) 2006-05-16 18:36:30

Fixed in 1.2 and trunk. Thanks! Well, almost fixed in trunk once I'm done.