; Relevant portion of dialplan in extensions.conf ;========================================================= #include "include.ext" ; Contents of include.ext ;========================================================= #include "astpoctwo.ext" ; Contents of astpoctwo.ext [astpoctwo] exten => _[*#0-9]!,1,Verbose(2,Received call from endpoint ${CHANNEL(from)} dialed ${EXTEN}) same => n,Set(CALL_ORIGIN=EndPoint) same => n,Macro(setup_call_environment,${EXTEN}) same => n,GoSubIf($["${hasCustomPbxDialplan}" = "1"]?${pbxContext}_custom_pbx_dialplan,${EXTEN},1) same => n,GoTo(${pbxContext}_dialmain,${EXTEN},1) exten => _[B]XXXXXX[D].,1,NoOp() ; Update callerId so we don't see ugly strings same => n,Set(CONNECTEDLINE(name,i)=Shared Line) same => n,Set(CONNECTEDLINE(num,i)=****) same => n,Set(CONNECTEDLINE(pres)=allowed) same => n,Set(CALL_ORIGIN=EndPoint) same => n,Macro(setup_call_environment) same => n,Set(_pbxContext=${pbxContext}) same => n,Set(_pbxId=${pbxId}) same => n,Set(_PEERNAME=${CHANNEL(peername)}) same => n,NoCDR() same => n,SLAStation(${EXTEN}) exten => _tru[n]k-X!,1,NoOp() same => n,Answer() same => n,NoCDR() ; we don't care about the CDR unless we actually place a call. ResetCDR() will re-enable CDR is a call is placed same => n,Read(NumberToDial,dial,,i,5,3) same => n,GotoIf($[${LEN(${NumberToDial})} > 0]?try_dialing) same => n,Playback(silence/1&cannot-complete-as-dialed) same => n,Hangup() same => n(try_dialing),NoOp() same => n,ResetCDR(e) ; re-enable CDR for this call so we bill if the other end answers same => n,Set(CDR(cd_branchId)=${pbxId}) same => n,GoSubIf($["${hasCustomPbxDialplan}" = "1"]?${pbxContext}_custom_pbx_dialplan,${NumberToDial},1) same => n,Goto(${pbxContext}_dialmain,${NumberToDial},1) exten => _parkpos[_]X!,1,NoOp() same => n,Set(CALL_ORIGIN=EndPoint) same => n,Macro(setup_call_environment,${EXTEN}) same => n,GoTo(${pbxContext}_dialmain,${EXTEN},1) exten=>100,hint,SIP/sip100_astpoctwo [astpoctwo_dialmain] include => dialmain Switch => Realtime [astpoctwo_voicemail] include => va_voicemail [astpoctwo_sla_lines] include => va_sla_line [astpoctwo_sla_group] include => va_sla_group [astpoctwo_custom_pbx_dialplan] exten => _.,1,return() [astpoctwo_outside_number] include => va_outside_number [astpoctwo_extensions] include => va_user_extension [astpoctwo_findme_100] include => va_find_me [astpoctwo_aa_Main] include => va_auto_attendant [astpoctwo_aa_After_Hours] include => va_auto_attendant [astpoctwo_ah_Business_Hours] include => va_time_frame [astpoctwo_agents_logout] exten => _X.,1,Macro(va_agent_logout,${EXTEN},1) [astpoctwo_agents_pause] exten => _X.,1,Macro(va_agent_pause,${EXTEN},1)