Greetings all, I'm on 1.2.9.1, and I'm trying to get a dialplan working that uses text labels, but it's not working. For instance, take the following macro snippet: [macro-dosomething] exten => s,1,GotoIf($["${MACRO_EXTEN:1:1}" != "1"] ? scid) exten => s,n,Set(MACRO_EXTEN=1${MACRO_EXTEN}) exten => s,n(scid),SetCallerId(${MY_CID}) exten => s,n,Dial(...) When I call this macro, I get the following: -- Executing Macro("SIP/1000-66b0", "dosomething") in new stack -- Executing GotoIf("SIP/1000-66b0", "1 ? scid") in new stack Jul 10 20:05:52 NOTICE[99803]: pbx.c:1753 pbx_extension_helper: No such label ' scid' in extension 's' in context 'macro-dosomething' Jul 10 20:05:52 WARNING[99803]: pbx.c:6514 ast_parseable_goto: Priority ' scid' must be a number > 0, or valid label The last log line suggests I can't use labels, but according to http://www.voip-info.org/wiki/index.php?page=Asterisk+priorities it shouldn't be a problem. Am I doing something wrong? Cheers, -Wes
> The last log line suggests I can't use labels, but according to > http://www.voip-info.org/wiki/index.php?page=Asterisk+priorities it > shouldn't be a problem.Labels work fine (and have been for a while). The snippet you provided looks correct to me too. Are there are warning/errors when loading extensions.conf? Does "show dialplan macro-dosomething" show the correct labels and all priorities? I.e.: CLI> show dialplan macro-setcfwd [ Context 'macro-setcfwd' created by 'pbx_config' ] 's' => 1. Playback(${ARG2}) [pbx_config] 2. Read(R|pls-ent-num-transfer|11||1|10) [pbx_config] 3. GotoIf($["${R}" != ""]?set) [pbx_config] 4. DbDel(${ARG1}) [pbx_config] 5. Playback(call-fwd-cancelled) [pbx_config] 6. Hangup() [pbx_config] [set] 7. DbPut(${ARG1}=${R}) [pbx_config] 8. Playback(${ARG2}) [pbx_config] 9. Playback(has-been-set-to) [pbx_config] 10. SayDigits(${R}) [pbx_config] -= 1 extension (10 priorities) in 1 context. =- --Luki
Tzafrir Cohen
2006-Jul-10 22:32 UTC
[asterisk-users] Text priority labels not working for me
On Mon, Jul 10, 2006 at 08:54:37PM -0700, Wes Santee wrote:> Greetings all, > > I'm on 1.2.9.1, and I'm trying to get a dialplan working that uses text > labels, but it's not working. For instance, take the following macro > snippet: > > [macro-dosomething] > exten => s,1,GotoIf($["${MACRO_EXTEN:1:1}" != "1"] ? scid) > exten => s,n,Set(MACRO_EXTEN=1${MACRO_EXTEN}) > exten => s,n(scid),SetCallerId(${MY_CID}) > exten => s,n,Dial(...) > > When I call this macro, I get the following: > > -- Executing Macro("SIP/1000-66b0", "dosomething") in new stack > -- Executing GotoIf("SIP/1000-66b0", "1 ? scid") in new stack > Jul 10 20:05:52 NOTICE[99803]: pbx.c:1753 pbx_extension_helper: No such > label ' scid' in extension 's' in context 'macro-dosomething' > Jul 10 20:05:52 WARNING[99803]: pbx.c:6514 ast_parseable_goto: Priority > ' scid' must be a number > 0, or valid labelFor starters, ask asterisk if there is. In the CLI: show dialplan macro-dosomething -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com
Eric "ManxPower" Wieling
2006-Jul-10 23:59 UTC
[asterisk-users] Text priority labels not working for me
Wes Santee wrote:> Greetings all, > > I'm on 1.2.9.1, and I'm trying to get a dialplan working that uses text > labels, but it's not working. For instance, take the following macro > snippet: > > [macro-dosomething] > exten => s,1,GotoIf($["${MACRO_EXTEN:1:1}" != "1"] ? scid) > exten => s,n,Set(MACRO_EXTEN=1${MACRO_EXTEN}) > exten => s,n(scid),SetCallerId(${MY_CID}) > exten => s,n,Dial(...) > > When I call this macro, I get the following: > > -- Executing Macro("SIP/1000-66b0", "dosomething") in new stack > -- Executing GotoIf("SIP/1000-66b0", "1 ? scid") in new stack > Jul 10 20:05:52 NOTICE[99803]: pbx.c:1753 pbx_extension_helper: No such > label ' scid' in extension 's' in context 'macro-dosomething' > Jul 10 20:05:52 WARNING[99803]: pbx.c:6514 ast_parseable_goto: Priority > ' scid' must be a number > 0, or valid label > > The last log line suggests I can't use labels, but according to > http://www.voip-info.org/wiki/index.php?page=Asterisk+priorities it > shouldn't be a problem. > > Am I doing something wrong?Don't put spaces around the ? -- Now accepting new clients in Birmingham, Atlanta, Huntsville, Chattanooga, and Montgomery.