0

I am trying my custom configuration to handle freeswitch call using Elastic SIP Trunking. I am not using mod_Signalwire. I want to handle route custom with multi-tenant system.

Below is my configuration:

Profile:

<document type="freeswitch/xml">
    <section name="configuration">
        <configuration name="sofia.conf" description="sofia conf">
            <profiles>
                <profile name="MY_PROFILE">
                    <aliases/>
                    <gateways>
                        <gateway name="MY_GATEWAY">
                            <param name="username" value="MY_USER"/>
                            <param name="password" value="MY_PW"/>
                            <param name="proxy" value="fjfhjhhhk.sip.signalwire.com"/>
                            <param name="realm" value="ffjjhghjh.sip.signalwire.com"/>
                            <param name="from-domain" value="bhjhkhkkj.sip.signalwire.com"/>
                            <param name="register" value="true"/>
                            <param name="sip-trace" value="no"/>
                            <param name="sip-capture" value="no"/>
                            <param name="context" value="public"/>
                            <param name="extension" value="sip_uri"/>
                        </gateway>
                    </gateways>
                    <domains name="all" alias="true" parse="true"/>
                    <settings>
                        <params name="ext-sip-ip" value="$${external_sip_ip}"/>
                        <params name="ext-rtp-ip" value="$${external_rtp_ip}"/>
                        <params name="sip-port" value="5060"/>
                        <params name="auth-calls" value="true"/>
                    </settings>
                </profile>
            </profiles>
        </configuration>
    </section>
</document>

Directory:

<document type="freeswitch/xml">
    <section name="directory">
        <domains>
            <domain name="ddsadaf.sip.signalwire.com">
                <params>
                    <param name="dial-string" value="{^^:sip_invite_domain=${dialed_domain}:presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(*/${dialed_user}@${dialed_domain})},${verto_contact(${dialed_user}@${dialed_domain})}"/>
                </params>
                <variables>
                    <variable name="user_context" value="public"/>
                </variables>
                <groups>
                    <group>
                        <users>
                            <user id="jssip">
                                <params>
                                    <param name="$${default_password}" value="Chits123"/>
                                    <param name="vm-password" value="MY_PASSWORD"/>
                                </params>
                                <variables>
                                    <variable name="toll_allow" value="domestic, international, local"/>
                                    <variable name="accountcode" value="jssip"/>
                                    <variable name="user_context" value="dsadasdsad.sip.signalwire.com"/>
                                    <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
                                    <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
                                </variables>
                            </user>
                        </users>
                    </group>
                </groups>
            </domain>
        </domains>
    </section>
</document>

Dialplan:

<document type="freeswitch/xml">
    <section name="dialplan" description="Dial Plan For FreeSwitch">
        <context name="public">
            <extension name="sip_uri">
                <condition field="destination_number" expression="^(MY_US_PHONE_NUMBER)$"> // ex 12345678901 - eleven US number with countr cde
                    <action application="sleep" data="10000"/>
                    <action application="bridge" data="sofia/gateway/GATEWAY_NAME/$1"/>
                    <action application="answer"/>
                </condition>
            </extension>
        </context>
    </section>
</document>

I am getting below error:

switch_core_state_machine.c:312 No Route, Aborting

I am able to successfully create sofia profile and gateway. Both are showing Running and Registered status gradually. I am also receiving call in my freeswitch log but it stuck at above error in my dial plan.

Rob
  • 14,746
  • 28
  • 47
  • 65
jack
  • 589
  • 8
  • 22

1 Answers1

0

We send to the registered contact, with the sip_to_user being the phone number, so change destination_number to sip_to_user or set <param name="extension" value="auto_to_user"/> on your gateway settings.