no segfault if i use the 3 parameter invocation of get_profile_size(), flagging the profile as "with value" and passing a static value to get_profile_size() and set_dlg_profile()<br><br><div class="gmail_quote">
On Wed, Oct 27, 2010 at 12:07 PM, Eugene Oden <span dir="ltr"><<a href="mailto:eugeneoden%2Blist@gmail.com">eugeneoden+list@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
one more clue:<div><br></div><div><div class="im"><div>767 if(sp_dest->setf(msg, &sp_dest->pvp, (int)EQ_T, &val)<0)</div></div><div>(gdb) p sp_dest->setf</div><div>$1 = (pv_setf_t) 0xffffffff</div>
<div><div></div><div class="h5"><div><br></div>
<br><div class="gmail_quote">On Wed, Oct 27, 2010 at 11:38 AM, Eugene Oden <span dir="ltr"><<a href="mailto:eugeneoden%2Blist@gmail.com" target="_blank" class="vt-p">eugeneoden+list@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hello,<div><br></div><div>just started using the dialog module with kamailio 3.1.0 and getting segfaults whenever get_profile_size() is executed. here's a stack trace:</div><div><br></div><div><div>Core was generated by `kamailio'.</div>
<div>Program terminated with signal 11, Segmentation fault.</div><div>#0 0x003c729e in w_get_profile_size (msg=0x834d8b4, profile=0xb60823f8 "\224$\b\266\t", value=0x831cb40 "\004", </div><div> result=0x8340900 "\001") at dialog.c:767</div>
<div>767 if(sp_dest->setf(msg, &sp_dest->pvp, (int)EQ_T, &val)<0)</div><div>(gdb) bt</div><div>#0 0x003c729e in w_get_profile_size (msg=0x834d8b4, profile=0xb60823f8 "\224$\b\266\t", value=0x831cb40 "\004", </div>
<div> result=0x8340900 "\001") at dialog.c:767</div><div>#1 0x08057770 in do_action (h=0xbff5fcb8, a=0x8328f2c, msg=0x834d8b4) at action.c:1105</div><div>#2 0x0805ea3c in run_actions (h=0xbff5fcb8, a=0x8328f2c, msg=0x834d8b4) at action.c:1553</div>
<div>#3 0x080576c0 in do_action (h=0xbff5fcb8, a=0x832c794, msg=0x834d8b4) at action.c:711</div><div>#4 0x0805ea3c in run_actions (h=0xbff5fcb8, a=0x832c794, msg=0x834d8b4) at action.c:1553</div><div>#5 0x0805ed71 in run_actions_safe (h=0xbff606e8, a=0x832c794, msg=0x834d8b4) at action.c:1605</div>
<div>#6 0x080f5d44 in rval_get_int (h=0xbff606e8, msg=0x0, i=0xbff600d8, rv=0xbff5f694, cache=0x0) at rvalue.c:904</div><div>#7 0x080fb4fb in rval_expr_eval_int (h=0xbff606e8, msg=0x834d8b4, res=0xbff600d8, rve=0x832c9c4) at rvalue.c:1866</div>
<div>#8 0x080fb5d0 in rval_expr_eval_int (h=0xbff606e8, msg=0x834d8b4, res=0xbff60394, rve=0x832cdac) at rvalue.c:1873</div><div>#9 0x08057511 in do_action (h=0xbff606e8, a=0x832db7c, msg=0x834d8b4) at action.c:1069</div>
<div>#10 0x0805ea3c in run_actions (h=0xbff606e8, a=0x832be40, msg=0x834d8b4) at action.c:1553</div><div>#11 0x080576c0 in do_action (h=0xbff606e8, a=0x8313b88, msg=0x834d8b4) at action.c:711</div><div>#12 0x0805ea3c in run_actions (h=0xbff606e8, a=0x83003cc, msg=0x834d8b4) at action.c:1553</div>
<div>#13 0x0805ecf4 in run_top_route (a=0x83003cc, msg=0x834d8b4, c=0x0) at action.c:1626</div><div>#14 0x080dceab in receive_msg (</div><div> buf=0x82a7740 "INVITE sip:*<a href="mailto:98@pipeline.bbpsphone.net" target="_blank" class="vt-p">98@pipeline.bbpsphone.net</a> SIP/2.0\r\nCall-ID: 6fb1466b73075c7ad55f278f86ff6b27@0:0:0:0:0:0:0:0\r\nCSeq: 2 INVITE\r\nFrom: \"Eugene Oden\" <<a href="mailto:sip%3Agoden.atl1@pipeline.bbpsphone.net" target="_blank" class="vt-p">sip:goden.atl1@pipeline.bbpsphone.net</a>>;tag=56dc2460\r\nTo: "..., len=1538, rcv_info=0xbff608f8)</div>
<div> at receive.c:205</div><div>#15 0x0816eef7 in udp_rcv_loop () at udp_server.c:532</div><div>#16 0x080ad9e1 in main_loop () at main.c:1554</div><div>#17 0x080b1126 in main (argc=1, argv=0xbff60bd4) at main.c:2398</div>
</div><div><br></div><div>and the relevant bits of configuration - not sure if its correct:</div><div><br></div><div>...</div><div><br></div><div><div><div>loadmodule "dialog.so"</div><div>modparam("dialog", "dlg_flag", 4);</div>
<div>modparam("dialog", "profiles_no_value", "voicemail");</div><div><br></div><div>...</div><div><br></div><div>route {</div><div> ...</div><div><br></div><div> if (is_method("INVITE")) {</div>
<div> dlg_manage();</div><div> setflag(4);</div><div> }</div><div><br></div><div> ...</div><div><br></div><div> if (! route(LIMIT_VOICEMAIL)) {</div><div> xdbg(" SCRIPT: Voicemail limit exceeded\n");</div>
<div> sl_send_reply("503", "Service Unavailable");</div><div> exit;</div><div> }</div><div><br></div><div> ...</div><div>}</div><div><br></div><div>...</div><div><br></div><div>route[LIMIT_VOICEMAIL] {</div>
<div> get_profile_size("voicemail", "$avp(size)");</div><div> if ($avp(size) >= 1) {</div><div> return -1;</div><div> }</div><div><br></div><div> set_dlg_profile("voicemail");</div>
<div><br></div><div> return 1;</div><div>}</div></div></div><div><br></div><div><br></div><div>any thoughts?</div><div><br></div><div>gene</div>
</blockquote></div><br></div></div></div>
</blockquote></div><br>