Need to modify the from-pstn-e164-us to do:
- modify callerID(number) based on a few rules
- modify callerid(dnid) based on rules
We've done some tests, but can't seem to get it working for all scenarios:
Basically we have the general idea, but somehow in the maipulations, it's getting lost somewhere...
_+1NXXNXXXXXX / _+1NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to CALLERID(number):1, and send the call to from-pstn, ${EXTEN:1},1
_+1NXXNXXXXXX / _1NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, and send the call to from-pstn,${EXTEN:1},1
_+1NXXNXXXXXX / _NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to 1CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
_+1NXXNXXXXXX / _+NX. set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to 011CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
_1NXXNXXXXXX / _+1NXXNXXXXXX set CALLERID(number) to 1NXXNXXXXXX, and send the call to from-pstn,${EXTEN:1},1
_1NXXNXXXXXX / _1NXXNXXXXXX send the call to from-pstn,${EXTEN},1
_1NXXNXXXXXX / _NXXNXXXXXX set CALLERID(number) to 1CALLERID(number), send the call to from-pstn,${EXTEN},1
_1NXXNXXXXXX / _+NX. set CALLERID(number) to 011CALLERID(number), and send the call to from-pstn,${EXTEN},1
_NXXNXXXXXX / _+1NXXNXXXXXX set CALLERID(dnid) to 1CALLERID(dnid), set CALLERID(number) to CALLERID(number):1, and send the call to from-pstn,1${EXTEN},1
_NXXNXXXXXX / _1NXXNXXXXXX set CALLERID(dnid) to 1CALLERID(dnid), send the call to from-pstn, 1${EXTEN},1
_NXXNXXXXXX / _NXXNXXXXXX set CALLERID(dnid) to 1CALLERID(dnid), set CALLERID(number) to 1CALLERID(number), and send the call to from-pstn,1${EXTEN},1
_NXXNXXXXXX / _+NX. set CALLERID(dnid) to 1CALLERID(dnid), set CALLERID(number) to 011CALLERID(number), and send the call to from-pstn,1${EXTEN},1
_+[2-9]X./_+1NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to CALLERID(number):1, and send the call to from-pstn, ${EXTEN:1},1
_+[2-9]X./_1NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, and send the call to from-pstn,${EXTEN:1},1
_+[2-9]X./_NXXNXXXXXX set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to 1CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
_+[2-9]X./_+NX. set CALLERID(dnid) to CALLERID(dnid):1, CALLERID(number) to 011CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
s/_+1NXXNXXXXXX set CALLERID(number) to CALLERID(number):1, and send the call to from-pstn, ${EXTEN:1},1
s/_1NXXNXXXXXX send the call to from-pstn,${EXTEN:1},1
s/_NXXNXXXXXX set CALLERID(number) to 1CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
s/_+NX. set CALLERID(number) to 011CALLERID(number), and send the call to from-pstn,${EXTEN:1},1
In essence, we need to get DNID and CallerID in 11digit form, or e164 without the + for proper routing in our existing switch.