#10 dialog profiles causes core dump in opensips 1.4.1

1.4.x
closed-fixed
modules (454)
8
2008-08-30
2008-08-20
Anonymous
No

I can be reached at rrevels@bsltech.net

backtrace:

Core was generated by `/usr/local/opensips/sbin/opensips -f /usr/local/opensips/etc/opensips/opensips.'.
Program terminated with signal 11, Segmentation fault.
#0 0x003ba645 in get_profile_size (profile=0xb6091548, value=0xbfec0b1c) at dlg_profile.c:530
530 if ( value->len==ph->value.len &&
(gdb) bt
#0 0x003ba645 in get_profile_size (profile=0xb6091548, value=0xbfec0b1c) at dlg_profile.c:530
#1 0x003a5665 in w_get_profile_size (msg=0x81b2b38, profile=0xb6091548 "?\025\t?\004", value=0x81a6690 "\030g\032\b", result=0x81a66d0 "\004") at dialog.c:638
#2 0x08052fa6 in do_action (a=0x81a6828, msg=0x81b2b38) at action.c:845
#3 0x08055819 in run_action_list (a=0x81a3298, msg=0x81b2b38) at action.c:138
#4 0x08054088 in do_action (a=0x81a2060, msg=0x81b2b38) at action.c:118
#5 0x08055819 in run_action_list (a=0x81a2060, msg=0x81b2b38) at action.c:138
#6 0x080544c5 in do_action (a=0x81a2130, msg=0x81b2b38) at action.c:717
#7 0x08055819 in run_action_list (a=0x81a2130, msg=0x81b2b38) at action.c:138
#8 0x080544c5 in do_action (a=0x81a2198, msg=0x81b2b38) at action.c:717
#9 0x08055819 in run_action_list (a=0x81a2198, msg=0x81b2b38) at action.c:138
#10 0x080544c5 in do_action (a=0x81a2268, msg=0x81b2b38) at action.c:717
#11 0x08055819 in run_action_list (a=0x81a2268, msg=0x81b2b38) at action.c:138
#12 0x080544c5 in do_action (a=0x81a22d0, msg=0x81b2b38) at action.c:717
#13 0x08055819 in run_action_list (a=0x81a1c20, msg=0x81b2b38) at action.c:138
#14 0x08054c58 in do_action (a=0x81a23a0, msg=0x81b2b38) at action.c:823
#15 0x08055819 in run_action_list (a=0x81a0880, msg=0x81b2b38) at action.c:138
#16 0x08055bb3 in run_top_route (a=0x81a0880, msg=0x81b2b38) at action.c:118
#17 0x08094f59 in receive_msg (
buf=0x81790c0 "INVITE sip:+18664358926@216.xx.xxx.xx:5060 SIP/2.0\r\nRecord-Route: <sip:216.xx.xxx.xx;lr;ftag=as0e08acc2;vsf=", 'A' <repeats 40 times>, "O2lzdXAtb2xpPTI5>\r\nVia: SIP/2.0/UDP 216.xx.xxx.xx;br"..., len=1161, rcv_info=0xbfec1ee4) at receive.c:165
#18 0x080d7a87 in udp_rcv_loop () at udp_server.c:449
#19 0x0806d5ce in main (argc=7, argv=0xbfec20d4) at main.c:780

script file:

route[16]
{
#load all properties associated with customer uuid picked up at proxy1
if(is_present_hf("X-CustomerUUID"))
{
$var(link)=$hdr(X-CustomerUUID);
avp_db_load("$var(link)", "a");
if (isflagset(1))
xlog("L_INFO", "Customer Header set to $var(link) for call $ci\n");
}
else
{
if (isflagset(1))
xlog("L_INFO", "Did not find Customer Header for call $ci\n");
sl_send_reply("404", "Non Authorized Host (Header)");
return;
}

#Next check to make sure call is coming from a corporate proxy
#tag 1 came from inbound proxy. tag 2 came from outbound proxy
$var(origproxy)=$(avp(i:707){s.select,1,?});
if (isflagset(1))
xlog("L_INFO", "The trusted tag is set with link value of $var(origproxy) for call $ci\n");

switch( $var(origproxy) )
{
case "1":
get_profile_size("inbound", "$var(link)", "$avp(s:inbound_calls)");
if (isflagset(1))
xlog("L_INFO", "Current number of inbound calls is $avp(s:inbound_calls) for call $ci\n");
if( is_avp_set( "$avp(s:concurrency_in)/s") )
{
if( $(avp(s:inbound_calls)) < $(avp(s:concurrency_in)) )
{
setflag(6);
set_dlg_profile("inbound","$var(link)");
ds_select_domain( "3", "99" );
t_on_failure("3");
route(5);
return;
}
if (isflagset(1))
xlog("L_INFO", "Inbound concurrency set at $avp(s:concurrency_in) and inbound calls at $avp(s:inbound_calls) for call $ci\n");
}
break;

case "2":
get_profile_size("outbound", "$var(link)", "$avp(s:outbound_calls)");
if (isflagset(1))
xlog("L_INFO", "Current number of outbound calls is $avp(s:outbound_calls) for call $ci\n");
if( is_avp_set( "$avp(s:concurrency_out)/s") )
{
if( $(avp(s:outbound_calls)) < $(avp(s:concurrency_out)) )
{
setflag(6);
set_dlg_profile("outbound","$var(link)");
if (isflagset(1))
xlog("L_INFO", "Outbound concurrency set at $avp(s:concurrency_out) and outbound calls at $avp(s:outbound_calls) for call $ru\n");
ds_select_domain( "3", "99" );
t_on_failure("3");
route(5);
return;
}
}
break;

default:
sl_send_reply("404", "Non Authorized Host (IP)");
return;
}

get_profile_size("both", "$var(link)", "$avp(s:both_calls)");
if (isflagset(1))
xlog("L_INFO", "Current number of both calls is $avp(s:both_calls) for call $ci\n");

if( is_avp_set( "$avp(s:concurrency_both)/s") )
{
if( $(avp(s:both_calls){s.int}) < $(avp(s:concurrency_both){s.int}) )
{
setflag(6);
set_dlg_profile("both","$var(link)");
if (isflagset(1))
xlog("L_INFO", "Outbound concurrency set at $avp(s:concurrency_both) and both calls at $avp(s:both_calls) for call $ci\n");
ds_select_domain( "3", "99" );
t_on_failure("3");
route(5);
return;
}
}
if (isflagset(1))
xlog("L_INFO", "Rejecting customer call for concurrency $ci\n");
sl_send_reply("603", "Concurrency Level reached");
return;
}

Discussion

  • Bogdan-Andrei Iancu

    • priority: 5 --> 7
    • assigned_to: nobody --> bogdan_iancu
     
  • Bogdan-Andrei Iancu

    Logged In: YES
    user_id=1275325
    Originator: NO

    Status update:

    got access to the core file and debugging goes offline.

    Bogdan

     
  • Bogdan-Andrei Iancu

    • priority: 7 --> 8
     
  • Bogdan-Andrei Iancu

    Logged In: YES
    user_id=1275325
    Originator: NO

    Fixed!

     
  • Bogdan-Andrei Iancu

    • milestone: --> 1.4.x
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks