Hi all,
This is a simple concept, however I'm not entirely comfortable with
available applications and functions available to me to make this happen.
I have a simple dialout macro such as the following:
[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:
if ($arg1 = SIP/MyPersonal)
{
set caller ID to mypersonal
goto s,2
}
else
{
Set(CALLERID(number)=${ARG1}) ; leave as is
goto s,2 ; leave as is
}
Thanks for any insight.
- sf