4 separate numbers

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

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.

1 Like

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.

1 Like

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

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?

1 Like

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?

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.

1 Like

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.

1 Like

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.

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.

1 Like

Is your provider sending the DID in full E164 format?

Look at an inbound call as it happens.

1 Like

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.

1 Like

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

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?

1 Like

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.

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.

1 Like

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.

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.

buongiorno Stewart, ti faccio vedere la configurazione che ho implementato, cosi mi dici dove sbaglio.

  1. ho inserito un trunk primario e uno di back-up con la seguente stringa:
    type=friend
    host=x.x.x.x
    fromuser=+39095…409
    fromdomain=ims.vf.it
    qualify=yes
    qualifyfreq=300
    nat=yes
    insecure=invite,port
    dtmfmode=rfc2833
    disallow=all
    allow=g729&alaw
    context=from-pstn-toheader
    sendrpid=pai
  2. estensioni:
  3. rotta in uscita:

    he always comes up with the final 400.

Good morning,

I contacted vodafone, they informed me that according to them, removing the final 0, so as to take the configuration of the route, could be a solution. We have tested:
095 … 40_ (it was 400, and we only put 40). Trivially the number comes out as: 095 … 40.
We tried to insert the variable X, therefore: 095 … 40X, but it comes out as “unknown”. Do you have any idea? is there something that escapes me?
they advise changing the configuration inherent to the trunk that my colleagues have configured, based on what they sent us. And now they say “try to modify the trunk we sent you”. I don’t understand them … anyway, do you have any idea about it? thank you