Accept calls from multiple voipswitch

Hello experts,
My setup is as follows:

  1. voipswitch1 => freepbx (iax2 trunk) => freepbx => gsm gateway1
  2. voipswitch2 => freepbx (iax2 trunk) => freepbx => gsm gateway2

I’m accepting calls from voipswitch without registration,
Settings is below:

[voipswitch-1]
type=peer
qualify=no
port=8887
insecure=port,invite
host=199.145.125.21
dtmfmode=rfc2833
contex=from-internal
canreinvite=no
allow=all

[voipswitch-2]
type=peer
qualify=no
port=8887
insecure=port,invite
host=196.144.155.23
dtmfmode=rfc2833
contex=from-internal
canreinvite=no
allow=all

I’ve setup inbound route in freepbx using following:
_7701X. for voipswitch1 which should go to IAX2 trunk1 and
_9901X. for voipswitch2 which should go to IAX2 trunk2

my problem is, if voipswitch1 sends calls using _9901X. calls are accepted and goes to IAX2 trunk2 and gsm gateway2, but I don’t want voipswitch1 to use _9901X inbound route,
I want voipswitch1 to use only _7701X.
also voipswitch2 can use _7701X inbound route, but I want voipswitch2 to use only _9901X. I’m not expert in dial-plan creating. I prefer to use freepbx as it can be done using a few mouse click.

I want to send calls from voipswitch1 to IAX2 trunk1 to gsm gateway1 using only _7701X and voipswitch2 to IAX2 trunk2 to gsm gateway2 using only _9901X. I don’t know how to do it. I don’t want one trunk to use other trunk’s inbound route. Please help me to configure it.
thanks in advance.

Hi bodmas79 l need help with the bellow i will appreciated any replay ? I have two questions

  1. i have a Voipswitch with IP ( 210.xxx.xxx.xxx <---- and I need to send the calls to Freepbx with IP --> 75.xxx.xxx.xxx witch section I have to configure to allow the incoming calls to enter in Free PBX ? I have tray to set up an Extension and don’t works can anybody help ?

  2. Then once calls reaches Free PBX the should go to SIP Trunk and terminate to me other Provider

Thanks In Advance

Hello tpointsystems,
Try using SIP trunk with below sample configuration:

[voipswitch-2]
type=peer
qualify=no
port=8887
insecure=port,invite
host=196.144.155.23
dtmfmode=rfc2833
contex=from-internal
canreinvite=no
allow=all