[Serusers] problems with t_relay_to

Zenone zenone at telip.com
Mon Jul 3 15:08:07 CEST 2006


Excuse me for my light explanation of my problem but your solution works!
Thanks!
Michel

--------- Message d'origine --------
De: Andrey Kouprianov <andrey.kouprianov at gmail.com>
A: serusers at iptel.org <serusers at iptel.org>
Objet: Re: [Serusers] problems with t_relay_to
Date: 03/07/06 13:00

> You did not specify your problem though...
> 
> Anyway, try t_relay_to_udp() or t_relay_to_tcp()
> 
> On 7/3/06, Zenone &lt;zenone at telip.com&gt; wrote:
> &gt; Hi,
> &gt; I have problems to make my ser work since two 't_relay_to' have been
added
> &gt; in 'ser.cfg'.
> &gt; Here is my ser.cfg:
> &gt; #
> &gt; # $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
> &gt; #
> &gt; # simple quick-start config script
> &gt; #
> &gt;
> &gt; # ----------- global configuration parameters
------------------------
> &gt;
> &gt; #debug=3         # debug level (cmd line: -dddddddddd)
> &gt; #fork=yes
> &gt; #log_stderror=no        # (cmd line: -E)
> &gt;
> &gt; /* Uncomment these lines to enter debugging mode
> &gt; fork=no
> &gt; log_stderror=yes
> &gt; */
> &gt;
> &gt; check_via=no    # (cmd. line: -v)
> &gt; dns=no           # (cmd. line: -r)
> &gt; rev_dns=no      # (cmd. line: -R)
> &gt; #port=5060
> &gt; #children=4
> &gt; fifo=&quot;/tmp/ser_fifo&quot;
> &gt;
> &gt; # ------------------ module loading
----------------------------------
> &gt;
> &gt; # Uncomment this if you want to use SQL database
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/mysql.so&quot;
> &gt;
> &gt; loadmodule &quot;/usr/local/ser_directory/lib/ser/modules/sl.so&quot;
> &gt; loadmodule &quot;/usr/local/ser_directory/lib/ser/modules/tm.so&quot;
> &gt; loadmodule &quot;/usr/local/ser_directory/lib/ser/modules/rr.so&quot;
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/maxfwd.so&quot;
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/usrloc.so&quot;
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/registrar.so&quot;
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/textops.so&quot;
> &gt;
> &gt; # Uncomment this if you want digest authentication
> &gt; # mysql.so must be loaded !
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/auth.so&quot;
> &gt; loadmodule
&quot;/usr/local/ser_directory/lib/ser/modules/auth_db.so&quot;
> &gt;
> &gt; modparam(&quot;tm&quot;, &quot;fr_inv_timer&quot;, 90)
> &gt; # ----------------- setting module-specific parameters
---------------
> &gt;
> &gt; # -- usrloc params --
> &gt;
> &gt; #modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,   0)
> &gt;
> &gt; # Uncomment this if you want to use SQL database
> &gt; # for persistent storage and comment the previous line
> &gt; modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)
> &gt;
> &gt; # -- auth params --
> &gt; # Uncomment if you are using auth module
> &gt; #
> &gt; modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)
> &gt; #
> &gt; # If you set &quot;calculate_ha1&quot; parameter to yes (which true
in this config),
> &gt; # uncomment also the following parameter)
> &gt; #
> &gt; modparam(&quot;auth_db&quot;, &quot;password_column&quot;,
&quot;password&quot;)
> &gt;
> &gt; # -- rr params --
> &gt; # add value to ;lr param to make some broken UAs happy
> &gt; modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)
> &gt;
> &gt; # -------------------------  request routing logic
-------------------
> &gt;
> &gt; # main routing logic
> &gt;
> &gt; route{
> &gt;
> &gt;        if (!mf_process_maxfwd_header(&quot;10&quot;)) {
> &gt;                sl_send_reply(&quot;483&quot;,&quot;Too Many
Hops&quot;);
> &gt;                break;
> &gt;        };
> &gt;
> &gt;        if (msg:len &gt;=  2048 ) {
> &gt;                sl_send_reply(&quot;513&quot;, &quot;Message too
big&quot;);
> &gt;                break;
> &gt;        };
> &gt;
> &gt;
> &gt;        if (!method==&quot;REGISTER&quot;) record_route();
> &gt;
> &gt;        if (loose_route()) {
> &gt;                append_hf(&quot;P-hint: rr-enforcedrn&quot;);
> &gt;                route(1);
> &gt;                break;
> &gt;        };
> &gt;
> &gt;        if (!uri==myself) {
> &gt;                append_hf(&quot;P-hint: outboundrn&quot;);
> &gt;                route(2);
> &gt;                break;
> &gt;        };
> &gt;
> &gt;        if (uri==myself) {
> &gt;
> &gt;                if (method==&quot;REGISTER&quot;) {
> &gt;                        if (!www_authorize(&quot;192.168.0.120&quot;,
&quot;subscriber&quot;)) {
> &gt;                               
www_challenge(&quot;192.168.0.120&quot;, &quot;0&quot;);
> &gt;                                break;
> &gt;                        };
> &gt;                        save(&quot;location&quot;);
> &gt;                        break;
> &gt;                };
> &gt;
> &gt;                lookup(&quot;aliases&quot;);
> &gt;                if (!uri==myself) {
> &gt;                        append_hf(&quot;P-hint: outbound
aliasrn&quot;);
> &gt;                        route(2);
> &gt;                        break;
> &gt;                };
> &gt;
> &gt;                t_on_failure(&quot;1&quot;);
> &gt;                lookup(&quot;location&quot;);
> &gt;        };
> &gt;        append_hf(&quot;P-hint: usrloc appliedrn&quot;);
> &gt;        route(1);
> &gt; }
> &gt;
> &gt; route[1]
> &gt; {
> &gt;        if (uri=~&quot;^sip:888@&quot;) {
> &gt;                                if (!t_relay_to(
&quot;192.168.0.120&quot;, &quot;5070&quot;)) sl_reply_error();
> &gt;                        break;
> &gt;        };
> &gt;        t_on_failure(&quot;1&quot;);
> &gt;        t_relay();
> &gt; }
> &gt;
> &gt;
> &gt; route[2]
> &gt; {
> &gt;        if (!t_relay()) {
> &gt;                sl_reply_error();
> &gt;        };
> &gt; }
> &gt;
> &gt;
> &gt; failure_route[1] {
> &gt;        if (!t_relay_to( &quot;192.168.0.120&quot;, &quot;5070&quot;))
> &gt;        {
> &gt;                sl_reply_error();
> &gt;        };
> &gt; }
> &gt;
> &gt; Thank you for your help!
> &gt; Michel
> &gt;
> &gt; ________________________________________________
> &gt; Message sent using UebiMiau 2.7.8
> &gt;
> &gt;
> &gt; _______________________________________________
> &gt; Serusers mailing list
> &gt; Serusers at lists.iptel.org
> &gt; http://lists.iptel.org/mailman/listinfo/serusers
> &gt;
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 
> 

________________________________________________
Message sent using UebiMiau 2.7.8





More information about the sr-users mailing list