<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Ok, I have not added any new gateway but added a file called
    02_gxw4104.xml into the dialplan/defaults directory with the
    following content:<br>
    <br>
    &lt;include&gt;<br>
    &nbsp; &lt;extension name="To PSTN"&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;condition field="destination_number" expression="(.*)"&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="bridge"
    data=<a class="moz-txt-link-rfc2396E" href="mailto:sofia/internal/${destination_number}@[192.168.0.160]:5060">"sofia/internal/${destination_number}@[192.168.0.160]:5060"</a>
    /&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
    &nbsp; &lt;/extension&gt;<br>
    &lt;/include&gt;<br>
    <br>
    When I dial 1234567890, FS sees the extension but then just hangs up
    with the following log output.<br>
    <br>
    2011-09-13 18:51:29.299942 [NOTICE] switch_channel.c:669 New Channel
    <a class="moz-txt-link-abbreviated" href="mailto:sofia/internal/1003@192.168.0.23">sofia/internal/1003@192.168.0.23</a>
    [9af4207f-2e03-4d6e-8aeb-16b063ecf30a]<br>
    2011-09-13 18:51:29.331835 [INFO] mod_dialplan_xml.c:418 Processing
    User1-&gt;1234567890 in context default<br>
    2011-09-13 18:51:29.343016 [NOTICE] switch_channel.c:669 New Channel
    sofia/internal/1234567890@[192.168.0.160]:5060
    [f9106a7a-c25a-434f-bac1-599a0ad71333]<br>
    2011-09-13 18:51:29.792807 [NOTICE] sofia.c:4789 Hangup
    sofia/internal/1234567890@[192.168.0.160]:5060 [CS_CONSUME_MEDIA]
    [NORMAL_TEMPORARY_FAILURE]<br>
    2011-09-13 18:51:29.792807 [INFO] mod_dptools.c:2355 Originate
    Failed.&nbsp; Cause: NORMAL_TEMPORARY_FAILURE<br>
    2011-09-13 18:51:29.792807 [NOTICE] mod_dptools.c:2418 Hangup
    <a class="moz-txt-link-abbreviated" href="mailto:sofia/internal/1003@192.168.0.23">sofia/internal/1003@192.168.0.23</a> [CS_EXECUTE]
    [NORMAL_TEMPORARY_FAILURE]<br>
    2011-09-13 18:51:29.836129 [NOTICE] switch_core_session.c:1182
    Session 29 (<a class="moz-txt-link-abbreviated" href="mailto:sofia/internal/1003@192.168.0.23">sofia/internal/1003@192.168.0.23</a>) Ended<br>
    2011-09-13 18:51:29.836129 [NOTICE] switch_core_session.c:1184 Close
    Channel <a class="moz-txt-link-abbreviated" href="mailto:sofia/internal/1003@192.168.0.23">sofia/internal/1003@192.168.0.23</a> [CS_DESTROY]<br>
    2011-09-13 18:51:29.836129 [NOTICE] switch_core_session.c:1182
    Session 30 (sofia/internal/1234567890@[192.168.0.160]:5060) Ended<br>
    2011-09-13 18:51:29.836129 [NOTICE] switch_core_session.c:1184 Close
    Channel sofia/internal/1234567890@[192.168.0.160]:5060 [CS_DESTROY]<br>
    <br>
    What am I missing?<br>
    Thanks<br>
    <br>
    <br>
    On 09/13/2011 06:10 PM, ocset wrote:
    <blockquote cite="mid:4E6F2C07.80800@the800group.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hi Nandy<br>
      <br>
      Thanks for your reply. I assume 192.168.0.9 in your example is the
      IP address of the GXW4104? <br>
      <br>
      Some more questions<br>
      <br>
      1. When you say port number, is this something I should be setting
      up on the GXW4104 so that it is listening on those 4 port numbers?
      If yes, what would be the setting I am looking for?<br>
      <br>
      2. Does that mean I don't define a new gateway in FreeSWITCH?<br>
      <br>
      3. In your example, you said the bridge data would be <a
        moz-do-not-send="true" class="moz-txt-link-abbreviated"
        href="mailto:7654321@192.168.0.9:5063">7654321@192.168.0.9:5063</a>.
      What would the whole line look like in the dialplan?<b><br>
        <br>
        &lt;action application="bridge" data="<a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:sofia/gateway/7654321@192.168.0.9:5063">sofia/gateway/7654321@192.168.0.9:5063</a></b><b>"/&gt;</b><br>
      <br>
      Still very confused :-)<br>
      <br>
      Thanks<br>
      <br>
      On 09/13/2011 03:45 PM, Nandy Dagondon wrote:
      <blockquote
cite="mid:CAHKqMb7vF4ULKjWsHqP20xVRy0oOrDo9A3fpwCBr2NXAjsJ6iw@mail.gmail.com"
        type="cite">hi,<br>
        <br>
        if GWX4104 is in your local network, use the internal profile
        for the gateway. register your FXO accounts to receive incoming
        calls (i think you did this already). <br>
        <br>
        to dialout the ports, specify the port number 5060~5063 assuming
        Port1 starts at 5060. to dialout via port4, the bridge data
        should look like:<br>
        <br>
        <a moz-do-not-send="true" href="http://7654321@192.168.0.9:5063">7654321@192.168.0.9:5063</a><br>
        <br>
        hope it helps.<br>
        <br>
        -nandy<br>
        <br>
        <br>
        <div class="gmail_quote">On Tue, Sep 13, 2011 at 2:49 PM, ocset
          <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ocset@the800group.com">ocset@the800group.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#FFFFFF" text="#000000"> Hi<br>
              <br>
              I have recently bought a Grandstream GXW4104 (4 FXO ports)
              and need some help setting up a gateway to call out using
              the GXW4104. I am really out of my depth here and may be
              looking at this the wrong way so please bear with me.<br>
              <br>
              I followed the advice on this website&nbsp;<a
                moz-do-not-send="true"
                href="http://www.timhunt.net/wiki/FreeSwitch:GXW4104"
                target="_blank">"http://www.timhunt.net/wiki/FreeSwitch:GXW4104"</a>
              and incoming calls from a PSTN line are working great. Now
              I need to setup a dialplan so that outgoing calls are
              routed through the same PSTN line on the GXW4104. I will
              eventually have 4 PSTN lines with a dialplan to use the
              first available line (if that is possible).<br>
              <br>
              According to the FreeSWITCH 1.0.6 book (and many online
              posts) I need to create a gateway and a dialplan but all
              the gateway examples are for SIP accounts. <br>
              <br>
              So, the gateway definition seems to need a username and
              password but the GXW4104 does not have that capability. I
              found this gateway definition in the&nbsp; freeswitch.xml.fsxml
              file but am not sure how many of these variables are
              required.<br>
              <br>
              &lt;gateways&gt;<br>
              &nbsp;&nbsp; &lt;gateway name="<a moz-do-not-send="true"
                href="http://example.com" target="_blank">example.com</a>"&gt;<br>
              &nbsp;&nbsp; &nbsp;&nbsp; &lt;param name="username" value="joeuser"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="password" value="password"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="from-user" value="joeuser"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="from-domain" value="<a
                moz-do-not-send="true" href="http://example.com"
                target="_blank">example.com</a>"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="expire-seconds" value="600"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="register" value="false"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="retry-seconds" value="30"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="extension" value="5000"/&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="context" value="public"/&gt;<br>
              &nbsp;&nbsp; &lt;/gateway&gt;<br>
              &lt;/gateways&gt;<br>
              <br>
              <br>
              If I define a gateway called "gxw4104", then this is what
              I think a simple dialplan should look like but I'm not
              sure of the gateway details in the "bridge" section of the
              definition.<br>
              &nbsp;<br>
              &lt;extension name="gxw4104_out"&gt;<br>
              &nbsp;&nbsp; &lt;condition field="destination_number"
              expression="^(\d{10})$"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
              &nbsp; &nbsp; &nbsp; <b>&lt;action application="bridge"
                data="sofia/gateway/gxw4104/........"/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (what
                should this be???)</b><br>
              &nbsp;&nbsp; &lt;/condition&gt;<br>
              &lt;/extension&gt;<br>
              <br>
              Am I moving in the right direction and can someone fill in
              the blanks for me please<br>
              <br>
              Thanks in advance!<br>
              <br>
              <br>
            </div>
            <br>
            <br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              target="_blank">http://www.freeswitch.org</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">FreeSWITCH-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
  </body>
</html>