[Asterisk-Users] Proper syntax for the "Cut" application?

Steven Sokol ssokol at sokol-associates.com
Mon Nov 3 11:13:27 MST 2003


Hi.  I am looking for the proper syntax for the Cut application.  I am
working on a "Feature Code" extension that drops a caller directly into
a voicemail box.  Here is what I have:

exten => _55.,1,Answer()
exten => _55.,2,Cut(VMEXT=EXTEN|55|2)
exten => _55.,3,Voicemail(u${VMEXT})
exten => _55.,4,Hangup()

When I dial 551100, the system tries to process this but I get dropped
immediately.  Here is the output:

-- Executing Answer("SIP/ppc-6aa2", "") in new stack
-- Executing Cut("SIP/ppc-6aa2", "VMEXT=EXTEN|55|2") in new stack
-- Executing Voicemail("SIP/ppc-6aa2", "u") in new stack
== Parsing '/etc/asterisk/voicemail.conf': Found
WARNING[1234379840]: File app_voicemail.c, Line 836 (leave_voicemail):
No entry in voicemail config file for ''

Obviously the new variable VMEXT is empty.  Why is that?  I read the
source for app_cut.c and the syntax looks correct.  I am asking for the
second field which should be '1100'.  I have tried several versions of
this, including changing the line from: exten =>
_55.,2,Cut(VMEXT=EXTEN|55|2) to: exten =>
_55.,2,Cut(VMEXT=${EXTEN}|55|2)

I have also tried changing the parsing function by parsing as such:
exten => _55.,2,Cut(VMEXT=EXTEN|5|2).

None of these put ANYTHING into the ${VMEXT} variable.

Please help!





More information about the asterisk-users mailing list