[OpenSIPS-Devel] contact hf manipulation/lump issues

Daniel Corbe daniel.junkmail at gmail.com
Tue Dec 2 13:27:01 CET 2008


Something I'm doing with http://rafb.net/p/19FYuY85.html is causing OpenSIPS
to crash.  I am simply trying to replace the contact HF uri with OpenSIPS'
own address before I relay the message to the core of my network so that
subsequent INVITE messages from the core to the endpoint flow through the
OpenSIPS system instead of the core attempting to contact the UA directly.
 Below is the BT.  Can someone please point out what I've done wrong?
Thanks.

-Daniel

(gdb) bt full
#0  0x28437572 in free_via_clen_lump (list=0x8187d28) at fix_lumps.h:60
        prev_lump = (struct lump *) 0x8178c58
        lump = (struct lump *) 0x30303233
        a = (struct lump *) 0x0
        foo = (struct lump *) 0x286c2fdc
        next = (struct lump *) 0x30303233
        __FUNCTION__ = "free_via_clen_lump"
#1  0x28437395 in build_cell (p_msg=0x8187a78) at h_table.c:287
        new_cell = (struct cell *) 0x286c21a0
        sip_msg_len = 0
        old = (struct usr_avp **) 0x8163dcc
        cbs = (struct tm_callback *) 0x8153da9
        cbs_tmp = (struct tm_callback *) 0x12
#2  0x2844c203 in new_t (p_msg=0x8187a78) at t_lookup.c:1000
        new_cell = (struct cell *) 0x2846a798
        __FUNCTION__ = "new_t"
#3  0x2844bf25 in t_newtran (p_msg=0x8187a78) at t_lookup.c:1115
        lret = -1
        my_err = 5
        __FUNCTION__ = "t_newtran"
#4  0x28443835 in t_relay_to (p_msg=0x8187a78, proxy=0x81824f8, flags=0) at
t_funcs.c:200
        ret = 0
        new_tran = 0
        uri = (str *) 0x0
        reply_ret = 0
        t = (struct cell *) 0x0
        __FUNCTION__ = "t_relay_to"
---Type <return> to continue, or q <return> to quit---
#5  0x2845bdb6 in w_t_relay (p_msg=0x8187a78, proxy=0x81824f8 "", flags=0x0)
at tm.c:962
        t = (struct cell *) 0xffffffff
        ret = 157
        __FUNCTION__ = "w_t_relay"
#6  0x08053a76 in do_action (a=0x8182d00, msg=0x8187a78) at action.c:845
        ret = -5
        v = 0
        to = (union sockaddr_union *) 0x2832d080
        p = (struct proxy_l *) 0x28154ee4
        tmp = 0x28175d30 ""
        new_uri = 0x0
        end = 0x0
        crt = 0x20002 <Error reading address 0x20002: Bad address>
        len = 673946068
        user = 673844676
        uri = {user = {s = 0x696c6169 <Error reading address 0x696c6169: Bad
address>, len = 1735289210},
  passwd = {s = 0x0, len = -1077942956}, host = {s = 0x20636544 <Error
reading address 0x20636544: Bad address>,
    len = 807416352}, port = {s = 0x32313a36 <Error reading address
0x32313a36: Bad address>, len = 540489018},
  params = {s = 0x20636544 <Error reading address 0x20636544: Bad address>,
len = 807416352}, headers = {
    s = 0x32313a36 <Error reading address 0x32313a36: Bad address>, len =
540489018}, port_no = 14683,
  proto = 14384, type = 542979632, transport = {s = 0x4f464e49 <Error
reading address 0x4f464e49: Bad address>,
    len = 1919902522}, ttl = {s = 0x20636544 <Error reading address
0x20636544: Bad address>, len = 807416352},
  user_param = {s = 0x32313a36 <Error reading address 0x32313a36: Bad
address>, len = 540489018}, maddr = {
    s = 0x3830395b <Error reading address 0x3830395b: Bad address>, len =
542979632}, method = {
    s = 0x4f464e49 <Error reading address 0x4f464e49: Bad address>, len =
1734438970}, lr = {
    s = 0x68633a65 <Error reading address 0x68633a65: Bad address>, len =
1600416873}, r2 = {
    s = 0x74696e69 <Error reading address 0x74696e69: Bad address>, len =
1634738234}, transport_val = {
---Type <return> to continue, or q <return> to quit---
    s = 0x203a6567 <Error reading address 0x203a6567: Bad address>, len =
1852731203}, ttl_val = {
    s = 0x69746365 <Error reading address 0x69746365: Bad address>, len =
1948282479}, user_param_val = {
    s = 0x794d206f <Error reading address 0x794d206f: Bad address>, len =
541872467}, maddr_val = {
    s = 0x76726573 <Error reading address 0x76726573: Bad address>, len =
1931506277}, method_val = {
    s = 0x65636375 <Error reading address 0x65636375: Bad address>, len =
1684366437}, lr_val = {
    s = 0x2e2e2e0a <Error reading address 0x2e2e2e0a: Bad address>, len =
672953610}, r2_val = {
    s = 0x2832b080 "", len = 136792676}}
        next_hop = {user = {s = 0x0, len = 0}, passwd = {
    s = 0x8153e2f "69\r\nContact:
<sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>\r\nFrom:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>;tag=4f9ad225\r\nCall-ID"...,
len = 674341099}, host = {s = 0x46 <Error reading address 0x46: Bad
address>, len = 1}, port = {
    s = 0x284882b4 "à¡", len = 0}, params = {s = 0xbfbfe448
"Hæ¿¿v:\005\bxz\030\b", len = 675804942}, headers = {
    s = 0x8187a78 "\001", len = 135609787}, port_no = 41192, proto = 10289,
type = ERROR_URI_T, transport = {
    s = 0xc <Error reading address 0xc: Bad address>, len = 0}, ttl = {
    s = 0x8153dbb " SIP/2.0\r\nVia: SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\nMax-Forwards:
69\r\nContact: <sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"161"..., len = -1}, user_param = {s = 0xf <Error reading address 0xf: Bad
address>, len = 64}, maddr = {s = 0x0,
    len = 673503224}, method = {s = 0x2847f6f0
"U\211åVS\203ì0èªüÿÿ\201÷\213", len = 0}, lr = {
    s = 0xbfbfe648 "xæ¿¿\213\022\005\b\bç\027\bxz\030\b\\æ¿¿\220ê\027\b\b",
len = 134560374}, r2 = {
    s = 0x8187a78 "\001", len = 0}, transport_val = {s = 0x0, len = 0},
ttl_val = {s = 0x0, len = 0},
  user_param_val = {s = 0x0, len = 673425193}, maddr_val = {s = 0xf <Error
reading address 0xf: Bad address>,
    len = 673469164}, method_val = {s = 0x80fc6f1 "", len = -1077941820},
lr_val = {s = 0xbfbfe970 "", len = 0},
  r2_val = {s = 0xffffffff <Error reading address 0xffffffff: Bad address>,
len = 1953066601}}
        u = (struct sip_uri *) 0x282b99d4
        port = 0
        cmatch = -1
        aitem = (struct action *) 0x282e2df8
---Type <return> to continue, or q <return> to quit---
        adefault = (struct action *) 0x20636544
        spec = (pv_spec_t *) 0x30203220
        model = 0x32313a36
        val = {rs = {s = 0xbfbfe408 "Hä¿¿\016÷G(xz\030\b»=\025\bè 1(", len =
675805430}, ri = 135821944,
  flags = 512}
        __FUNCTION__ = "do_action"
#7  0x0805128b in run_action_list (a=0x8181ea8, msg=0x8187a78) at
action.c:138
        ret = 1
        t = (struct action *) 0x8182d00
        __FUNCTION__ = "run_action_list"
#8  0x08051501 in run_actions (a=0x8181ea8, msg=0x8187a78) at action.c:118
        ret = 0
        __FUNCTION__ = "run_actions"
#9  0x08052798 in do_action (a=0x817eb68, msg=0x8187a78) at action.c:483
        ret = -5
        v = 134813009
        to = (union sockaddr_union *) 0x817eb18
        p = (struct proxy_l *) 0x8187a78
        tmp = 0x0
        new_uri = 0xca <Error reading address 0xca: Bad address>
        end = 0x2826c6a0 "¬\225"
        crt = 0x38 <Error reading address 0x38: Bad address>
        len = 14
        user = 3
        uri = {user = {s = 0x0, len = 0}, passwd = {s = 0x0, len = 0}, host
= {s = 0x0, len = 0}, port = {
    s = 0x0, len = 0}, params = {s = 0x0, len = 0}, headers = {s = 0x0, len
= 0}, port_no = 0, proto = 0,
  type = TEL_URI_T, transport = {s = 0x0, len = 0}, ttl = {s = 0x8174970 "",
len = 3}, user_param = {
---Type <return> to continue, or q <return> to quit---
    s = 0x44 <Error reading address 0x44: Bad address>, len = 1}, maddr = {s
= 0x8174940 "", len = 135802768},
  method = {s = 0xeb <Error reading address 0xeb: Bad address>, len = 232},
lr = {
    s = 0x162b6 <Error reading address 0x162b6: Bad address>, len = 90806},
r2 = {
    s = 0xbfbfe7a8 "ûÿÿÿQ\025\t\b\030ë\027\bxz\030\b", len = 134813009},
transport_val = {s = 0x817ccd0 "\002",
    len = 135821944}, ttl_val = {s = 0x0, len = 229}, user_param_val = {s =
0x8174940 "", len = 135797296},
  maddr_val = {s = 0xd4 <Error reading address 0xd4: Bad address>, len = 1},
method_val = {
    s = 0xd6 <Error reading address 0xd6: Bad address>, len = 135797296},
lr_val = {
    s = 0x6 <Error reading address 0x6: Bad address>, len = 1}, r2_val = {
    s = 0x162b6 <Error reading address 0x162b6: Bad address>, len = 90806}}
        next_hop = {user = {s = 0xbfbfe65c "\220ê\027\b\b", len =
135785104}, passwd = {
    s = 0x8 <Error reading address 0x8: Bad address>, len = 1}, host = {
    s = 0x6465736f <Error reading address 0x6465736f: Bad address>, len =
-1}, port = {
    s = 0x162b6 <Error reading address 0x162b6: Bad address>, len = 90806},
params = {
    s = 0xbfbfe7a8 "ûÿÿÿQ\025\t\b\030ë\027\bxz\030\b", len = 134796121},
headers = {s = 0x8187a78 "\001",
    len = 20}, port_no = 31364, proto = 2072, type = 135785260, transport =
{
    s = 0x7173796d <Error reading address 0x7173796d: Bad address>, len =
1818451820}, ttl = {s = 0x2865736f "",
    len = 1633886249}, user_param = {s = 0x1 <Error reading address 0x1: Bad
address>, len = 135812768}, maddr = {
    s = 0xbfbfe7fc "\213\022\005\bhë\027\bxz\030\b ", len = 0}, method = {s
= 0x28323160 "\t", len = 0}, lr = {
    s = 0x1 <Error reading address 0x1: Bad address>, len = 235}, r2 = {s =
0xbfbfe748 "D", len = 674467845},
  transport_val = {s = 0x2822f1db "\201Ã\035æ\001", len = 673503224},
ttl_val = {
    s = 0x43 <Error reading address 0x43: Bad address>, len = 14},
user_param_val = {s = 0xbfbfe7e8 "(è¿¿¶b\001",
    len = 673365485}, maddr_val = {s = 0xbfbfe784 "0\032\030\bÔ", len =
675670902}, method_val = {
    s = 0xbfbfe80c "\004", len = 136792676}, lr_val = {s = 0x0, len = 0},
r2_val = {s = 0x0, len = 0}}
        u = (struct sip_uri *) 0x8174b18
        port = 0
        cmatch = -1077942280
        aitem = (struct action *) 0x1
---Type <return> to continue, or q <return> to quit---
        adefault = (struct action *) 0x162b6
        spec = (pv_spec_t *) 0x162b6
        model = 0xbfbfe828
        val = {rs = {s = 0xbfbfe678 "¨ç¿¿YÓ\b\bxz\030\b\024", len =
134550155}, ri = 135784200, flags = 135821944}
        __FUNCTION__ = "do_action"
#10 0x0805128b in run_action_list (a=0x817eb68, msg=0x8187a78) at
action.c:138
        ret = -1
        t = (struct action *) 0x817eb68
        __FUNCTION__ = "run_action_list"
#11 0x08053457 in do_action (a=0x817ebd0, msg=0x8187a78) at action.c:717
        ret = 1
        v = 1
        to = (union sockaddr_union *) 0x7fffffe6
        p = (struct proxy_l *) 0xffff0208
        tmp = 0x2 <Error reading address 0x2: Bad address>
        new_uri = 0x0
        end = 0x2 <Error reading address 0x2: Bad address>
        crt = 0x0
        len = 135799160
        user = 135798848
        uri = {user = {s = 0x0, len = 131074}, passwd = {s = 0x28136501
"\201Ãó>\002", len = 672538656}, host = {
    s = 0xbfbfea38 "", len = 135609889}, port = {s = 0x1 <Error reading
address 0x1: Bad address>,
    len = 134533494}, params = {s = 0xbace0dd <Error reading address
0xbace0dd: Bad address>, len = 672535040},
  headers = {s = 0x28165020 "°(z\a", len = 1}, port_no = 0, proto = 0, type
= 135609796, transport = {
    s = 0xbace0dd <Error reading address 0xbace0dd: Bad address>, len = 0},
ttl = {s = 0x0, len = 135610334},
  user_param = {s = 0xbfbfe9a8
"!>\025\b\204,\f\b¸:\030\b@\030\b\234z\030\b", len = 135108928}, maddr
= {
    s = 0x8153dc4 "\nVia: SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\n---Type
<return> to continue, or q <return> to quit---
Max-Forwards: 69\r\nContact:
<sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\""..., len = 10}, method = {s = 0x21b <Error reading address
0x21b: Bad address>, len = 135609768}, lr = {
    s = 0x18 <Error reading address 0x18: Bad address>, len = -1077941848},
r2 = {
    s = 0xbfbfe9c8 "(ê¿¿\022Ñ\v\bÅ=\025\bÞ?\025\b\001", len = 134977274},
transport_val = {s = 0x8174940 "",
    len = 135798840}, ttl_val = {
    s = 0x8153e21 "Max-Forwards: 69\r\nContact:
<sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>\r\nFrom:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>;tag=4f9"...,
len = 135015556}, user_param_val = {s = 0x8183ab8 "\001", len = 135798848},
maddr_val = {
    s = 0x8187a9c "\200", len = 0}, method_val = {s = 0x162b6 <Error reading
address 0x162b6: Bad address>,
    len = 0}, lr_val = {s = 0xbfbfea28 "Xê¿¿\213\022\005\bÐë\027\bxz\030\b",
len = 134992146}, r2_val = {
    s = 0x8153dc5 "Via: SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\nMax-Forwards:
69\r\nContact: <sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\"<"..., len = 135610334}}
        next_hop = {user = {s = 0x28318073 "", len = 673599671}, passwd = {
    s = 0x28 <Error reading address 0x28: Bad address>, len = 1}, host = {
    s = 0x4 <Error reading address 0x4: Bad address>, len = -1077942224},
port = {
    s = 0x4 <Error reading address 0x4: Bad address>, len = -1077942221},
params = {
    s = 0x1 <Error reading address 0x1: Bad address>, len = 6}, headers = {
    s = 0x11 <Error reading address 0x11: Bad address>, len = 5}, port_no =
59608, proto = 49087,
  type = 135152302, transport = {
    s = 0x8153e21 "Max-Forwards: 69\r\nContact:
<sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>\r\nFrom:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>;tag=4f9"...,
len = 0}, ttl = {s = 0x84000 <Error reading address 0x84000: Bad address>,
len = 0}, user_param = {
    s = 0x48 <Error reading address 0x48: Bad address>, len = -1077942124},
maddr = {
    s = 0xbfbfe908
"Èé¿¿àÁ\v\bÊ=\025\bÞ?\025\b¸:\030\bø×$(Êy$(äN\025(0]\027(", len =
134977274}, method = {
    s = 0x0, len = 84228784}, lr = {
    s = 0x8153e21 "Max-Forwards: 69\r\nContact:
<sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo---Type
<return> to continue, or q <return> to quit---
: \"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>\r\nFrom:
\"16193200531\"<sip:16193200531 at 216.151.151.19<sip%3A16193200531 at 216.151.151.19>>;tag=4f9"...,
len = 135609882}, r2 = {s = 0x0, len = 135805624}, transport_val = {s =
0x8183ba8 "ë", len = 0}, ttl_val = {
    s = 0x162b6 <Error reading address 0x162b6: Bad address>, len = 0},
user_param_val = {
    s = 0xbfbfe9c8 "(ê¿¿\022Ñ\v\bÅ=\025\bÞ?\025\b\001", len = 134988256},
maddr_val = {
    s = 0x8153dca "SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\nMax-Forwards:
69\r\nContact: <sip:16193200531 at 10.0.1.199:29488;rinstance=cabf0a2b1bd2a29f>\r\nTo:
\"16193200531\"<sip:1"..., len = 135610334}, method_val = {s = 0x8183ab8
"\001", len = 673503224}, lr_val = {
    s = 0x282479ca "TueWedThuFriSat/var/run/nscd", len = 672485092}, r2_val
= {s = 0x28175d30 "", len = 0}}
        u = (struct sip_uri *) 0x8153da9
        port = 2069
        cmatch = 135609889
        aitem = (struct action *) 0x8153fde
        adefault = (struct action *) 0x0
        spec = (pv_spec_t *) 0x0
        model = 0xbfbfea44
        val = {rs = {s = 0x64 <Error reading address 0x64: Bad address>, len
= 110}, ri = 135797348,
  flags = 674332779}
        __FUNCTION__ = "do_action"
#12 0x0805128b in run_action_list (a=0x817cfb0, msg=0x8187a78) at
action.c:138
        ret = 1
        t = (struct action *) 0x817ebd0
        __FUNCTION__ = "run_action_list"
#13 0x08051501 in run_actions (a=0x817cfb0, msg=0x8187a78) at action.c:118
        ret = 134837087
        __FUNCTION__ = "run_actions"
#14 0x080515a2 in run_top_route (a=0x817cfb0, msg=0x8187a78) at action.c:179
        bk_action_flags = 0
---Type <return> to continue, or q <return> to quit---
        bk_rec_lev = 0
        ret = 0
#15 0x08086599 in receive_msg (
    buf=0x8153da0 "REGISTER sip:216.151.151.19 SIP/2.0\r\nVia: SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\nMax-Forwards:
69\r\nContact: <sip:16193200531 at 10.0.1.199:29488;rinstance="..., len=574,
rcv_info=0xbfbfeb1c) at receive.c:165
        msg = (struct sip_msg *) 0x8187a78
        __FUNCTION__ = "receive_msg"
#16 0x080b6609 in udp_rcv_loop () at udp_server.c:449
        len = 574
        tmp = 0x1 <Error reading address 0x1: Bad address>
        from = (union sockaddr_union *) 0x8182018
        fromlen = 16
        ri = {src_ip = {af = 2, len = 4, u = {addrl = {599549252, 0, 90806,
90806}, addr32 = {599549252, 0,
        90806, 90806}, addr16 = {25924, 9148, 0, 0, 25270, 1, 25270, 1},
      addr = "De¼#\000\000\000\000¶b\001\000¶b\001"}}, dst_ip = {af = 2, len
= 4, u = {addrl = {328701912, 0, 0,
        0}, addr32 = {328701912, 0, 0, 0}, addr16 = {38872, 5015, 0, 0, 0,
0, 0, 0},
      addr = "Ø\227\227\023", '\0' <repeats 11 times>}}, src_port = 35844,
dst_port = 5060, proto = 1,
  proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_len = 16
'\020', sa_family = 2 '\002',
      sa_data = "\214\004De¼#\000\000\000\000\000\000\000"}, sin = {sin_len
= 16 '\020', sin_family = 2 '\002',
      sin_port = 1164, sin_addr = {s_addr = 599549252}, sin_zero =
"\000\000\000\000\000\000\000"}, sin6 = {
      sin6_len = 16 '\020', sin6_family = 2 '\002', sin6_port = 1164,
sin6_flowinfo = 599549252, sin6_addr = {
        __u6_addr = {__u6_addr8 = '\0' <repeats 15 times>, __u6_addr16 = {0,
0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {
            0, 0, 0, 0}}}, sin6_scope_id = 0}}, bind_address = 0x8183110}
        buf = "REGISTER sip:216.151.151.19 SIP/2.0\r\nVia: SIP/2.0/UDP
10.0.1.199:29488;branch=z9hG4bK-d8754z-e9df41448d227a59-1---d8754z-;rport\r\nMax-Forwards:
69\r\nContact: <sip:16193200531 at 10.0.1.199:29488;rinstance="...
        __FUNCTION__ = "udp_rcv_loop"
---Type <return> to continue, or q <return> to quit---
#17 0x080634d6 in main_loop () at main.c:693
        i = 322504
        pid = 134863859
        si = (struct socket_info *) 0x28
        chd_rank = 0
        __FUNCTION__ = "main_loop"
#18 0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
        cfg_log_stderr = 0
        cfg_stream = (FILE *) 0x28260e20
        c = -1
        r = 0
        tmp = 0xbfbfed04 "\004"
        tmp_len = 1
        port = 0
        proto = 0
        options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
        ret = -1
        seed = 412982717
        rfd = 4
        __FUNCTION__ = "main"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/devel/attachments/20081202/e13b5d6c/attachment-0001.htm 


More information about the Devel mailing list