[Asterisk-biz] gotta be a better way
Bill Michaelson
bill at cosi.com
Tue Nov 22 18:00:19 MST 2005
Yes, you have consolidated my technique into a single expression. The
referenced page is the one on which I failed to find what I was looking
for. So perhaps there really is no better way. C'est la vie. Thanks
for the ref.
Further experimentation reveals that hacking off trailing five
characters is really only reliable for SIP channels on my box, but it
will do for now. IAX is problematic not only because of slight
syntactical differences in the channel string contruction, but because
of the multiplexed nature of the channel which makes it logically
impractical to associate a physical device with any segment of the
channel ID. The notion of station ID is just not present in this
circumstance, nor do I think it should be.
But I'll get by for now...
C F wrote:
>So the following will do in your case:
>
>exten => 807,1,Set(DEVICE=${CHANNEL:0:$[${LEN(${CHANNEL})} - 5]})
>Hope you enjoy making out the code, but it should work.
>Anyhow, the documentation is around:
>http://www.voip-info.org/wiki-asterisk+variables
>You just got to use your creativity/imagination to get it done.
>
>
>
>
>
More information about the asterisk-biz
mailing list