<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
In the <a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Clarification:gateways">http://wiki.freeswitch.org/wiki/Clarification:gateways</a> we can
read :<br>
<br>
"What I gather from this is that if you only want certain extensions to
be registered with your voip provider when a specific user registers
with freeswitch you should define gateways in the directory section
rather than in the sofia configuration. Conversely, if you always want
an extension registered with a provider you would define the gateway as
part of the sip profile."<br>
<br>
So If I understand the above statement correctly the gateways that are<br>
defined within a user tag are not necessarily the gateways of the
specific<br>
user (i.e. he/she physically owns them) , <br>
but gateways that our FS may use to terminate calls of this specific
user.<br>
<br>
What I also understand from the above statement is that these gateways <br>
get registered (or are generally accessible) only when that particular
user <br>
registers to our FS. Is this correct?<br>
<br>
<br>
Anthony Minessale wrote:
<blockquote
 cite="mid:191c3a030901130912l294f83f9h7962f188672c9374@mail.gmail.com"
 type="cite">What you are doing is correct.<br>
  <br>
In FS gateways only represent a set of credentials that the profile
uses to authenticate to another sip UA<br>
The actual UA is the sofia profile and the gateways are assumed
identities to deal with challenges.<br>
  <br>
Also to manage everything from the same place,<br>
you can put the &lt;gateways&gt; tag inside the &lt;user&gt; tag in the
directory then<br>
tell sofia to parse the whole domain for gateways in the profile <br>
  <br>
in &lt;domains&gt; section of your sofia profile <br>
add<br>
&lt;domain name="<a moz-do-not-send="true" href="http://domain.com">domain.com</a>"
parse="true"/&gt;<br>
  <br>
this will tell FS to open that domain in the user directory and check
every user<br>
for &lt;gateways&gt; and parse them all.<br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">On Tue, Jan 13, 2009 at 10:45 AM, Apostolos
Pantsiopoulos <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:regs@kinetix.gr">regs@kinetix.gr</a>&gt;</span> wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
think one of the most difficult ideas to grasp when someone<br>
migrates to FS from other soft-switches is the definition of<br>
endpoints (in the generic meaning of the word) i.e. other gateways<br>
that your FS gateway will exchange traffic with. From what I<br>
understood from the wiki :<br>
    <br>
a user (directory) is an entitiy that defines our subscribers (with<br>
registration or not)<br>
    <br>
a gateway is another VoIP gateway that we use to send traffic to<br>
(provider) and sometimes receive traffic from<br>
    <br>
(correct me If I am wrong this far)<br>
    <br>
Now, I have the following scenario :<br>
    <br>
I have an FS box that will exhchange traffic with certain gateways.<br>
Sometimes a gateway will act as a client (customer) or a provider,<br>
depending on the traffic direction.<br>
    <br>
1st approach :<br>
    <br>
The first plan I tried, was to use the directory to "define" these<br>
other gateways since they are clients. I &nbsp;turned off registrations<br>
in my SIP profile (because I don't need any), I wrote an xml file<br>
for each gateway in the directory with the appropriate cidr and that<br>
was it.<br>
    <br>
I then realized that I could not use my definitions in the users
directory<br>
so that I can send a call to that &nbsp;client. In order to do so, I had to<br>
define<br>
that particular IP as a gateway in my SIP profile &lt;gateways&gt;
section.<br>
    <br>
2nd approach :<br>
    <br>
I forgot all about the directory thing (after all I needed not any<br>
mailboxes or registrations) and tried &nbsp;to implement the same scenario<br>
by just using gateways. I declared the gateways in my SIP profile and<br>
was able to dial out to them just by using :<br>
    <br>
&lt;action application="bridge"
data="sofia/gateway/&lt;gw_name&gt;/$1"/&gt;<br>
    <br>
which was fine. But when I got an inbound call from that gateway<br>
I realized (1) that I had to define this gateway in an acl and (2) the<br>
dialplan used (context) was always the inbound one since there is no<br>
way of telling a gateway which context to use when accepting a call.<br>
I found a way in the wiki that suggests using DIDs to accomplish that,<br>
but I find it this to be not a very elegant solution because I don't<br>
want to use<br>
prefixes or DIDs to accomplish my goal. I want to be able to define a<br>
gateway using a gateway name &nbsp;(label) of my choice and an IP address,<br>
so when I come to the point of having 100+ gateways i won't<br>
have to search wich DID to use for a new one.<br>
    <br>
3rd approach :<br>
    <br>
Use a combination of the above. Declare a gateway that receives and<br>
sends traffic twice. Once as a<br>
user in the directory and once in the gateways section of my profile.<br>
    <br>
Does all these sound correct to you? Am I missing something? Which<br>
approach is the best?<br>
Please send me your feedback. Inline comments would be ideal.<br>
    <br>
--<br>
-------------------------------------------<br>
Apostolos Pantsiopoulos<br>
Kinetix Tele.com R &amp; D<br>
email: <a moz-do-not-send="true" href="mailto:regs@kinetix.gr">regs@kinetix.gr</a><br>
-------------------------------------------<br>
    <br>
    <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>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Anthony Minessale II<br>
  <br>
FreeSWITCH <a moz-do-not-send="true" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>
ClueCon <a moz-do-not-send="true" href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
  <br>
AIM: anthm<br>
  <a moz-do-not-send="true"
 href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a moz-do-not-send="true"
 href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a moz-do-not-send="true" href="http://irc.freenode.net">irc.freenode.net</a>
#freeswitch<br>
  <br>
FreeSWITCH Developer Conference<br>
  <a moz-do-not-send="true"
 href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
  <a moz-do-not-send="true"
 href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
  <a moz-do-not-send="true"
 href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R &amp; D
email: <a class="moz-txt-link-abbreviated" href="mailto:regs@kinetix.gr">regs@kinetix.gr</a>
------------------------------------------- </pre>
</body>
</html>