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

el Flynn el_flynn at lanvik-icu.com
Mon Nov 29 17:37:34 MST 2004


Nick Barnes wrote:

<snip>

> [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
> 

how about doing this:

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

[some-context]
exten => s,1,Macro(dodial,SIP/201,123456,MOHClass)

this might work since the "15,tT" bit might be generic enough for all 
the extens that are calling that macro.

flynn




More information about the asterisk-users mailing list