Re: [SR-Users] dlg.end_dlg on RTP timeout

2020-01-21 Thread Miteshkumar Thakkar
No, that is not the case. It is visiting K+RTPENGINE only once.

Mitesh

> On 22-Jan-2020, at 1:00 PM, Daniel-Constantin Mierla  
> wrote:
> 
> Hello,
> 
> is the call looped via rtpengine twice? Like
> 
> UA1  K+RTPENGINE  SIP Server - K+RTPENGINE  UA2
> 
> Cheers,
> Daniel
> 
> On 22.01.20 08:21, Miteshkumar Thakkar wrote:
>> Hi,
>> 
>> Any thoughts on this?
>> 
>> Mitesh
>> 
>>> On 26-Dec-2019, at 1:36 PM, Miteshkumar Thakkar >> > wrote:
>>> 
>>> This is really helpful development.
>>> I am facing one issue, when I use this.
>>> RTPEngine is sending two "dlg.terminate_dlg" events for single call to 
>>> kamailio with same call-id but reversed to-tag and from-tag in second 
>>> event. I believe this is due to two separate RTP streams.
>>> Problem here is that - in first event kamailio terminates the call, hence 
>>> when second event comes, kamailio says - call-id not found and send 
>>> response back to RTPEngine. But still RTPEngine keeps sending that event 
>>> message for three more times. Kamailio has to respond to it with call-id 
>>> not found. Which is overhead. Not recommended for production environment.
>>> How can I avoid this? Any help is appreciated.
>>> Thank you
>>> Mitesh
>>> That's great, thank you!
>>> Cheers,
>>> Daniel
>>> On 06.09.18 11:15, Richard Fuchs wrote:
>>> > This is now supported as per
>>> > https://github.com/sipwise/rtpengine/commit/89084da8d820919b44a0244e16e6701822070a72
>>> >  
>>> > 
>>> >
>>> > Cheers
>>> >
>>> > On 2018-09-05 05:39, Daniel-Constantin Mierla wrote:
>>> >>
>>> >> There is the dlg.terminate_dlg rpc command that requires callid,
>>> >> from-tag and to-tag as parameters:
>>> >>
>>> >>   *
>>> >> https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dlg.r.terminate_dlg
>>> >>  
>>> >> 
>>> >>
>>> >> So it expects something like:
>>> >>
>>> >> 
>>> >> 
>>> >> dlg.terminate_dlg
>>> >> 
>>> >> _CALLID_VALUE__
>>> >> _FROM_TAG_VALUE__
>>> >> _TO_TAG_VALUE__
>>> >> 
>>> >> 
>>> >>
>>> >> I planned to make the from-tag and to-tag optional for quite some
>>> >> time, but didn't get the time for it yet.
>>> >>
>>> >> Cheers,
>>> >> Daniel
>>> >>
>>> >> On 05.09.18 08:52, Richard Fuchs wrote:
>>> >>> Yup that's exactly right.
>>> >>>
>>> >>> It would be fairly simple to implement an additional XMLRPC format
>>> >>> if there's a particular one that's more friendly towards Kamailio.
>>> >>>
>>> >>> Cheers
>>> >>>
>>> >>> On 2018-09-05 02:42, Daniel-Constantin Mierla wrote:
>>> 
>>>  Looking quickly at the readme of rtpengine application and digging
>>>  a bit with google, it is something like rtpengine has to be started
>>>  with
>>> 
>>>  -b http(s)://myrpcserver.ip/path -x 1
>>> 
>>>  and then the xmlrpc request is going to be sent to that url, having
>>>  a format like:
>>> 
>>>  
>>>  
>>>  teardown
>>>  
>>>  _CALLID_VALUE__
>>>  
>>>  
>>> 
>>>  Is it right? If yes, then I can try to make a sample config that
>>>  could handle it using xmlops, xhttp and jsonrpcs modules.
>>> 
>>>  Cheers,
>>>  Daniel
>>> 
>>> 
>>>  On 05.09.18 08:24, Richard Fuchs wrote:
>>> > It does an XMLRPC callback. Currently there's two formats for it,
>>> > one is a sems sbc teardown request (using the from-tag), the other
>>> > is a generic "teardown" command using the call ID.
>>> >
>>> > Cheers
>>> >
>>> > On 2018-09-04 07:52, Daniel-Constantin Mierla wrote:
>>> >>
>>> >> Hello,
>>> >>
>>> >> what do you get from rtpengine on rtp timeout? An RPC call back
>>> >> or an http request?
>>> >>
>>> >> Cheers,
>>> >> Daniel
>>> >>
>>> >>
>>> >> On 04.09.18 12:48, Igor Olhovskiy wrote:
>>> >>> Hi all!
>>> >>>
>>> >>> Is there any way to end dialog in Kamailio on RTP Timeout event
>>> >>> on RTPEngine?
>>> >>>
>>> >>> Or only look at logs/redis database with external tool?
>>> >>>
>>> >>> Regards, Igor
>>> >>>
>>> >>>
>>> >>> ___
>>> >>> Kamailio (SER) - Users Mailing List
>>> >>> sr-users at 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 -- www.kamailioworld.com 
>>> >> 
>>> >> Kamailio 

Re: [SR-Users] dlg.end_dlg on RTP timeout

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

is the call looped via rtpengine twice? Like

UA1  K+RTPENGINE  SIP Server - K+RTPENGINE  UA2

Cheers,
Daniel

On 22.01.20 08:21, Miteshkumar Thakkar wrote:
> Hi,
>
> Any thoughts on this?
>
> Mitesh
>
>> On 26-Dec-2019, at 1:36 PM, Miteshkumar Thakkar
>> mailto:mitesh.thak...@plivo.com>> wrote:
>>
>> This is really helpful development.
>> I am facing one issue, when I use this.
>> RTPEngine is sending two "dlg.terminate_dlg" events for single call to 
>> kamailio with same call-id but reversed to-tag and from-tag in second event. 
>> I believe this is due to two separate RTP streams.
>> Problem here is that - in first event kamailio terminates the call, hence 
>> when second event comes, kamailio says - call-id not found and send response 
>> back to RTPEngine. But still RTPEngine keeps sending that event message for 
>> three more times. Kamailio has to respond to it with call-id not found. 
>> Which is overhead. Not recommended for production environment.
>> How can I avoid this? Any help is appreciated.
>> Thank you
>> Mitesh
>>
>> That's great, thank you!
>>
>> Cheers,
>>
>> Daniel
>>
>> On 06.09.18 11:15, Richard Fuchs wrote:
>>
>> >/This is now supported as per /
>>
>> 
>> >/https://github.com/sipwise/rtpengine/commit/89084da8d820919b44a0244e16e6701822070a72
>> /
>>
>> >
>>
>> >/Cheers /
>>
>> >
>>
>> >/On 2018-09-05 05:39, Daniel-Constantin Mierla wrote: /
>>
>> >>
>>
>> >>/There is the dlg.terminate_dlg rpc command that requires callid, /
>>
>> >>/from-tag and to-tag as parameters: /
>>
>> >>
>>
>> >>/  * /
>>
>> 
>> >>/https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dlg.r.terminate_dlg
>> /
>>
>> >>
>>
>> >>/So it expects something like: /
>>
>> >>
>>
>> >>/ /
>>
>> >>/ /
>>
>> >>/dlg.terminate_dlg /
>>
>> >>/ /
>>
>> >>/_CALLID_VALUE__ /
>>
>> >>/_FROM_TAG_VALUE__ /
>>
>> >>/_TO_TAG_VALUE__ /
>>
>> >>/ /
>>
>> >>/ /
>>
>> >>
>>
>> >>/I planned to make the from-tag and to-tag optional for quite some /
>>
>> >>/time, but didn't get the time for it yet. /
>>
>> >>
>>
>> >>/Cheers, /
>>
>> >>/Daniel /
>>
>> >>
>>
>> >>/On 05.09.18 08:52, Richard Fuchs wrote: /
>>
>> >>>/Yup that's exactly right. /
>>
>> >>>
>>
>> >>>/It would be fairly simple to implement an additional XMLRPC format /
>>
>> >>>/if there's a particular one that's more friendly towards Kamailio. /
>>
>> >>>
>>
>> >>>/Cheers /
>>
>> >>>
>>
>> >>>/On 2018-09-05 02:42, Daniel-Constantin Mierla wrote: /
>>
>> 
>>
>> /Looking quickly at the readme of rtpengine application and digging /
>>
>> /a bit with google, it is something like rtpengine has to be started 
>> /
>>
>> /with /
>>
>> 
>>
>> /-b http(s)://myrpcserver.ip/path -x 1 /
>>
>> 
>>
>> /and then the xmlrpc request is going to be sent to that url, having 
>> /
>>
>> /a format like: /
>>
>> 
>>
>> / /
>>
>> / /
>>
>> /teardown /
>>
>> / /
>>
>> /_CALLID_VALUE__ /
>>
>> / /
>>
>> / /
>>
>> 
>>
>> /Is it right? If yes, then I can try to make a sample config that /
>>
>> /could handle it using xmlops, xhttp and jsonrpcs modules. /
>>
>> 
>>
>> /Cheers, /
>>
>> /Daniel /
>>
>> 
>>
>> 
>>
>> /On 05.09.18 08:24, Richard Fuchs wrote: /
>>
>> >/It does an XMLRPC callback. Currently there's two formats for it, /
>>
>> >/one is a sems sbc teardown request (using the from-tag), the other 
>> /
>>
>> >/is a generic "teardown" command using the call ID. /
>>
>> >
>>
>> >/Cheers /
>>
>> >
>>
>> >/On 2018-09-04 07:52, Daniel-Constantin Mierla wrote: /
>>
>> >>
>>
>> >>/Hello, /
>>
>> >>
>>
>> >>/what do you get from rtpengine on rtp timeout? An RPC call back /
>>
>> >>/or an http request? /
>>
>> >>
>>
>> >>/Cheers, /
>>
>> >>/Daniel /
>>
>> >>
>>
>> >>
>>
>> >>/On 04.09.18 12:48, Igor Olhovskiy wrote: /
>>
>> >>>/Hi all! /
>>
>> >>>
>>
>> >>>/Is there any way to end dialog in Kamailio on RTP Timeout event /
>>
>> >>>/on RTPEngine? /
>>
>> >>>
>>
>> >>>/Or only look at logs/redis database with external tool? /
>>
>> >>>
>>
>> >>>/Regards, Igor /
>>
>> >>>
>>
>> >>>
>>
>> >>>/___ /
>>
>> >>>/Kamailio (SER) - Users Mailing List /
>>
>> >>>/sr-users at lists.kamailio.org
>>  /
>>
>> >>>/https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users /
>>
>> >>
>>
>> >>/-- /
>>
>> >>/Daniel-Constantin 

Re: [SR-Users] dlg.end_dlg on RTP timeout

2020-01-21 Thread Miteshkumar Thakkar
Hi,

Any thoughts on this?

Mitesh

> On 26-Dec-2019, at 1:36 PM, Miteshkumar Thakkar  
> wrote:
> 
> This is really helpful development.
> 
> I am facing one issue, when I use this.
> RTPEngine is sending two "dlg.terminate_dlg" events for single call to 
> kamailio with same call-id but reversed to-tag and from-tag in second event. 
> I believe this is due to two separate RTP streams.
> 
> Problem here is that - in first event kamailio terminates the call, hence 
> when second event comes, kamailio says - call-id not found and send response 
> back to RTPEngine. But still RTPEngine keeps sending that event message for 
> three more times. Kamailio has to respond to it with call-id not found. Which 
> is overhead. Not recommended for production environment.
> How can I avoid this? Any help is appreciated.
> 
> Thank you
> Mitesh
> That's great, thank you!
> Cheers,
> Daniel
> On 06.09.18 11:15, Richard Fuchs wrote:
> > This is now supported as per
> > https://github.com/sipwise/rtpengine/commit/89084da8d820919b44a0244e16e6701822070a72
> >  
> > 
> >
> > Cheers
> >
> > On 2018-09-05 05:39, Daniel-Constantin Mierla wrote:
> >>
> >> There is the dlg.terminate_dlg rpc command that requires callid,
> >> from-tag and to-tag as parameters:
> >>
> >>   *
> >> https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dlg.r.terminate_dlg
> >>  
> >> 
> >>
> >> So it expects something like:
> >>
> >> 
> >> 
> >> dlg.terminate_dlg
> >> 
> >> _CALLID_VALUE__
> >> _FROM_TAG_VALUE__
> >> _TO_TAG_VALUE__
> >> 
> >> 
> >>
> >> I planned to make the from-tag and to-tag optional for quite some
> >> time, but didn't get the time for it yet.
> >>
> >> Cheers,
> >> Daniel
> >>
> >> On 05.09.18 08:52, Richard Fuchs wrote:
> >>> Yup that's exactly right.
> >>>
> >>> It would be fairly simple to implement an additional XMLRPC format
> >>> if there's a particular one that's more friendly towards Kamailio.
> >>>
> >>> Cheers
> >>>
> >>> On 2018-09-05 02:42, Daniel-Constantin Mierla wrote:
> 
>  Looking quickly at the readme of rtpengine application and digging
>  a bit with google, it is something like rtpengine has to be started
>  with
> 
>  -b http(s)://myrpcserver.ip/path -x 1
> 
>  and then the xmlrpc request is going to be sent to that url, having
>  a format like:
> 
>  
>  
>  teardown
>  
>  _CALLID_VALUE__
>  
>  
> 
>  Is it right? If yes, then I can try to make a sample config that
>  could handle it using xmlops, xhttp and jsonrpcs modules.
> 
>  Cheers,
>  Daniel
> 
> 
>  On 05.09.18 08:24, Richard Fuchs wrote:
> > It does an XMLRPC callback. Currently there's two formats for it,
> > one is a sems sbc teardown request (using the from-tag), the other
> > is a generic "teardown" command using the call ID.
> >
> > Cheers
> >
> > On 2018-09-04 07:52, Daniel-Constantin Mierla wrote:
> >>
> >> Hello,
> >>
> >> what do you get from rtpengine on rtp timeout? An RPC call back
> >> or an http request?
> >>
> >> Cheers,
> >> Daniel
> >>
> >>
> >> On 04.09.18 12:48, Igor Olhovskiy wrote:
> >>> Hi all!
> >>>
> >>> Is there any way to end dialog in Kamailio on RTP Timeout event
> >>> on RTPEngine?
> >>>
> >>> Or only look at logs/redis database with external tool?
> >>>
> >>> Regards, Igor
> >>>
> >>>
> >>> ___
> >>> Kamailio (SER) - Users Mailing List
> >>> sr-users at 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 -- www.kamailioworld.com 
> >> 
> >> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
> >> www.asipto.com 
> >>
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users at lists.kamailio.org 
> >> 
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
> >> 
> >
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users at lists.kamailio.org 
> > 

Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

what version of kamailio are you using and what http version is curl
using? Can you paste here the http request taken with ngrep from the
network?

Cheers,
Daniel

On 21.01.20 19:00, Nuno Ferreira wrote:
> Hi Daniel,
>
> There's no other traffic than the HTTP requests.
> This comment in src/core/parser/parse_fline.c 99 - 113, caugh my
> attention:
>
>  } else if (http_reply_parse != 0 &&
> (*tmp=='H' || *tmp=='h') &&
> /* 'HTTP/1.' */
> strncasecmp( tmp+1, HTTP_VERSION+1, HTTP_VERSION_LEN-1)==0 &&
> /* [0|1] */
> ((*(tmp+HTTP_VERSION_LEN)=='0') || (*(tmp+HTTP_VERSION_LEN)=='1')) &&
> (*(tmp+HTTP_VERSION_LEN+1)==' ')  ){
> */* ugly hack to be able to route http replies
> * Note: - the http reply must have a via
> *       - the message is marked as SIP_REPLY (ugly)*
> */
> fl->type=SIP_REPLY;
> fl->flags|=FLINE_FLAG_PROTO_HTTP;
> fl->u.reply.version.len=HTTP_VERSION_LEN+1 /*include last digit*/;
> tmp=buffer+HTTP_VERSION_LEN+1 /* last digit */;
>
> and later in error1:
> error1:
> fl->type=SIP_INVALID;
> LOG((core, core_cfg, corelog), "parse_first_line: bad message (offset:
> %d)\n", offset);
> /* skip  line */
> nl=eat_line(buffer,len);
> return nl;
>
> So that log line can be conditional if FLINE_FLAG_PROTO_HTTP is not
> part of fl->flags.
> I just don't know where the "[466B blob data]" is getting printed
>
> On Tue, Jan 21, 2020 at 4:30 PM Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> as I said, watch the traffic on port 8000 with ngrep or some other
> network sniffer to see what data comes there. You can also start
> kamailio with debug=3 in config, more debug logs should be printed
> to syslog to get the context of what is processed at that time.
>
> Cheers,
> Daniel
>
> On 21.01.20 16:31, Nuno Ferreira wrote:
>> Hi Daniel,
>>
>> Thanks for your feedback.
>> I have a dedicated listen directive for JSONRPC
>> listen = 127.0.0.1:8000 
>>
>> and then an event_route for it:
>> event_route[xhttp:request] {
>>     if ($Rp != 8000) {
>>         xhttp_reply("403", "Forbidden", "text/html",
>> "Forbidden");
>>         exit;
>>     }
>>     if ($hu =~ "^/RPC") {
>>         jsonrpc_dispatch();
>>     } else {
>>         xhttp_reply("200", "OK", "text/html", "Wrong
>> URL $hu");
>>     }
>>     return;
>> }
>>
>> So, I'm already doing HTTP traffic only in port 8000.
>> The interesting part is that if I use kamcmd pl.list pipe_INVITE,
>> only the first log line is printed. Using curl, I see the other 2
>> logs all the time.
>>
>> Thank you
>>
>> On Tue, Jan 21, 2020 at 2:45 PM Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> can you want the traffic on port 8000 and see if there is no
>> "unexpected" traffic there? There should be no error message
>> for parsing the first line of an HTTP request.
>>
>> The error message related the missing pipe can be made debug.
>>
>> Cheers,
>> Daniel
>>
>> On 21.01.20 15:34, Nuno Ferreira wrote:
>>> Hi all,
>>>
>>> I'm using pipelimit with the "clean_unused" option to get
>>> rid of pipes that are not used for quite some time. At the
>>> same time we are monitoring pipelimit with a jsonrpc call
>>> similar to:
>>>
>>> # curl --header 'Content-Type: application/json'
>>> --data-binary '{"id": 1, "jsonrpc": "2.0", "method":
>>> "pl.list", "params": ["pipe_INVITE"]' http://127.0.0.1:8000/RPC
>>>
>>> Reply:
>>> {
>>>    "jsonrpc": "2.0",
>>>    "error": {
>>>       "code": 400,
>>>       "message": "Unknown pipe id pipe_INVITE"
>>>    },
>>>    "id": 1
>>> }
>>>
>>> The above reply is valid because the pipe_INVITE was not
>>> loaded yet, but the request makes kamailio to log the
>>> following log messages:
>>>
>>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: pipelimit
>>> [pl_ht.c:519]: rpc_pl_list(): no pipe: pipe_INVITE
>>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: 
>>> [core/parser/parse_fline.c:262]: parse_first_line():
>>> parse_first_line: bad message (offset: 20)
>>> Jan 20 11:21:48 proxy1 kamailio[24474]: [466B blob data]
>>>
>>> Since the monitoring system does periodic requests, those
>>> log lines get a bit annoying and fill the log with ERROR
>>> messages that aren't really errors.
>>>
>>> IMHO the first log line should be converted to DEBUG instead
>>> of ERROR, but I have some doubts about the one
>>> from parse_fline.c:262. parse_first_line() is used to
>>> process both SIP and HTTP. It makes sense to log ERROR if
>>> SIP but not in the case of HTTP...
>>> Regarding the "[466B blob data]" I really 

Re: [SR-Users] Implicit branch creation and private variables questions

2020-01-21 Thread Alex Balashov
I would put these in an $xavp array and iterate through them in a
failure_route.

On Tue, Jan 21, 2020 at 11:09:51PM +0200, George Diamantopoulos wrote:

> Hello all,
> 
> I'm trying to accomplish the following scenario, and some questions have
> been raised during testing: I'd like to be able to fork serially to a
> number of downstream destinations in case of failure, but also try several
> hosts which are available per destination network before failing over to
> the next one. To that end, I'm using something similar to the following:
> 
> request_route {
> ...
> $vn(some_var) = "some_value";
> $vn(some_other_var) = "some_other_value";
> ...
> $avp(provider_order) = "last_provider";
> $avp(provider_order) = "first_provider";
> ...
> t_set_fr(12, 2000);
> route(PROVIDER_SELECTION);
> ...
> }
> 
> route[PROVIDER_SELECTION] {
> if ( is_avp_set("$avp(provider_order)") ) {
> t_on_failure("PROVIDER_SERIAL");
> if ( $avp(provider_priority) == "first_provider" )

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


-- 
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


[SR-Users] Implicit branch creation and private variables questions

2020-01-21 Thread George Diamantopoulos
Hello all,

I'm trying to accomplish the following scenario, and some questions have
been raised during testing: I'd like to be able to fork serially to a
number of downstream destinations in case of failure, but also try several
hosts which are available per destination network before failing over to
the next one. To that end, I'm using something similar to the following:

request_route {
...
$vn(some_var) = "some_value";
$vn(some_other_var) = "some_other_value";
...
$avp(provider_order) = "last_provider";
$avp(provider_order) = "first_provider";
...
t_set_fr(12, 2000);
route(PROVIDER_SELECTION);
...
}

route[PROVIDER_SELECTION] {
if ( is_avp_set("$avp(provider_order)") ) {
t_on_failure("PROVIDER_SERIAL");
if ( $avp(provider_priority) == "first_provider" )
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-01-21 Thread Nuno Ferreira
Hi Daniel,

There's no other traffic than the HTTP requests.
This comment in src/core/parser/parse_fline.c 99 - 113, caugh my attention:

 } else if (http_reply_parse != 0 &&
(*tmp=='H' || *tmp=='h') &&
/* 'HTTP/1.' */
strncasecmp( tmp+1, HTTP_VERSION+1, HTTP_VERSION_LEN-1)==0 &&
/* [0|1] */
((*(tmp+HTTP_VERSION_LEN)=='0') || (*(tmp+HTTP_VERSION_LEN)=='1')) &&
(*(tmp+HTTP_VERSION_LEN+1)==' ')  ){


* /* ugly hack to be able to route http replies * Note: - the http reply
must have a via *   - the message is marked as SIP_REPLY (ugly)*
*/
fl->type=SIP_REPLY;
fl->flags|=FLINE_FLAG_PROTO_HTTP;
fl->u.reply.version.len=HTTP_VERSION_LEN+1 /*include last digit*/;
tmp=buffer+HTTP_VERSION_LEN+1 /* last digit */;

and later in error1:
error1:
fl->type=SIP_INVALID;
LOG((core, core_cfg, corelog), "parse_first_line: bad message (offset:
%d)\n", offset);
/* skip  line */
nl=eat_line(buffer,len);
return nl;

So that log line can be conditional if FLINE_FLAG_PROTO_HTTP is not part
of fl->flags.
I just don't know where the "[466B blob data]" is getting printed

On Tue, Jan 21, 2020 at 4:30 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> as I said, watch the traffic on port 8000 with ngrep or some other network
> sniffer to see what data comes there. You can also start kamailio with
> debug=3 in config, more debug logs should be printed to syslog to get the
> context of what is processed at that time.
>
> Cheers,
> Daniel
> On 21.01.20 16:31, Nuno Ferreira wrote:
>
> Hi Daniel,
>
> Thanks for your feedback.
> I have a dedicated listen directive for JSONRPC
> listen = 127.0.0.1:8000
>
> and then an event_route for it:
> event_route[xhttp:request] {
> if ($Rp != 8000) {
> xhttp_reply("403", "Forbidden", "text/html",
> "Forbidden");
> exit;
> }
> if ($hu =~ "^/RPC") {
> jsonrpc_dispatch();
> } else {
> xhttp_reply("200", "OK", "text/html", "Wrong URL
> $hu");
> }
> return;
> }
>
> So, I'm already doing HTTP traffic only in port 8000.
> The interesting part is that if I use kamcmd pl.list pipe_INVITE, only the
> first log line is printed. Using curl, I see the other 2 logs all the time.
>
> Thank you
>
> On Tue, Jan 21, 2020 at 2:45 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> can you want the traffic on port 8000 and see if there is no "unexpected"
>> traffic there? There should be no error message for parsing the first line
>> of an HTTP request.
>>
>> The error message related the missing pipe can be made debug.
>>
>> Cheers,
>> Daniel
>> On 21.01.20 15:34, Nuno Ferreira wrote:
>>
>> Hi all,
>>
>> I'm using pipelimit with the "clean_unused" option to get rid of pipes
>> that are not used for quite some time. At the same time we are monitoring
>> pipelimit with a jsonrpc call similar to:
>>
>> # curl --header 'Content-Type: application/json' --data-binary '{"id": 1,
>> "jsonrpc": "2.0", "method": "pl.list", "params": ["pipe_INVITE"]'
>> http://127.0.0.1:8000/RPC
>>
>> Reply:
>> {
>>"jsonrpc": "2.0",
>>"error": {
>>   "code": 400,
>>   "message": "Unknown pipe id pipe_INVITE"
>>},
>>"id": 1
>> }
>>
>> The above reply is valid because the pipe_INVITE was not loaded yet, but
>> the request makes kamailio to log the following log messages:
>>
>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: pipelimit [pl_ht.c:519]:
>> rpc_pl_list(): no pipe: pipe_INVITE
>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: 
>> [core/parser/parse_fline.c:262]: parse_first_line(): parse_first_line: bad
>> message (offset: 20)
>> Jan 20 11:21:48 proxy1 kamailio[24474]: [466B blob data]
>>
>> Since the monitoring system does periodic requests, those log lines get a
>> bit annoying and fill the log with ERROR messages that aren't really errors.
>>
>> IMHO the first log line should be converted to DEBUG instead of ERROR,
>> but I have some doubts about the one
>> from parse_fline.c:262. parse_first_line() is used to process both SIP and
>> HTTP. It makes sense to log ERROR if SIP but not in the case of HTTP...
>> Regarding the "[466B blob data]" I really don't know from where it's
>> coming from.
>> I can submit a PR, but I would like to have first some feedback from you.
>>
>> Thank you,
>>
>> Nuno
>>
>>
>> *Confidentiality Notice: The information contained in this e-mail and any
>> attachments may be confidential. If you are not an intended recipient, you
>> are hereby notified that any dissemination, distribution or copying of
>> this
>> e-mail is strictly prohibited. If you have received this e-mail in error,
>> please notify the sender and permanently delete the e-mail and any
>> attachments immediately. You should not retain, copy or use this e-mail or
>> any attachment for any purpose, nor disclose all or any part of the
>> contents to any other person. Thank you.*
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> 

[SR-Users] Param.valueat not returning special chars

2020-01-21 Thread Duarte Rocha
Hello,

I've run into a problem while using parameters parsing tools from Kamailio.
When i request the value of a parameter it discards some characters like ""
for example.

Here is an example :


$var(Parameters) = "kamailio=\"version5\";sip=hey";
xerr("String Parameter = $var(Parameters)");
xerr("Parameter on position 1 = $(var(Parameters){param.name,0}) and has
value = $(var(Parameters){param.valueat,0})");


This code returns :
ERROR: 

Re: [SR-Users] Printing xavp

2020-01-21 Thread Julien Chavanton
Glad to see that pv_isset can be used, I will use this one more, it seems
more consistent than some other alternatives !

On Tue, Jan 21, 2020 at 7:35 AM Ovidiu Sas  wrote:

> Here's something that works:
> $xavp(x=>a) = "1";
> $xavp(x[0]=>b) = "2";
> $xavp(x=>a) = "10";
> $xavp(x[0]=>b) = "20";
> $xavp(x=>a) = "100";
> $xavp(x[0]=>b) = "200";
>
>
> $var(i) = 0;
> while (pv_isset("$xavp(x[$var(i)])")) {
> xlog("L_INFO", "[$mi] xavp_copy $var(i)\n");
> xavp_copy("x", "$var(i)", "y");
> $var(i) = $var(i) + 1;
> }
> xlog("L_INFO", "[$mi] x is duplicated to y\n");
>
> $var(i) = 0;
> while (pv_isset("$xavp(y[0])")) {
> xavp_params_implode("y", "$var(out)");
> xlog("L_INFO", "[$mi] xavp(y[$var(i)])=$var(out)\n");
> pv_unset("$xavp(y[0)");
> $var(i) = $var(i) + 1;
> }
>
>
> The output:
> Jan 21 10:18:12 asrock k[29060]: INFO: 

Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

as I said, watch the traffic on port 8000 with ngrep or some other
network sniffer to see what data comes there. You can also start
kamailio with debug=3 in config, more debug logs should be printed to
syslog to get the context of what is processed at that time.

Cheers,
Daniel

On 21.01.20 16:31, Nuno Ferreira wrote:
> Hi Daniel,
>
> Thanks for your feedback.
> I have a dedicated listen directive for JSONRPC
> listen = 127.0.0.1:8000 
>
> and then an event_route for it:
> event_route[xhttp:request] {
>     if ($Rp != 8000) {
>         xhttp_reply("403", "Forbidden", "text/html",
> "Forbidden");
>         exit;
>     }
>     if ($hu =~ "^/RPC") {
>         jsonrpc_dispatch();
>     } else {
>         xhttp_reply("200", "OK", "text/html", "Wrong URL
> $hu");
>     }
>     return;
> }
>
> So, I'm already doing HTTP traffic only in port 8000.
> The interesting part is that if I use kamcmd pl.list pipe_INVITE, only
> the first log line is printed. Using curl, I see the other 2 logs all
> the time.
>
> Thank you
>
> On Tue, Jan 21, 2020 at 2:45 PM Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> can you want the traffic on port 8000 and see if there is no
> "unexpected" traffic there? There should be no error message for
> parsing the first line of an HTTP request.
>
> The error message related the missing pipe can be made debug.
>
> Cheers,
> Daniel
>
> On 21.01.20 15:34, Nuno Ferreira wrote:
>> Hi all,
>>
>> I'm using pipelimit with the "clean_unused" option to get rid of
>> pipes that are not used for quite some time. At the same time we
>> are monitoring pipelimit with a jsonrpc call similar to:
>>
>> # curl --header 'Content-Type: application/json' --data-binary
>> '{"id": 1, "jsonrpc": "2.0", "method": "pl.list", "params":
>> ["pipe_INVITE"]' http://127.0.0.1:8000/RPC
>>
>> Reply:
>> {
>>    "jsonrpc": "2.0",
>>    "error": {
>>       "code": 400,
>>       "message": "Unknown pipe id pipe_INVITE"
>>    },
>>    "id": 1
>> }
>>
>> The above reply is valid because the pipe_INVITE was not loaded
>> yet, but the request makes kamailio to log the following log
>> messages:
>>
>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: pipelimit
>> [pl_ht.c:519]: rpc_pl_list(): no pipe: pipe_INVITE
>> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: 
>> [core/parser/parse_fline.c:262]: parse_first_line():
>> parse_first_line: bad message (offset: 20)
>> Jan 20 11:21:48 proxy1 kamailio[24474]: [466B blob data]
>>
>> Since the monitoring system does periodic requests, those log
>> lines get a bit annoying and fill the log with ERROR messages
>> that aren't really errors.
>>
>> IMHO the first log line should be converted to DEBUG instead of
>> ERROR, but I have some doubts about the one
>> from parse_fline.c:262. parse_first_line() is used to process
>> both SIP and HTTP. It makes sense to log ERROR if SIP but not in
>> the case of HTTP...
>> Regarding the "[466B blob data]" I really don't know from where
>> it's coming from.
>> I can submit a PR, but I would like to have first some feedback
>> from you.
>>
>> Thank you,
>>
>> Nuno
>>
>>
>> *Confidentiality Notice: The information contained in this e-mail
>> and any
>> attachments may be confidential. If you are not an intended
>> recipient, you
>> are hereby notified that any dissemination, distribution or
>> copying of this
>> e-mail is strictly prohibited. If you have received this e-mail
>> in error,
>> please notify the sender and permanently delete the e-mail and any
>> attachments immediately. You should not retain, copy or use this
>> e-mail or
>> any attachment for any purpose, nor disclose all or any part of the
>> contents to any other person. Thank you.*
>>
>> ___
>> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com 
> 
> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
> www.kamailioworld.com 
>
>
>
> *Confidentiality Notice: The information contained in this e-mail and any
> attachments may be confidential. If you are not an intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this
> e-mail is strictly prohibited. If you have received this e-mail in error,
> please notify the sender and 

Re: [SR-Users] Printing xavp

2020-01-21 Thread Daniel-Constantin Mierla
Based on that function you can add a simplified one to print the format
you like.

Daniel

On 21.01.20 16:08, Ovidiu Sas wrote:
> This is to verbose and hard to read.
> I was looking for something more configurable from the script.
>
> -ovidiu
>
> On Tue, Jan 21, 2020 at 7:34 AM Daniel-Constantin Mierla
>  wrote:
>> Hello,
>>
>> if you are looking to print the content to syslog for troubleshooting,
>> then there is pv_xapv_print().
>>
>> Cheers,
>> Daniel
>>
>> On 20.01.20 23:07, Ovidiu Sas wrote:
>>> What's the best way to print the entire content of an xavp?
>>> The xavp_params_implode() doesn't print the entire stack of an xavp,
>>> only the top layer:
>>>
>>> The following code produces "c=d;e=f;"
>>> $xavp(x=>e) = "f";
>>> $xavp(x[0]=>c) = "d";
>>> $xavp(x[1]=>e) = "z";
>>> $xavp(x[1]=>c) = "y";
>>> xavp_params_implode("x", "$var(out)");
>>>
>>> Is there a way to print everything inside $xavp(x)?
>>>
>>> Thanks,
>>> Ovidiu
>>>
>>> ___
>>> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
>> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
>> www.kamailioworld.com
>>
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com


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


Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-01-21 Thread Nuno Ferreira
Hi Daniel,

Thanks for your feedback.
I have a dedicated listen directive for JSONRPC
listen = 127.0.0.1:8000

and then an event_route for it:
event_route[xhttp:request] {
if ($Rp != 8000) {
xhttp_reply("403", "Forbidden", "text/html",
"Forbidden");
exit;
}
if ($hu =~ "^/RPC") {
jsonrpc_dispatch();
} else {
xhttp_reply("200", "OK", "text/html", "Wrong URL
$hu");
}
return;
}

So, I'm already doing HTTP traffic only in port 8000.
The interesting part is that if I use kamcmd pl.list pipe_INVITE, only the
first log line is printed. Using curl, I see the other 2 logs all the time.

Thank you

On Tue, Jan 21, 2020 at 2:45 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> can you want the traffic on port 8000 and see if there is no "unexpected"
> traffic there? There should be no error message for parsing the first line
> of an HTTP request.
>
> The error message related the missing pipe can be made debug.
>
> Cheers,
> Daniel
> On 21.01.20 15:34, Nuno Ferreira wrote:
>
> Hi all,
>
> I'm using pipelimit with the "clean_unused" option to get rid of pipes
> that are not used for quite some time. At the same time we are monitoring
> pipelimit with a jsonrpc call similar to:
>
> # curl --header 'Content-Type: application/json' --data-binary '{"id": 1,
> "jsonrpc": "2.0", "method": "pl.list", "params": ["pipe_INVITE"]'
> http://127.0.0.1:8000/RPC
>
> Reply:
> {
>"jsonrpc": "2.0",
>"error": {
>   "code": 400,
>   "message": "Unknown pipe id pipe_INVITE"
>},
>"id": 1
> }
>
> The above reply is valid because the pipe_INVITE was not loaded yet, but
> the request makes kamailio to log the following log messages:
>
> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: pipelimit [pl_ht.c:519]:
> rpc_pl_list(): no pipe: pipe_INVITE
> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: 
> [core/parser/parse_fline.c:262]: parse_first_line(): parse_first_line: bad
> message (offset: 20)
> Jan 20 11:21:48 proxy1 kamailio[24474]: [466B blob data]
>
> Since the monitoring system does periodic requests, those log lines get a
> bit annoying and fill the log with ERROR messages that aren't really errors.
>
> IMHO the first log line should be converted to DEBUG instead of ERROR, but
> I have some doubts about the one from parse_fline.c:262. parse_first_line()
> is used to process both SIP and HTTP. It makes sense to log ERROR if SIP
> but not in the case of HTTP...
> Regarding the "[466B blob data]" I really don't know from where it's
> coming from.
> I can submit a PR, but I would like to have first some feedback from you.
>
> Thank you,
>
> Nuno
>
>
> *Confidentiality Notice: The information contained in this e-mail and any
> attachments may be confidential. If you are not an intended recipient, you
> are hereby notified that any dissemination, distribution or copying of this
> e-mail is strictly prohibited. If you have received this e-mail in error,
> please notify the sender and permanently delete the e-mail and any
> attachments immediately. You should not retain, copy or use this e-mail or
> any attachment for any purpose, nor disclose all or any part of the
> contents to any other person. Thank you.*
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
> www.kamailioworld.com
>
>

-- 
*Confidentiality Notice: The information contained in this e-mail and any

attachments may be confidential. If you are not an intended recipient, you

are hereby notified that any dissemination, distribution or copying of this

e-mail is strictly prohibited. If you have received this e-mail in error,

please notify the sender and permanently delete the e-mail and any

attachments immediately. You should not retain, copy or use this e-mail or

any attachment for any purpose, nor disclose all or any part of the

contents to any other person. Thank you.*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Printing xavp

2020-01-21 Thread Ovidiu Sas
Here's something that works:
$xavp(x=>a) = "1";
$xavp(x[0]=>b) = "2";
$xavp(x=>a) = "10";
$xavp(x[0]=>b) = "20";
$xavp(x=>a) = "100";
$xavp(x[0]=>b) = "200";


$var(i) = 0;
while (pv_isset("$xavp(x[$var(i)])")) {
xlog("L_INFO", "[$mi] xavp_copy $var(i)\n");
xavp_copy("x", "$var(i)", "y");
$var(i) = $var(i) + 1;
}
xlog("L_INFO", "[$mi] x is duplicated to y\n");

$var(i) = 0;
while (pv_isset("$xavp(y[0])")) {
xavp_params_implode("y", "$var(out)");
xlog("L_INFO", "[$mi] xavp(y[$var(i)])=$var(out)\n");
pv_unset("$xavp(y[0)");
$var(i) = $var(i) + 1;
}


The output:
Jan 21 10:18:12 asrock k[29060]: INFO: 

Re: [SR-Users] Printing xavp

2020-01-21 Thread Ovidiu Sas
This is to verbose and hard to read.
I was looking for something more configurable from the script.

-ovidiu

On Tue, Jan 21, 2020 at 7:34 AM Daniel-Constantin Mierla
 wrote:
>
> Hello,
>
> if you are looking to print the content to syslog for troubleshooting,
> then there is pv_xapv_print().
>
> Cheers,
> Daniel
>
> On 20.01.20 23:07, Ovidiu Sas wrote:
> > What's the best way to print the entire content of an xavp?
> > The xavp_params_implode() doesn't print the entire stack of an xavp,
> > only the top layer:
> >
> > The following code produces "c=d;e=f;"
> > $xavp(x=>e) = "f";
> > $xavp(x[0]=>c) = "d";
> > $xavp(x[1]=>e) = "z";
> > $xavp(x[1]=>c) = "y";
> > xavp_params_implode("x", "$var(out)");
> >
> > Is there a way to print everything inside $xavp(x)?
> >
> > Thanks,
> > Ovidiu
> >
> > ___
> > 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
> www.kamailioworld.com
>


-- 
VoIP Embedded, Inc.
http://www.voipembedded.com

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


Re: [SR-Users] Get destination IP from forwarded invite

2020-01-21 Thread Sergiu Pojoga
Hi Cumhur,

ruri.hostport won't return the de-facto IPv[4,6] address if the RURI
contains a domain name, that's why ppl have suggested to use the
*onsend_route*, as it's the only route where the IP is exposed after DNS
resolver is performed following the t_relay() or forward().

Cheers.

On Tue, Jan 21, 2020 at 8:16 AM CUMHUR KARAHAN <
cumhur.kara...@consultant.turkcell.com.tr> wrote:

> Hi again,
>
> I used $sel(ruri.hostport) for Kamailio1 after t_relay in Relay route. So
> I managed to get the request-line URI's IP and port parameters of the
> outgoing INVITE that is leaving the first Kamailio box.
>
> Thank you very much.
>
> -Original Message-
> From: sr-users  On Behalf Of CUMHUR
> KARAHAN
> Sent: 17 Ocak 2020 Cuma 15:23
> To: sr-users@lists.kamailio.org
> Subject: Re: [SR-Users] Get destination IP from forwarded invite
>
> Hi Joel,
>
> Thank you for your response.
>
> In fact, I want to get Request-line URI's parameters of the outgoing
> INVITE that is leaving the first Kamailio box, briefly. Unfortunately "du -
> destination URL" or "sndto(name)" pseudo-variables indicate the next hope's
> information. And in this case, the next hope's information is not same as
> the ClientB's information.
>
> As I tried to tell before, our setup is like that:
>
> ClientA -> Kamailio1 -> Kamailio2 -> ClientB
>
> I need the request line URI parameters of the invite message sent by
> Kamailio1 to Kamailio2. And these parameters contain ClientB's ip and port
> information such as 10.252.180.51:36945 as you can see below:
>
> INVITE sip:905364167881@10.252.180.51:36945;transport=tls SIP/2.0
> Record-Route:
> 
> Record-Route:  ;transport=tls;r2=on;lr;did=7f5.f572;nat=yes>
> Via: SIP/2.0/UDP
> gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0593548557.1;i=f
> Via: SIP/2.0/TLS 100.64.13.139:56993
> ;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;rport=32980
> From: ;tag=WbINy0ypx
> To: sip:905364167...@testsip.tvoip.turkcell.com.tr
> CSeq: 21 INVITE
> Call-ID: 1wF-vjzGIX
> ...
>
> And, your question: no, we don't use the dispatcher mechanism. We just
> check the DB to find out Kamailio server which the number registered into
> and send the messages to this server basically.
>
> Thanks for all...
>
>
> -Original Message-
> From: sr-users  On Behalf Of
> sr-users-requ...@lists.kamailio.org
> Sent: 17 Ocak 2020 Cuma 14:00
> To: sr-users@lists.kamailio.org
> Subject: sr-users Digest, Vol 176, Issue 17
>
> Send sr-users mailing list submissions to
> sr-users@lists.kamailio.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-requ...@lists.kamailio.org
>
> You can reach the person managing the list at
> sr-users-ow...@lists.kamailio.org
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
>1. Get destination IP from forwarded invite (CUMHUR KARAHAN)
>2. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
>3. Re: Get destination IP from forwarded invite (Joel Serrano)
>4. Re: Kamalio + RTP Engine + SIP Client behind NAT
>   (Nuno Miguel Reis)
>5. Re: Kamailio/RTC dinner at Fosdem 2020 (Federico Santulli)
>6. Re: http_client interface (Daniel-Constantin Mierla)
>7. Re: Kamailio stop to process incoming SIP traffic via TCP.
>   (adeykunov)
>8. Question about xhttp module kamailio 5.2.x (Jimmy Rodley)
>9. Trouble with 302 Redirect (Jim Leahy)
>   10. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
>   11. Re: http_client interface (Fred Posner)
>   12. Re: Trouble with 302 Redirect (Alex Balashov)
>   13. UCaaS Platform (Dario Vargas)
>   14. Re: [commercial announcement] (Henning Westerholt)
>
>
> --
>
> Message: 1
> Date: Thu, 16 Jan 2020 11:45:15 +
> From: CUMHUR KARAHAN 
> To: "sr-users@lists.kamailio.org" 
> Subject: [SR-Users] Get destination IP from forwarded invite
> Message-ID:
> <319901a90d17413292ad249eb56df...@consultant.turkcell.com.tr>
> Content-Type: text/plain; charset="utf-8"
>
>
> Hi all,
>
> I'm a newbie for Kamailio and working on a feature needs end-users'
> destination IP in the first transferred/forwarded invite message.
>
> Basically, our system/call flow is like:
> ClientA -> Kamailio1 -> Kamailio2 -> ClientB
>
> Invite from the clientA:
>
> tls:212.252.34.165:32980
> tls:172.21.193.100:5061
> INVITE sip:905364167...@testsip.tvoip.turkcell.com.tr:443 SIP/2.0
> Via: SIP/2.0/TLS 100.64.13.139:56993;branch=z9hG4bK.GoiTxA4Ee;rport
> From: ;tag=WbINy0ypx
> To: sip:905364167...@testsip.tvoip.turkcell.com.tr
> CSeq: 20 INVITE
> ...
>
> Needed Ip (Client B's IP 10.252.180.51 for this case) is in the INVITE row
> of the forwarded message.
>
> Invite to the 

Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

can you want the traffic on port 8000 and see if there is no
"unexpected" traffic there? There should be no error message for parsing
the first line of an HTTP request.

The error message related the missing pipe can be made debug.

Cheers,
Daniel

On 21.01.20 15:34, Nuno Ferreira wrote:
> Hi all,
>
> I'm using pipelimit with the "clean_unused" option to get rid of pipes
> that are not used for quite some time. At the same time we are
> monitoring pipelimit with a jsonrpc call similar to:
>
> # curl --header 'Content-Type: application/json' --data-binary '{"id":
> 1, "jsonrpc": "2.0", "method": "pl.list", "params": ["pipe_INVITE"]'
> http://127.0.0.1:8000/RPC
>
> Reply:
> {
>    "jsonrpc": "2.0",
>    "error": {
>       "code": 400,
>       "message": "Unknown pipe id pipe_INVITE"
>    },
>    "id": 1
> }
>
> The above reply is valid because the pipe_INVITE was not loaded yet,
> but the request makes kamailio to log the following log messages:
>
> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: pipelimit
> [pl_ht.c:519]: rpc_pl_list(): no pipe: pipe_INVITE
> Jan 20 11:21:48 proxy1 kamailio[24474]: ERROR: 
> [core/parser/parse_fline.c:262]: parse_first_line(): parse_first_line:
> bad message (offset: 20)
> Jan 20 11:21:48 proxy1 kamailio[24474]: [466B blob data]
>
> Since the monitoring system does periodic requests, those log lines
> get a bit annoying and fill the log with ERROR messages that aren't
> really errors.
>
> IMHO the first log line should be converted to DEBUG instead of ERROR,
> but I have some doubts about the one
> from parse_fline.c:262. parse_first_line() is used to process both SIP
> and HTTP. It makes sense to log ERROR if SIP but not in the case of
> HTTP...
> Regarding the "[466B blob data]" I really don't know from where it's
> coming from.
> I can submit a PR, but I would like to have first some feedback from you.
>
> Thank you,
>
> Nuno
>
>
> *Confidentiality Notice: The information contained in this e-mail and any
> attachments may be confidential. If you are not an intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this
> e-mail is strictly prohibited. If you have received this e-mail in error,
> please notify the sender and permanently delete the e-mail and any
> attachments immediately. You should not retain, copy or use this e-mail or
> any attachment for any purpose, nor disclose all or any part of the
> contents to any other person. Thank you.*
>
> ___
> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com

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


Re: [SR-Users] TLS Profiles : server_name and server_id query

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

looks like a bug in that matching conditions. I guess I used with same
value for server id and server name, so the issue was not exposed. I
will fix it soon.

Cheers,
Daniel

On 21.01.20 13:54, mahesh b wrote:
> Hi All,
>
> Am using kamailio 5.1.9 version
>
> From http://www.kamailio.org/docs/modules/5.1.x/modules/tls.html , i
> understand " The value for server_id can be any string, being used to
> match TLS client config profile, overriding the match on ip:port and
> server_name. " 
>
> Which suggests that the server_name and server_id can be different for
> a tls profile 
>
> IN my tls.cfg i have [client:default] verify_certificate = no
> require_certificate = no [client:10.211.160.172:5071
> ] method = TLSv1.2 verify_certificate =
> yes require_certificate = yes private_key =
> /ssl/sip/profile1/server.key certificate =
> /ssl/sip/profile1/server.crt ca_list = /ssl/sip/profile1/ca.crt
> cipher_list = RSA verify_depth = 9 server_id = profile1 server_name =
> btip.176.com  And in sar.cfg i am doing, before
> sending the request out $xavp(tls=>server_name)="btip.176.com
> "; $xavp(tls[0]=>server_id)="profile1"; But if i
> see the logs , its picking client default profile for tls handshake,
> Am i missing anything in tls.cfg or sar.cfg ?
> if i see the code in tls_lookup_cfg()
> while (p) {
>   if(srvid && srvid->len>0) {
>   LM_DBG("comparing addr: [%s:%d] [%s:%d] -- id: [%.*s] [%.*s]\n",
>   ip_addr2a(>ip), p->port, ip_addr2a(ip), port,
>   p->server_id.len, ZSW(p->server_id.s),
>   srvid->len, ZSW(srvid->s));
>   if(p->server_id.s && p->server_id.len==srvid->len
>   && strncasecmp(p->server_name.s, srvid->s, srvid->len)==0) {
>   LM_DBG("TLS config found by server id\n");
>   return p;
>   }  Why is that there is a strncasecmp between p->server_name.s
> and srvid->s ?? the strncasecmp should be between p->server_id.s and
> srvid->s right ?
>
> Regards, Mahesh.B
>
>
> ___
> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com

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


Re: [SR-Users] Get destination IP from forwarded invite

2020-01-21 Thread CUMHUR KARAHAN
Hi again,

I used $sel(ruri.hostport) for Kamailio1 after t_relay in Relay route. So I 
managed to get the request-line URI's IP and port parameters of the outgoing 
INVITE that is leaving the first Kamailio box.

Thank you very much.

-Original Message-
From: sr-users  On Behalf Of CUMHUR KARAHAN
Sent: 17 Ocak 2020 Cuma 15:23
To: sr-users@lists.kamailio.org
Subject: Re: [SR-Users] Get destination IP from forwarded invite

Hi Joel,

Thank you for your response. 

In fact, I want to get Request-line URI's parameters of the outgoing INVITE 
that is leaving the first Kamailio box, briefly. Unfortunately "du - 
destination URL" or "sndto(name)" pseudo-variables indicate the next hope's 
information. And in this case, the next hope's information is not same as the 
ClientB's information.

As I tried to tell before, our setup is like that:

ClientA -> Kamailio1 -> Kamailio2 -> ClientB

I need the request line URI parameters of the invite message sent by Kamailio1 
to Kamailio2. And these parameters contain ClientB's ip and port information 
such as 10.252.180.51:36945 as you can see below:

INVITE sip:905364167881@10.252.180.51:36945;transport=tls SIP/2.0
Record-Route: 
Record-Route: 

Via: SIP/2.0/UDP 
gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0593548557.1;i=f
Via: SIP/2.0/TLS 
100.64.13.139:56993;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;rport=32980
From: ;tag=WbINy0ypx
To: sip:905364167...@testsip.tvoip.turkcell.com.tr
CSeq: 21 INVITE
Call-ID: 1wF-vjzGIX
...

And, your question: no, we don't use the dispatcher mechanism. We just check 
the DB to find out Kamailio server which the number registered into and send 
the messages to this server basically. 

Thanks for all...


-Original Message-
From: sr-users  On Behalf Of 
sr-users-requ...@lists.kamailio.org
Sent: 17 Ocak 2020 Cuma 14:00
To: sr-users@lists.kamailio.org
Subject: sr-users Digest, Vol 176, Issue 17

Send sr-users mailing list submissions to
sr-users@lists.kamailio.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-requ...@lists.kamailio.org

You can reach the person managing the list at
sr-users-ow...@lists.kamailio.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of sr-users digest..."


Today's Topics:

   1. Get destination IP from forwarded invite (CUMHUR KARAHAN)
   2. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
   3. Re: Get destination IP from forwarded invite (Joel Serrano)
   4. Re: Kamalio + RTP Engine + SIP Client behind NAT
  (Nuno Miguel Reis)
   5. Re: Kamailio/RTC dinner at Fosdem 2020 (Federico Santulli)
   6. Re: http_client interface (Daniel-Constantin Mierla)
   7. Re: Kamailio stop to process incoming SIP traffic via TCP.
  (adeykunov)
   8. Question about xhttp module kamailio 5.2.x (Jimmy Rodley)
   9. Trouble with 302 Redirect (Jim Leahy)
  10. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
  11. Re: http_client interface (Fred Posner)
  12. Re: Trouble with 302 Redirect (Alex Balashov)
  13. UCaaS Platform (Dario Vargas)
  14. Re: [commercial announcement] (Henning Westerholt)


--

Message: 1
Date: Thu, 16 Jan 2020 11:45:15 +
From: CUMHUR KARAHAN 
To: "sr-users@lists.kamailio.org" 
Subject: [SR-Users] Get destination IP from forwarded invite
Message-ID:
<319901a90d17413292ad249eb56df...@consultant.turkcell.com.tr>
Content-Type: text/plain; charset="utf-8"


Hi all,

I'm a newbie for Kamailio and working on a feature needs end-users' destination 
IP in the first transferred/forwarded invite message.

Basically, our system/call flow is like:
ClientA -> Kamailio1 -> Kamailio2 -> ClientB

Invite from the clientA:

tls:212.252.34.165:32980
tls:172.21.193.100:5061
INVITE sip:905364167...@testsip.tvoip.turkcell.com.tr:443 SIP/2.0
Via: SIP/2.0/TLS 100.64.13.139:56993;branch=z9hG4bK.GoiTxA4Ee;rport
From: ;tag=WbINy0ypx
To: sip:905364167...@testsip.tvoip.turkcell.com.tr
CSeq: 20 INVITE
...

Needed Ip (Client B's IP 10.252.180.51 for this case) is in the INVITE row of 
the forwarded message.

Invite to the Kamailio2 :

udp:172.21.193.100:5060
udp:172.21.193.98:5060
INVITE sip:905364167881@10.252.180.51:36945;transport=tls SIP/2.0
Record-Route: 
Record-Route: 

Via: SIP/2.0/UDP 
gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0593548557.1;i=f
Via: SIP/2.0/TLS 
100.64.13.139:56993;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;rport=32980
From: ;tag=WbINy0ypx
To: sip:905364167...@testsip.tvoip.turkcell.com.tr
CSeq: 21 INVITE
...

When the first invite message receives, the dialog variables or sel(msg...) 
parsed values belong to this first received message, as far as I understand 
during the tests. However I need the 

[SR-Users] TLS Profiles : server_name and server_id query

2020-01-21 Thread mahesh b
Hi All,

Am using kamailio 5.1.9 version

>From http://www.kamailio.org/docs/modules/5.1.x/modules/tls.html , i
understand " The value for server_id can be any string, being used to match
TLS client config profile, overriding the match on ip:port and server_name.
 "

Which suggests that the server_name and server_id can be different for a
tls profile

IN my tls.cfg i have [client:default]
verify_certificate = no
require_certificate = no
[client:10.211.160.172:5071]
method = TLSv1.2
verify_certificate = yes
require_certificate = yes
private_key = /ssl/sip/profile1/server.key
certificate = /ssl/sip/profile1/server.crt
ca_list = /ssl/sip/profile1/ca.crt
cipher_list = RSA
verify_depth = 9
server_id = profile1
server_name = btip.176.com And in sar.cfg i am doing, before sending the
request out $xavp(tls=>server_name)="btip.176.com";
$xavp(tls[0]=>server_id)="profile1"; But if i see the logs , its picking
client default profile for tls handshake, Am i missing anything in tls.cfg
or sar.cfg ?
if i see the code in tls_lookup_cfg()

while (p) {
if(srvid && srvid->len>0) {
LM_DBG("comparing addr: [%s:%d] [%s:%d] -- id: [%.*s] [%.*s]\n",
ip_addr2a(>ip), p->port, ip_addr2a(ip), port,
p->server_id.len, ZSW(p->server_id.s),
srvid->len, ZSW(srvid->s));
if(p->server_id.s && p->server_id.len==srvid->len
&& strncasecmp(p->server_name.s, srvid->s, srvid->len)==0) {
LM_DBG("TLS config found by server id\n");
return p;
}  Why is that there is a strncasecmp between p->server_name.s and
srvid->s ?? the strncasecmp should be between p->server_id.s and srvid->s
right ?
Regards, Mahesh.B
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Printing xavp

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

if you are looking to print the content to syslog for troubleshooting,
then there is pv_xapv_print().

Cheers,
Daniel

On 20.01.20 23:07, Ovidiu Sas wrote:
> What's the best way to print the entire content of an xavp?
> The xavp_params_implode() doesn't print the entire stack of an xavp,
> only the top layer:
>
> The following code produces "c=d;e=f;"
> $xavp(x=>e) = "f";
> $xavp(x[0]=>c) = "d";
> $xavp(x[1]=>e) = "z";
> $xavp(x[1]=>c) = "y";
> xavp_params_implode("x", "$var(out)");
>
> Is there a way to print everything inside $xavp(x)?
>
> Thanks,
> Ovidiu
>
> ___
> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com


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


Re: [SR-Users] [EXT] Re: Kamailio 5.2.2 IMS -enum_query question

2020-01-21 Thread Woscek, Martin W.
Hi Henning,

It turned out that I didn't know how an e.164 lookup is initiated particularly 
the required format of the calling number.
Reading through the source code, the function call: is_e164() showed I was 
missing the leading + char.  I also noticed that I missed the LM_ERR in my log 
files eg:
Jan 10 10:50:11 imskamailio /usr/local/sbin/kamailio[24552]: ERROR: enum 
[enum.c:840]: enum_query(): R-URI user '<1234567>' is not an E164 number

In our case we are looking at standing up a ENUM server that can be queried for 
specific user characteristics to complete a call, so now we append the '+' when 
we want to check a caller or callee:
enum_pv_query("+$rU", "enumsvc.e164.arpa.", "sip+video")
enum_pv_query("+$fU", " enumsvc.e164.arpa", "+sip+video")

All is good now.

Thanks!
Martin

From: Henning Westerholt 
Sent: Saturday, January 18, 2020 6:47 AM
To: Kamailio (SER) - Users Mailing List ; Woscek, 
Martin W. 
Subject: [EXT] Re: [SR-Users] Kamailio 5.2.2 IMS -enum_query question


Hello Martin,

do you see any errors in the log file during the time that you execute the 
enum_query? Have you tried to test it with activated debug logging?

Cheers,

Henning
Am 10.01.20 um 17:57 schrieb Woscek, Martin W.:
Hi,

I am trying to invoke unum lookups from calls to enum_query() 
,is_from_user_enum() and  enum_pv_query().
However we are not seeing any enum lookups over the wire using wireshark.

In the Kamailio.cfg the following are set:

loadmodule "enum"
modparam("enum", "domain_suffix", "mydnsserver.org.")
modparam("enum", "i_enum_suffix", " mydnsserver.org.")

sample use in our Kamailio.cfg file:

if(!enum_query("mydnsserver.org.")) {
xlog(");
#do something
} else {
Xlog("")
#do something else
}

I do see NAPTR lookups being done by the other Kamailio IMS processes initially 
when it starts up so I know it has connectivity to the DNS server, but none for 
the invoked enum queries.

We are running Kamailio 5.2.2.

Thanks,
Martin



___

Kamailio (SER) - Users Mailing List

sr-users@lists.kamailio.org

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--

Henning Westerholt - https://skalatan.de/blog/

Kamailio services - https://gilawa.com

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


Re: [SR-Users] Kamailio service error

2020-01-21 Thread Voip support
I think you need to capture w tcpdump on kamailio port and then check what
packet is causing this.

tcmdump -f "port 5060" -w file.pcap

Then open file in wireshark and try figure out ( i think not valid sip
packet coming on 5060 port).

wt., 21 sty 2020 o 11:26 Mike from ApoloCore 
napisał(a):

> I think you need to capture w tcpdump on kamailio port and then check what
> packet is causing this.
>
> tcmdump -f "port 5060" -w file.pcap
>
> Then open file in wireshark and try figure out ( i think not valid sip
> packet coming on 5060 port).
>
> wt., 14 sty 2020 o 08:54 Alex Balashov 
> napisał(a):
>
>> It would appear that an incoming SIP message has one or more
>> grammatically invalid headers that confuse the parser?
>>
>> —
>> Sent from mobile, with due apologies for brevity and errors.
>>
>> > On Jan 14, 2020, at 2:37 AM, Ratanraj Singh 
>> wrote:
>> >
>> > 
>> > Hi All,
>> > I am troubling with kamailio service error. Can  someone help on this
>> issue?
>> >
>> >
>> > 
>> >
>> > ___
>> > 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


Re: [SR-Users] Possible bug in Presence module !?

2020-01-21 Thread Daniel-Constantin Mierla
Hello,

are the notify requests for the same event? Can you paste here the
subscriber and reply, along with the first two notify requests that have
same version?

Cheers,
Daniel

On 19.01.20 03:47, SamyGo wrote:
> Hi, 
> I'm experiencing a strange behavior with the Kamailio presence module.
> I've a Polycom phone which takes the the XML tag "version" very
> seriously and so as soon it SUBSCRIBEs to a parking lot a NOTIFY is
> sent from server with "version=1" - When the Parking lot/extension
> gets busy it receives the second NOTIFY with "version=1" whereas it
> should've been 2. So it fails to light up the BLF icons.
>
> Now, any further notify correctly increments the version tag and
> Polycom blf works fine until its SUBSCRIBE expires and the first cycle
> of NOTIFY is exchanged. 
>
> I can tell its a bug because for each NOTIFY the
> /event_route[tm:local-request]/ prints the attribute $subs(version)
> and it correctly shows the sequence 1,2,3...onwards, However the
> sngrep/network trace tells it differently, the version shows up as
> 1,1,2,3...onwards 
>
> *_version:_* kamailio 5.2.3 (x86_64/linux) c36229
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
> SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
> USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
> USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE
> 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: c36229
> compiled on 22:20:40 Jan 18 2020 with gcc 4.9.2
>
> *_MODULES:
>
> _*#!ifdef WITH_PRESENCE
> loadmodule "presence.so"
> loadmodule "presence_mwi.so"
> loadmodule "presence_xml.so"
> loadmodule "presence_dialoginfo.so"
> loadmodule "presence_reginfo.so"
> loadmodule "pua.so"
> loadmodule "pua_rpc.so"
> loadmodule "pua_dialoginfo.so"
> modparam("pua", "db_url", DBURL)
> modparam("pua", "db_mode", 2) 
> modparam("pua", "update_period", 60)
> modparam("pua", "dlginfo_increase_version", 0)
> modparam("pua", "reginfo_increase_version", 0)
> modparam("pua", "check_remote_contact", 1)
> modparam("pua", "fetch_rows", 1000)
> modparam("pua", "outbound_proxy", "sip:MY_HOST_IP:MY_HOST_PORT")
>
> modparam("pua_dialoginfo", "include_callid", 1)
> modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
> modparam("pua_dialoginfo", "caller_confirmed", 1)
> modparam("pua_dialoginfo", "include_tags", 1)
> modparam("pua_dialoginfo", "override_lifetime", 124)
>
> modparam("presence", "presentity_table", "presentity")
> modparam("presence", "active_watchers_table", "active_watchers")
> modparam("presence", "watchers_table", "watchers")
> modparam("presence", "db_update_period", 60)
> modparam("presence", "db_table_lock_type", 0)
> modparam("presence", "local_log_level", 3)
> modparam("presence", "notifier_processes", 10)
> modparam("presence", "force_delete", 0)
> modparam("presence", "subs_db_mode", 2)
> modparam("presence", "db_table_lock_type", 0)
> modparam("presence", "expires_offset", 60)
> modparam("presence", "send_fast_notify", 1) 
> modparam("presence", "clean_period", 30)
> modparam("presence", "publ_cache", 0) 
> modparam("presence", "min_expires_action", PRESENCE_MIN_EXPIRES_ACTION)
> modparam("presence", "min_expires", PRESENCE_MIN_EXPIRES)
> modparam("presence", "max_expires", PRESENCE_MAX_EXPIRES)
> modparam("presence", "sip_uri_match", 1)
> modparam("presence", "waitn_time", 1)
> modparam("presence", "db_url", DBURL)
> modparam("presence", "server_address", "sip:MY_HOST_IP:MY_HOST_PORT")
>
> modparam("presence_xml", "force_dummy_presence", 1)
> modparam("presence_xml", "force_active", 1)
> modparam("presence_xml", "db_url", DBURL)
>
> modparam("presence_dialoginfo", "force_single_dialog", 1)
> modparam("presence_dialoginfo", "force_dummy_dialog", 1)
> #!endif
> *_
> _*
> *_
> _*
> Looking to find some answers,
> Thanks,
> Sammy
> *_
> _*
>
> ___
> 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 Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com

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


Re: [SR-Users] systemd - properly starting up rtpengine with kernel forwarding

2020-01-21 Thread Daniel-Constantin Mierla

On 17.01.20 15:50, Richard Fuchs wrote:
> On 17/01/2020 09.01, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> do people here have (implemented) special ways to properly start
>> rtpengine with kernel forwarding after system reboot?
> On our own systems, we have xt_RTPENGINE loaded through
> modules-load.d, and the iptables rule added through
> iptables-persistent. But obviously this is not a generic solution as
> there are dependencies.
>> Not strictly related, but if someone is aware or had some experiences
>> with,  I am curious if "echo 'del 0' > /proc/rtpengine/control" is
>> really needed because on a system where I forgot to have it in the
>> scripts (well, was commented), I haven't noticed any issues after
>> rtpengine restarts.
>
> This is not actually required any more. The daemon itself handles this
> on startup now.
Thanks for clarifying its status!

Cheers, Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com


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