Re: [SR-Users] RADIUS auth func diff

2019-01-14 Thread morf...@gmail.com

Thanks you for reply!!

And next question, which is preferable? =)


11.01.2019 22:44, Daniel-Constantin Mierla пишет:

Hello,

it is about the header to be used for authentication, either
Authorization or Proxy-Authorization. They are given based on the type
of challenge sent back, via 401 or 407 sip responses.

Cheers,
Daniel

On 11.01.19 14:43, morf...@gmail.com wrote:

Hello!

In auth_radius manual present two functions: radius_www_authorize()
and radius_proxy_authorize().

What is the difference?


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] rtpengine_manage() in async tasks

2019-01-14 Thread Alex Balashov
Hi,

I've run into an issue with handling reinvites in async task
workers--which I need to do in order to introduce a small delay to avoid
a UA race condition--in which some state that is necessary for
rtpengine_manage() to do the right thing seems to be lost.

Specifically, if I do this:

--
loadmodule "mqueue"
loadmodule "rtimer"

...

modparam("rtimer", "timer", "name=reinvite_q1;interval=1u;mode=1;")
modparam("rtimer", "exec", "timer=reinvite_q1;route=REINVITE_DEQUEUE")

modparam("mqueue", "mqueue", "name=reinvite_q");

...

route {
   ...

   if(has_totag()) {
  if(loose_route()) {
 ...

 if(is_method("INVITE")) {
if(!t_suspend()) {
   sl_send_reply("500", "Server Internal Error");
   exit;
}

mq_add("reinvite_q", "$T(id_index):$T(id_label)", "");
 } else 
route(IN_DLG_REQ);

  exit;
   }

   ...
}

route[REINVITE_DEQUEUE] {
   while(mq_fetch("reinvite_q")) {
  $var(id) = $(mqk(reinvite_q){s.select,0,:}{s.int});
  $var(label) = $(mqk(reinvite_q){s.select,1,:}{s.int});

  t_continue("$var(id)", "$var(label)", "IN_DLG_REQ");
   }
}

route[IN_DLG_REQ] {
   handle_ruri_alias();

   if(is_method("BYE"))
  rtpengine_manage();
   else if(is_method("INVITE") && sdp_content()) 
  rtpengine_manage("replace-origin replace-session-connection ICE=remove")

   t_on_reply("MAIN_REPLY");

   if(!t_relay())
  sl_reply_error();
}

onreply_route[MAIN_REPLY] {
   if(is_method("INVITE") && sdp_content()) 
  rtpengine_manage("replace-origin replace-session-connection ICE=remove");
}
--

What I find is that if I generate a reinvite from either side,
rtpengine_manage() passes through the SDP offer in the reinvite
unadulterated, although the answer returns properly adulterated by
RTPEngine.

The same thing occurs if I use 'async', which as I gather is just a
wrapper of convenience around t_suspend/t_continue() anyway. That module
won't do for my purposes because I need a millisecond-level delay
resolution rather than second-level, anyhow.

Anyway, surely enough, this is because the execution context is one that
insinuates a stream deletion. When the reinvite offer comes across and I
call rtpengine_manage(), the command sent is 'delete':

--
Jan 14 20:24:23 staccato.evaristesys.com rtpengine[33830]: INFO: 
[c94347dcf92e7ccc10dee84c4e0d1c8a]: Received command 'delete' from 
209.51.167.66:39788
--

The RTPEngine module documentation actually warns about this:

https://kamailio.org/docs/modules/5.2.x/modules/rtpengine.html#rtpengine.f.rtpengine_manage

But this insight is buried in the fourth bullet point:

   "If BYE or CANCEL, or called within a FAILURE_ROUTE[], then call 
rtpengine_delete(). Be careful with calling this function after 
resuming a suspended transaction (e.g., after t_continue()), 
because the context of executed route is FAILURE ROUTE (in other 
words, rtpengine_manage() in the route block of t_continue() 
does the same as in failure_route)."

This would lead one to believe that it applies only in the context of
handling a BYE or CANCEL in a resumed transaction, when in fact it seems
to hold true of non-BYE/CANCEL and non-failure contexts as well, as can
be clearly seen with the reinvite. 

The behaviour is exactly as expected if I don't use rtpengine_manage()
and instead manually call rtpengine_offer()/rtpengine_answer(). And
expected behaviour comes from rtpengine_manage() if I don't handle the
request in a resumed transaction context. 

This yields the fundamental question:

Is there any way to have my cake and eat it too? I really want to use
rtpengine_manage() because I need to handle a potential SDP offer-in-ACK
scenario and don't want to do a bunch of state-keeping in order to use
the correct choice of rtpengine_{offer|answer}() in the right context,
which is a problem rtpengine_manage() solves beautifully. At the same
time, I absolutely need the slight reinvite delay that can be
accomplished via async processing; a UA on this side has a nasty habit
of sending a reinvite almost simultaneously to the 2xx answer for the
INVITE transaction, leading to indeterminate egress velocity for those
respective messages out of Kamailio worker threads.

Many thanks in advance!

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segfault at 0 - process stopped

2019-01-14 Thread YASIN CANER
Hello.
Kamailio version is really old. 5.2 is available now. Without core dump 
backtrace , it is hard to find out. Until version5.2 , tons of buga are fixed 
and improved.


Good luck



AL RSM mailto:ali...@mail.com>> şunları yazdı (14 Oca 2019 
21:54):

Hi

We are running Kamailio 3.7 on our production servers. The Kamailio process 
stopped running on one of the 4 servers. Log shows "segfault error".
No core file generated. Any suggestion on how to verify the issue would be 
appreciated.

kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip 0055933a sp 
7fffd4ca6700 error 4 in kamailio[40+211000]
/usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process 1558 exited 
by a signal 11
/usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not generated
CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)

Thanks,
AL

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] segfault at 0 - process stopped

2019-01-14 Thread AL RSM


	
		
			
			
			
			Hi 

			 

			We are running Kamailio 3.7 on our production servers. The Kamailio process stopped running on one of the 4 servers. Log shows "segfault error".

			No core file generated. Any suggestion on how to verify the issue would be appreciated.

			 

			kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip 0055933a sp 7fffd4ca6700 error 4 in kamailio[40+211000]

			/usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process 1558 exited by a signal 11

			/usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not generated

			CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)

			 

			Thanks,

			AL
			
			
			
		
	



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] test

2019-01-14 Thread AL RSM

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] segfault error - process stopped

2019-01-14 Thread AL RSM
Hi 



We are running Kamailio 3.7 on our production servers. The Kamailio process 
stopped running on one of the 4 servers. Log shows "segfault error".

No core file generated. Any suggestion on how to verify the issue would be 
appreciated.



kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip 0055933a sp 
7fffd4ca6700 error 4 in kamailio[40+211000]

/usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process 1558 exited 
by a signal 11

/usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not generated

CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)



Thanks,

AL___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Logging from cfg file

2019-01-14 Thread Denys Pozniak
Now it works!
Thanks!

пн, 14 янв. 2019 г. в 12:47, Daniel-Constantin Mierla :

> Hello,
>
> have you loaded corex module?
>
> Cheers,
> Daniel
> On 14.01.19 10:40, Denys Pozniak wrote:
>
> Hello!
> Tried to use $cfg(line), but got error.
> Please point me where the issue is.
>
> loadmodule "cfgutils.so"
> xlog("L_WARNING", "route block: $cfg(line) \n");
>
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:903]:
> pv_parse_spec2(): error searching pvar "cfg"
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:1107]:
> pv_parse_spec2(): wrong char [l/108] in [$cfg(line)] at [5 (5)]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR: xlog [xlog.c:513]:
> xdbg_fixup_helper(): wrong format[pvar $cfg(line) #012]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/route.c:1154]:
> fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/main.cfg:8
>
> # kamailio -v
> version: kamailio 5.1.6 (x86_64/linux)
>
>
>
> вс, 30 дек. 2018 г. в 05:19, Joel Serrano :
>
>> Adding it to my log_prefix !!!
>>
>> Sounds dum but this simplifies my logging so much 
>>
>> Thanks guys, every day you learn something new!
>>
>>
>> On Sat, Dec 29, 2018 at 14:42 David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> yep: $cfg(route)
>>> added Jun 2017
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.w...@gmail.com
>>> phone: +34669448337
>>>
>>>
>>> On Sat, Dec 29, 2018 at 10:09 PM * Paolo Visintin - evosip.cloud
>>>   wrote:
>>>
 Joel , you could use $cfg(route) !

 I usually store my breadcrumbs in a define and use on top of every
 interesting route !


 Il giorno sab 29 dic 2018 alle 21:29 Joel Serrano 
 ha scritto:

> I wonder if there is a $something that contains the route-block-name?
>
> Anyone know?
>
>
> On Sat, Dec 29, 2018 at 10:52 David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> I prefer using
>>
>> log(“L_ERR”, “[REQUEST_ROUTE]: $ci Register Request\n”);
>>
>> That way you have the route block where you are logging from and the
>> Call-ID with your information string. (I mostly use L_ERR when debugging)
>>
>> Cheers
>> On Sat, 29 Dec 2018 at 11:02, Mojtaba  wrote:
>>
>>> Hi,
>>> You could use xlog instead of log, like this:
>>>  xlog("Register request...\n");
>>> With Regards.Mojtaba
>>>
>>> On Sat, Dec 29, 2018 at 11:14 AM Muhammad Allaudin
>>>  wrote:
>>> >
>>> > Hi everyone,
>>> >
>>> > I have recently started working on Kamailio, I am trying to learn
>>> the basics. For "Register" route, I am trying to print the log but log 
>>> is
>>> not appearing in log file. Other logs are there, only this one is 
>>> missing.
>>> >
>>> > if(is_method("REGISTER")){
>>> >  log(2, "Register request");
>>> > }
>>> >
>>> > I will be really helpful if you can help me with this.
>>> >
>>> > Thanks & Kind Regards
>>> >
>>> > Regards,
>>> > M.Allaudin
>>> > Software Engineer
>>> > Nowtel Group
>>> > Phone # +92-333-8291874
>>> > Blogger @ allaudin.github.io
>>> > ___
>>> > Kamailio (SER) - Users Mailing List
>>> > sr-users@lists.kamailio.org
>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> --
>>> --Mojtaba Esfandiari.S
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
 --
 *Paolo Visintin*
 *CTO*
 evosip.cloud
 [image: Risultati immagini per evosip]
 ___
 Kamailio (SER) - Users Mailing List
 sr-users@lists.kamailio.org
 https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
>
> BR,
> Denys Pozniak
>
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> 

Re: [SR-Users] N-Way call

2019-01-14 Thread Victor Seva
AFAIK you need a B2BUA in order to accomplish that.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptarce module and SIP-Replying Messages

2019-01-14 Thread Daniel-Constantin Mierla
Hello,

if you want to drop all sip traffic:

request_route {
    exit;
}

reply_route {
   drop();
}

Cheers,
Daniel

On 14.01.19 11:24, Mojtaba wrote:
> Hello,
> I am using siptrace module in Kamailio. As you know, it sends a copy
> of signalling message for specific destination. Like HOMER project.
> Because of  i won't run main route block in destination, i just  have
> changed this block like below:
> request_route {
>     //do some works.
>     drop();
>     exit;
> }
> I know it would make a question in your mind why i do this? No
> problem, Let's come back to question. All things works correct except
> Replying SIP message. The destination is trying to relay Replying SIP
> message that it get from siptrace module in other server.
> How can i disable replying SIP mesages?
> With Best Regards 
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Logging from cfg file

2019-01-14 Thread Daniel-Constantin Mierla
Hello,

have you loaded corex module?

Cheers,
Daniel

On 14.01.19 10:40, Denys Pozniak wrote:
> Hello!
> Tried to use $cfg(line), but got error.
> Please point me where the issue is.
>
> loadmodule "cfgutils.so"
> xlog("L_WARNING", "route block: $cfg(line) \n");
>
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:903]:
> pv_parse_spec2(): error searching pvar "cfg"
> Jan 14 10:39:19 dev kamailio[10856]: ERROR: 
> [core/pvapi.c:1107]: pv_parse_spec2(): wrong char [l/108] in
> [$cfg(line)] at [5 (5)]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR: xlog [xlog.c:513]:
> xdbg_fixup_helper(): wrong format[pvar $cfg(line) #012]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR: 
> [core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/main.cfg:8
>
> # kamailio -v
> version: kamailio 5.1.6 (x86_64/linux)
>
>
>
> вс, 30 дек. 2018 г. в 05:19, Joel Serrano  >:
>
> Adding it to my log_prefix !!!
>
> Sounds dum but this simplifies my logging so much 
>
> Thanks guys, every day you learn something new! 
>
>
> On Sat, Dec 29, 2018 at 14:42 David Villasmil
>  > wrote:
>
> yep: $cfg(route)
> added Jun 2017
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> 
> phone: +34669448337
>
>
> On Sat, Dec 29, 2018 at 10:09 PM * Paolo Visintin -
> evosip.cloud  wrote:
>
> Joel , you could use $cfg(route) !
>
> I usually store my breadcrumbs in a define and use on top
> of every interesting route ! 
>
>
> Il giorno sab 29 dic 2018 alle 21:29 Joel Serrano
> mailto:j...@textplus.com>> ha scritto:
>
> I wonder if there is a $something that contains the
> route-block-name?
>
> Anyone know?
>
>
> On Sat, Dec 29, 2018 at 10:52 David Villasmil
>  > wrote:
>
> I prefer using
>
> log(“L_ERR”, “[REQUEST_ROUTE]: $ci Register
> Request\n”);
>
> That way you have the route block where you are
> logging from and the Call-ID with your information
> string. (I mostly use L_ERR when debugging)
>
> Cheers
> On Sat, 29 Dec 2018 at 11:02, Mojtaba
> mailto:mes...@gmail.com>> wrote:
>
> Hi,
> You could use xlog instead of log, like this:
>  xlog("Register request...\n");
> With Regards.Mojtaba
>
> On Sat, Dec 29, 2018 at 11:14 AM Muhammad Allaudin
>  > wrote:
> >
> > Hi everyone,
> >
> > I have recently started working on Kamailio,
> I am trying to learn the basics. For
> "Register" route, I am trying to print the log
> but log is not appearing in log file. Other
> logs are there, only this one is missing.
> >
> > if(is_method("REGISTER")){
> >  log(2, "Register request");
> > }
> >
> > I will be really helpful if you can help me
> with this.
> >
> > Thanks & Kind Regards
> >
> > Regards,
> > M.Allaudin
> > Software Engineer
> > Nowtel Group
> > Phone # +92-333-8291874
> > Blogger @ allaudin.github.io
> 
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> 
> >
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> -- 
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>

Re: [SR-Users] Logging from cfg file

2019-01-14 Thread Alex
request_route {
$avp(sess_mylog_id) = 0;

$var(mylog_data) = 'L_INFO|route[MAIN] INIT SIP REQUEST [ sip_requestId:' +
$mi + ' ]';
route(MYLOG);

.

}

route[MYLOG] {

$avp(sess_mylog_id) = $avp(sess_mylog_id) + 1;
$shv(mylog_id) = $shv(mylog_id) + 1;

$var(mylog_level) = $(var(mylog_data){s.select,0,|});
$var(mylog_msg) = $(var(mylog_data){s.select,1,|});

#xlog("L_INFO","route[MYLOG] mylog_data = [$var(mylog_data)]
n=$var(n)");

#if ( $var(mylog_data) ) {
#   $var(mylog_level) = $(var(mylog_data){s.select,0,,});
#   $var(mylog_msg) = $(var(mylog_data){s.select,1,,});
#}

$var(direct) = 'unknown';
if ( is_request() ) {
$var(direct) = 'request';
}
if ( is_reply() ) {
$var(direct) = 'reply';
}

# 
# si - client source ip
# sp - client source port
# Ri - destination ip
# --
# ad - is always null
# rU - is always null
# 

$var(mylog_out) = '[MYLOG][' + $shv(mylog_id) + '][' +
$avp(sess_mylog_id) + '] => ' + $var(mylog_msg) +
" # direct=" + $var(direct) +
" rm=" + $rm +
" fu=" + $fu + " fU=" + $fU + " fd=" + $fd + " ft=" + $ft +
" tU=" + $tU + " tt=" + $tt +
" rd=" + $rd +
" au=" + $au + " aU=" + $aU + " Au=" + $Au +
" si=" + $si + " sp=" + $sp +
" Ri=" + $Ri +
" mi=" + $mi + " ci=" + $ci+ " cs=" + $cs + " ua=[" + $ua + "]";

#xlog('L_INFO',"route[MYLOG] level=$var(mylog_level)
msg=$var(mylog_msg)\n");

switch ( $var(mylog_level) ) {
case 'L_ALERT':
xlog('L_ALERT',"$var(mylog_out)\n");
break;
case 'L_DEBUG':
xlog('L_DEBUG',"$var(mylog_out)\n");
break;
case 'L_ERROR':
xlog('L_ERROR',"$var(mylog_out)\n");
break;
case 'L_INFO':
xlog('L_INFO',"$var(mylog_out)\n");
break;
case 'L_NOTICE':
xlog('L_NOTICE',"$var(mylog_out)\n");
break;
case 'L_WARN':
xlog('L_WARN',"$var(mylog_out)\n");
break;
default:
xlog('L_ALERT',"[MYLOG] Unknown log_level=$var(mylog_level)
data=$var(mylog_data)\n");
}


$var(mylog_level) = '';
$var(mylog_msg) = '';
$var(mylog_out) = '';
$var(mylog_data) = '';
}


пн, 14 янв. 2019 г. в 12:42, Denys Pozniak :

> Hello!
> Tried to use $cfg(line), but got error.
> Please point me where the issue is.
>
> loadmodule "cfgutils.so"
> xlog("L_WARNING", "route block: $cfg(line) \n");
>
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:903]:
> pv_parse_spec2(): error searching pvar "cfg"
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:1107]:
> pv_parse_spec2(): wrong char [l/108] in [$cfg(line)] at [5 (5)]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR: xlog [xlog.c:513]:
> xdbg_fixup_helper(): wrong format[pvar $cfg(line) #012]
> Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/route.c:1154]:
> fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/main.cfg:8
>
> # kamailio -v
> version: kamailio 5.1.6 (x86_64/linux)
>
>
>
> вс, 30 дек. 2018 г. в 05:19, Joel Serrano :
>
>> Adding it to my log_prefix !!!
>>
>> Sounds dum but this simplifies my logging so much 
>>
>> Thanks guys, every day you learn something new!
>>
>>
>> On Sat, Dec 29, 2018 at 14:42 David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> yep: $cfg(route)
>>> added Jun 2017
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.w...@gmail.com
>>> phone: +34669448337
>>>
>>>
>>> On Sat, Dec 29, 2018 at 10:09 PM * Paolo Visintin - evosip.cloud
>>>  wrote:
>>>
 Joel , you could use $cfg(route) !

 I usually store my breadcrumbs in a define and use on top of every
 interesting route !


 Il giorno sab 29 dic 2018 alle 21:29 Joel Serrano 
 ha scritto:

> I wonder if there is a $something that contains the route-block-name?
>
> Anyone know?
>
>
> On Sat, Dec 29, 2018 at 10:52 David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> I prefer using
>>
>> log(“L_ERR”, “[REQUEST_ROUTE]: $ci Register Request\n”);
>>
>> That way you have the route block where you are logging from and the
>> Call-ID with your information string. (I mostly use L_ERR when debugging)
>>
>> Cheers
>> On Sat, 29 Dec 2018 at 11:02, Mojtaba  wrote:
>>
>>> Hi,
>>> You could use xlog instead of log, like this:
>>>  xlog("Register request...\n");
>>> With Regards.Mojtaba
>>>
>>> On Sat, Dec 29, 2018 at 11:14 AM Muhammad Allaudin
>>>  wrote:
>>> >
>>> > Hi everyone,
>>> >
>>> > I have recently started working on Kamailio, I am trying to learn
>>> the basics. For "Register" route, I am trying to print the log but log 
>>> is
>>> not appearing in 

[SR-Users] Logging from cfg file

2019-01-14 Thread Soltanici Ilie

Hi,

If you need the line from configuration file - then you may use xlogl instead 
of xlog.
xlogl("L_WARNING", "route block: \n");

Then you don't need $cfg(line) variable. ;)
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] siptarce module and SIP-Replying Messages

2019-01-14 Thread Mojtaba
Hello,
I am using siptrace module in Kamailio. As you know, it sends a copy of
signalling message for specific destination. Like HOMER project.
Because of  i won't run main route block in destination, i just  have
changed this block like below:
request_route {
//do some works.
drop();
exit;
}
I know it would make a question in your mind why i do this? No problem,
Let's come back to question. All things works correct except Replying SIP
message. The destination is trying to relay Replying SIP message that it
get from siptrace module in other server.
How can i disable replying SIP mesages?
With Best Regards
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Logging from cfg file

2019-01-14 Thread Denys Pozniak
Hello!
Tried to use $cfg(line), but got error.
Please point me where the issue is.

loadmodule "cfgutils.so"
xlog("L_WARNING", "route block: $cfg(line) \n");

Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:903]:
pv_parse_spec2(): error searching pvar "cfg"
Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/pvapi.c:1107]:
pv_parse_spec2(): wrong char [l/108] in [$cfg(line)] at [5 (5)]
Jan 14 10:39:19 dev kamailio[10856]: ERROR: xlog [xlog.c:513]:
xdbg_fixup_helper(): wrong format[pvar $cfg(line) #012]
Jan 14 10:39:19 dev kamailio[10856]: ERROR:  [core/route.c:1154]:
fix_actions(): fixing failed (code=-1) at
cfg:/etc/kamailio/routing.d/main.cfg:8

# kamailio -v
version: kamailio 5.1.6 (x86_64/linux)



вс, 30 дек. 2018 г. в 05:19, Joel Serrano :

> Adding it to my log_prefix !!!
>
> Sounds dum but this simplifies my logging so much 
>
> Thanks guys, every day you learn something new!
>
>
> On Sat, Dec 29, 2018 at 14:42 David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> yep: $cfg(route)
>> added Jun 2017
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>>
>>
>> On Sat, Dec 29, 2018 at 10:09 PM * Paolo Visintin - evosip.cloud
>>  wrote:
>>
>>> Joel , you could use $cfg(route) !
>>>
>>> I usually store my breadcrumbs in a define and use on top of every
>>> interesting route !
>>>
>>>
>>> Il giorno sab 29 dic 2018 alle 21:29 Joel Serrano 
>>> ha scritto:
>>>
 I wonder if there is a $something that contains the route-block-name?

 Anyone know?


 On Sat, Dec 29, 2018 at 10:52 David Villasmil <
 david.villasmil.w...@gmail.com> wrote:

> I prefer using
>
> log(“L_ERR”, “[REQUEST_ROUTE]: $ci Register Request\n”);
>
> That way you have the route block where you are logging from and the
> Call-ID with your information string. (I mostly use L_ERR when debugging)
>
> Cheers
> On Sat, 29 Dec 2018 at 11:02, Mojtaba  wrote:
>
>> Hi,
>> You could use xlog instead of log, like this:
>>  xlog("Register request...\n");
>> With Regards.Mojtaba
>>
>> On Sat, Dec 29, 2018 at 11:14 AM Muhammad Allaudin
>>  wrote:
>> >
>> > Hi everyone,
>> >
>> > I have recently started working on Kamailio, I am trying to learn
>> the basics. For "Register" route, I am trying to print the log but log is
>> not appearing in log file. Other logs are there, only this one is 
>> missing.
>> >
>> > if(is_method("REGISTER")){
>> >  log(2, "Register request");
>> > }
>> >
>> > I will be really helpful if you can help me with this.
>> >
>> > Thanks & Kind Regards
>> >
>> > Regards,
>> > M.Allaudin
>> > Software Engineer
>> > Nowtel Group
>> > Phone # +92-333-8291874
>> > Blogger @ allaudin.github.io
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>> --
>> --Mojtaba Esfandiari.S
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
 ___
 Kamailio (SER) - Users Mailing List
 sr-users@lists.kamailio.org
 https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

>>> --
>>> *Paolo Visintin*
>>> *CTO*
>>> evosip.cloud
>>> [image: Risultati immagini per evosip]
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 

BR,
Denys Pozniak
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] N-Way call

2019-01-14 Thread José Antonio Gutiérrez Delgado
Hi, I am trying unsuccessfully to create three calls from an already
created call or, if possible, calls to n users. I do not know if I
need an additional module or if I need to do it at the plot level. I
have searched unsuccessfully for guides and manuals, so I would
appreciate any kind of guidance. I use for MjSIP communication. Thank
you



-- 
José Antonio Gutiérrez Delgado
Responsable técnico
Oficina: (+34) 923040031

*Este mensaje se dirige exclusivamente a su destinatario/s y puede contener
información privilegiada o confidencial. Si no es vd. el destinatario
indicado, queda notificado de que la utilización, divulgación y/o copia sin
autorización está prohibida en virtud de la legislación vigente. Si ha
recibido este mensaje por error, le rogamos que nos lo comunique
inmediatamente por esta misma vía y proceda a su destrucción.*
*Antes de imprimir, piensa si es necesario. Cuidar el medioambiente es
tarea de todos.*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users