<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.moz-txt-tag
        {mso-style-name:moz-txt-tag;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I don’t know about the gateway, but I suspect that your “lan_pstn” dialplan entry to send all calls to 1001 is located after the gateway entry so that gets matched first; FS never gets to the “lan_pstn” entry.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This can happen if you put this in the child subdirectory which is loaded at the end of the dialplan.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hope this helps.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>---<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Bote<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FreeSWITCH Docs Janitor<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://freeswitch.org/confluence">http://freeswitch.org/confluence</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Murat Knecht<br><b>Sent:</b> Wednesday, 30 March, 2016 06:35<br><b>Subject:</b> [Freeswitch-users] Routing outbound calls to user extension<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><pre>Hello,<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I want to route outbound calls to my user-extension-connected<o:p></o:p></pre><pre>softphone, and would like to know which mechanism to use.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>The IVR system I develop makes calls and then reacts to keypresses<o:p></o:p></pre><pre>(reverse DTMF). For testing purposes, I'd like to route those outbound<o:p></o:p></pre><pre>calls to my softphone — the advantage of that is that the IVR system<o:p></o:p></pre><pre>can remain unchanged, calling numbers in the US or Philippines, while<o:p></o:p></pre><pre>I still test with my local softphone.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Regarding my setup, I have a FS 1.2.24 with two softphones connected<o:p></o:p></pre><pre>as user extensions 1001 and 1002. Calling between those phones works,<o:p></o:p></pre><pre>and I can originate calls to them, with user/1001 for example. Then, I<o:p></o:p></pre><pre>have an external gateway “lan” and a dialplan setup, which I want to<o:p></o:p></pre><pre>use to originate calls from the IVR (those are just the default<o:p></o:p></pre><pre>configs, as they should not matter, except the bridge / routing config<o:p></o:p></pre><pre>inside).<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>If I do a call to a Philippines number:<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>  originate sofia/external/lan/639123298392 &amp;echo()<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Currently, this gives me:<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>[WARNING] mod_sofia.c:5089 Cannot locate registered user lan/63282932@external<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I don't understand why an <span class=moz-txt-tag><b>*</b></span><b>external<span class=moz-txt-tag>*</span></b> number would need to or could be<o:p></o:p></pre><pre>registered.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>To address my original requirement, I tried adding an unconditional<o:p></o:p></pre><pre>bridge to user/1001 to the dialplan, which is otherwise empty.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>  &lt;extension name=&quot;lan_pstn&quot;&gt;<o:p></o:p></pre><pre>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(.*)$&quot;&gt;<o:p></o:p></pre><pre>      &lt;action application=&quot;bridge&quot; data=&quot;user/1001&quot;/&gt;<o:p></o:p></pre><pre>    &lt;/condition&gt;<o:p></o:p></pre><pre>  &lt;/extension&gt;<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>This has no effect. (Still the above error.)<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>If I add a hostname to the number, an INVITE is sent, and then I get a<o:p></o:p></pre><pre>different error:<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>    originate sofia/external/lan/1001@hostname &amp;echo()<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>    [NOTICE] sofia.c:6702 Hangup sofia/external/lan/1001@hostname<o:p></o:p></pre><pre>[CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>My question is: How can I configure this gateway that all outbound<o:p></o:p></pre><pre>calls are accepted (nobody needs to be registered) and are then routed<o:p></o:p></pre><pre>to a user extension, i.e. never leave the “local setup”?<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Thank you,<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Murat<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>P.S.: Needed to resubscribe, sorry if this ends up duplicate. <o:p></o:p></pre></div></div></body></html>