SOLVED Anveo CID incoming formating

Hometech

Active Member
Joined
Mar 9, 2008
Messages
257
Reaction score
30
I have a incredible PBX2020 running but having a small issue with incoming caller ID it has a +1 at the beginning of all incoming numbers it is messing up my phone number searches in my asterisk phone book.
How do I remove the +1 prefix on all incoming numbers?

my trunk has this context=from-anveo not sure if this is my issue. not sure what to change it to
 
here is what i use:

[from-pstn-custom]

exten => _.,1,Noop(from-pstn-custom ${CALLERID(num)} ${CALLERID(name)})
exten => _.,n,ExecIf($[ "${CALLERID(num):0:1}" = "1" ]?Set(CALLERID(num)=${CALLERID(num):1}))
exten => _.,n,ExecIf($[ "${CALLERID(num):0:1}" = "+" ]?Set(CALLERID(num)=${CALLERID(num):1}))
exten => _.,n,Noop(from-pstn-custom ${CALLERID(num)} ${CALLERID(name)})


Barton Fisher
Innovative Communications
714-228-5410
 
Thanks Bart I tried yours but did not allow any incoming calls?

Here is what I have but does not remove the +1 for some reason.

[from-anveo]
exten => _.,1,Ringing
exten => _.,n,Goto(from-trunk,${SIP_HEADER(X-anveo-e164)},1)
 
For Caller ID only, no extensions_custom.conf entry is needed. Use the built in context "from-pstn-e164-us" to normalize 1NXXNXXX and +1NXXNXXX Caller IDs to 10 digits. This context also normalizes +1NXXNXXX DIDs to 10 digits. Unfortunately it does not normalize 11 digit 1NXXNXXX DIDs to 10 digits.

I NEVER want to see a 1NXXNXXX format number on phone display or CDR entry, so I normalize both incoming and outgoing to 10 digits.

For incoming trunks that send DIDs as 1NXXNXXX I point to following:

Code:
[from-pstn-e164-us-pre]
;Normalize 1NXXNXXXXXX DIDs to 10 digits, then pass to [from-pstn-e164-us]
exten => _1NXXNXXXXXX,1,NoOp(exten: ${EXTEN} cid:${CALLERID(number)})
exten => _1NXXNXXXXXX,n,Goto(from-pstn-e164-us,${EXTEN:1},1)
exten => _.,1,Goto(from-pstn-e164-us,${EXTEN},1)
 
Last edited by a moderator:
For incoming trunks that send DIDs as 1NXXNXXX I point to following:

Code:
[from-pstn-e164-us-pre]
;Normalize 1NXXNXXXXXX DIDs to 10 digits, then pass to [from-pstn-e164-us]
exten => _1NXXNXXXXXX,1,NoOp(exten: ${EXTEN} cid:${CALLERID(number)})
exten => _1NXXNXXXXXX,n,Goto(from-pstn-e164-us,${EXTEN:1},1)
exten => _.,1,Goto(from-pstn-e164-us,${EXTEN},1)

I don't get it, why not just point your trunk directly to from-pstn-e164-us? That's what it's intended for, and I have used it for that purpose so I know it works. Why the extra "from-pstn-e164-us-pre" context which appears to add nothing other than displaying the values of ${EXTEN} and ${CALLERID(number)} in the Asterisk CLI, am I missing something here?
 
Look again, as stated in the post, the stock from-pstn-e164-us context does not change 11 digit DIDs to 10 digits. The custom context does.
 
So I have a tricky quesiton:
Anveo Direct requires 11 digit outbound CID to work properly, otherwise it presents on cellphones as +countrycodeandnumber , but everything else uses 10 digits. Anveo Direct has perfect call completion in my opinion but the others I use that can accept 10 digit don't always. How can we send 10 digit to some trunks and 11 to others, if you have to change the CID for each extension (centrally hosted PBX for multiple offices). I haven't figured it out exactly yet.
 
I have the outbound routes manipulate to a 10 digit number, and add a "1" to the Trunk's "Outbound Dial Prefix." If your Anveo PIN is 987654, then set the prefix to 9876541.

You may have to define a duplicate trunk without the "1" prefix if anveo direct is your international target.
 
Last edited:
I have the outbound routes manipulate to a 10 digit number, and add a "1" to the Trunk's "Outbound Dial Prefix." If your Anveo PIN is 987654, then set the prefix to 9876541.

You may have to define a duplicate trunk without the "1" prefix if anveo direct is your international target.

That's the outbound number though, not the outbound caller ID . Anveo needs the CID in 11 digits,, most other NA carriers just use 10.
 
Look again, as stated in the post, the stock from-pstn-e164-us context does not change 11 digit DIDs to 10 digits. The custom context does.
Oh, I did miss that. Now it makes sense! Thanks for the explanation.
 

Members online

Forum statistics

Threads
26,688
Messages
174,412
Members
20,259
Latest member
Fadeek86
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top