[asterisk-users] SHARED() variables and <ZOMBIE> channel
Chris Maciejewski
chris at wima.co.uk
Sun May 17 12:27:27 CDT 2009
2009/5/17 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>:
> On Sunday 17 May 2009 09:10:47 Chris Maciejewski wrote:
>> Hi,
>>
>> I am using SHARED() function to push destination channel info (i.e.
>> audio codec) into "source" channel, in order to record into a customer
>> CDR field.
>> My dialplan looks like:
>>
>> [default]
>> exten => _X.,1,Set(_X-SRC_CHANNEL=${CHANNEL})
>> exten => _X.,n,Dial(SIP/user at domain.net,30,M(getCalledInfo))
>>
>> exten => h,1,Set(CDR(DST_CODEC)=${SHARED(X-DST-CODEC,${CHANNEL})})
>>
>> [macro-getCalledInfo]
>> exten =>
>> s,1,Set(SHARED(X-DST-CODEC,${X-SRC_CHANNEL})=${CHANNEL(audionativeformat)})
>>
>> The above works great, however there is a problem when call is
>> transferred via SIP attended transfer and channel is renamed to
>> Channel<ZOMBIE>.
>>
>> -- Executing [h at default:1] Set("SIP/somechannel<ZOMBIE>",
>> "CDR(DST_CODEC)=") in new stack
>>
>> Is there any workaround for the above issue?
>
> I suppose you could use CUT to guarantee that the ZOMBIE portion won't show
> up in the channel name, i.e.
>
> exten => h,1,Set(CDR(DST_CODEC)=${SHARED(X-DST-CODEC,${CUT(CHANNEL,<,1)})})
>
I tried that already, but Asterisk throws the following error:
-- Executing [h at default:1] Set("SIP/OpenSER-0831a618<ZOMBIE>",
"X-CHAN-NAME=SIP/OpenSER-0831a618") in new stack
[May 17 18:24:32] ERROR[6101]: func_global.c:106 shared_read: Channel
'SIP/OpenSER-0831a618' not found! Variable 'X-DST-CODEC' will be
blank.
as OpenSER-0831a618 doesn't exist any more. Looks like maybe SHARED()
variables are not inherited by <ZOMBIE> channel?
> --
> Tilghman
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list