4 separate numbers


(Dario Pll) #1

Good morning,

I recently entered the world of FreePBX. I have so many things to learn, I’m starting out. I need to configure the PBX like this:
I have to allow 4 independent telephones, incoming and outgoing, with separate numbers.
For example:

  1. 095 … 401
  2. 095 … 402
  3. 095 … 403
  4. 095 … 404
    incoming and outgoing.
    I don’t understand how should I act? Do I have to create outbound routes? Do I have to act on the trunk?
    Could you help me please?

Thank you


(Jared Busch) #2

Assuming you have 4 inbound phones numbers…

You make an inbound route for each one. The destination of that inbound route will be each desired extension.

You need only a single outbound route as long as you are not forcing the outbound CID in the outbound route or trunk.

You set the outbound CID in each extension.


(Dario Pll) #3

thank you so much for replying. This is the trunk I created:

type=friend
host=x.x.x.x
fromuser=+39095…400
fromdomain=ims.vf.it
qualify=yes
qualifyfreq=300
nat=yes
insecure=invite,port
dtmfmode=rfc2833
disallow=all
allow=g729&alaw
context=from-pstn-toheader

So, only one route is needed at the exit and I have to go to enter, for example the numbering:
095 … 402, only on the extension CID?

Did I go wrong in creating the trunk? it is too specific, and therefore the CID does not take the other numbers but only the one that ends with 400?

Thank you


#4

Try adding
sendrpid=pai
to your trunk configuration. If that doesn’t work, you’ll need documentation from Vodafone showing which header and what format should be used for outbound caller ID.

Unrelated to your present problem, specifying g729 as the first codec seems strange, unless you have very limited bandwidth, because the voice quality is not very good and it sometimes causes issues with DTMF.


(Dario Pll) #5

thank you so much for replying.

Is there a specific location to put it in the trunk? Because I entered it at the end, and now it won’t allow me to make outgoing calls, it says:
“the number you entered is not in use”, but before inserting the string you recommended, it didn’t give me this error, where am I wrong?

Thanks so much


#6

Does the extension have Outbound CID in the correct format, for example
"Some Name" <+3909516957401>

If so, I don’t know why the number is not accepted. Can you post a copy of the instructions from Vodafone, or a link to instructions on their site?


(Dario Pll) #7

I tried, but it doesn’t work. Unfortunately vodafone has not provided me with material on which to base myself and I am groping on freePBX. I don’t understand, although I change the number, it keeps going out with <+39095…7400>; I can’t explain it. Do you think the problem may be on the vodafone router?


#8

It could be a Vodafone problem. Do incoming calls to all four numbers work? If so, look at the DID field of the CDRs to see what format the number is in. Most likely, they would want outbound caller ID in the same format.


#9

If you still have trouble, at the Asterisk command prompt, type
sip set debug on
and make a failing test call. Paste the relevant section of the Asterisk log at https://pastebin.freepbx.org and post the link here.


(Dario Pll) #10

Yes, the incoming calls work, it asks us to enter the description of the incoming route in the field: call_7402 and by calling the number 095…402 the designated telephone rings. Ok, thanks a lot, I’ll do it right away.


#11

What is in the DID field of the Inbound Route for for call_7402? My guess is that Vodafone would want the outbound caller ID in the same format.


(Dario Pll) #12

Hello, thank you very much for your support. I’ll show you:


(Jared Busch) #13

Is your provider sending the DID in full E164 format?

Look at an inbound call as it happens.


(Dave Burgess) #14

Or look in the /var/log/asterisk/full log file to see what the PBX is getting. Log into the console as ‘root’ (via keyboard and screen or SSH) and use the command “grep 6957406 /var/log/asterisk/full” and you will see every occurrence of the phone number in the log. Differentiating the inbound from the other uses of the number shouldn’t be too challenging, and it means you can do it “after the fact” instead of having to watch a moving command line and hoping you spot it.


(Dario Pll) #15

Log:

[2020-06-24 10:44:51] VERBOSE[40771] pbx_variables.c: Setting global variable ‘OUT_1’ to ‘SIP/trunk_vf_2’
Why utilize trunk vf 2? i am create a new trunk vf 3, with 095…403 number. But, if no utilize my configuration.
[2020-06-24 10:44:51] VERBOSE[40771] pbx_variables.c: Setting global variable ‘OUTCID_1’ to ‘<+39095…400>’
Always outgoing with 400 final, it doesn’t show me logs with the final 406.
what can I do?
Although he created another trunk, he always uses vf_1 or vf_2, ignoring the trunk created by me, and entered as a priority. I also entered the CID as you rightly pointed out to me, but nothing. Do you have any idea?
I created vf_3 with the final numbering 403, but it is totally ignored by freePBX.

I don’t know if it can be useful, I am configuring from PBX on Yealink T21P E2 phones


#16

I’m very confused here. Do you have one Vodafone account with four numbers? If so, why do you have multiple trunks?

If you don’t have any documentation from Vodafone, can you at least find somewhere on the web an example showing proper operation with multiple numbers? (If the example is for 3CX or some other PBX we can probably still figure it out.)

Possibly, Vodafone expects the outbound caller ID in the From header. If you change the trunk setting
fromuser=+39095…400
to
fromuser=+39095…401
does that change the outbound caller ID, or does the call just fail?


(Dario Pll) #17

I have 20 numbers, but within my company, I have to create 4 independent communication channels
401
402
403
404
The other outgoing numbers, we currently do not need. The colleague who configured the PBX informed me that the trunk configuration was provided to him by vodafone, there are two trunks, because one is the primary and the second is backup. I, to avoid compromising their configuration, I tried to create a third trunk with the configuration fromuser = … 401, however, it does not come out with the trunk that I told him, despite the priority that I imposed on him by creating the route ; but it continues to exit with trunk 1 or 2, and then exits with the number 400.


(Lorne Gaetz) #18

If you have an inbound route with nothing set for the DID and CID fields (an ANY/ANY route) then all calls will be accepted. You can then look in the CDR report for inbound calls, and there see what is being provided for DID and CID. Once you have those values, you can create inbound routes to route calls.


(Dario Pll) #19

Hi Lorne,

Thanks a lot for your comment, for incoming calls I managed to configure it, my problem is outgoing calls. I can’t hang out with a number other than the final 400.


#20

Your test Outbound Route must be higher in the list than the regular route and should be the same as your regular route except for your extension number in the CallerID field, assuming that you want all calls from your extension to use the test route.