[Asterisk-Users] Channel name (and substring)

B. J. Bomar bbomar at raccoon.com
Thu Mar 17 13:57:19 MST 2005


Put in two Cut statement for both the "@" and "-".  It looks like if it
can't find the delimiter that it just simply sets the new variable to the
exact value of the old one.  Just a thought.

B. J.





-----Original Message-----
From: Thomas Andrews [mailto:tandrews at grok.co.za] 
Sent: Thursday, March 17, 2005 14:25
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Channel name (and substring)

On Thu, Mar 17, 2005 at 02:06:24PM -0600, B. J. Bomar wrote:

> Try using the Cut application.  For your example channel you can use the
> following.
> 
> exten => whatever,n,Cut(my_variable=CHANNEL,@,1)

Thanks, I thought of that, but it doesn't account for cases like Zap/1
that becomes Zap/1-1 in the ${CHANNEL} variable because the convention
seems to change from '@' to '-'. It means I can't write a "generic"
translation.

Thanks,
Thomas






More information about the asterisk-users mailing list