[asterisk-users] SHARED() variables and <ZOMBIE> channel

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun May 17 09:57:21 CDT 2009


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)})})

-- 
Tilghman



More information about the asterisk-users mailing list