[Asterisk-Users] Re: PTSN POTS Differences RESOLVED...no really this time...

Robert Keller rkeller at ferndale.wednet.edu
Mon Apr 11 09:58:22 MST 2005


Tony, good call. The place I had entered the "w" would get overwritten by a
default include from somewhere.

I found the ${ARG2} in the extensions.conf:

; dialout using a trunk, using pattern matching (don't strip any prefix)
; arg1 = trunk number, arg2 = number
[macro-dialout-trunk]
exten => s,1,GotoIf($[foo${ECID${CALLERIDNUM}} = foo]?4)        ;check
for CID override for exten
exten => s,2,SetCallerID(${ECID${CALLERIDNUM}})
exten => s,3,Goto(6)
exten => s,4,GotoIf($[foo${OUTCID_${ARG1}} = foo]?6)            ;check
for CID override for trunk
exten => s,5,SetCallerID(${OUTCID_${ARG1}})
exten => s,6,SetGroup(OUT_${ARG1})
exten => s,7,CheckGroup(${OUTMAXCHANS_${ARG1}})
; if we've used up the max channels, continue at 108 (n+101)
exten => s,8,SetVar(DIAL_NUMBER=w${ARG2})  ****HERE*******HERE**********
exten => s,9,SetVar(DIAL_TRUNK=${ARG1})
exten => s,10,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial
string for this trunk
exten => s,11,Dial(${OUT_${ARG1}}/${OUTPREFIX_${ARG1}}${DIAL_NUMBER})
; if dial fails (ie, all channels are busy), continue at 112 (n+101)

Works and does not appear to get overwritten.

Thanks again.

Robert





> From: tony at softins.clara.co.uk (Tony Mountifield)
> Organization: Software Insight Ltd., Winchester, UK
> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com>
> Date: Mon, 11 Apr 2005 16:13:59 +0000 (UTC)
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] Re: PTSN POTS Differences SOLVED
> 
> In article <BE7FD12F.1A2CD%rkeller at ferndale.wednet.edu>,
> Robert Keller <rkeller at ferndale.wednet.edu> wrote:
>> Tony, I don't see "${EXTEN}" anywhere in the [macro-dialout-trunk] context.
>> Am I missing something?
> 
> It's probably ${ARG2}.
> 
> When you call Macro(name,1,${EXTEN}), say for extension 1234, then the
> macro [macro-name] gets called with ${ARG1} containing 1, and ${ARG2}
> containing 1234.
> 
> Somewhere in [macro-dialout-trunk] you probably have the command:
> 
> Dial(whatever/something/${ARG2},options)
> 
> If that's true, you just need to put the w before ${ARG2}.
> 
> I've never seen Asterisk at Home, so if the above doesn't match what you
> have, perhaps you could post the contents of [macro-dialout-trunk].
> 
> Cheers
> Tony
> 
>> Robert Andrew Keller
>> Ferndale School District #502
>> rkeller at ferndale.wednet.edu
>> 360-383-9228 PH.
>> 360-383-9218 FAX
>> "Paving the way for tomorrows genius."
>> 
>>> From: tony at softins.clara.co.uk (Tony Mountifield)
>>> Organization: Software Insight Ltd., Winchester, UK
>>> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
>>> <asterisk-users at lists.digium.com>
>>> Date: Mon, 11 Apr 2005 07:48:19 +0000 (UTC)
>>> To: asterisk-users at lists.digium.com
>>> Subject: [Asterisk-Users] Re: PTSN POTS Differences SOLVED
>>> 
>>> In article <BE7F361F.1A279%rkeller at ferndale.wednet.edu>,
>>> Robert Keller <rkeller at ferndale.wednet.edu> wrote:
>>>> Thanks Rich, I wasn't sure where to find that context. I found the outbound
>>>> context in the extensions_additional.conf and added w's in the following
>>>> manner:
>>>> 
>>>> [outrt-001-Out1]
>>>> include => outrt-001-Out1-custom
>>>> exten => _1NXXNXXXXXX,1,Macro(dialout-trunk,1,w${EXTEN})
>>>> exten => _1NXXNXXXXXX,2,Macro(outisbusy)    ; No available circuits
>>>> exten => _9.,1,Macro(dialout-trunk,1,w${EXTEN:1})
>>>> exten => _9.,2,Macro(outisbusy)    ; No available circuits
>>>> exten => _NXXNXXXXXX,1,Macro(dialout-trunk,1,w${EXTEN})
>>>> exten => _NXXNXXXXXX,2,Macro(outisbusy)    ; No available circuits
>>>> exten => _NXXXXXX,1,Macro(dialout-trunk,1,w${EXTEN})
>>>> exten => _NXXXXXX,2,Macro(outisbusy)    ; No available circuits
>>> 
>>> Couldn't you have just put the w in once, in the Dial command that
>>> is inside [macro-dialout-trunk] ?
>>> 
>>> Cheers
>>> Tony
>>> -- 
>>> Tony Mountifield
>>> Work: tony at softins.co.uk - http://www.softins.co.uk
>>> Play: tony at mountifield.org - http://tony.mountifield.org
>>> _______________________________________________
>>> Asterisk-Users mailing list
>>> Asterisk-Users at lists.digium.com
>>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>> To UNSUBSCRIBE or update options visit:
>>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>> 
>> _______________________________________________
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>> 
> 
> 
> -- 
> Tony Mountifield
> Work: tony at softins.co.uk - http://www.softins.co.uk
> Play: tony at mountifield.org - http://tony.mountifield.org
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list