Inbound Routes, DID field expects numbers, Provider sends letters

Hello, I either have something set wrong, or my provider is doing something non-standard.

Up until just now, I’ve had no issues with my providers calls. However, up until now I had my inbound route for this provider set up with the “DID Number” field in Inbound Routes as “providerusername”.

I had to update the inbound route just now to change the destination from an extention to a ring group, and the page gave me an error that I could only have numbers in the “DID Number field”. Previous versions of this module must not have had this validation.

I changed the “DID Number” field to the actual number “12041234567” and the route no longer works. I’ve tried reverting my changes but since I can not put “providerusername” back into this field, I have not been able to get it to work.

Looking at the Asterisk logs, the FROM_DID the provider is sending seems to be “providerusername”.

So, can anyone help with either:

  1. Am I doing something wrong, should I be putting the DID number somewhere in my TRUNK config to force this FROM_DID response?
  2. What config file can I edit directly to change this field in “Inbound Routes” to go back to “providerusername”.


I edited extension_additional.conf directly, changing the lines for the route to state “providerusername” instead of the number.

Inbound calls are working again, however if I reload FreePBX it overwrites the .conf file.

Where does the Inbound Routes GUI store these settings which it uses to create the .conf files?

Hi, I had the exact same problem and the solution was as follows:

The registration string I was using for my SIP provider was - username:[email protected]/username

and as you say if the username has letters, they can’t be entered into the FreePBX DID field.

All I did was change my registration string to username:[email protected]/DIDnumber and miraculously, I received the DIDnumber with incoming calls.

With my provider, they send you whatever you put after the forward slash in the registration string as the DID.

Hope this works for you too.




Thanks for the reply.

I made this change to my registration string, have been messing around with these settings for a bit now. My provider still seems to send the username back regardless of registration string.

Using vbuzzer over here…

In the PEER Details for your Trunk, change:





Nice, that gives me the 10 digit number for FROM_DID. Thank you!

Also what I did not notice before, is that extensions.conf has really good documentation and explains all the different built in contexts.

In fact, yesterday I was trying to figure out the difference of from-trunk to from-pstn, and go figure:

; from-trunk:
; Context is really just an aliax of from-pstn
include => from-pstn

Even more interesting is to read the sample .conf files provided by Digium with a basic install of Asterisk. They have a lot of useful and interesting examples that are helpful in understanding how all of this stuff works, and I spent a lot of time reading them and testing various configurations before I wrote much of what I put into the Wiki (and which has since been removed).

1 Like

Thanks for that, i was fiddling round with sipgate basic - and this did the job for me… in 2018

1 Like

Brilliant! This worked for me too! Thanks for posting this solution…4 years ago!

1 Like

hello, if you cannot use letters in DID field, just go into PJSIP Advanced, and change “Contact user” to random seqence of numbers. It will be your new DID for this trunk.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.