by J-Rod1988 » Tue Dec 08, 2015 10:41 pm
Everything I had been finding was for free PBX which stated to change the context to from-pstn-e164-us. I went ahead and found a copy of the extensions.conf for free PBX and added the contents for "from-pstn-e164-us" above trunkinbound and named it "from-carrier". After changing the "Goto" from "from-pstn" to "trunkinbound" and updating the context in the carrier to "from-carrier" with just a simple reload in asterisk the calls were coming in with no issues. From what I can see it will accept and change anything to 10 digits. Below is exactly what I added to the asterisk's extensions.conf just above "trunkinbound" to resolve the issue.
[from-carrier]
exten => _+1NXXNXXXXXX/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _+1NXXNXXXXXX/_NXXNXXXXXX,2,Goto(trunkinbound,${EXTEN:2},1)
exten => _+1NXXNXXXXXX/_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _+1NXXNXXXXXX/_011X.,n,Goto(trunkinbound,${EXTEN:2},1)
exten => _+1NXXNXXXXXX,1,Goto(trunkinbound,${EXTEN:2},1)
exten => _[0-9+]./_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _[0-9+]./_NXXNXXXXXX,n,Goto(trunkinbound,${EXTEN},1)
exten => _[0-9+]./_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _[0-9+]./_011X.,n,Goto(trunkinbound,${EXTEN},1)
exten => _[0-9+].,1,Goto(trunkinbound,${EXTEN},1)
exten => s/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => s/_NXXNXXXXXX,n,Goto(trunkinbound,${EXTEN},1)
exten => s/_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => s/_011X.,n,Goto(trunkinbound,${EXTEN},1)
exten => s,1,Goto(trunkinbound,${EXTEN},1)