FOOD FOR THOUGHT getting 10 digit # delivered to phone?? Old way doesn't work.

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
When I had chan_sip trunks, I used this code in /etc/asterisk/extensions_custom.conf:

[from-flowroute-com]
exten => _X!,1,Set(CALLERID(num)=${CALLERID(num):2:12})
exten => _X!,n,Goto(from-trunk,${EXTEN},1)

and then stuck 'from-flowroute-com' in my trunk context instead of 'from-pstn'

This doesn't work with PJSIP trunks as far as I can tell. Is there an equivalent for PJSIP?
If possible, I'd also like calls routed to avantax to only be 10 digits - I can't figure out that either (nor could I with a chan_sip trunk).

I have tried modifying the trunk to 'from-pstn-e164-us' and that didn't seem to do anything - still 11 digits.


Thanks so much.

Andrew
 
Last edited:

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Contexts work the same whether using pjsip or chan_sip trunks.

Read the Asterisk log file to see how the call is being routed when it comes in.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
@billsimon,

You're obviously way ahead of me on this. Looking at the logs in /var/log/asterisk/full, I can't tell much. Too much information and nothing that I can trace correctly.

I see calls coming in as [phonenumber]@from-pstn, but changing the context in the trunk to 'from-pstn-e164-us' didn't change the digits displayed.
Using the change in extensions_custom.conf (from chan_sip days) didn't alter the incoming DID either.

Andrew
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
If you put your log in a pastebin, I'll try to point you in the right direction on tracing down the problem.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
@billsimon,
which logs should I post (location, filename)? I tried adding the [from-flowroute-com] section to my trunks and extension_custom.conf. All calls ended up going to voicemail. Changing back and rebooting again didn't fix (as if something else changed). Fortunately, I had a full backup.

Also, can I blank the logs before I run (will they recreate if not there) in order to keep the log filesize down?


Weird, again.

Andrew
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
which logs should I post (location, filename)?

The section from /var/log/asterisk/full that contains the call. If you aren't sure about which logs, just grab for the general time frame.

Also, can I blank the logs before I run (will they recreate if not there) in order to keep the log filesize down?

You don't need to do this and you don't need to upload the whole file. Just download the file to your pc and open it in a text editor and copy/paste the relevant part.

I tried adding the [from-flowroute-com] section to my trunks and extension_custom.conf. All calls ended up going to voicemail. Changing back and rebooting again didn't fix (as if something else changed). Fortunately, I had a full backup.

Stop randomly trying stuff. this is annoying and makes troubleshooting more difficult because who knows what's screwed up after a bunch of random experiments.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
My guess is that calls are coming from Flowroute and not being identified with your flowroute trunk... because you had a huge thread going on here a while back that was left unresolved. So I am curious how you fixed that.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
@billsimon,

With tons of help, I believe I fixed all of my prior issues.

I did a 16-15 scratch install using Dahdi 1.8.x (which is what I had working on my Green PBX). That version of Dahdi is still supported for my TDM800P w hardware EC. I copied across all the old dahdi files since neither dahdi_genconf nor dahdi_cfg creates a useful system and using a newer version didn't seem to like my old config files.

I changed my SIP port to 5160 and my PJSIP port to 5060. flowroute wants 5060 (and so does everyone else by default).

I added my local IP to the SIP settings page and have it auto-updating if it changes via cron (and @wardmundy <g>). This fixed the remote extension not getting/having audio.

My Sipura didn't seem to like PJSIP, but since I have the phones back on the Digium card, I care less.

So, phones register, two way audio and both flowroute and bulkvs seem to be happy.

At this point, I could remove SIP altogether.

With the help received, calls are being recorded to a RAID system on my fileserver.

There are some weird anomalies - at the end of some calls, the alternate flowroute account name (I have two on the system since my friend pays his own bill and I'm just hosting) shows up in some messages. When I look on flowroute, however, we are being charged correctly. Additionally, on the dahdi lines, I sometimes get fading/muting of sound - could be a config issue, but I'll never find it.

So, i now have a clean install with all the features enabled.

In normal calls, the flowroute messages all seem 'normal', but calls are coming in as +18885551212 which means I can't hit redial and my phonebook entries don't match.

You told me to quit randomly trying stuff. I've tried 2 things to fix the problem.

I changed the context to from-pstn-e164-us - which should have at least dropped the plus sign (not sure if it did) and the from-flowroute-com entry in extensions_custom.conf which, for me, has been the tried and true fix for 12 digit CID deliver. This was posted originally by Brian Kelly in 2008 (on this forum). The interesting thing about this (at this time) 'non-fix' is that removing it and rebooting didn't set my system back to where it had been.

Regardless, I'm very interested in 10 digit caller id being delivered to the system/phones.

Andrew
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Ok, let’s see the logs, as I am fairly sure we will be able to spot the problem there.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
I believe this is the call log from the /etc/asterisk/full file


I'm continuing the conversation at the freepbx forums as well - I can't be the only person with this issue, so others may benefit as well.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
Unique, yes. Similar, highly likely.

i have a PJSIP flowroute trunk on a generic 16-15 install and I want 10 digit #s delivered to Avantfax, extensions and the phonebook lookup.

I'm not trying to get into a fight with you in any way. I recognize your knowledge and willingness to help. But the flowroute +1 delivery has been an issue since at least 2008 on this forum.

Andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
So, it appears to be a dahdi issue. When I use from-pstn-e164-us (pardon any typos) I get the correct display on my SIP phones. Dahdi phones still show 1-888-555-4444.

I can live with it, but would like to know which of the dahdi conf files I can edit to get rid of it.

Andrew
 

dallas

Active Member
Joined
Oct 21, 2007
Messages
844
Reaction score
247
This is not rocket science. You need to manipulate the CallerID number to suit your requirements within the context that processes the call.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
dallas,

Are you suggesting that I can change the context in *the dahdi extension* to from-pstn-e164-us? It is 'from-internal'. It was my understanding (perhaps wrong) that the processing is done on the trunk side (which is delivering the 10 digits to all of the other phones (which also have a context of 'from-internal').

Andrew
 

dallas

Active Member
Joined
Oct 21, 2007
Messages
844
Reaction score
247
Andrew,

No. You should not need to change the context in the dahdi extension!
AFAIK you cannot modify the caller id in the trunk settings. Generally speaking the context 'from-internal' is for outbound calls and 'from-trunk' (or 'from-pstn') is for incoming calls.

The 'from-pstn-e164-us' context is used to reformat e164 non-NPA (country code other than 1) "from: +<CountryCode><Number> to 011<CountryCode><Number>"

You need to write something similar to handle NPA calls to change them to 10 digits.
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
Dallas,

My incoming route has e164. All my phones - except the dahdi extensions - show the number without the +1. It seems to be a dahdi thing.
 

Members online

Forum statistics

Threads
25,770
Messages
167,440
Members
19,181
Latest member
ejrubin
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.
Top