[Serusers] 481 Call Leg Transaction Does Not Exist Problem

Jonathan jbcrisostomo at gmail.com
Tue Aug 17 12:04:14 CEST 2004


Hello Everyone,

I am a newbie SER user.

I am working on a chat client application that supports VoIP and text
chat (both single and multiparty IM). I am using Microsoft's RTCDLL
with SER.

My question is, is there an issue with regards to using RTCDLL with
SER and using TCP as the transfer protocol? I asked this because if i
specify UDP as the transfer protocol im using for both the proxy and
registrar, text chat works just fine. If i change either of the
settings to TCP, i get the 481 error (Call Leg transaction does not
exist) whenever the contacted UA tries to send back message (reply) to
the caller/initiator of the text chat.

The following are the infos relevant to my system setup

OS version is  :  Linux Redhat 9

Version: ser 0.8.12 ( i 386/linux)

flags: STATS:Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, DNS_IP_HACK,
SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535

@(#) $ld:main.c.v 1.168 2003/10/12 15:09:08 andrei Exp $
main.c compiled on 13:09:22 Nov 21 2003 with gcc 2.95


ser config file

#
# $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 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=3
fork=yes
log_stderror=no
*/

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"
sip_warning=yes
server_signature=yes
uid="adrian"
gid="adrian"
listen=192.168.10.38
listen=127.0.0.1

# hostname matching an alias will satisfy the condition uri==myself".
alias=gandalf.hq1.astra.ph
#alias=hq1.astra.ph
alias=192.168.10.38
# ------------------ module loading ----------------------------------

# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/exec.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/print.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/uri.so"
loadmodule "/usr/lib/ser/modules/pa.so"

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

modparam("tm", "fr_timer", 10)
modparam("tm", "fr_inv_timer", 20)

# ------------- rr parameters

# set ";lr" tag to “;lr=trueâ€<9d>
modparam("rr", "enable_full_lr", 1)

# ------------- accounting parameters
modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)

# ------------- usrloc parameters

# 2 enables write-back to persistent mysql storage for speed
# disable=0, write-through=1
modparam("usrloc", "db_mode", 0)

# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)

# database location
modparam("usrloc", "db_url", "sql://ser:heslo@localhost/ser")


# ------------- auth parameters

# database location
modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser")

# allows clear text passwords in the mysql database
modparam("auth_db", "calculate_ha1",1)# yes)

# name of password column in mysql database
modparam("auth_db", "password_column", "password")

# pa initialization
#modparam("pa", "default_expires", 3600)

# -------------------------  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 (len_gt( 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;
        };
        lookup("aliases");
        # 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==myself) {

                if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
                        if (!www_authorize("gandalf.hq1.astra.ph",
"subscriber")) {
                                www_challenge("gandalf.hq1.astra.ph", "1");
                                break;
                        };

                        # only registered users are allowed
        #               if (!is_user("replicator") & !check_to()) {
        #                     log(1, "LOG: unregistered user registration
        #                     attempt\n");
        #                     sl_send_reply("403", "Only registered users are
        #                     allowed");
        #                     break;
        #               };

                        # it is an authenticated request, update Contact
                        # database now
        #               if (!save("location")) {
        #                     sl_reply_error();
        #               };

                        save("location");
                        break;
                };

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

        #if(t_newtran()){
        #       if (method=="SUBSCRIBE" || method=="PUBLISH"){
        #               handle_subscription("registrar");
        #               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();
        };

}

end of config file


As i said before, if i use UDP as my transport protocol, everything
works fine....the call initiator can send messages and the receiver
can reply back.

But when i use TCP, even if the call initiator can still send messages
like before without any problem, the other client UA (receiver) cannot
send messages back anymore....here is the sample captured SIP Messages
when the caller sends text chat messages.

T 192.168.10.42:1283 -> 192.168.10.38:5060 [AP]
  MESSAGE
sip:rose at 192.168.10.38;transport=tcp;ftag=c3366ad7dc9c41d799d979d8aa40b6ef;lr=on
SIP/2.0..Via: SIP/2.0/TCP 192.1
  68.10.42:14457..Max-Forwards: 70..From: "jon"
<sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=b
  f0baf3a75..To:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..Call-ID:
e4256863ae5e4c82b2c1138152
  e1221e at 192.168.10.42..CSeq: 3 MESSAGE..Route:
<sip:rose at gandalf.hq1.astra.ph:11818;maddr=192.168.10.27;transport=tcp>..C
  ontact:
<sip:jon at gandalf.hq1.astra.ph:14457;maddr=192.168.10.42;transport=tcp>..User-Agent:
RTC/1.2..Content-Type: text/
  enriched; charset=UTF-8..Content-Length:
230....{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0
Ar
  ial;}{\f1\fnil\fcharset0 Tahoma;}}..{\colortbl
;\red0\green0\blue255;}..\viewkind4\uc1\pard\cf1\b\fs18 jon : \cf0\b0\fs1
  6 hello po\par..\pard\f1\fs17\par..}..
##########
T 192.168.10.38:33101 -> 192.168.10.27:11818 [AP]
  MESSAGE sip:192.168.10.27:11818;transport=tcp SIP/2.0..Record-Route:
<sip:rose at 192.168.10.38;transport=tcp;ftag=c3366ad7
  dc9c41d799d979d8aa40b6ef;lr=on>..Via: SIP/2.0/TCP
192.168.10.38;branch=z9hG4bKd26d.d1049a22.4;i=01..Via: SIP/2.0/TCP 192
  .168.10.42:14457..Max-Forwards: 69..From: "jon"
<sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid
  =bf0baf3a75..To:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..Call-ID:
e4256863ae5e4c82b2c11381
  52e1221e at 192.168.10.42..CSeq: 3 MESSAGE..Contact:
<sip:jon at gandalf.hq1.astra.ph:14457;maddr=192.168.10.42;transport=tcp>
  ..User-Agent: RTC/1.2..Content-Type: text/enriched;
charset=UTF-8..Content-Length: 230....{\rtf1\ansi\ansicpg1252\deff0\
  deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0
Tahoma;}}..{\colortbl ;\red0\green0\blue255;}..\viewk
  ind4\uc1\pard\cf1\b\fs18 jon : \cf0\b0\fs16 hello
po\par..\pard\f1\fs17\par..}..
#
T 192.168.10.27:11818 -> 192.168.10.38:33101 [AP]
  SIP/2.0 200 OK..Via: SIP/2.0/TCP
192.168.10.38;branch=z9hG4bKd26d.d1049a22.4;i=01..Via: SIP/2.0/TCP
192.168.10.42:14457.
  .From: "jon"
<sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=bf0baf3a75..To:
<sip:rose at gandalf.
  hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..Call-ID:
e4256863ae5e4c82b2c1138152e1221e at 192.168.10.42..CSeq: 3 MES
  SAGE..Contact:
<sip:rose at gandalf.hq1.astra.ph:11818;maddr=192.168.10.27;transport=tcp>..User-Agent:
RTC/1.2..Content-Len
  gth: 0....
##
T 192.168.10.38:5060 -> 192.168.10.42:1283 [AP]
  SIP/2.0 200 OK..Via: SIP/2.0/TCP 192.168.10.42:14457..From: "jon"
<sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d
  979d8aa40b6ef;epid=bf0baf3a75..To:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..Call-ID:
e42568
  63ae5e4c82b2c1138152e1221e at 192.168.10.42..CSeq: 3 MESSAGE..Contact:
<sip:rose at gandalf.hq1.astra.ph:11818;maddr=192.168.1
  0.27;transport=tcp>..User-Agent: RTC/1.2..Content-Length: 0....

______________________________________________________________

And here is the sample SIP captured message if the receiver tries to
reply back to the caller....the one with the 481 error


T 192.168.10.27:1077 -> 192.168.10.38:5060 [AP]
  MESSAGE
sip:rose at 192.168.10.38;transport=tcp;ftag=c3366ad7dc9c41d799d979d8aa40b6ef;lr=on
SIP/2.0..Via: SIP/2.0/TCP 192.1
  68.10.27:11818..Max-Forwards: 70..From:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..To:
"jon"
  <sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=bf0baf3a75..Call-ID:
e4256863ae5e4c82b2c1138152
  e1221e at 192.168.10.42..CSeq: 1 MESSAGE..Route:
<sip:jon at gandalf.hq1.astra.ph:14457;maddr=192.168.10.42;transport=tcp>..Co
  ntact:
<sip:rose at gandalf.hq1.astra.ph:11818;maddr=192.168.10.27;transport=tcp>..User-Agent:
RTC/1.2..Content-Type: text/
  enriched; charset=UTF-8..Content-Length:
249....{\rtf1\ansi\ansicpg1252\deff0\deflang13321{\fonttbl{\f0\fnil\fcharset0
A
  rial;}{\f1\fnil\fcharset0 Tahoma;}}..{\colortbl
;\red0\green0\blue255;}..\viewkind4\uc1\pard\cf1\b\fs18 rose : \cf0\b0\f
  s16 r\lang1033 eply\par..\pard\lang13321\f1\fs17\par..}..
##########
T 192.168.10.38:33101 -> 192.168.10.27:11818 [AP]
  MESSAGE sip:192.168.10.27:11818;transport=tcp SIP/2.0..Record-Route:
<sip:rose at 192.168.10.38;transport=tcp;ftag=0ce6d678
  daf24305a094f59a177bdac7;lr=on>..Via: SIP/2.0/TCP
192.168.10.38;branch=z9hG4bKf26d.b82505f.4;i=11..Via: SIP/2.0/TCP 192.
  168.10.27:11818..Max-Forwards: 69..From:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..To:
"jon"
   <sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=bf0baf3a75..Call-ID:
e4256863ae5e4c82b2c113815
  2e1221e at 192.168.10.42..CSeq: 1 MESSAGE..Contact:
<sip:rose at gandalf.hq1.astra.ph:11818;maddr=192.168.10.27;transport=tcp>
  ..User-Agent: RTC/1.2..Content-Type: text/enriched;
charset=UTF-8..Content-Length: 249....{\rtf1\ansi\ansicpg1252\deff0\
  deflang13321{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0
Tahoma;}}..{\colortbl ;\red0\green0\blue255;}..\view
  kind4\uc1\pard\cf1\b\fs18 rose : \cf0\b0\fs16 r\lang1033
eply\par..\pard\lang13321\f1\fs17\par..}..
##
T 192.168.10.38:5060 -> 192.168.10.27:1077 [AP]
  SIP/2.0 408 Request Timeout..Via: SIP/2.0/TCP 192.168.10.27:11818..From:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf
  24305a094f59a177bdac7..To: "jon"
<sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=bf0baf3a75..Ca
  ll-ID: e4256863ae5e4c82b2c1138152e1221e at 192.168.10.42..CSeq: 1
MESSAGE..Server: Sip EXpress router (0.8.11 (i386/linux))
  ..Content-Length: 0..Warning: 392 192.168.10.38:5060 "Noisy feedback tells:
pid=5107 req_src_ip=192.168.10.27 req_src_p
  ort=1077
in_uri=sip:rose at 192.168.10.38;transport=tcp;ftag=c3366ad7dc9c41d799d979d8aa40b6ef;lr=on
out_uri=sip:192.168.10.
  27:9287;transport=tcp via_cnt==0"....
##
T 192.168.10.27:11818 -> 192.168.10.38:33101 [AP]
  SIP/2.0 481 Call Leg/Transaction Does Not Exist..Via: SIP/2.0/TCP
192.168.10.38;branch=z9hG4bKf26d.b82505f.4;i=11..Via:
  SIP/2.0/TCP 192.168.10.27:11818..From:
<sip:rose at gandalf.hq1.astra.ph>;tag=0ce6d678daf24305a094f59a177bdac7..To:
"jon" <
  sip:jon at gandalf.hq1.astra.ph>;tag=c3366ad7dc9c41d799d979d8aa40b6ef;epid=bf0baf3a75..Call-ID:
e4256863ae5e4c82b2c1138152e
  1221e at 192.168.10.42..CSeq: 1 MESSAGE..User-Agent: RTC/1.2..Content-Length:
0....


I have no clue as to why it behaves this way while it does not so
using UDP.  I don't know where the actual problem lies although i am
biased that more likely, it is microsoft's fault. ^_^


Please enlighten me, anything would greatly help.


Many thanks in advance....

-- 
Jonathan




More information about the sr-users mailing list