Module: sip-router
Branch: master
Commit: c4f7356f2d8c057f59cb61948aa04664cecd35f7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c4f7356…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 30 17:53:44 2014 +0200
core: exit with -1 if there is a mismatch in version of module and core
- return code to shell 0 is like succesful run, some scripts not being
able to say it was a failure to start
---
sr_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sr_module.c b/sr_module.c
index b581635..e1c1797 100644
--- a/sr_module.c
+++ b/sr_module.c
@@ -610,7 +610,7 @@ reload:
}
/* version control */
if (!version_control(handle, path)) {
- exit(0);
+ exit(-1);
}
mod_if_ver = (unsigned *)dlsym(handle,
DLSYM_PREFIX "module_interface_ver");
Module: sip-router
Branch: master
Commit: fad3b2482f98888351f4133f47a433b5bb36c3b7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fad3b24…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 30 17:37:50 2014 +0200
test/unit: README updated with more details about running unit tests
---
test/unit/README | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/test/unit/README b/test/unit/README
index d6735f4..85c5776 100644
--- a/test/unit/README
+++ b/test/unit/README
@@ -1,7 +1,11 @@
+Kamailio Test Unit
+==================
+
This directory contains some small "smoke tests", that should assure that
basic functionality of the server work as required. This tests should consists
of one shell script and a config file if needed. They should not need much time
for execution, to allow the run of the complete test suite in a few seconds.
+
All test scripts must be self-contained, should not have external dependencies
and must clean up after they are run. The second line in each scripts should
contain a small comment that describe the task of the test, it should not
@@ -10,3 +14,18 @@ output any messages on successful runs.
This tests should (in the current state) only run by developers who know
what they do. They could delete your database, produce core dumps that fill
your harddisk or do other nasty things..
+
+Usage
+-----
+
+To execute all unit tests, run:
+
+ make all
+
+To run a specific unit test, run:
+
+ make run UNIT=scripname
+
+Scriptname is the name of shell file to execute, for example:
+
+ make run UNIT=1.sh
Hi,
rtpengine is crashing when it is activated in the branch route.
In normal cases I would do it before relaying the request, but in my
scenario, I am trying to call to two UAs behind NAT, the first one
registered through WS transport, and the other one via TCP.
The caller is a normal softphone, and I am determining what operations
rtpengine needs to do depending on the transport reported by the location
records.
Is there any other (better) way of achieving the same?
Thanks,
Carlos
-----------------------------------------------------------------------------------------------------
*(gdb) bt full*
*#0 str_hash (ss=<optimized out>) at str.c:12*
* x = <optimized out>*
* s = <optimized out>*
* ret = <optimized out>*
* it = {s = <optimized out>, len = 36}*
*#1 0x00007f0bd6b5cd29 in ?? ()*
*No symbol table info available.*
*#2 0x00000000004130aa in call_get (m=0xfc2000, callid=0x7f0bceeef480) at
call.c:2523*
* ret = <optimized out>*
*#3 call_get_opmode (callid=callid@entry=0x7f0bceeef480,
m=m@entry=0xfc2000, opmode=opmode@entry=OP_ANSWER) at call.c:2541*
*No locals.*
*#4 0x0000000000421067 in call_offer_answer_ng
(input=input@entry=0x7f0bc8001f38, m=0xfc2000,
output=output@entry=0x7f0bc8001ed8,*
* opmode=opmode@entry=OP_ANSWER) at call_interfaces.c:591*
* sdp = {*
* s = 0x7f0bceeef772 "v=0\r\no=- 3621027548 3621027549 IN IP4
192.168.3.107\r\ns=pjmedia\r\nc=IN IP4 192.168.3.107\r\nt=0 0\r\nm=audio
4022 RTP/AVP 8 101\r\nc=IN IP4 192.168.3.107\r\na=rtcp:4023 IN IP4
192.168.3.107\r\na=sendrecv\r\na=rtpma"..., len = 267}*
* fromtag = {s = 0x7f0bceeef94e
"35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 13}*
* totag = {s = 0x7f0bceeef966
"vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere", len = 32}*
* callid = {*
* s = 0x7f0bceeef8f5
"d27f350d-c2df-1232-e19b-04011404230113:received-froml3:IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 36}*
* errstr = 0x429c48 "Incomplete SDP specification"*
* parsed = {head = 0x7f0bc8001a00, tail = 0x7f0bc8001a00, length =
1}*
* streams = {head = 0x7f0bc8001c20, tail = 0x7f0bc8001c20, length =
1}*
* call = <optimized out>*
* monologue = <optimized out>*
* ret = <optimized out>*
* flags = {opmode = OP_ANSWER, received_from_family = {*
* s = 0x7f0bceeef92c
"IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 3},*
* received_from_address = {*
* s = 0x7f0bceeef932
"189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 14},*
* media_address = {s = 0x0, len = 0}, transport_protocol_str = {*
* s = 0x7f0bceeef8e2
"RTP/AVP7:call-id36:d27f350d-c2df-1232-e19b-04011404230113:received-froml3:IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 7}, address_family_str = {s = 0x0, len = 0},*
* transport_protocol = 0x427880 <transport_protocols>,
parsed_received_from = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {*
* 0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
parsed_media_address = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>,*
* __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0,
0, 0}}}, direction = {{s = 0x0, len = 0}, {s = 0x0, len = 0}},*
* address_family = 0, tos = 256, asymmetric = 0, trust_address =
-1, replace_origin = -1, replace_sess_conn = -1, ice_remove = -1, ice_force
= 0,*
* ice_force_relay = 0, rtcp_mux_offer = 0, rtcp_mux_demux = 0,
rtcp_mux_accept = 0, rtcp_mux_reject = 0, strict_source = 0, media_handover
= 0}*
* chopper = <optimized out>*
--
Carlos
http://caruizdiaz.com
Hi,
I am currently trying to understand some kamailio code and came across
this construct inside do_forward_reply() function (code in italics is
not part of upstream kamailio):
*do_forward_reply(struct sip_msg* msg, int mode){*
...
...
apply_force_send_socket(&dst, msg);
if (msg_send(&dst, new_buf, new_len)<0)
{
STATS_RPL_FWD_DROP();
goto error;
}
/* ...
dst.send_sock=get_send_socket(msg, &dst.to, dst.proto);
...
run_onsend(msg, &dst, new_buf, new_len);*/
*}*
Is there really a sense in calling run_onsend() after the msg_send()
function? In my understanding (based on onsend_route uasge) run_onsend()
is used to make some last minute changes before a message is sent to a
destination.
Thank you,
Lucian Balaceanu