[asterisk-users] Duplicate channel variables after transfer

Alex Hermann alex at speakup.nl
Fri Aug 27 08:13:54 CDT 2010

Hi all,

with an (attended) transfer i see the following happening:

1) A calls B1
2) B2 calls C
3) B2 transfers call to A
4) A talks to C

At step 3, the channel A is connected to channel C and B1 and B2 are hung up. 
In the h extension for channel B2, the channel is renamed to B2<ZOMBIE> and i 
see that the channel variables of A have been merged into B2<ZOMBIE>. If there 
were duplicate names for variables, the channel now has those variables 
doubled. The DumpChan() application called from the h extension confirms this.

In my case the channels are all SIP channels and in the h extension I want to 
access the SIPCALLID variable of the A channel. Every access to it gives me 
the wrong value namely that of channel B1. How do i access the _second_ 
variable named SIPCALLID in the channel?

Extract from DumpChan() as an example:

Dumping Info For Channel: SIP/sipout-00000055<ZOMBIE>:
Name=               SIP/sipout-00000055<ZOMBIE>
Type=               SIP
UniqueID=           1282913436.108
SIPCALLID=eae94252-ebf238ff at
SIPCALLID=lyvkqtybsgrtsnh at

I want to get lyvkqtybsgrtsnh at instead of eae94252-
ebf238ff at as a result.


Alex Hermann

More information about the asterisk-users mailing list