[asterisk-users] How to handle "+" prefix

James FitzGibbon james.fitzgibbon at gmail.com
Thu Aug 30 07:39:38 CDT 2007


On 8/30/07, Adrian Marsh <Adrian.Marsh at ubiquisys.com> wrote:

> [outgoing-pstn-international]
> exten => _+.,1,Set(EXTEN=00${EXTEN:+1})
> exten => _+.,2,NoOp(test line: ${EXTEN})


Setting ${EXTEN} won't work, but Goto(context,00${EXTEN:1},priority) will:

[foo]
exten   => 7997,1,Answer
exten   => 7997,n,Set(FOO=+1441793xxxxxx)
exten   => 7997,n,Goto(foo,00${FOO:1},1)
exten   => 7997,n,Hangup
exten => _0.,1,NoOp(${EXTEN})
exten => _0.,n,Hangup

    -- Executing [7997 at from-internal-admin:1] Answer("SIP/427-9dd49740", "")
in new stack
    -- Executing [7997 at from-internal-admin:2] Set("SIP/427-9dd49740",
"FOO=+1441793xxxxxx") in new stack
    -- Executing [7997 at from-internal-admin:3] Goto("SIP/427-9dd49740",
"foo|001441793xxxxxx|1") in new stack
    -- Goto (foo,001441793xxxxxx,1)
    -- Executing [001441793xxxxxx at foo:1] NoOp("SIP/427-9dd49740",
"001441793xxxxxx") in new stack
    -- Executing [001441793xxxxxx at foo:2] Hangup("SIP/427-9dd49740", "") in
new stack

-- 
j.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070830/0cead1ce/attachment.htm 


More information about the asterisk-users mailing list