Sangoma config file not working

Discussion in '3CX Phone System - General' started by cgallery, Sep 17, 2011.

Thread Status:
Not open for further replies.
  1. cgallery

    Joined:
    Dec 6, 2010
    Messages:
    40
    Likes Received:
    0
    I got a Sangoma A200 card (4 ports) and followed the instructions on the site to a "T" (I think).

    The only difference is I didn't download the commercial version of the Sangoma gateway software. I just downloaded the SOHO version.

    When I try to import the configuration file I create with 3CX, I get an error from the Netborder Express software. It says "PBX Configurator input file is invalid. Please see Gateway Manager log file for more details."

    That log files says
    *****
    2011-09-16 21:24:54:984 [3096] ERROR - netborder.pbxConfiguration.PbxConfigurationInfo : Invalid configuration file C:\Program Files\Netborder\Express\Gateway\tmp\sangoma-a200.gwcfg, only one pbxConfiguraion element is allowed.
    2011-09-16 21:24:54:984 [3096] FATAL - netborder.pbxConfigurator : Invalid xml configuration file C:\Program Files\Netborder\Express\Gateway\tmp\sangoma-a200.gwcfg
    2011-09-16 21:24:54:984 [3096] ERROR - netborder.pbxConfigurator : Initialization failed with code: 2
    2011-09-16 21:24:54:984 [3096] INFO - netborder.PbxConfigurator : function main returned with code = 2
    2011-09-16 21:24:54:984 [3096] ERROR - netborder.PbxConfigurator : PBX Configurator process failed with cause=2
    *****

    The actual file created by 3CX is as follows
    *****
    <?xml version="1.0" encoding="utf-8"?>
    <routing_rules>

    <rule name="default_sip_out0" outbound_interface="sip" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="pstn.in.channelName" expr=".*\)ai1"/>
    <condition param="pstn.in.dnis" expr="(.*)"/>
    <condition param="pstn.in.ani" expr="(.*)"/>
    <condition param="pstn.in.callerName" expr="([0-9a-zA-Z]+)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.requestUri" expr="sip:10000@192.168.1.131:5060"/>
    <param name="sip.out.from.uri" expr="sip:%1@GW_HOST_IP:GW_SIP_PORT"/>
    <param name="sip.out.from.displayName" expr="%2"/>
    <param name="sip.out.to.uri" expr="sip:10000@192.168.1.131:5060"/>
    <param name="sip.out.to.displayName" expr="10000"/>
    <param name="sip.out.transport" expr="udp"/>
    </out_leg>
    </rule>

    <rule name="default_sip_out1" outbound_interface="sip" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="pstn.in.channelName" expr=".*\)ai2"/>
    <condition param="pstn.in.dnis" expr="(.*)"/>
    <condition param="pstn.in.ani" expr="(.*)"/>
    <condition param="pstn.in.callerName" expr="([0-9a-zA-Z]+)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.requestUri" expr="sip:10001@192.168.1.131:5060"/>
    <param name="sip.out.from.uri" expr="sip:%1@GW_HOST_IP:GW_SIP_PORT"/>
    <param name="sip.out.from.displayName" expr="%2"/>
    <param name="sip.out.to.uri" expr="sip:10001@192.168.1.131:5060"/>
    <param name="sip.out.to.displayName" expr="10001"/>
    <param name="sip.out.transport" expr="udp"/>
    </out_leg>
    </rule>

    <rule name="default_sip_out2" outbound_interface="sip" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="pstn.in.channelName" expr=".*\)ai3"/>
    <condition param="pstn.in.dnis" expr="(.*)"/>
    <condition param="pstn.in.ani" expr="(.*)"/>
    <condition param="pstn.in.callerName" expr="([0-9a-zA-Z]+)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.requestUri" expr="sip:10002@192.168.1.131:5060"/>
    <param name="sip.out.from.uri" expr="sip:%1@GW_HOST_IP:GW_SIP_PORT"/>
    <param name="sip.out.from.displayName" expr="%2"/>
    <param name="sip.out.to.uri" expr="sip:10002@192.168.1.131:5060"/>
    <param name="sip.out.to.displayName" expr="10002"/>
    <param name="sip.out.transport" expr="udp"/>
    </out_leg>
    </rule>

    <rule name="default_sip_out3" outbound_interface="sip" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="pstn.in.channelName" expr=".*\)ai4"/>
    <condition param="pstn.in.dnis" expr="(.*)"/>
    <condition param="pstn.in.ani" expr="(.*)"/>
    <condition param="pstn.in.callerName" expr="([0-9a-zA-Z]+)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.requestUri" expr="sip:10003@192.168.1.131:5060"/>
    <param name="sip.out.from.uri" expr="sip:%1@GW_HOST_IP:GW_SIP_PORT"/>
    <param name="sip.out.from.displayName" expr="%2"/>
    <param name="sip.out.to.uri" expr="sip:10003@192.168.1.131:5060"/>
    <param name="sip.out.to.displayName" expr="10003"/>
    <param name="sip.out.transport" expr="udp"/>
    </out_leg>
    </rule>

    <!-- PSTN OUT -->
    <rule name="default_pstn_out_with_from_display_name" outbound_interface="pstn" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="sip.in.requestUri.canonical" expr="sip:([0-9]+)@GW_HOST_IP:GW_SIP_PORT"/>
    <condition param="sip.in.from.displayName" expr="([0-9a-zA-Z]+)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="pstn.out.phoneNumber" expr="%0"/>
    <param name="pstn.out.deviceGroup" expr="default"/>
    <param name="pstn.out.cpa.enable" expr="false"/>
    <param name="pstn.out.ani" expr="%1"/>
    </out_leg>
    </rule>

    <rule name="default_pstn_out_without_from_display_name" outbound_interface="pstn" qvalue="0.001">
    <condition param="transfer" expr="false"/>
    <condition param="sip.in.requestUri.canonical" expr="sip:([0-9]+)@GW_HOST_IP:GW_SIP_PORT"/>
    <out_leg name="" media_type="sendrecv">
    <param name="pstn.out.phoneNumber" expr="%0"/>
    <param name="pstn.out.deviceGroup" expr="default"/>
    <param name="pstn.out.cpa.enable" expr="false"/>
    </out_leg>
    </rule>

    <rule name="redirect_to_sip" outbound_interface="sip" qvalue="0.1">
    <condition param="sip.in.redirect.Contact" expr="(.*)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.redirect.Contact" expr="%0"/>
    </out_leg>
    </rule>

    <rule name="redirect_to_pstn" outbound_interface="pstn" qvalue="0.2">
    <condition param="sip.in.redirect.Contact" expr="^Contact:.*sip:([0-9]+)@GW_HOST_IP:GW_SIP_PORT"/>
    <out_leg name="" media_type="sendrecv">
    <param name="pstn.out.phoneNumber" expr="%0"/>
    <param name="pstn.out.deviceGroup" expr="default"/>
    </out_leg>
    </rule>

    <!-- SIP to SIP transfer, results in a SIP bridged transfer on the gateway if transfer target is the gateway and no other transfer rule matches -->
    <rule name="sip_to_sip_transfer" outbound_interface="sip" qvalue="0.001">
    <condition param="transfer" expr="true"/>
    <condition param="sip.in.referTo" expr="(?U)(.*)(?:;|\?|$)"/>
    <condition param="sip.in.from.uri" expr="(.*)"/>
    <out_leg name="" media_type="sendrecv">
    <param name="sip.out.requestUri" expr="%0"/>
    <!-- echoing "from" fields of the REFER request -->
    <param name="sip.out.from.uri" expr="%1"/>
    </out_leg>
    </rule>

    <!-- PSTN (CTBus/SCBus/Internal audio switch) bridge -->
    <rule name="default_pstn_bridge_transfer" outbound_interface="pstn" qvalue="0.01">
    <condition param="transfer" expr="true"/>
    <condition param="sip.in.referTo.canonical" expr="sip:([0-9]+)@GW_HOST_IP:GW_SIP_PORT"/>
    <out_leg name="" media_type="sendrecv">
    <param name="pstn.out.phoneNumber" expr="%0"/>
    <param name="pstn.out.deviceGroup" expr="default"/>
    <param name="pstn.out.transfer.type" expr="2channel-bridged"/>
    <param name="pstn.out.transfer.supervision" expr="connect"/>
    <param name="pstn.out.transfer.timeoutMs" expr="30000"/>
    <param name="paraxip.gw.ringTimeoutMs" expr="0"/>
    <param name="paraxip.gw.connectionTimeoutMs" expr="0"/>
    </out_leg>
    </rule>

    </routing_rules>
    *****

    Not sure if there is even enough information in that file to get this done. For example, when creating the gateway in 3CX, passwords are automatically generated. However, in the file above, I see no passwords?

    So anyway, I used the Netborder Express Quick Setup feature to create a configuration, and was able to place an outbound call. But incoming calls result in an INVITE error.

    *****
    21:35:05.281 Requests rate from IP 192.168.1.131 is too high! Blacklisted for 334 seconds
    21:35:05.281 [CM500002]: Unidentified incoming call. Review INVITE and adjust source identification:
    INVITE sip:5555551212@192.168.1.131:5060;transport=udp;user=phone SIP/2.0
    Via: SIP/2.0/UDP 127.0.0.1:5066;rport=5066;branch=z9hG4bKa6d5fcd9-e0d5-11e0-979b-a1fa54d2045c;received=192.168.1.131
    Max-Forwards: 70
    Contact: <sip:NetborderExpressGateway@127.0.0.1:5066;transport=udp>
    To: "5555551212"<sip:5555551212@192.168.1.131:5060>
    From: "CELLULAR CALL"<sip:5555551213@192.168.1.131:5066>;tag=pxip-callid-1316226899-890625-18467-118ds-427-3da852e2
    Call-ID: a6d5fcd5-e0d5-11e0-ac97-91450dbdbfc1@CGMSRV01
    CSeq: 3586 INVITE
    Expires: 179
    Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, INFO, OPTIONS, REFER
    Date: Sat, 17 Sep 2011 02:35:05 GMT
    Supported: replaces, 100rel
    User-Agent: Netborder Express Gateway/4.1.4
    Content-Length: 0

    21:35:05.281 [CM302001]: Authorization system can not identify source of: SipReq: INVITE 5555551212@192.168.1.131:5060 tid=a6d5fcd9-e0d5-11e0-979b-a1fa54d2045c cseq=INVITE contact=NetborderExpressGateway@127.0.0.1:5066 / 3586 from(wire)
    *****

    I changed the real phone numbers to 5555551212 and 5555551213. I've seen others here do it, I guess.

    So any ideas on how to make this work?
     
Thread Status:
Not open for further replies.