<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi,<br>
<br>
You can use the script_trace() function :<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-1#toc43">http://www.opensips.org/Documentation/Script-CoreFunctions-2-1#toc43</a><br>
to trace the executions through your script.<br>
<br>
Place this function first thing in your script and check the its
output for your OPTIONS.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 10.05.2016 17:26, Nduwayezu,
Joselyne wrote:<br>
</div>
<blockquote
cite="mid:CAFSzUtZ3CUteYert+XBUG_sjPHuVgtOUjQMM-Ypih36YsuLUdg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>hello Bogdan,</div>
<div><br>
</div>
<div>How can i do to check the logs to see if the script
execution really gets to the siptrace part ?All what i've
done, i use ngrep to capture packets when i send sipsak and
this is what i get on both servers:</div>
<div><br>
</div>
<div>Server 10.0.0.5 gives:<br>
.</div>
<div><br>
U 2016/05/10 13:57:12.402720 <a moz-do-not-send="true"
href="http://10.0.0.5:47413">10.0.0.5:47413</a> -> <a
moz-do-not-send="true" href="http://10.0.0.4:5060">10.0.0.4:5060</a><br>
OPTIONS <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>
SIP/2.0.<br>
Via: SIP/2.0/UDP
10.0.0.5:47413;branch=z9hG4bK.3fc50b66;rport;alias.<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:sip:sipsak@10.0.0.5:47413;tag=4c5c78b9">sip:sipsak@10.0.0.5:47413;tag=4c5c78b9</a>.<br>
To: <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>.<br>
Call-ID: <a moz-do-not-send="true"
href="mailto:1281128633@10.0.0.5">1281128633@10.0.0.5</a>.<br>
CSeq: 1 OPTIONS.<br>
Contact: <a moz-do-not-send="true"
href="http://sip:sipsak@10.0.0.5:47413">sip:sipsak@10.0.0.5:47413</a>.<br>
Content-Length: 0.<br>
Max-Forwards: 70.<br>
User-Agent: sipsak 0.9.6.<br>
Accept: text/plain.<br>
.</div>
<div><br>
U 2016/05/10 13:57:12.405823 <a moz-do-not-send="true"
href="http://10.0.0.4:5060">10.0.0.4:5060</a> -> <a
moz-do-not-send="true" href="http://10.0.0.5:47413">10.0.0.5:47413</a><br>
SIP/2.0 <strong><font style="background-color:rgb(255,0,0)">500
Service full.</font></strong><br>
Via: SIP/2.0/UDP
10.0.0.5:47413;received=10.0.0.5;branch=z9hG4bK.3fc50b66;rport=47413;alias.<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:sip:sipsak@10.0.0.5:47413;tag=4c5c78b9">sip:sipsak@10.0.0.5:47413;tag=4c5c78b9</a>.<br>
To: <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>;tag=61890dad1e908c702027bf054a266115.c3bd.<br>
Call-ID: <a moz-do-not-send="true"
href="mailto:1281128633@10.0.0.5">1281128633@10.0.0.5</a>.<br>
CSeq: 1 OPTIONS.<br>
Server: OpenSIPS (2.1.2 (x86_64/linux)).<br>
Content-Length: 0.<br>
.</div>
<div><br>
</div>
<div>Server 10.0.0.4 gives:</div>
<div><br>
</div>
<div><br>
root@front-1:/etc/opensips# ngrep -d eth0 -t -W byline "$1"
port 5060 -q<br>
interface: eth0 (<a moz-do-not-send="true"
href="http://10.0.0.0/255.255.255.0">10.0.0.0/255.255.255.0</a>)<br>
filter: (ip or ip6) and ( port 5060 )</div>
<div>U 2016/05/10 13:57:12.406208 <a moz-do-not-send="true"
href="http://10.0.0.5:47413">10.0.0.5:47413</a> -> <a
moz-do-not-send="true" href="http://10.0.0.4:5060">10.0.0.4:5060</a><br>
OPTIONS <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>
SIP/2.0.<br>
Via: SIP/2.0/UDP
10.0.0.5:47413;branch=z9hG4bK.3fc50b66;rport;alias.<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:sip:sipsak@10.0.0.5:47413;tag=4c5c78b9">sip:sipsak@10.0.0.5:47413;tag=4c5c78b9</a>.<br>
To: <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>.<br>
Call-ID: <a moz-do-not-send="true"
href="mailto:1281128633@10.0.0.5">1281128633@10.0.0.5</a>.<br>
CSeq: 1 OPTIONS.<br>
Contact: <a moz-do-not-send="true"
href="http://sip:sipsak@10.0.0.5:47413">sip:sipsak@10.0.0.5:47413</a>.<br>
Content-Length: 0.<br>
Max-Forwards: 70.<br>
User-Agent: sipsak 0.9.6.<br>
Accept: text/plain.<br>
.</div>
<div><br>
U 2016/05/10 13:57:12.406735 <a moz-do-not-send="true"
href="http://10.0.0.4:5060">10.0.0.4:5060</a> -> <a
moz-do-not-send="true" href="http://10.0.0.5:47413">10.0.0.5:47413</a><br>
SIP/2.0 <strong><font style="background-color:rgb(255,0,0)">500
Service full.</font></strong><br>
Via: SIP/2.0/UDP
10.0.0.5:47413;received=10.0.0.5;branch=z9hG4bK.3fc50b66;rport=47413;alias.<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:sip:sipsak@10.0.0.5:47413;tag=4c5c78b9">sip:sipsak@10.0.0.5:47413;tag=4c5c78b9</a>.<br>
To: <a moz-do-not-send="true"
href="mailto:sip%3Aopensips@10.0.0.4">sip:opensips@10.0.0.4</a>;tag=61890dad1e908c702027bf054a266115.c3bd.<br>
Call-ID: <a moz-do-not-send="true"
href="mailto:1281128633@10.0.0.5">1281128633@10.0.0.5</a>.<br>
CSeq: 1 OPTIONS.<br>
Server: OpenSIPS (2.1.2 (x86_64/linux)).<br>
Content-Length: 0.</div>
<div><br>
</div>
<div>I guess the error "500 Service full" is related to a bloc
in the script where i define the routing logic for the load
balancing:</div>
<div><br>
</div>
<div><br>
## Freeswitch<br>
route[2] {</div>
<div> xlog("L_NOTICE","[$pr:$fU@$si:$sp]: This is
Media-Server Route Use Load-balancer NOW!!\n");<br>
if (!load_balance("1","calls")) {<br>
sl_send_reply("500","Service full");<br>
exit;<br>
}<br>
xlog("L_NOTICE","[$pr:$fU@$si:$sp]: Selected
destination Media-Server : $du\n");<br>
}</div>
<div>
<br>
.</div>
<div>In need more explanation how i can fix that.<br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr">NDUWAYEZU Joselyne<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">2016-04-30 12:20 GMT+02:00
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a></a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Use debug=4 in your config and check the logs to see if the
script execution really gets to the siptrace part and if so,
why it is not done. If you do not manage to "read" the logs,
post them somewhere (post only logs related to the REGISTER
execution - the REGISTER you want to trace) and send here
the link.<br>
<br>
Regards,<br>
<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
<a moz-do-not-send="true"
href="http://www.opensips-solutions.com" target="_blank"
rel="noreferrer">http://www.opensips-solutions.com</a><br>
<br>
On <a moz-do-not-send="true" href="tel:27.04.2016%2010"
target="_blank" value="+12704201610">27.04.2016 10</a>:24,
Francjos wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Hello,<br>
I,ve conigured two opensips servers and i would like each
one to send sipsak<br>
to another and see if it is still working.<br>
I've installed sipsak on both Opensips.<br>
In order to see the request and reply messages, i've used
the siptrace<br>
module.<br>
I've loaded it on both Opensips and set the parameters as
follows:<br>
<br>
loadmodule “siptrace.so”<br>
<br>
modparam(“siptrace”, “db_url“,<br>
“mysql://opensips:opensipsrw@localhost/opensips”)<br>
modparam(“siptrace”, “trace_flag“, “22”) # Here the
trace_flag will 22.<br>
modparam(“siptrace”, “traced_user_avp“,
“$avp(traced_user)”)<br>
modparam(“siptrace”, “trace_on”, 1)<br>
<br>
I also load the avpops module :<br>
<br>
loadmodule “avpops.so”<br>
modparam(“avpops”,”db_url”,“mysql://opensips:opensipsrw@localhost/opensips”)<br>
modparam(“avpops”, “avp_table”, “New_usr_preferences”)<br>
<br>
After that, i've added the avp in the usr_preferences
table using this<br>
command:<br>
<br>
opensipsctl avp add –T usr_preferences
opensips@myripaddress trace 1 1<br>
<br>
I also add this routing logic at the beginning of the main
routing logic:<br>
<br>
if(avp_db_load(“$fu”,”$avp(trace)”)) {<br>
$avp(traced_user)=$fu;<br>
setflag(22);<br>
sip_trace();<br>
xlog(“L_INFO”,”User $fu being traced”);<br>
}<br>
<br>
I restarted Opensips and tracing:<br>
<br>
opensipsctl restart<br>
opensipsctl fifo sip_trace on<br>
<br>
When i send a ping using the sipsak tool like this:<br>
<br>
sipsak -s sip:opensips@myotheripaddress, i hope i can
visualize, the<br>
tracing in the sip_trace table, but when i visualise its
content, the table<br>
is empty.<br>
<br>
Am i simming something in order to get corrects results?<br>
<br>
Thanky you<br>
<br>
<br>
<span class="HOEnZb"><font color="#888888">
<br>
--<br>
View this message in context: <a
moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/SIPTRAce-module-tp7602727.html"
target="_blank" rel="noreferrer"><a class="moz-txt-link-freetext" href="http://opensips-open-sip-server.1449251.n2.nabble.com/SIPTRAce-module-tp7602727.html">http://opensips-open-sip-server.1449251.n2.nabble.com/SIPTRAce-module-tp7602727.html</a></a><br>
Sent from the OpenSIPS - Users mailing list archive at
Nabble.com.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org"
target="_blank">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank" rel="noreferrer">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</font></span></blockquote>
<br>
</blockquote>
</div>
<br>
</div>
<br>
Haute École de Bruxelles
</blockquote>
<br>
</body>
</html>