Hello everyone,
been looking for a way to do sip wildcarded contact matching where
contact could look like <sip:2222..@33.33.33.33:5060>.
Current usrloc module does not implement any such matching, but it seems
there is a new rfc 5947 issued regarding this problem. Maybe someone is
already working on it?
What options do i have in sip-router / kamailio besides LCR based ones ?
I want to do local contact matching as fast as possible and without a
need to reload lcr table.
Antanas Masevicius
NTT
Hello,
On 9/12/11 4:14 PM, neili ma wrote:
> Hello,
>
> Thanks a lot for your advice, I found and solved the problem thanks to
> the debugger, actually the problem was with
>
> modparam("auth_db",
> "db_url","mysql://openser:openserrw@localhost/openser")
>
> I just had to change localhost to my locationserver IP and the problem
> was solved :), thanks again.
good that you find it. Don't forget to cc the mailing list always so
people reading the thread (archive later) see the conclusion -- it can
help many others running on same situation.
Cheers,
Daniel
>
> Sincerely,
> Neili
>
>
> 2011/9/12 Daniel-Constantin Mierla <miconda(a)gmail.com
> <mailto:miconda@gmail.com>>
>
> Hello,
>
> you have another group of actions that can send 401 Unauthorized:
>
>
> if (!check_to()) {
> sl_send_reply("401", "Unauthorized");
> exit;
> }
>
> You can either run with debug=4 and watch the syslog to see some
> hints in messages where it fires this 401, or use debugger module
> with cfgtrace option set and you see the execution path of the
> config in the logs.
>
> If you send here the ngrep of such REGISTER and the reply we can
> spot what could be the situation for 401.
>
> Cheers,
> Daniel
>
>
> On 9/11/11 9:18 PM, neili ma wrote:
>> Hello sr-users,
>>
>> I'm new using kamailio open source, and I would like to ask for help.
>>
>> My version is 3.1.4 and I am trying to configure 3 servers, one
>> with proxy, one with registrar and one with location server.
>>
>> My problem is when I try to send a register message it returns an
>> error "401 Unauthorized", I know the error is in the fuction
>> www_authorize("10.254.239.7", "subscriber") but I don't know how
>> to solve it, for me it seems correct the parameters.
>>
>> Below I have attatched the proxy and registrar relevant route
>> code for my problem, and the IPs for proxy an registrar are:
>> 10.254.239.7-----------10.254.239.8
>>
>> If someone can help me, I will be gratefull. Thanks in advance.
>>
>> ####REGISTRAR CODE
>>
>> route{
>>
>> # initial sanity checks -- too long messages
>> if (msg:len >= 2048 ) {
>> sl_send_reply("513", "Message too big");
>> exit;
>> };
>>
>> if (!uri==myself) {
>> sl_send_reply("400", "Bad destination, only
>> register messages de$
>> exit;
>> };
>>
>> # the only valid message for the registrar is the register
>> message
>> # other messages are answered with an error message
>> if (uri==myself) {
>>
>> if (method=="REGISTER") {
>>
>> sl_send_reply("100", "Trying");
>>
>> if (!www_authorize("10.254.239.7", "subscriber")) {
>> www_challenge("10.254.239.7", "1");
>> exit;
>> };
>>
>> if (!check_to()) {
>> sl_send_reply("401", "Unauthorized");
>> exit;
>> };
>>
>> consume_credentials();
>> if(!save("location")) {
>> sl_reply_error();
>> };
>> exit;
>> } else {
>> sl_send_reply("403", "Forbidden");
>> exit;
>> };
>> };
>> }
>>
>> #########PROXY CODE
>>
>> if (method=="ACK") {
>> route(1);
>> exit;
>> } if (method=="INVITE") {
>> route(3);
>> exit;
>> } else if (method=="REGISTER") {
>> route(2);
>> exit;
>> };
>>
>> lookup("aliases");
>> if (!uri==myself) {
>> route(1);
>> };
>>
>> route[2] {
>> #rewrinting the host allows the registrar to know that the
>> message is de$
>>
>> rewritehost("10.254.239.8");
>> if(!t_relay()) {
>> sl_reply_error();
>> };
>> exit;
>> }
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla --http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin:http://asipto.com/u/kat
> http://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hello all,
I want to log the incoming and outgoing CANCEL on my Kamailio. I tried with
a call of sip_trace in the default route
setflag(22);
if (method == "CANCEL") {
sip_trace();
if (t_check_trans()) {
t_relay();
exit;
}
}
This works great, I get the incoming CANCEL in the Database. But the
outgoing CANCEL is not logged with flag set. So I tried to use onsend_route
with the following lines:
onsend_route {
xlog("L_NOTICE", " SENDING from $si \n $mb \n ");
if ( method == "CANCEL" )
sip_trace();
}
I am using Kamailio Version 3.1.0 (with Patch for Siptrace in onsend_route
by Daniel ).
But the CANCEL is not processed in the onsend_route at all. I do not even
see the xlog-line. But tcpdump gives me the CANCEL outgoing.
Following callflow:
INVITE >
100 <
> INVITE
< 100
< 180
180 <
CANCEL>
> CANCEL
I am missing the last CANCEL.
Why is the CANCEL not logged with flag 22 set?
Why is the CANCEL not processed in the onsend_route?
Greetings
Timo
Hello List,
Can i have UA in the same nat with the box and also UA in different nat at
the same time?
My box is currrently working behind nat with ip 192.168.2.3
and advertised_address is set to sip.mydomain.com
is it possible to append the via header replace the sip.mydomain.com to
192.168.2.3 ?
Thanks,
--
Regards,
MingHon
i started to test sr presence and for some reason sr does not send out
any publish request when i issue one via pua_mi.
i have in route [xmlrpc_requests]:
xlog("L_INFO", "Handling XMLRPC $rm from <$si> with body <$(rb{re.subst,/[\n\r\t]//g})>\n");
set_reply_no_connect();
set_reply_close();
dispatch_rpc();
syslog shows that sr receives xmlrpc request:
Aug 29 19:42:13 sip /usr/sbin/pres-serv[2118]: INFO: Handling XMLRPC
POST from <127.0.0.1> with body <<?xml version='1.0'?><methodCall><methodName>mi</methodName><params><param><value><string>pua_publish</string></value></param><param><value><string>sip:jh@vm.test.fi</string></value></param><param><value><int>7776000</int></value></param><param><value><string>message-summary</string></value></param><param><value><string>application/simple-message-summary</string></value></param><param><value><string>.</string></value></param><param><value><string>a.1313821931.6178.2.0</string></value></param><param><value><string>P-Flags:
0</string></value></param><param><value><string>Messages-Waiting:yesVoice-Message: 1/1 (0/0)</string></value></param></params></methodCall>>
and wireshark shows that sr xmlrpc server responds to it with 200 ok.
but after than nothing happens, i.e., according to wireshark no publish
request is sent out. i have pua and pua_mi modules loaded and outbound
proxy defined:
modparam("pua", "outbound_proxy", "sip:127.0.0.1:5082")
there is no error messages in syslog. any idea why sr does not send
publish to outbound proxy? this used to work with opensips.
-- juha
Hi
Ive been trying to configure kamailio as a loadbalancer between two
transcoders that afterwards send all calls to a softswitch but I
currently have two problems.
My first and most important one is a NAT problem or so I think. All
calls in UDP work perfectly but when dealing with calls in TCP only
outgoing calls work, no incoming calls work. After doing some traces
on the network I realized that the transcoder is trying to reach the
router in front of the softphone and skipping the Kamailio
loadbalancer. The call never reaches the softphone so the phonecall
never completes. In UDP exactly the same thing happens, the call skips
the Kamailio loadbalancer but the call completes perfectly fine.
The other detail has to do with the actual loadbalancing and failover.
I was using the weight distribution and it works great except its
sending the same CSeq to both transcoders and then the softswitch is
receiving it twice and an error pops up at the softphone Ive been
using saying theres a duplicate CSeq. I was using the forward()
command after the dispatcher arguments. I changed it to the t_relay()
and it works as in it doesnt send the same CSeq twice but instead a
unique one to each transcoder so the Softswitch stopped winning but
then the failover doesnt work. Whenever it one goes down its till
trying to reach it. Im using roundrobin in the dispatcher config
because I noticed it doesnt send stuff to both transcoders but only to
the transcoder its going to actually use. I started to read that for
failover I need the user_avp module which I didnt install but then I
wonder how come failover worked before?
Thanks for your help
Cheers
David
Hello sr-users,
I'm new using kamailio open source, and I would like to ask for help.
My version is 3.1.4 and I am trying to configure 3 servers, one with proxy,
one with registrar and one with location server.
My problem is when I try to send a register message it returns an error "401
Unauthorized", I know the error is in the fuction
www_authorize("10.254.239.7", "subscriber") but I don't know how to solve
it, for me it seems correct the parameters.
Below I have attatched the proxy and registrar relevant route code for my
problem, and the IPs for proxy an registrar are:
10.254.239.7-----------10.254.239.8
If someone can help me, I will be gratefull. Thanks in advance.
####REGISTRAR CODE
route{
# initial sanity checks -- too long messages
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
if (!uri==myself) {
sl_send_reply("400", "Bad destination, only register messages
de$
exit;
};
# the only valid message for the registrar is the register message
# other messages are answered with an error message
if (uri==myself) {
if (method=="REGISTER") {
sl_send_reply("100", "Trying");
if (!www_authorize("10.254.239.7", "subscriber")) {
www_challenge("10.254.239.7", "1");
exit;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
exit;
};
consume_credentials();
if(!save("location")) {
sl_reply_error();
};
exit;
} else {
sl_send_reply("403", "Forbidden");
exit;
};
};
}
#########PROXY CODE
if (method=="ACK") {
route(1);
exit;
} if (method=="INVITE") {
route(3);
exit;
} else if (method=="REGISTER") {
route(2);
exit;
};
lookup("aliases");
if (!uri==myself) {
route(1);
};
route[2] {
#rewrinting the host allows the registrar to know that the message is
de$
rewritehost("10.254.239.8");
if(!t_relay()) {
sl_reply_error();
};
exit;
}
Hello,
try to keep the mailing list cc-ed -- others may be able to help you
faster or this discussion will be helpful for different people.
The username_spec and password_spec were removed indeed, the first was
useless since the username was taken from auth header and the second
became parameter to pv_www_authenticate, see:
http://kamailio.org/docs/modules/3.1.x/modules/auth.html#pv_www_authenticate
You simply have to use something like:
if (!pv_www_authenticate("$td", "$var(password)", "0")) {
www_challenge("$td", "0");
exit;
}
Cheers,
Daniel
On 9/10/11 12:51 PM, Khoa Phuong Viet Ngo wrote:
> Hi Daniel,
>
> Thanks Daniel for your answer.
>
> It's very helpful for me :).
>
> Actually i tried with using kamailio 3.1.4 (lastest kamailio) but i
> got the problem with auth module and parameter with auth module.
> Because some parameters at auth module have changed.
> http://kamailio.org/docs/modules/stable/modules/auth.html [3.1.4]
>
> But in 3.0.4 kamailio, i am using auth module with these parameter and
> it had error with new kamailio (3.1.4) . :(
>
> kamailio.cfg
>
> ########################################################
> loadmodule auth.so
>
> # ----- auth params -----
> modparam("auth", "username_spec", "$var(username)")
> modparam("auth", "password_spec", "$var(password)")
> modparam("auth", "calculate_ha1", 1)
>
> route[AUTH] {
> $var(utype) = 0;
> #!ifdef WITH_AUTH
> if (is_method("REGISTER"))
> {
> if(is_present_hf("Authorization"))
> {
> # authenticate the REGISTER requests (uncomment to enable
> auth)
> if(!route(GETPASSWD))
> {
> www_challenge("", "0");
> exit;
> }
> if(!pv_www_authorize(""))
> {
> www_challenge(""/*realm*/,"0"/*qop*/);
> exit;
> }
> } else {
> www_challenge("", "0");
> exit;
> }
> } else {
> $var(srcgrp) = allow_source_address_group();
> if ($var(srcgrp) > 0) {
> # src ip allowed
> $var(utype) = 1;
> if($var(srcgrp)!=100)
> {
> $rd = $Ri;
> $fs = "udp:" + $Ri + ":5062";
> }
> return 1;
> }
> # authenticate if from local subscriber (uncomment to enable auth)
> if (from_uri==myself)
> {
> if(is_present_hf("Proxy-Authorization"))
> {
> # authenticate the non-REGISTER requests (uncomment to
> enable auth)
> if(!route(GETPASSWD))
> {
> proxy_challenge("", "0");
> exit;
> }
> if(!pv_proxy_authorize(""))
> {
> proxy_challenge(""/*realm*/,"0"/*qop*/);
> exit;
> }
> } else {
> proxy_challenge("", "0");
> exit;
> }
> $var(utype) = 2;
> consume_credentials();
> # caller authenticated
> }
> }
> #!endif
> return;
> }
>
> #####################################################
>
> Error logs:
>
> Sep 6 19:37:01 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <username_spec> not found in module <auth>
> Sep 6 19:37:01 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 260, column
> 51: Can't set module parameter
> Sep 6 19:37:01 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <password_spec> not found in module <auth>
> Sep 6 19:37:01 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 261, column
> 51: Can't set module parameter
> Sep 6 19:37:01 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <calculate_ha1> not found in module <auth>
> Sep 6 19:37:01 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 262, column
> 36: Can't set module parameter
> Sep 6 19:37:01 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 562, column
> 27: unknown command, missing loadmodule?
> Sep 6 19:37:01 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 594, column
> 30: unknown command, missing loadmodule?
> Sep 6 19:37:39 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <username_spec> not found in module <auth>
> Sep 6 19:37:39 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 260, column
> 51: Can't set module parameter
> Sep 6 19:37:39 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <password_spec> not found in module <auth>
> Sep 6 19:37:39 CorePBX kamailio: : <core> [cfg.y:3419]: parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 261, column
> 51: Can't set module parameter
> Sep 6 19:37:39 CorePBX kamailio: ERROR: <core> [modparam.c:150]:
> set_mod_param_regex: parameter <calculate_ha1> not found in module <auth>
>
> ########################################################
>
> I appreciate all your help on this case.
>
> Thanks Daniel,
> KhoaNVP
>
>
>
>
> On Sat, Sep 10, 2011 at 1:58 PM, Daniel-Constantin Mierla
> <miconda(a)gmail.com <mailto:miconda@gmail.com>> wrote:
>
> Hello,
>
> it seems like a buffer overflow happened previously, since the
> crash is in malloc. Do you get any error messages is syslog? Can
> you recompile with QM_DBG_MALLOC like explained in the next link
> and try again watching the syslog messages?
> http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory
>
> On another hand, 3.0.4 is quite old, why are not using 3.1.4, it
> is far more updated than 3.0 series -- we are just to release
> first in 3.2 series. Upgrading from 3.0 to 3.1 is rather trivial.
>
> Cheers,
> Daniel
>
>
> On 9/9/11 8:38 PM, KhoaNVP wrote:
>
> Hi everyone,
>
> I hope you can help me with this issues.
> I'm working with kamailio 3.0.4 and when i implement the call
> via kamailio
> after 1-->3 mins , kamailio is crashed.
>
> It's my debug from core log.
>
> Core was generated by `kamailio -E -ddd'.
> Program terminated with signal 11, Segmentation fault.
> #0 fm_malloc (qm=0x88c860, size=<value optimized out>) at
> mem/f_malloc.c:382
> 382 *f=frag->u.nxt_free;
> (gdb) qt
> Undefined command: "qt". Try "help".
> (gdb) bt
> #0 fm_malloc (qm=0x88c860, size=<value optimized out>) at
> mem/f_malloc.c:382
> #1 0x000000000041fd27 in dup_lump_list_r (l=0x9275f8,
> dir=LD_AFTER,
> error=0x7fff23bd661c) at data_lump.c:453
> #2 0x000000000041ffa9 in dup_lump_list_r (l=0x927640,
> dir=LD_AFTER,
> error=0x7fff23bd666c) at data_lump.c:476
> #3 0x000000000041ff6d in dup_lump_list_r (l=0x926db0,
> dir=<value optimized
> out>, error=0x7fff23bd66b4) at data_lump.c:465
> #4 0x0000000000420058 in dup_lump_list (l=0x88c860) at
> data_lump.c:508
> #5 0x00002b8b2efb858d in prepare_new_uac (t=0x2b8b3218ffa8,
> i_req=0x926ef0,
> branch=0, uri=0x927150, path=0x9274d0, next_hop=<value
> optimized out>,
> fsocket=0x0, snd_flags=0 '\000', fproto=0, flags=0) at
> t_fwd.c:242
> #6 0x00002b8b2efb94c7 in add_uac (t=0x2b8b3218ffa8,
> request=0x926ef0,
> uri=0x927150, next_hop=0x7, path=0x9274d0, proxy=0x0, fsocket=0x0,
> snd_flags=0 '\000', proto=0, flags=0) at t_fwd.c:679
> #7 0x00002b8b2efbce7a in t_forward_nonack (t=0x2b8b3218ffa8,
> p_msg=0x926ef0, proxy=0x0, proto=0) at t_fwd.c:1340
> #8 0x00002b8b2efb4996 in t_relay_to (p_msg=0x926ef0,
> proxy=0x0, proto=0,
> replicate=0) at t_funcs.c:358
> #9 0x0000000000413489 in do_action (h=0x7fff23bd71e0, a=0x8be788,
> msg=0x926ef0) at action.c:860
> #10 0x0000000000415e03 in run_actions (h=0x7fff23bd71e0,
> a=0x8be788,
> msg=0x926ef0) at action.c:1315
> #11 0x00000000004161e7 in run_actions_safe (h=0x7fff23bd8bb0,
> a=0x38,
> msg=0x88ca08) at action.c:1370
> #12 0x000000000049696b in rval_get_int (h=0x7fff23bd8bb0,
> msg=0x88ca08,
> i=0x7fff23bd75dc, rv=0x7, cache=0x7) at rvalue.c:897
> #13 0x000000000049b7fc in rval_expr_eval_int (h=0x7fff23bd8bb0,
> msg=0x926ef0, res=0x7fff23bd75dc, rve=0x8be878) at rvalue.c:1841
> #14 0x000000000049b8ad in rval_expr_eval_int (h=0x7fff23bd8bb0,
> msg=0x926ef0, res=0x7fff23bd79d8, rve=0x8bef48) at rvalue.c:1848
> #15 0x0000000000411d49 in do_action (h=0x7fff23bd8bb0, a=0x8bf798,
> msg=0x926ef0) at action.c:834
> #16 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0,
> a=0x8be608,
> msg=0x926ef0) at action.c:1315
> #17 0x0000000000413084 in do_action (h=0x7fff23bd8bb0, a=0x8f6060,
> msg=0x926ef0) at action.c:479
> #18 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0,
> a=0x8f6060,
> msg=0x926ef0) at action.c:1315
> #19 0x0000000000411dab in do_action (h=0x7fff23bd8bb0, a=0x8f62d0,
> msg=0x926ef0) at action.c:853
> #20 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0,
> a=0x8f62d0,
> msg=0x926ef0) at action.c:1315
> #21 0x0000000000413084 in do_action (h=0x7fff23bd8bb0, a=0x8bd698,
> msg=0x926ef0) at action.c:479
> #22 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0,
> a=0x8bd398,
> msg=0x926ef0) at action.c:1315
> #23 0x0000000000411dab in do_action (h=0x7fff23bd8bb0, a=0x8bd788,
> msg=0x926ef0) at action.c:853
> #24 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0,
> a=0x8a1340,
> msg=0x926ef0) at action.c:1315
> #25 0x0000000000416174 in run_top_route (a=0x8a1340,
> msg=0x926ef0, c=<value
> optimized out>) at action.c:1391
> #26 0x000000000048009c in receive_msg (buf=0x57e779 "DEBUG",
> len=<value
> optimized out>, rcv_info=0x7fff23bd8e20) at receive.c:196
> #27 0x000000000050698b in udp_rcv_loop () at udp_server.c:520
> #28 0x0000000000455e2f in main_loop () at main.c:1447
> #29 0x0000000000456f32 in main (argc=<value optimized out>,
> argv=0x7fff23bd90e8) at main.c:2251
> (gdb)
>
>
> Thanks with all the help,
> Khoa
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
> http://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi everyone,
I hope you can help me with this issues.
I'm working with kamailio 3.0.4 and when i implement the call via kamailio
after 1-->3 mins , kamailio is crashed.
It's my debug from core log.
Core was generated by `kamailio -E -ddd'.
Program terminated with signal 11, Segmentation fault.
#0 fm_malloc (qm=0x88c860, size=<value optimized out>) at
mem/f_malloc.c:382
382 *f=frag->u.nxt_free;
(gdb) qt
Undefined command: "qt". Try "help".
(gdb) bt
#0 fm_malloc (qm=0x88c860, size=<value optimized out>) at
mem/f_malloc.c:382
#1 0x000000000041fd27 in dup_lump_list_r (l=0x9275f8, dir=LD_AFTER,
error=0x7fff23bd661c) at data_lump.c:453
#2 0x000000000041ffa9 in dup_lump_list_r (l=0x927640, dir=LD_AFTER,
error=0x7fff23bd666c) at data_lump.c:476
#3 0x000000000041ff6d in dup_lump_list_r (l=0x926db0, dir=<value optimized
out>, error=0x7fff23bd66b4) at data_lump.c:465
#4 0x0000000000420058 in dup_lump_list (l=0x88c860) at data_lump.c:508
#5 0x00002b8b2efb858d in prepare_new_uac (t=0x2b8b3218ffa8, i_req=0x926ef0,
branch=0, uri=0x927150, path=0x9274d0, next_hop=<value optimized out>,
fsocket=0x0, snd_flags=0 '\000', fproto=0, flags=0) at t_fwd.c:242
#6 0x00002b8b2efb94c7 in add_uac (t=0x2b8b3218ffa8, request=0x926ef0,
uri=0x927150, next_hop=0x7, path=0x9274d0, proxy=0x0, fsocket=0x0,
snd_flags=0 '\000', proto=0, flags=0) at t_fwd.c:679
#7 0x00002b8b2efbce7a in t_forward_nonack (t=0x2b8b3218ffa8,
p_msg=0x926ef0, proxy=0x0, proto=0) at t_fwd.c:1340
#8 0x00002b8b2efb4996 in t_relay_to (p_msg=0x926ef0, proxy=0x0, proto=0,
replicate=0) at t_funcs.c:358
#9 0x0000000000413489 in do_action (h=0x7fff23bd71e0, a=0x8be788,
msg=0x926ef0) at action.c:860
#10 0x0000000000415e03 in run_actions (h=0x7fff23bd71e0, a=0x8be788,
msg=0x926ef0) at action.c:1315
#11 0x00000000004161e7 in run_actions_safe (h=0x7fff23bd8bb0, a=0x38,
msg=0x88ca08) at action.c:1370
#12 0x000000000049696b in rval_get_int (h=0x7fff23bd8bb0, msg=0x88ca08,
i=0x7fff23bd75dc, rv=0x7, cache=0x7) at rvalue.c:897
#13 0x000000000049b7fc in rval_expr_eval_int (h=0x7fff23bd8bb0,
msg=0x926ef0, res=0x7fff23bd75dc, rve=0x8be878) at rvalue.c:1841
#14 0x000000000049b8ad in rval_expr_eval_int (h=0x7fff23bd8bb0,
msg=0x926ef0, res=0x7fff23bd79d8, rve=0x8bef48) at rvalue.c:1848
#15 0x0000000000411d49 in do_action (h=0x7fff23bd8bb0, a=0x8bf798,
msg=0x926ef0) at action.c:834
#16 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0, a=0x8be608,
msg=0x926ef0) at action.c:1315
#17 0x0000000000413084 in do_action (h=0x7fff23bd8bb0, a=0x8f6060,
msg=0x926ef0) at action.c:479
#18 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0, a=0x8f6060,
msg=0x926ef0) at action.c:1315
#19 0x0000000000411dab in do_action (h=0x7fff23bd8bb0, a=0x8f62d0,
msg=0x926ef0) at action.c:853
#20 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0, a=0x8f62d0,
msg=0x926ef0) at action.c:1315
#21 0x0000000000413084 in do_action (h=0x7fff23bd8bb0, a=0x8bd698,
msg=0x926ef0) at action.c:479
#22 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0, a=0x8bd398,
msg=0x926ef0) at action.c:1315
#23 0x0000000000411dab in do_action (h=0x7fff23bd8bb0, a=0x8bd788,
msg=0x926ef0) at action.c:853
#24 0x0000000000415e03 in run_actions (h=0x7fff23bd8bb0, a=0x8a1340,
msg=0x926ef0) at action.c:1315
#25 0x0000000000416174 in run_top_route (a=0x8a1340, msg=0x926ef0, c=<value
optimized out>) at action.c:1391
#26 0x000000000048009c in receive_msg (buf=0x57e779 "DEBUG", len=<value
optimized out>, rcv_info=0x7fff23bd8e20) at receive.c:196
#27 0x000000000050698b in udp_rcv_loop () at udp_server.c:520
#28 0x0000000000455e2f in main_loop () at main.c:1447
#29 0x0000000000456f32 in main (argc=<value optimized out>,
argv=0x7fff23bd90e8) at main.c:2251
(gdb)
Thanks with all the help,
Khoa
--
View this message in context: http://old.nabble.com/Kamailio-3.0.4-is-crashed-tp32433892p32433892.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.
Hello.
I'm currently developing an OpenSER module which does some business logic
for the company I work for. For compatibility reasons we are working
with openser-1.2.2-tls and we haven't been able to upgrade to newer version
yet.
In one block of the code I have to read an avp which is written inside the
openser.cfg script using:
OPENSER:
avp_copy("sip:123@123.123.123:5060", "$avp(s:selectedroute)/g");
C CODE:
if (is_response && is_invite_seq)
{
struct usr_avp* destavp = NULL;
int_str destval;
const str selected_route = { "selectedroute", 13 };
int attempts = 1, max_attempts = 3;
for ( destavp = search_first_avp(AVP_NAME_STR | AVP_VAL_STR, (int_str)
selected_route, NULL, 0); destavp != NULL; destavp =
search_next_avp(destavp, NULL) ) { get_avp_val(destavp, &destval); }
}
The problem is that "selectedroute" avp cannot be found so I can't read its
value. This happens sporadically and most of the time the code works just
fine.
I also checked for the list of available AVPs using get_avp_list() but it
reports an empty list.
Is there another way to read AVPs or is there something I'm missing which is
causing this problem?
Any help will be appreciated.
Thanks in advance!
Carlos.