<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
OK.&nbsp; I think I understand.<br>
<br>
Since the SIP request is injected straight into SER via the t_uac_dlg()
FIFO command, I had presumed the request would get dumped into the
route[0] block like any other request coming into SER from a UDP port.&nbsp;
If this were the case I'd expect the normal "if(uri == myself)" type
checks to catch the request and do the appropriate thing.&nbsp; But if I
follow your reply, this isn't <br>
the case.<br>
<br>
If I understand what you say correctly, the t_uac_dlg() command works
just like some UAC out on the network, and needs to have the IP address
of its proxy either hard coded, or resolvable via some means (hosts
file, DNS).&nbsp; Once this resolved, it sends the request to SER via
networking calls and normal processing ensues.&nbsp; Is this correct ?<br>
<br>
If this is all true, then it means that for the current SERweb CTD
functionality to work, you need a host file or DNS entry for all SIP
domains served by your SER server, since SERweb delivers the dummy
INVITE URI in the <a class="moz-txt-link-rfc2396E" href="sip:name@domain">"sip:name@domain"</a> form instead of <a class="moz-txt-link-rfc2396E" href="sip:name@ip">"sip:name@ip"</a>
form.&nbsp; Is this all correct ?<br>
<br>
Presuming the above is correct, one problem I can see with this
requirement is that in some instances, it may be impossible for someone
to add the DNS SRV entries (no access to DNS server, for instance), and
impractical to add /etc/hosts aliases for the SIP domain, since doing
so could possibly break other things in the system, such as email
routing on that host (I think sendmail, etc would assume that the
machine was the mail server for that domain if such an alias existed).&nbsp;
In this sort of situation, the user might want to hard code the IP
address of the SIP proxy to contact, much as you do when you configure
SIP phones.<br>
<br>
If you wanted to somehow "hard code" the SIP proxy called by changing
the PHP code in SERweb, could you do so "properly" ?&nbsp; I could see how
changing the URI from <a class="moz-txt-link-rfc2396E" href="sip:user@domain">"sip:user@domain"</a> to <a class="moz-txt-link-rfc2396E" href="sip:user@ip-of-SIP-proxy">"sip:user@ip-of-SIP-proxy"</a>
in the PHP would work, but wouldn't that break a multi-domain
situation, since the domain of the user in question would be lost ?&nbsp;
Perhaps if just the INVITE URI were changed to
<a class="moz-txt-link-rfc2396E" href="sip:user@ip-of-SIP-proxy">"sip:user@ip-of-SIP-proxy"</a> form, and the "To: " header in the SIP
request were left in <a class="moz-txt-link-rfc2396E" href="sip:user@domain">"sip:user@domain"</a> form, things would still work ?&nbsp;
Or perhaps other headers could be changed/added in the SIP request that
would allow t_uac_dlg() to figure out which IP to contact for the
request without needing to do a host lookup ?&nbsp; Or maybe the best
approach would be to add an optional IP-address argument to the
t_uac_dlg() command which specifies the SIP server to call (for
instance, ":t_dlg_uac:reply_fifo_name[:IP of SIP server to call]") ?<br>
<br>
TIA,<br>
Jim<br>
<br>
<br>
Jiri Kuthan wrote:<br>
<blockquote type="cite"
 cite="mid6.0.0.22.0.20031030165328.03089c60@localhost">
  <pre wrap="">Jim,

CTD acts as a SIP client -- i.e., it takes mydomain.com and tries
to resolve it via DNS. If the resolution fails, the transaction 
fails. That's completely orthogonal to function of "alias" which
is used for proxy server's domain matching.

if mydomain.com is served by the same server, CTD initiates a transaction,
sends it to itself, and in proxy mode it recognizes it as a request
for itself using alias.

-jiri

At 04:46 PM 10/30/2003, Jim Burwell wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

I was trying to get click-to-dial working from SERweb and it was failing for unclear reasons.  I then experimented with the "ctd.sh" script, which does the same thing as the SERweb PHP code.  I found that it would fail during the 'dummy invite' stage, returning an odd error if I used a URI which used a SIP domain/realm, but would work fine if I used the IP address of the SIP proxy as the domain.  i.e.:

  ./ctd.sh <a class="moz-txt-link-freetext" href="sip:joebob@mydomain.com">sip:joebob@mydomain.com</a> <a class="moz-txt-link-freetext" href="sip:billybob@mydomain.com">sip:billybob@mydomain.com</a>   &lt;- fails
  ./ctd.sh <a class="moz-txt-link-freetext" href="sip:joebob@1.2.3.4">sip:joebob@1.2.3.4</a> <a class="moz-txt-link-freetext" href="sip:billybob@mydomain.com">sip:billybob@mydomain.com</a>        &lt;- succeeds

The reply from SER would be "500 fifo_uac: no mem for hf block" .  The log file would have these errors:

  ERROR: mk_proxy: could not resolve hostname: "mydomain.com"
  ERROR: uri2proxy: bad host name in URI <a class="moz-txt-link-rfc2396E" href="sip:joebob@mydomain.com">&lt;sip:joebob@mydomain.com&gt;</a>
  ERROR: uri2sock: Can't create a dst proxy
  ERROR: get_hf_block: send_sock failed
  ERROR: fifo_uac: no mem for hf block

So it appears that SER didn't understand that the URI's domain was itself, even though there's a host alias line in the ser.cfg file listing "mydomain.com" as an alias for this host.  It's as if it thinks it needed to relay the transaction to another SIP router, and look up an IP to do so.  If "mydomain.com" were placed in /etc/hosts as an alias for the system SER was running on, or if a DNS SRV entry for the SIP domain were created pointing to the SER system, voila, the <a class="moz-txt-link-rfc2396E" href="sip:user@domain">"sip:user@domain"</a> form would work just fine.

Is this a bug ?  I think SER isn't checking SER host aliases against the SIP domain if the SIP request comes in via the fifo t_uac_dlg() command.

I'm using the SER release 0.8.11-r1, aka the "stable CVS" release.

TIA,
Jim

-- 
+---------------------------------------------------------------------------+
|         Jim Burwell - Sr. Systems/Network/Security Engineer, JSBC         |
+---------------------------------------------------------------------------+
| "I never let my schooling get in the way of my education." - Mark Twain   |
| "UNIX was never designed to keep people from doing stupid things, because |
|  that policy would also keep them from doing clever things." - Doug Gwyn  |
| "Cool is only three letters away from Fool" - Mike Muir, Suicyco          |
| "..Government in its best state is but a necessary evil; in its worst     |
|  state an intolerable one.." - Thomas Paine, "Common Sense" (1776)        |
+---------------------------------------------------------------------------+
|   Email:  <a class="moz-txt-link-abbreviated" href="mailto:jimb@jsbc.cc">jimb@jsbc.cc</a>                              ICQ UIN:  1695089     |
+---------------------------------------------------------------------------+
|  Reply problems ?  Turn off the "sign" function in email prog.  Blame MS. |
+---------------------------------------------------------------------------+



_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--
Jiri Kuthan            <a class="moz-txt-link-freetext" href="http://iptel.org/~jiri/">http://iptel.org/~jiri/</a> 
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="78">-- 
+---------------------------------------------------------------------------+
|         Jim Burwell - Sr. Systems/Network/Security Engineer, JSBC         |
+---------------------------------------------------------------------------+
| "I never let my schooling get in the way of my education." - Mark Twain   |
| "UNIX was never designed to keep people from doing stupid things, because |
|  that policy would also keep them from doing clever things." - Doug Gwyn  |
| "Cool is only three letters away from Fool" - Mike Muir, Suicyco          |
| "..Government in its best state is but a necessary evil; in its worst     |
|  state an intolerable one.." - Thomas Paine, "Common Sense" (1776)        |
+---------------------------------------------------------------------------+
|   Email:  <a class="moz-txt-link-abbreviated" href="mailto:jimb@jsbc.cc">jimb@jsbc.cc</a>                              ICQ UIN:  1695089     |
+---------------------------------------------------------------------------+
|  Reply problems ?  Turn off the "sign" function in email prog.  Blame MS. |
+---------------------------------------------------------------------------+
</pre>
</body>
</html>