Re: [SR-Users] Incoming call on Kamailio WebRTC

2018-09-17 Thread Henning Westerholt
Am Montag, 17. September 2018, 12:21:50 CEST schrieb Adesh Pandey: > We are trying to setup WebRTC with Kamailio as sip registrar and > dispatcher. We have succeed for outgoing calls but cannot attend incoming > calls to the Kamailio. It would be a great help if someone can provide a > sample

Re: [SR-Users] Can't get from cache: $sqlrows(asg)

2018-09-17 Thread Henning Westerholt
Am Montag, 17. September 2018, 14:40:43 CEST schrieb David Villasmil: > Module config: > modparam("sqlops","sqlcon","asg=>mysql://DB_USER:DB_PASS@DB_HOST/kamailio") > Route: > sql_query("asg", "insert ignore dispatcher (id, setid, destination, > flags, priority, attrs, description) values

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Juha Heinanen writes: > I'll backport to 5.1. cherry-pick didn't work: $ git cherry-pick -x f088d2afe4153b9e440a4293211c78f5a25af691 error: could not apply f088d2afe... core: if nosip msg hooks skip handling the packet, stop sip routing processing hint: after resolving the conflicts, mark the

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Duarte Rocha
I want to add to Kamailio's. This INVITE arrives at Kamailio with no Record-Route. It leaves Kamailio with two Record-Routes since i'm using one IP for receiving and another for sending. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Duarte Rocha
When Kamailio receives the INVITE, it relays it with two Record-Route like this : Record-Route:sip:IP1;ftag=;vst=xxx;vsf=xxx Record-Route:sip:IP2;ftag=;vst=xxx;vsf=xxx What i want is : Record-Route:sip:IP1;ftag=;vst=xxx;vsf=xxx;NEW_PARAMETER=10

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I guess you have some modules that registered to process non-sip > traffic, such as xhttp, xmlrpc, ... the parse_msg() throws error and in > such case the processing is delegated to non-sip message handling, if > all skipped, then ended up on trying going

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Alex Balashov
You want to add new parameters to someone else's Record-Routes, or Kamailio's? On Mon, Sep 17, 2018 at 03:59:14PM +0100, Duarte Rocha wrote: > When Kamailio receives the INVITE, it relays it with two Record-Route like > this : > > Record-Route:sip:IP1;ftag=;vst=xxx;vsf=xxx >

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Daniel-Constantin Mierla
I will check the cherry pick conflict and do the backport manually if needed once. Going to be a bit later today. Cheers, Daniel On Mon, 17 Sep 2018, 17:05 Juha Heinanen, wrote: > Juha Heinanen writes: > > > I'll backport to 5.1. > > cherry-pick didn't work: > > $ git cherry-pick -x

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I will check the cherry pick conflict and do the backport manually if > needed once. Going to be a bit later today. I did it. There was only one small conflict. -- Juha ___ Kamailio (SER) - Users Mailing List

[SR-Users] Where does location ruid come from?

2018-09-17 Thread David Cunningham
Hello, We are debugging an issue with location records having duplicate "ruid" values, which aren't allowed by the table index. Can anyone tell us where the "ruid" value comes from? Is it a function of some other variable? Thanks in advance, -- David Cunningham, Voisonics Limited

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Juha Heinanen
Duarte Rocha writes: > When Kamailio receives the INVITE, it relays it with two Record-Route like > this : > > Record-Route:sip:IP1;ftag=;vst=xxx;vsf=xxx > Record-Route:sip:IP2;ftag=;vst=xxx;vsf=xxx > What i want is : > >

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Duarte Rocha
Thanks for all your help. With record_route_preset(string[,string2]) i can place the parameters as i want. The only problem is that using record_route_preset, it doesn't add all the parameters that it usually does, like "vst", vsf" and "r2", only the ftag. However, it might be possible get those

[SR-Users] MWI notification through pua.publish

2018-09-17 Thread willy
Hello. Have anyone tried to use pua.publish to send MWI notification? Can it work at all? I'm sending request through jsonrpc server, but it is not dispatched by handle_publish. Thank you, Kirill ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] re- double record route

2018-09-17 Thread Mojtaba
Your response confused me, But let me describe some rules. The BYE request is used the record route header in it's INVITE request in Dialogs. Then when UE want to send BYE, It add a all record route in BYE message. On other hand, the SIP stack that UE is used, may be different, So you must be sure

[SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
Hi I'm building some system with failover trunk but my providers requires to set their doamin in domain part of To Header so when I rewrite it at the my failure_route $td = FAILOVER_PROVIDER my To filed looks like To: what i tried: Move this change to BRANCH_ROUTE: here tried as $td = as

[SR-Users] Incoming call on Kamailio WebRTC

2018-09-17 Thread Adesh Pandey
Hi All, We are trying to setup WebRTC with Kamailio as sip registrar and dispatcher. We have succeed for outgoing calls but cannot attend incoming calls to the Kamailio. It would be a great help if someone can provide a sample config for webrtc + kamailio or blog for the same. Thanking you all --

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Sergiu Pojoga
>From which route are you calling uac_replace_to(), failure_route? "This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE" On Mon, Sep 17, 2018 at 6:05 AM Yuriy Gorlichenko wrote: > I tried uac_replace_to() > But no luck > > пн, 17 сент. 2018 г. в 12:28, Alex Balashov : > >> That

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Sergiu Pojoga
Ok, what are your UAC parameters? On Mon, Sep 17, 2018 at 7:34 AM Yuriy Gorlichenko wrote: > No. Tried from branch route. > > пн, 17 сент. 2018 г., 14:25 Sergiu Pojoga : > >> From which route are you calling uac_replace_to(), failure_route? >> >> "This function can be used from REQUEST_ROUTE

[SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
In order to be able to fail2ban an attacker that sends tons of SIP requests with malformed request lines, it would need to be possible to generate an appropriate syslog message from config file. I didn't find any sanity module param value that would turn on checking of request line syntax. Any

[SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Juha Heinanen writes: > I didn't find any sanity module param value that would turn on checking > of request line syntax. Any other ideas? I added log message at the beginning of main route block: route { # main route block (initial tasks) xinfo("Here\n"); It was not printed when

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
No. Tried from branch route. пн, 17 сент. 2018 г., 14:25 Sergiu Pojoga : > From which route are you calling uac_replace_to(), failure_route? > > "This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE" > > On Mon, Sep 17, 2018 at 6:05 AM Yuriy Gorlichenko > wrote: > >> I tried

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
I tried uac_replace_to() But no luck пн, 17 сент. 2018 г. в 12:28, Alex Balashov : > That is not a safe way to change the To header, since proxies aren't > supposed to modify the To or From headers. > > The proper approach conceals the fact that modifications have taken place > from the caller:

[SR-Users] MWI notification through pua.publish

2018-09-17 Thread Juha Heinanen
willy writes: > Have anyone tried to use pua.publish to send MWI notification? Can it > work at all? > > I'm sending request through jsonrpc server, but it is not dispatched by > handle_publish. It works fine here. Last week I noticed an issue with pua.publish over jsonrpc and it was fixed.

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
But I rewrites succesfully with request_route Flow. Im rewriting it with out any issues пн, 17 сент. 2018 г., 12:23 Mojtaba : > The $td is read-only variable, and yoou could not change it's value. > If you want to change domain in To header, You should use testops > module in kamialio and

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Daniel-Constantin Mierla
Hello, try with event_route[core:receive-parse-error] { ... } The variables related to sip message content (headers, body, ...) likely not working there (should return null), but source IP/port should be good. Cheers, Daniel On 17.09.18 14:24, Juha Heinanen wrote: > Juha Heinanen writes: > >>

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Duarte Rocha
Can you show me where? I've tried add_rr_param() but it still adds every parameter to the two record-routes ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > try with event_route[core:receive-parse-error] { ... } > > The variables related to sip message content (headers, body, ...) likely > not working there (should return null), but source IP/port should be good. Thanks for the pointer. I defined:

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Juha Heinanen
Duarte Rocha writes: > Can you show me where? I've tried add_rr_param() but it still adds every > parameter to the two record-routes. I didn't quite understand your question. Perhaps you need to add the r-r headers using append_hf() function that allows you to customize them. -- Juha

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Daniel-Constantin Mierla
Can you send all log messages with debug=3? Btw, the source ip variable is $si. Cheers, Daniel On 17.09.18 15:42, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> try with event_route[core:receive-parse-error] { ... } >> >> The variables related to sip message content (headers,

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you send all log messages with debug=3? Below. > Btw, the source ip variable is $si. Oh yes, I had just copied the statement from other part of config, where $si has been assigned to $var(src_ip). -- Juha Sep 17 16:56:07 char /usr/bin/sip-proxy[24183]:

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you send all log messages with debug=3? I also started k with debug=3 to check that the event route is ok: Sep 17 17:00:40 char sip-proxy: DEBUG: [core/events.c:53]: sr_core_ert_init(): event_route[core:receive-parse-error] is defined -- Juha

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
all is default Maybe I need to set up something there? I jsut did not found anything about it at the docs пн, 17 сент. 2018 г. в 14:42, Sergiu Pojoga : > Ok, what are your UAC parameters? > > On Mon, Sep 17, 2018 at 7:34 AM Yuriy Gorlichenko > wrote: > >> No. Tried from branch route. >> >> пн,

[SR-Users] Dispatcher Active IP for specific SetID over xHTTP

2018-09-17 Thread Soltanici Ilie
How could I get the active IP from the dispatcher module for a specific setid  by using xHTTP request?___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
hmm Suppose you are correct Makes sence Yes I using on ly in the branch for the failure Thx for tip пн, 17 сент. 2018 г. в 15:58, Federico Cabiddu : > Hi, > I didn't understand from your mail if you are calling uac_replace_to() in > a branch route also for the first request or only when you hit

[SR-Users] Can't get from cache: $sqlrows(asg)

2018-09-17 Thread David Villasmil
Hello guys, i've got this in my config: Module config: modparam("sqlops","sqlcon","asg=>mysql://DB_USER:DB_PASS@DB_HOST/kamailio") Route: sql_query("asg", "insert ignore dispatcher (id, setid, destination, flags, priority, attrs, description) values (NULL, $var(dispatcher_id),

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Juha Heinanen
Duarte Rocha writes: > I need all of my kamailio's IPs in Record Routes and i can do that already. > What i want to do is add different parameters to each Record-Route. Is that > possible? Yes, read rr module README. -- Juha ___ Kamailio (SER) -

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Federico Cabiddu
Hi, I didn't understand from your mail if you are calling uac_replace_to() in a branch route also for the first request or only when you hit the failure route. Just in case, you need to call it in a branch route for the initial request too so to have a "clean" message when you run the failure

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Sergiu Pojoga
Yes you have to configure a few things, most importantly: https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.p.restore_mode https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.p.restore_dlg You have two choices: either you set it to restore from RR or you treat calls with

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Daniel-Constantin Mierla
I guess you have some modules that registered to process non-sip traffic, such as xhttp, xmlrpc, ... the parse_msg() throws error and in such case the processing is delegated to non-sip message handling, if all skipped, then ended up on trying going further as sip ... I just pushed a patch to