[Asterisk-Users] Variable substitution - How can I doDial(${DIALSTRING}) where ${DIALSTRING} is 'SIP/201, 15, tT'?

Nick Barnes nick at bcn-it.co.uk
Mon Nov 29 14:13:46 MST 2004


OK, sorry for the mistakes....
 
> in new stack Nov 29 19:43:09 WARNING[802835]: pbx.c:1280 
> pbx_extension_helper: No application 'Dial{${ARG1})' for 
> extension (macro-dodial, s, 5)

Should have read:

    -- Executing Dial("SIP/201-aca6", "SIP/201,15,tT") in new stack
Nov 29 21:14:05 WARNING[868371]: chan_sip.c:1386 create_addr: No such host:
201,15,tT
Nov 29 21:14:05 NOTICE[868371]: app_dial.c:756 dial_exec: Unable to create
channel of type 'SIP'

And, if I change the contents of the ${ARG1} to 'SIP/201|15|tT' then things
get very weird.



So:

[some-context]
Exten => s,1,Macro(dodial,'SIP/201,15,tT',123456,MOHClass)

[macro-dodial]
Exten => s,1,SetCallerID(${ARG2})
Exten => s,2,SetMusicOnHold(${ARG3})
Exten => s,3,Dial(${ARG1})


Gives:


    -- Executing Macro("SIP/200-aca6",
"dodial|SIP/201,15,tT|123456|MOHClass") in new stack
    -- Executing SetCallerID("SIP/201-aca6", "123456") in new stack
    -- Executing SetMusicOnHold("SIP/200-aca6", "FRED") in new stack
    -- Executing Dial("SIP/200-aca6", "SIP/201,15,tT") in new stack
Nov 29 21:14:05 WARNING[868371]: chan_sip.c:1386 create_addr: No such host:
201,15,tT
Nov 29 21:14:05 NOTICE[868371]: app_dial.c:756 dial_exec: Unable to create
channel of type 'SIP'
  == Everyone is busy/congested at this time


And:

[some-context]
Exten => s,1,Macro(dodial,'SIP/201|15|tT',123456,MOHClass)

[macro-dodial]
Exten => s,1,SetCallerID(${ARG2})
Exten => s,2,SetMusicOnHold(${ARG3})
Exten => s,3,Dial(${ARG1})


Gives:


    -- Executing Macro("SIP/200-c515",
"dodial|SIP/201|15|tT|123456|MOHClass") in new stack
    -- Executing SetCallerID("SIP/200-c515", "15") in new stack
    -- Executing SetMusicOnHold("SIP/200-c515", "tT") in new stack
    -- Executing Dial("SIP/200-c515", "SIP/201") in new stack
Nov 29 21:18:29 NOTICE[884755]: channel.c:284 ast_alloc_uniqueid: uid =
asterisk-158-1101763109.38
    -- Called 201



Which I can't quite get my head round.

Any ideas?

Nick.






More information about the asterisk-users mailing list