[asterisk-users] Simple dial plan inquiry

Steve Finkelstein sf at stevefink.net
Mon Apr 30 13:13:34 MST 2007


Howdy Noah,

I just re-read my original inquiry and noticed my original purpose for
mailing the list was not simple to dig out of the message.

Ultimately, the dialout macro works fabulous. My issue is that I'd like
to be able to override one particular SIP endpoint with its own unique
callerID versus what is passed in $ARG1. So any exten that hits the
dialout macro will get set to the callerID in $ARG1. My one particular
SIP handset, for argument sake, SIP/123 .. should be set to CallerID = 234.

Does that clear up what I'm trying to accomplish some?

Thanks!

- sf

Noah Miller wrote:
> Hi Steve -
> 
>> [macro-dialout];
>> arg1 = callerid number;
>> arg2 = phone numberl
>> exten => s,1,Set(CALLERID(number)=${ARG1})
>> exten => s,2,GotoIf($[${LEN(${ARG2})} = 10]?3:4)
>> exten => s,3,Set(ARG2=1${ARG2})
>> exten => s,4,Dial(${TRUNK}/${ARG2},,m)
>> exten => s,5,Congestion()
>> exten => s,105,Busy()
>>
>> This macro overrides one SIP endpoint which I use for personal usage and
>> do not wish to contain our default CID which is passed through arg1. Is
>> there anyway I can combine GotoIf/Goto to set it otherwise? I was
>> thinking in terms of pseudo code to do something similar to the
>> following:
> 
> Looks like it should work.  Does it?  Dialplan logic is fairly terse.
> I don't think you'll be able to clean it up much more than that.  If
> you're looking for something that looks prettier, you could always use
> AEL/AEL2.  Of course, in the end AEL code will compile down to
> Dialplan code.
> 
> - Noah
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> !DSPAM:1020,46364310262288221135878!
> 


More information about the asterisk-users mailing list