[Serusers] SER, ATA-186 & Cisco AS5300

Linus Surguy linus at magrathea-telecom.co.uk
Sat Jun 19 19:58:45 CEST 2004


> Please email your ser.cfg file

#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

#debug=3         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)

/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
listen=213.166.5.135
check_via=no # (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"

# ------------------ module loading ----------------------------------

# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"

loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"

# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"

# ----------------- setting module-specific parameters ---------------

# -- usrloc params --

#modparam("usrloc", "db_mode",   0)

# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)

# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")

# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

# -------------------------  request routing logic -------------------

# main routing logic

route{

 # initial sanity checks -- messages with
 # max_forwards==0, or excessively long requests
 if (!mf_process_maxfwd_header("10")) {
  sl_send_reply("483","Too Many Hops");
  break;
 };
 if ( msg:len > max_len ) {
  sl_send_reply("513", "Message too big");
  break;
 };

 # we record-route all messages -- to make sure that
 # subsequent messages will go through our proxy; that's
 # particularly good if upstream and downstream entities
 # use different transport protocol
 record_route();
 # loose-route processing
 if (loose_route()) {
  t_relay();
  break;
 };

 # if the request is for other domain use UsrLoc
 # (in case, it does not work, use the following command
 # with proper names and addresses in it)


 if (uri=~"magrathea.net") {

  if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
   if (!www_authorize("gk.magrathea.net", "subscriber")) {
    www_challenge("gk.magrathea.net", "0");
    break;
   };

   save("location");
   break;
  };

# PSTN

# attempt handoff to PSTN
        if (uri=~"^sip:44800[0-9]*@gk.magrathea.net") {  ##  This assumes
that the caller is


                log("Forwarding to PSTN\n");      ##  registered in our
realm
                t_relay_to_udp( "213.166.5.131", "5060");  ##  Our Cisco
router

                break;
        };


  # native SIP destinations are handled using our USRLOC DB
  if (!lookup("location")) {
   sl_send_reply("404", "Not Found");
   break;
  };
 };




 # forward to current uri now; use stateful forwarding; that
 # works reliably even if we forward from TCP to UDP
 if (!t_relay()) {
  sl_reply_error();
 };

}



----- Original Message ----- 
From: "CM Rahman" <cmrahman at ccsi.com>
To: "Linus Surguy" <linus at magrathea-telecom.co.uk>; <serusers at lists.iptel.org>
Sent: Saturday, June 19, 2004 6:10 PM
Subject: RE: [Serusers] SER, ATA-186 & Cisco AS5300


>
> Thanks
>
> &*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*
> C.M. Rahman Jr.
> CTO
> CCNP, MCSE Security    "Secure your self by securing your System"
> CompTI Security Plus Certified
> CCS Internet
> http://www.ccsi.com
> 13704 Research Blvd. Building O-Suite 4
> Austin, TX 78750
> Tel: 512-257-2274 Ex: 115
>
>
> -----Original Message-----
> From: serusers-bounces at iptel.org [mailto:serusers-bounces at lists.iptel.org] On
> Behalf Of Linus Surguy
> Sent: Saturday, June 19, 2004 12:08 PM
> To: serusers at lists.iptel.org
> Subject: [Serusers] SER, ATA-186 & Cisco AS5300
>
> I hope this is not an FAQ, I've tried searching the available info.
> Using
> Ser 0.8.12, Cisco AS5300 with IOS 12.3.6 & a ATA-186.
>
> ATA-186 (behind NAT) -> SER -> AS5300
>
> On the INVITE, we get:
>
> 10w6d: httpish_msg_process_network_msg: Content Length 261, Bytes
> Remaining
> 256
> 10w6d: HandleUdpSocketReads: SIP Message incomplete, trashed
>
> ser.cfg is just using t_relay_to_udp and not doing anything fancy.
>
> Any ideas!?
>
> Linus
>
> (Full debug from debug ccsip all)
>
> 10w6d: Received:
> INVITE sip:448000664901 at gk.magrathea.net;user=phone SIP/2.0
> Max-Forwards: 10
> Record-Route: <sip:448000664901 at 213.166.5.135;ftag=651568306;lr=on>
> Via: SIP/2.0/UDP 213.166.5.135;branch=z9hG4bKbf06.7adc86c4.0
> Via: SIP/2.0/UDP 213.162.109.118:5060
> From: sip:linus at gk.magrathea.net;tag=651568306
> To: <sip:448000664901 at gk.magrathea.net;user=phone>
> Call-ID: 82733180 at 213.162.109.118
> CSeq: 1 INVITE
> Contact: <sip:linus at 213.162.109.118:5060;transport=udp>
> User-Agent: Cisco ATA 186  v2.16.1 ata18x (030709a)
> Expires: 300
> Content-Length: 261
> Content-Type: application/sdp
>
> v=0
> o=linus 115389 115389 IN IP4 213.162.109.118
> s=ATA186 Call
> c=IN IP4 213.162.109.118
> t=0 0
> m=audio 16384 RTP/AVP 4 8 0 101
> a=rtpmap:4 G723/8000/1
> a=rtpmap:8 PCMA/8000/1
> a=rtpmap:0 PCMU/8000/1
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
>
> 10w6d: httpish_msg_process_network_msg: Content Length 261, Bytes
> Remaining
> 256
> 10w6d: HandleUdpSocketReads: SIP Message incomplete, trashed
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>




More information about the sr-users mailing list