I have to take the extension number, if the number starts with 011 and call my phone company number… 212xxxxxx and send ${EXTEN} as DFTM.
From a regular phone, If I dial, 212xxxxxx,01144xxxxx with comma separation it works. I am having hard time achieving this through dialplan.
The following is the dilaplan rule:
exten => _011.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _011.,n,Gosub(sub-record-check,s,1(out,${EXTEN},yes))
exten => _011.,n,ExecIf($[ “${CALLEE_ACCOUNCODE}” != “” ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE}))
exten => _011.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _011.,n,ExecIf($["${KEEPCID}"!=“TRUE” & ${LEN(${TRUNKCIDOVERRIDE})}=0]?Set(TRUNKCIDOVERRIDE=))
exten => _011.,n,Set(_NODEST=)
exten => _011.,n,Macro(dialout-trunk,2,${EXTEN},on)
exten => _011.,n,Macro(dialout-trunk,3,${EXTEN},on)
exten => _011.,n,Macro(dialout-trunk,4,${EXTEN},on)
exten => _011.,n,Macro(outisbusy,)
I have unsuccessfully tried SendDTMF. Not sure if that works with the above macro.
Thanks!