[dial-out-100]
exten => _011XXXXXX.,1,Set(temp=${EXTEN:3})
same => n,Goto(_1XXXXXX.,modified)
exten => _XXXXXX.,1,Set(temp=1${EXTEN})
same => n,Goto(_1XXXXXX.,modified)
exten => _1XXXXXX.,1,Set(temp=${EXTEN})
same => n(modified),GotoIf($["${CDR(cdr_direction)}" != ""]?keepDir)
same => n,Set(CDR(cdr_direction)=2)
same => n(keepDir),Set(CDR(cdr_outbound_dialed_phonenumber)=${temp})
same => n,Set(CDR(cdr_outbound_from_extension)=100)
same => n,Set(CDR(cdr_application)=Outbound Dial)
same => n,Set(CALLERID(all)="Luke Apartment" <9726001152>)
same => n,Set(CDR(cdr_outbound_did)=9726001152)
same => n(doDial),Dial(SIP/flowroute/${temp})
exten => 911,1,Set(CALLERID(all)="Luke Apartment" <9726001152>)
same => n,GotoIf($["${CDR(cdr_direction)}" != ""]?keepDir)
same => n,Set(CDR(cdr_direction)=2)
same => n(keepDir),Set(CDR(cdr_outbound_did)=9726001152)
same => n,Set(CDR(cdr_outbound_dialed_phonenumber)=911)
same => n,Set(CDR(cdr_outbound_from_extension)=100)
same => n,Set(CDR(cdr_application)=Outbound Dial)
same => n,Dial(SIP/flowroute/911)
exten => 9911,1,Set(CALLERID(all)="Luke Apartment" <9726001152>)
same => n,GotoIf($["${CDR(cdr_direction)}" != ""]?keepDir)
same => n,Set(CDR(cdr_direction)=2)
same => n(keepDir),Set(CDR(cdr_outbound_did)=9726001152)
same => n,Set(CDR(cdr_outbound_dialed_phonenumber)=9911)
same => n,Set(CDR(cdr_outbound_from_extension)=100)
same => n,Set(CDR(cdr_application)=Outbound Dial)
same => n,Dial(SIP/flowroute/911)
