Re: [OpenSIPS-Users] uac_auth DB support

2024-01-08 Thread Schneur Rosenberg
Thanks Liviu, BTW it's not Sebastian. it's Schneur AKA Scott :-)

On Mon, Jan 8, 2024 at 9:34 AM Liviu Chircu  wrote:
>
> On 06.12.2023 16:18, S.Rosenberg wrote:
>
>
> I would like to know if OpenSIPS has a way to pull the registrant info via 
> code without manually doing a DB query?
>
> Hi Sebastian,
>
> A bit late to the party here, but try giving the sql_cacher a spin.  It also 
> works on top of cachedb_local (or any other NoSQL, for that matter...), 
> however it will help you:
>
> - cut down on the amount of LoC in your script (just configure the cached 
> table properties in the "modparam" section and you're good to go)
>
> - solve the problem of reloading the data (you can configure it with 
> on_demand=300, for example, in order to cache a given row for a maximum of 5 
> minutes)
>
> Best regards,
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
> OpenSIPS Summit 2024 Valencia, May 14-17 | www.opensips.org/events
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memory leak

2022-01-18 Thread Schneur Rosenberg
That's a given the question is can it mess up the active server if the
passive one was updated already? I'm not planning on leaving it like that I
just like to do the upgrades slowly, one at a time and test it and only
then to upgrade the second one.

Scott

On Wed, Jan 19, 2022, 09:26 Bogdan-Andrei Iancu  wrote:

> Hi Schneur,
>
> It is strongly recommend that all OpenSIPS nodes in a cluster  to have
> the same version.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 1/18/22 6:08 PM, Schneur Rosenberg wrote:
> > Hi, it seems like it was fixed in 3.2, I will have to migrate all my
> > servers, I use binary replication will it break if one server is
> > running 2.4 and the other 3.2? its a active/passive setup so I will
> > take down one at a time and upgrade it, I'm just worried what will
> > happen while one is 3.2 and the second one is still 2.4, in the past I
> > disabled the replication while I was doing the updates and I'm
> > wondering if its necessary.
> >
> > thanks
> > Scott (Schneur)
> >
> > On Fri, Dec 17, 2021 at 6:21 PM Bogdan-Andrei Iancu 
> wrote:
> >> While trying to reproduce (as I failed to do so), I noticed you
> mentioned this is on version 2.4.11, right ? As I was testing on 3.2
> without getting the leak.
> >>
> >> Could you try on 3.2/3.1 ? Keep in mind 2.4 is not maintained anymore :(
> >>
> >> Regards,
> >>
> >> Bogdan-Andrei Iancu
> >>
> >> OpenSIPS Founder and Developer
> >>https://www.opensips-solutions.com
> >> OpenSIPS eBootcamp 2021
> >>https://opensips.org/training/OpenSIPS_eBootcamp_2021/
> >>
> >> On 12/17/21 1:40 PM, Schneur Rosenberg wrote:
> >>
> >> Thanks Bogdan!, this is my entire local_route, all my dst_uri's are IP
> only.
> >>
> >> On Fri, Dec 17, 2021, 12:36 Bogdan-Andrei Iancu 
> wrote:
> >>> Hi Schneur,
> >>>
> >>> I suspect that the leaking mk_proxy is related to the changing of the
> >>> RURI in local route. Let me test your snippet. BTW, is that the whole
> >>> processing you do in local route? is the $rd (from LB) a FQDN or
> >>> straight IP ?
> >>>
> >>> Regards,
> >>>
> >>> Bogdan-Andrei Iancu
> >>>
> >>> OpenSIPS Founder and Developer
> >>> https://www.opensips-solutions.com
> >>> OpenSIPS eBootcamp 2021
> >>> https://opensips.org/training/OpenSIPS_eBootcamp_2021/
> >>>
> >>> On 12/16/21 9:43 AM, Schneur Rosenberg wrote:
> >>>> Hi Bogdan
> >>>>
> >>>> I think I found the issue, I recently added these lines of code,
> >>>> because of a probing issue I was having, I just searched from my
> >>>> previous tickets and I see that you have warned me about the
> >>>> implications but for some reason I never read the message.
> >>>>
> >>>> Here is the old ticket
> >>>> https://www.mail-archive.com/users@lists.opensips.org/msg43301.html
> >>>> the reason I'm using INVITE to probe is because I want the servers
> >>>> that were probed not only to respond but also check if the database is
> >>>> working, I did it this way because I had cases where mysql crashed but
> >>>> my asterisk servers were still responding to the probe but all of the
> >>>> calls just hung, so I do a invite and it does a DB lookup and it will
> >>>> only return a positive message if it was able to query the DB, do you
> >>>> have a better solution? at the time I set it up I couldn't run a query
> >>>> on receipt of a OPTIONS but perhaps I didn't look good enough :-),
> >>>> either way can I do anything to make sure this code doesn't leak
> >>>> memory? this probing has worked for years until I needed the Contact
> >>>> header.
> >>>>
> >>>> local_route {
> >>>>if (is_method("INVITE")&& $fU=="pingTest"){
> >>>>   $ru="sip:s@"+$rd ;
> >>>>   append_hf("Contact: \r\n");
> >>>>   exit;
> >>>>}
> >>>> }
> >>>>
> >>>> On Fri, Dec 10, 2021 at 2:16 PM Schneur Rosenberg
> >>>>  wrote:
> >>

Re: [OpenSIPS-Users] Setting Extensions via Rest API or Database writes

2022-01-04 Thread Schneur Rosenberg
OpenSIPS is nothing like Asterisk it's a completely different beast,
regarding your question yes it can use a DB to program stuff in realtime.

On Tue, Jan 4, 2022, 17:01 Nauman Sulaiman (SESSIONTALK) <
nau...@sessiontalk.co.uk> wrote:

> Hi,
>
> Just wondering if Opensips has something similar to Asterisk where one can
> setup
> extensions, queues etc via realtime database? Alternatively could it be
> done via RestAPI.
> If so, is all functionality configurable from remote or just some?
>
> Regards
> Nauman
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memory leak

2021-12-15 Thread Schneur Rosenberg
Hi Bogdan

I think I found the issue, I recently added these lines of code,
because of a probing issue I was having, I just searched from my
previous tickets and I see that you have warned me about the
implications but for some reason I never read the message.

Here is the old ticket
https://www.mail-archive.com/users@lists.opensips.org/msg43301.html
the reason I'm using INVITE to probe is because I want the servers
that were probed not only to respond but also check if the database is
working, I did it this way because I had cases where mysql crashed but
my asterisk servers were still responding to the probe but all of the
calls just hung, so I do a invite and it does a DB lookup and it will
only return a positive message if it was able to query the DB, do you
have a better solution? at the time I set it up I couldn't run a query
on receipt of a OPTIONS but perhaps I didn't look good enough :-),
either way can I do anything to make sure this code doesn't leak
memory? this probing has worked for years until I needed the Contact
header.

local_route {
 if (is_method("INVITE")&& $fU=="pingTest"){
$ru="sip:s@"+$rd ;
append_hf("Contact: \r\n");
exit;
     }
}

On Fri, Dec 10, 2021 at 2:16 PM Schneur Rosenberg
 wrote:
>
> Hi Bogdan,
>
> I did it on a backup server, its also leaking memory but at a slower
> pace, I'm attaching the logs when running kill -SIGUSR1 on the pid
> that's growing in size, it still has available memory, I hop this will
> give you a clue.
>
> Here is a pastbin to the loggs https://pastebin.com/KJVb9Y75
>
> On Fri, Dec 10, 2021 at 11:00 AM Schneur Rosenberg
>  wrote:
> >
> > Thank you, does this reduce performance? can I leave it enabled on a
> > production machine? I will wait for the memory leak to be apparent and
> > I'll post the result.
> >
> >
> > On Thu, Dec 9, 2021 at 12:31 PM Bogdan-Andrei Iancu  
> > wrote:
> > >
> > > Hi Schneur,
> > >
> > > Just follow the
> > > https://www.opensips.org/Documentation/TroubleShooting-OutOfMem and
> > > provide the dump. This is the only way to investigate this.
> > >
> > > Regards,
> > >
> > > Bogdan-Andrei Iancu
> > >
> > > OpenSIPS Founder and Developer
> > >https://www.opensips-solutions.com
> > > OpenSIPS eBootcamp 2021
> > >https://opensips.org/training/OpenSIPS_eBootcamp_2021/
> > >
> > > On 12/8/21 12:14 PM, Schneur Rosenberg wrote:
> > > > I just noticed that process 88 runs the timer handler, perhaps this
> > > > might shed light on whats going on.
> > > >
> > > > opensipsctl fifo ps
> > > > Process::  ID=88 PID=5327 Type=Timer handler
> > > >
> > > > On Wed, Dec 8, 2021 at 10:55 AM Schneur Rosenberg
> > > >  wrote:
> > > >> Now a few hours later this is what I'm getting
> > > >> Dec  8 09:50:13 /sbin/opensips[21699]: ERROR:nathelper:nh_timer: out
> > > >> of pkg memory
> > > >> Dec  8 09:50:16 /sbin/opensips[21699]: WARNING:core:fm_malloc: not
> > > >> enough continuous free pkg memory (3024 bytes left, need 5128),
> > > >> attempting defragmentation... please increase the "-M" command line
> > > >> parameter!
> > > >> Dec  8 09:50:16 /sbin/opensips[21699]: ERROR:core:fm_malloc: not
> > > >> enough free pkg memory (3024 bytes left, need 5128), please increase
> > > >> the "-M" command line parameter!
> > > >>
> > > >> Here is the last 20 package memory max_used_size
> > > >> pkmem:70-max_used_size:: 1009584
> > > >> pkmem:71-max_used_size:: 1009584
> > > >> pkmem:72-max_used_size:: 1009584
> > > >> pkmem:73-max_used_size:: 1009584
> > > >> pkmem:74-max_used_size:: 1009584
> > > >> pkmem:75-max_used_size:: 1009584
> > > >> pkmem:76-max_used_size:: 1009584
> > > >> pkmem:77-max_used_size:: 1009584
> > > >> pkmem:78-max_used_size:: 1009584
> > > >> pkmem:79-max_used_size:: 1009584
> > > >> pkmem:80-max_used_size:: 1044752
> > > >> pkmem:81-max_used_size:: 1075552
> > > >> pkmem:82-max_used_size:: 1116848
> > > >> pkmem:83-max_used_size:: 1117456
> > > >> pkmem:84-max_used_size:: 1102640
> > > >> pkmem:85-max_used_size:: 1306992
> > > >> pkmem:86-max_used_size:: 1706304
> > > >> pkmem:87-max_used_size:: 2507000
> > > >> pkmem:88-max_used_size:: 4194264

Re: [OpenSIPS-Users] Memory leak

2021-12-11 Thread Schneur Rosenberg
Here is a newer dump
https://pastebin.com/2CTihBVD

On Fri, Dec 10, 2021 at 2:16 PM Schneur Rosenberg
 wrote:
>
> Hi Bogdan,
>
> I did it on a backup server, its also leaking memory but at a slower
> pace, I'm attaching the logs when running kill -SIGUSR1 on the pid
> that's growing in size, it still has available memory, I hop this will
> give you a clue.
>
> Here is a pastbin to the loggs https://pastebin.com/KJVb9Y75
>
> On Fri, Dec 10, 2021 at 11:00 AM Schneur Rosenberg
>  wrote:
> >
> > Thank you, does this reduce performance? can I leave it enabled on a
> > production machine? I will wait for the memory leak to be apparent and
> > I'll post the result.
> >
> >
> > On Thu, Dec 9, 2021 at 12:31 PM Bogdan-Andrei Iancu  
> > wrote:
> > >
> > > Hi Schneur,
> > >
> > > Just follow the
> > > https://www.opensips.org/Documentation/TroubleShooting-OutOfMem and
> > > provide the dump. This is the only way to investigate this.
> > >
> > > Regards,
> > >
> > > Bogdan-Andrei Iancu
> > >
> > > OpenSIPS Founder and Developer
> > >https://www.opensips-solutions.com
> > > OpenSIPS eBootcamp 2021
> > >https://opensips.org/training/OpenSIPS_eBootcamp_2021/
> > >
> > > On 12/8/21 12:14 PM, Schneur Rosenberg wrote:
> > > > I just noticed that process 88 runs the timer handler, perhaps this
> > > > might shed light on whats going on.
> > > >
> > > > opensipsctl fifo ps
> > > > Process::  ID=88 PID=5327 Type=Timer handler
> > > >
> > > > On Wed, Dec 8, 2021 at 10:55 AM Schneur Rosenberg
> > > >  wrote:
> > > >> Now a few hours later this is what I'm getting
> > > >> Dec  8 09:50:13 /sbin/opensips[21699]: ERROR:nathelper:nh_timer: out
> > > >> of pkg memory
> > > >> Dec  8 09:50:16 /sbin/opensips[21699]: WARNING:core:fm_malloc: not
> > > >> enough continuous free pkg memory (3024 bytes left, need 5128),
> > > >> attempting defragmentation... please increase the "-M" command line
> > > >> parameter!
> > > >> Dec  8 09:50:16 /sbin/opensips[21699]: ERROR:core:fm_malloc: not
> > > >> enough free pkg memory (3024 bytes left, need 5128), please increase
> > > >> the "-M" command line parameter!
> > > >>
> > > >> Here is the last 20 package memory max_used_size
> > > >> pkmem:70-max_used_size:: 1009584
> > > >> pkmem:71-max_used_size:: 1009584
> > > >> pkmem:72-max_used_size:: 1009584
> > > >> pkmem:73-max_used_size:: 1009584
> > > >> pkmem:74-max_used_size:: 1009584
> > > >> pkmem:75-max_used_size:: 1009584
> > > >> pkmem:76-max_used_size:: 1009584
> > > >> pkmem:77-max_used_size:: 1009584
> > > >> pkmem:78-max_used_size:: 1009584
> > > >> pkmem:79-max_used_size:: 1009584
> > > >> pkmem:80-max_used_size:: 1044752
> > > >> pkmem:81-max_used_size:: 1075552
> > > >> pkmem:82-max_used_size:: 1116848
> > > >> pkmem:83-max_used_size:: 1117456
> > > >> pkmem:84-max_used_size:: 1102640
> > > >> pkmem:85-max_used_size:: 1306992
> > > >> pkmem:86-max_used_size:: 1706304
> > > >> pkmem:87-max_used_size:: 2507000
> > > >> pkmem:88-max_used_size:: 4194264
> > > >> pkmem:89-max_used_size:: 1009584
> > > >>
> > > >> And here is the real used size, you can see that process 88 maxed out
> > > >> pkmem:69-real_used_size:: 975528
> > > >> pkmem:70-real_used_size:: 978016
> > > >> pkmem:71-real_used_size:: 989592
> > > >> pkmem:72-real_used_size:: 951416
> > > >> pkmem:73-real_used_size:: 982496
> > > >> pkmem:74-real_used_size:: 965744
> > > >> pkmem:75-real_used_size:: 959424
> > > >> pkmem:76-real_used_size:: 949472
> > > >> pkmem:77-real_used_size:: 983080
> > > >> pkmem:78-real_used_size:: 961400
> > > >> pkmem:79-real_used_size:: 977808
> > > >> pkmem:80-real_used_size:: 978928
> > > >> pkmem:81-real_used_size:: 1009936
> > > >> pkmem:82-real_used_size:: 1110760
> > > >> pkmem:83-real_used_size:: 1116720
> > > >> pkmem:84-real_used_size:: 1096568
> > > >> pkmem:85-real_used_size:: 1300592
> > > >> pkmem:86-real_used_size::

Re: [OpenSIPS-Users] Memory leak

2021-12-08 Thread Schneur Rosenberg
I just noticed that process 88 runs the timer handler, perhaps this
might shed light on whats going on.

opensipsctl fifo ps
Process::  ID=88 PID=5327 Type=Timer handler

On Wed, Dec 8, 2021 at 10:55 AM Schneur Rosenberg
 wrote:
>
> Now a few hours later this is what I'm getting
> Dec  8 09:50:13 /sbin/opensips[21699]: ERROR:nathelper:nh_timer: out
> of pkg memory
> Dec  8 09:50:16 /sbin/opensips[21699]: WARNING:core:fm_malloc: not
> enough continuous free pkg memory (3024 bytes left, need 5128),
> attempting defragmentation... please increase the "-M" command line
> parameter!
> Dec  8 09:50:16 /sbin/opensips[21699]: ERROR:core:fm_malloc: not
> enough free pkg memory (3024 bytes left, need 5128), please increase
> the "-M" command line parameter!
>
> Here is the last 20 package memory max_used_size
> pkmem:70-max_used_size:: 1009584
> pkmem:71-max_used_size:: 1009584
> pkmem:72-max_used_size:: 1009584
> pkmem:73-max_used_size:: 1009584
> pkmem:74-max_used_size:: 1009584
> pkmem:75-max_used_size:: 1009584
> pkmem:76-max_used_size:: 1009584
> pkmem:77-max_used_size:: 1009584
> pkmem:78-max_used_size:: 1009584
> pkmem:79-max_used_size:: 1009584
> pkmem:80-max_used_size:: 1044752
> pkmem:81-max_used_size:: 1075552
> pkmem:82-max_used_size:: 1116848
> pkmem:83-max_used_size:: 1117456
> pkmem:84-max_used_size:: 1102640
> pkmem:85-max_used_size:: 1306992
> pkmem:86-max_used_size:: 1706304
> pkmem:87-max_used_size:: 2507000
> pkmem:88-max_used_size:: 4194264
> pkmem:89-max_used_size:: 1009584
>
> And here is the real used size, you can see that process 88 maxed out
> pkmem:69-real_used_size:: 975528
> pkmem:70-real_used_size:: 978016
> pkmem:71-real_used_size:: 989592
> pkmem:72-real_used_size:: 951416
> pkmem:73-real_used_size:: 982496
> pkmem:74-real_used_size:: 965744
> pkmem:75-real_used_size:: 959424
> pkmem:76-real_used_size:: 949472
> pkmem:77-real_used_size:: 983080
> pkmem:78-real_used_size:: 961400
> pkmem:79-real_used_size:: 977808
> pkmem:80-real_used_size:: 978928
> pkmem:81-real_used_size:: 1009936
> pkmem:82-real_used_size:: 1110760
> pkmem:83-real_used_size:: 1116720
> pkmem:84-real_used_size:: 1096568
> pkmem:85-real_used_size:: 1300592
> pkmem:86-real_used_size:: 1699648
> pkmem:87-real_used_size:: 2501096
> pkmem:88-real_used_size:: 4191280
> pkmem:89-real_used_size:: 882528
>
> On Tue, Dec 7, 2021 at 7:53 PM Schneur Rosenberg
>  wrote:
> >
> > Hi, lately I'm getting  these errors in my logs.
> >
> > ERROR:core:fm_malloc: not enough free pkg memory (1792 bytes left,
> > need 2184), please increase the "-M" command line para
> > meter!
> >
> > CRITICAL:core:hostent_cpy: pkg memory allocation failure
> >
> > ERROR:nathelper:nh_timer: out of pkg memory
> >
> > ERROR:core:fm_malloc: not enough free pkg memory (5952 bytes left,
> > need 5408), please increase the "-M" command line para
> > meter!
> >
> > I was on version 2.4.8 and I upgraded to 2.4.11 and I'm monitoring the
> > max_used_size of the package memory, a few hours later I see that 2
> > processes keep on getting bigger, so far the rest are pretty stable, I
> > have 90 processes and 87 and 88 are growing.
> >
> > here you can see the last few processes, OpenSIPS set aside 4 mb per 
> > process.
> >
> > pkmem:80-max_used_size:: 1009584
> > pkmem:81-max_used_size:: 1009584
> > pkmem:82-max_used_size:: 1009584
> > pkmem:83-max_used_size:: 1009584
> > pkmem:84-max_used_size:: 1009584
> > pkmem:85-max_used_size:: 1009584
> > pkmem:86-max_used_size:: 1143608
> > pkmem:87-max_used_size:: 1323256
> > pkmem:88-max_used_size:: 1831928
> > pkmem:89-max_used_size:: 1009584
> >
> > Any hints where to start looking besides the solutions fund here.
> >
> > https://www.opensips.org/Documentation/TroubleShooting-OutOfMem
> >
> > thank you
> > Scott

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memory leak

2021-12-08 Thread Schneur Rosenberg
Now a few hours later this is what I'm getting
Dec  8 09:50:13 /sbin/opensips[21699]: ERROR:nathelper:nh_timer: out
of pkg memory
Dec  8 09:50:16 /sbin/opensips[21699]: WARNING:core:fm_malloc: not
enough continuous free pkg memory (3024 bytes left, need 5128),
attempting defragmentation... please increase the "-M" command line
parameter!
Dec  8 09:50:16 /sbin/opensips[21699]: ERROR:core:fm_malloc: not
enough free pkg memory (3024 bytes left, need 5128), please increase
the "-M" command line parameter!

Here is the last 20 package memory max_used_size
pkmem:70-max_used_size:: 1009584
pkmem:71-max_used_size:: 1009584
pkmem:72-max_used_size:: 1009584
pkmem:73-max_used_size:: 1009584
pkmem:74-max_used_size:: 1009584
pkmem:75-max_used_size:: 1009584
pkmem:76-max_used_size:: 1009584
pkmem:77-max_used_size:: 1009584
pkmem:78-max_used_size:: 1009584
pkmem:79-max_used_size:: 1009584
pkmem:80-max_used_size:: 1044752
pkmem:81-max_used_size:: 1075552
pkmem:82-max_used_size:: 1116848
pkmem:83-max_used_size:: 1117456
pkmem:84-max_used_size:: 1102640
pkmem:85-max_used_size:: 1306992
pkmem:86-max_used_size:: 1706304
pkmem:87-max_used_size:: 2507000
pkmem:88-max_used_size:: 4194264
pkmem:89-max_used_size:: 1009584

And here is the real used size, you can see that process 88 maxed out
pkmem:69-real_used_size:: 975528
pkmem:70-real_used_size:: 978016
pkmem:71-real_used_size:: 989592
pkmem:72-real_used_size:: 951416
pkmem:73-real_used_size:: 982496
pkmem:74-real_used_size:: 965744
pkmem:75-real_used_size:: 959424
pkmem:76-real_used_size:: 949472
pkmem:77-real_used_size:: 983080
pkmem:78-real_used_size:: 961400
pkmem:79-real_used_size:: 977808
pkmem:80-real_used_size:: 978928
pkmem:81-real_used_size:: 1009936
pkmem:82-real_used_size:: 1110760
pkmem:83-real_used_size:: 1116720
pkmem:84-real_used_size:: 1096568
pkmem:85-real_used_size:: 1300592
pkmem:86-real_used_size:: 1699648
pkmem:87-real_used_size:: 2501096
pkmem:88-real_used_size:: 4191280
pkmem:89-real_used_size:: 882528

On Tue, Dec 7, 2021 at 7:53 PM Schneur Rosenberg
 wrote:
>
> Hi, lately I'm getting  these errors in my logs.
>
> ERROR:core:fm_malloc: not enough free pkg memory (1792 bytes left,
> need 2184), please increase the "-M" command line para
> meter!
>
> CRITICAL:core:hostent_cpy: pkg memory allocation failure
>
> ERROR:nathelper:nh_timer: out of pkg memory
>
> ERROR:core:fm_malloc: not enough free pkg memory (5952 bytes left,
> need 5408), please increase the "-M" command line para
> meter!
>
> I was on version 2.4.8 and I upgraded to 2.4.11 and I'm monitoring the
> max_used_size of the package memory, a few hours later I see that 2
> processes keep on getting bigger, so far the rest are pretty stable, I
> have 90 processes and 87 and 88 are growing.
>
> here you can see the last few processes, OpenSIPS set aside 4 mb per process.
>
> pkmem:80-max_used_size:: 1009584
> pkmem:81-max_used_size:: 1009584
> pkmem:82-max_used_size:: 1009584
> pkmem:83-max_used_size:: 1009584
> pkmem:84-max_used_size:: 1009584
> pkmem:85-max_used_size:: 1009584
> pkmem:86-max_used_size:: 1143608
> pkmem:87-max_used_size:: 1323256
> pkmem:88-max_used_size:: 1831928
> pkmem:89-max_used_size:: 1009584
>
> Any hints where to start looking besides the solutions fund here.
>
> https://www.opensips.org/Documentation/TroubleShooting-OutOfMem
>
> thank you
> Scott

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Memory leak

2021-12-07 Thread Schneur Rosenberg
Hi, lately I'm getting  these errors in my logs.

ERROR:core:fm_malloc: not enough free pkg memory (1792 bytes left,
need 2184), please increase the "-M" command line para
meter!

CRITICAL:core:hostent_cpy: pkg memory allocation failure

ERROR:nathelper:nh_timer: out of pkg memory

ERROR:core:fm_malloc: not enough free pkg memory (5952 bytes left,
need 5408), please increase the "-M" command line para
meter!

I was on version 2.4.8 and I upgraded to 2.4.11 and I'm monitoring the
max_used_size of the package memory, a few hours later I see that 2
processes keep on getting bigger, so far the rest are pretty stable, I
have 90 processes and 87 and 88 are growing.

here you can see the last few processes, OpenSIPS set aside 4 mb per process.

pkmem:80-max_used_size:: 1009584
pkmem:81-max_used_size:: 1009584
pkmem:82-max_used_size:: 1009584
pkmem:83-max_used_size:: 1009584
pkmem:84-max_used_size:: 1009584
pkmem:85-max_used_size:: 1009584
pkmem:86-max_used_size:: 1143608
pkmem:87-max_used_size:: 1323256
pkmem:88-max_used_size:: 1831928
pkmem:89-max_used_size:: 1009584

Any hints where to start looking besides the solutions fund here.

https://www.opensips.org/Documentation/TroubleShooting-OutOfMem

thank you
Scott

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-11 Thread Schneur Rosenberg
Hi, thank you very much that fixed the error but then it's complained with
a 484 Address Incomplete, I fixed the RURI too and now it's working fine.

Scott

On Wed, Nov 10, 2021, 21:47 Schneur Rosenberg 
wrote:

> No, I'll try and keep you posted.
>
> On Wed, Nov 10, 2021 at 9:39 PM Vasilios Tzanoudakis
>  wrote:
> >
> > Have you tried adding the extra contact header in local_route?
> >
> > Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg <
> rosenberg11...@gmail.com> έγραψε:
> >>
> >> Hi, I'm using load balancer with probing_method INVITE, it worked fine
> >> for many years with my Asterisk and Freeswitch servers, I'm migrating
> >> my asterisk server from chan_sip to pjsip and now asterisk is
> >> rejecting all the probing requests with a 400 Missing Contact header,
> >> I checked the modparams for the  "load_balancer" module but couldn't
> >> find how to have OpenSIPs add the contact header.
> >>
> >> S. Rosenberg
> >>
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-10 Thread Schneur Rosenberg
No, I'll try and keep you posted.

On Wed, Nov 10, 2021 at 9:39 PM Vasilios Tzanoudakis
 wrote:
>
> Have you tried adding the extra contact header in local_route?
>
> Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg 
>  έγραψε:
>>
>> Hi, I'm using load balancer with probing_method INVITE, it worked fine
>> for many years with my Asterisk and Freeswitch servers, I'm migrating
>> my asterisk server from chan_sip to pjsip and now asterisk is
>> rejecting all the probing requests with a 400 Missing Contact header,
>> I checked the modparams for the  "load_balancer" module but couldn't
>> find how to have OpenSIPs add the contact header.
>>
>> S. Rosenberg
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-10 Thread Schneur Rosenberg
Hi, I'm using load balancer with probing_method INVITE, it worked fine
for many years with my Asterisk and Freeswitch servers, I'm migrating
my asterisk server from chan_sip to pjsip and now asterisk is
rejecting all the probing requests with a 400 Missing Contact header,
I checked the modparams for the  "load_balancer" module but couldn't
find how to have OpenSIPs add the contact header.

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call-ID changing on re-registration

2021-07-07 Thread Schneur Rosenberg
I know about the expire, I just want to ignore them because I only care
when new devices register, I've tried the contact issue but it didn't help,
both phones came in with the same contact.

On Wed, Jul 7, 2021, 11:31 Alexey Kazantsev via Users <
users@lists.opensips.org> wrote:

> Hello,
>
> maybe the second parameter (‘contact’) of the ‘is_contact_registered’
> function [1] could be useful?
> And speaking about Expires: 0 — according to SIP RFC [2] it’s absolutely
> normal,
> it means tat a device disables its registration, this is done either by
> sending Expires: 0 SIP header,
> or by adding ;expires=0 as a parameter to the Contact header.
>
>
> [1]
> https://opensips.org/docs/modules/3.1.x/registrar.html#func_is_contact_registered
> [2] https://datatracker.ietf.org/doc/html/rfc3261#section-10.3
>
> ---
> BR, Alexey
> http://alexeyka.zantsev.com/
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Call-ID changing on re-registration

2021-07-06 Thread Schneur Rosenberg
Hi, I'm trying to run a script when a new sip device registers, I want
that if 2 devices have the same user name it should run the script
when each device registers first time, I added this script to my
REGISTER processing

if (!is_contact_registered("location",,,"$ci") && $hdr(Expires) !="0")
runscript..

I hoped this would only run once for each device registered, but I see
lots of devices changing the Call-ID for each registration, hence
running the script every few minutes instead of only once.

I also have some devices sending registrations with Expires: 0, so I
added the && $hdr(Expires) !="0" which seems to of solved that issue.

is there a better way to do this? can I have a way of knowing its the
same registration even though the Call-ID has changed?

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips generate ring and hangup after x seconds

2021-06-09 Thread Schneur Rosenberg
Hi, I would like to have OpenSIPs generate a ring tone on a incoming
call, and hang up after x seconds, I dont want to the call to ring on
any device, I just want to reply to the client with a 180 and a cancel
after x seconds, is it possible?

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPs & CP - Documentation (Dynamic Routing, DialPlans, CP)

2021-03-12 Thread Schneur Rosenberg
Why don't you get Bogdans book? It's called Building telephony systems with
OpenSIPs second edition, it's a little old but it's a good start.

On Fri, Mar 12, 2021, 08:55 Rick McGill - ₪  wrote:

> Dear OpenSIPs Community,
>
> I'm very new to OpenSIPS and have a new fresh install and have started to
> customize it.
> So if my question seems so very basic this is why.
>
> I have the following:
> Debian 1.7 (Buster)
> OpenSIPs 3.1
> OpenSIPs Control Panel
> RTPproxy
>
> I have a couple of uses setup and can call with softphone from User to user
> on OpenSIPS.
> I have an FreePBX/Asterisk SIP Trunk setup to OpenSIPS.   With outbound
> routes and all configured and working properly.
> I also have on OpenSIPS a Route/Gateway or Trunk from OpenSIPs to CommPeak
> For Outbound calls.
>
> The issue I'm having is learning or finding documentation on how exactly to
> setup Dialplan, Dynamic Routes, Permissions and such so that I can get a
> call from Ext on Asterisk routed to OpenSIPS then out to CommPeak for an
> outbound International call.
>
> Currently when I try to make this type of call OpenSIPS says for example
> 662...@sip.netrovoip.comuserloc does not exists and hangs up.
> Sip.netrovoip.com is my OpenSIPs server
> So apparently with all my efforts my Dialplan, Permissions, and Dynamic
> Routes is not working no matter what changes I keep trying in them.
>
> FYI I have not yet edited or customized the file
> /var/www/opensips-cp/config/tools/system/dialplan/local.inc.php
>
> I cannot find out what code and customization I should do for attrib and
> what I can use standard in OpenSIPS-CP
>
> $config->attrs_cb=array(
> <-->// name , description
> <-->"a" => "Descr a",
> <-->"b" => "Descr b",
> <-->"c" => "Descr c",
>
> So My question is:
> Where can I find some comprehensive detailed documentation (if it exists)
> so
> I can learn more about the following?:
> Dialplans
> Dynamic Routes
> And whatever else I need to learn to get this kind of basic Dynamic Routing
> working?
> I have gone thru the OpenSIPS-CP documentation and the OpenSIPs.org too but
> there it seems a bit basic or outdated.
>
> Also I do have my Regular Expressions Quick Reference v1.2 but no matter
> what I program in CP it does not seem to work.
> I think I'm missing some very basic but major bit of information on how to
> get this simple Asterisk -> OpenSIPS -> CommPeak outbound call basic setup
> configured / working.
>
> Again sorry if all this sound like such a basic knowledge set of questions.
>
>
> 
> ---
> Rick McGill – CEO
> r...@netrovoip.com | r...@netropolitanworks.com
> Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
> +66-85557-3000
> Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
> supp...@netrovoip.com
>   ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
> Provider
>
> 
> ---
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Limit Call per Second

2021-01-23 Thread Schneur Rosenberg
Maybe use memcache, it's global and it won't create a bottleneck like a
database query would.

Scott (Schneur)

On Thu, Jan 21, 2021, 05:43 Ovidiu Sas  wrote:

> Take a look at the ratelimit module:
> https://opensips.org/docs/modules/3.1.x/ratelimit.html
>
> -ovidiu
>
> On Wed, Jan 20, 2021 at 10:01 PM Alexander Perkins
>  wrote:
> >
> > Hi All.  Is there a way to limit the calls per second by pulling the
> information from a database? I was looking at the call_control module and
> that seems to be a global value. but I would need something that I can
> control at the call level (I will be handling different accounts that have
> different limits).
> >
> > Thanks, All.  Any help is appreciated.
> >
> > Alex
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.com
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips.cfg on Amazon EC2 - no audio issues

2020-12-22 Thread Schneur Rosenberg
I didn't do this in a while, so I don't remember what I've done, but did
you set the advertised_address= with the external IP address, and did you
make sure the proper ports are open?


On Wed, Dec 23, 2020, 06:19 HS  wrote:

> Dear all.
>
> We have a fairly basic setup on Opensips 3.0 on Amazon EC2. We allow users
> to make and receive voice calls only. We are not using any proxy or STUN as
> all our calls route completely fine within our country. However, following
> are some issues:
>
> 1. When we make calls outside our country, there is no audio (both ways).
> 2. When our users try and make calls between themselves (outside our
> country, the calls don't go through at all).
>
> We have tried multiple configurations that we found on github and personal
> blogs, however, can't seem to solve this issue - and unable to find someone
> who can.
>
> Following is our opensips.cfg file, appreciate if someone can clarify what
> is wrong:
>
> #
> # OpenSIPS residential configuration script
> # by OpenSIPS Solutions 
> #
> # This script was generated via "make menuconfig", from
> #   the "Residential" scenario.
> # You can enable / disable more features / functionalities by
> #   re-generating the scenario with different options.#
> #
> # Please refer to the Core CookBook at:
> #  https://opensips.org/Resources/DocsCookbooks
> # for a explanation of possible statements, functions and parameters.
> #
>
>
> ### Global Parameters #
>
> log_level=3
> log_stderror=no
> #log_facility=LOG_LOCAL0
> log_facility=LOG_LOCAL7
>
> udp_workers=8
>
> /* uncomment the following lines to enable debugging */
> #debug_mode=yes
>
> /* uncomment the next line to enable the auto temporary blacklisting of
>not available destinations (default disabled) */
> #disable_dns_blacklist=no
>
> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>lookup failures (default disabled) */
> #dns_try_ipv6=yes
>
> /* comment the next line to enable the auto discovery of local aliases
>based on reverse DNS on IPs */
> auto_aliases=no
>
> advertised_address=XX.XXX.XXX.XX
>
>
> listen=udp:XXX.XX.XX.XXX:5060  # CUSTOMIZE ME
> listen=tcp:XXX.XX.XX.XXX:5060  # CUSTOMIZE ME
>
> ### Modules Section 
>
> #set module path
> mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/"
>
>  SIGNALING module
> loadmodule "signaling.so"
>
>  StateLess module
> loadmodule "sl.so"
>
>  Transaction Module
> loadmodule "tm.so"
> modparam("tm", "fr_timeout", 5)
> modparam("tm", "fr_inv_timeout", 30)
> modparam("tm", "restart_fr_on_each_reply", 0)
> modparam("tm", "onreply_avp_mode", 1)
>
>  Record Route Module
> loadmodule "rr.so"
> /* do not append from tag to the RR (no need for this script) */
> modparam("rr", "append_fromtag", 0)
>
>  MAX ForWarD module
> loadmodule "maxfwd.so"
>
>  SIP MSG OPerationS module
> loadmodule "sipmsgops.so"
>
>  FIFO Management Interface
> loadmodule "mi_fifo.so"
> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
> modparam("mi_fifo", "fifo_mode", 0666)
>
>  MYSQL module
> loadmodule "db_mysql.so"
>
>  HTTPD module
> loadmodule "httpd.so"
> modparam("httpd", "port", )
>
>  USeR LOCation module
> loadmodule "usrloc.so"
> modparam("usrloc", "nat_bflag", "NAT")
> modparam("usrloc", "db_mode",   2)
> modparam("usrloc", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
>
>
>  REGISTRAR module
> loadmodule "registrar.so"
> modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
> modparam("registrar", "received_avp", "$avp(received_nh)")/* uncomment the
> next line not to allow more than 10 contacts per AOR */
> #modparam("registrar", "max_contacts", 10)
>
>  ACCounting module
> loadmodule "acc.so"
> /* what special events should be accounted ? */
> modparam("acc", "early_media", 0)
> modparam("acc", "report_cancels", 0)
> /* by default we do not adjust the direct of the sequential requests.
>if you enable this parameter, be sure the enable "append_fromtag"
>in "rr" module */
> modparam("acc", "detect_direction", 0)
> modparam("acc", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
>
>  AUTHentication modules
> loadmodule "auth.so"
> loadmodule "auth_db.so"
> modparam("auth_db", "calculate_ha1", 0)
> modparam("auth_db", "password_column", "ha1")
> modparam("auth_db", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
> modparam("auth_db", "load_credentials", "")
>
>  ALIAS module
> loadmodule "alias_db.so"
> modparam("alias_db", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
>
>  DOMAIN module
> loadmodule "domain.so"
> modparam("domain", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
> modparam("domain", "db_mode", 0)   # Use caching
> modparam("auth_db|usrloc", "use_domain", 1)
>
>  PRESENCE modules
> loadmodule "xcap.so"
> loadmodule "presence.so"
> loadmodule 

[OpenSIPS-Users] Segfault in OpenSIPs 2.4.8

2020-11-17 Thread Schneur Rosenberg
Hi I just upgraded from 2.4.4 to 2.4.8 and my system crashed, first I
got a couple of these messages in my log over a span of a few hours.

CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error
(1213): Deadlock found when trying to get lock; try restarting
transaction


And then this happened

 CRITICAL:core:sig_usr: segfault in process pid: 2440, id: 88

CRITICAL:core:handle_worker: dead child 88 (EOF received), pid 2440

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call MI functions from script

2020-02-27 Thread Schneur Rosenberg
I don't know if you can, but I assume you can always write a external
script with xmlrpc and use the exec in a timer route to execute the script.

On Tue, Feb 25, 2020, 9:40 PM Grant Bagdasarian 
wrote:

> Hello,
>
> Is it possible to call MI functions from within the OpenSips script?
> For instance, call the domain_reload function inside a timer_route to
> refresh the domains every N seconds? I know this may be a bad example,
> since the domain module supports caching and realtime mode, but I hope
> you get the idea.
>
> I've been going through the documentation (mainly modules), but
> couldn't find anything that allows me to perform these tasks.
>
> Regards,
>
> Grant
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Freeswitch integration with Opensips

2020-01-08 Thread Schneur Rosenberg
There are a couple of ways to do it, here is the way I did it, my users
register on a opensips cluster, freeswitch and asterisk have a copy of
every user freeswitch and asterisk have a acl to allow outgoing calls only
from opensips, opensips sends the call to freeswitch and then freeswitch
uses setuser to the user it received from opensips, there are other methods
like using mid_registrar etc.

If you don't have sngrep install it on both servers so you can monitor
what's happening.

S.Rosenberg

On Tue, Jan 7, 2020, 8:50 PM John Tuxies  wrote:

> I have opensips with cp. Users provisioned fine and users can call each
> other. When i install freeswitch and try to integrate it with opensips then
> i got no calls between the users. The registration of the users is done in
> the opensips.
> I could send the whole config files from both opensips and Freeswitch as
> well if you would like.
>
>
> John
>
>
> On Tuesday, January 7, 2020, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi John,
>>
>> It will be a good idea to bring the tutorial up2date, but not sure if
>> Giovanni has the resources to do it.
>>
>> I'm not able to help with the FS part, but I can help with the OpenSIPS
>> side - have you tried to migrate to 2.4 / 3.0 and faced some issues ?
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit, Amsterdam, May 2020
>>   https://www.opensips.org/events/Summit-2020Amsterdam/
>> OpenSIPS Bootcamp, Miami, March 2020
>>   https://opensips.org/training/OpenSIPS_Bootcamp_2020/
>>
>> On 1/7/20 2:08 PM, John Tuxies wrote:
>>
>> After many failed attempts to integrate Freeswitch with Opensips, i am
>> asking for some help please.
>> The guide i am trying to follow is quite old
>> https://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration
>> but there is not any newer version.
>> What i have done so far is to install Opensips (from deb repository) with
>> Control Panel in a Debian system. I have created a domain (local IP) and a
>> few users. Users registered to softphones and they can talk to each other.
>> Then i installed Freeswitch (from deb repository) and altered the default
>> ports from 506x to something 509x. Also i have changed the default 1234
>> passwd for all extensions from Freeswitch.
>> I am stuck in the rest of the config of Freeswitch and Opensips to
>> integrate them.  Some help please?
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 cluster module help .

2019-07-25 Thread Schneur Rosenberg
No, multicast is a technology where all servers get the same IP, and it
gets routed to one server, but being that all servers are aware of the
registrations and dialogs etc so any server can handle the subsequent
requests, you do set flags so only one server responds to subscribe for
example because you don't want them all sending updates.

Because the client sees it coming from the same IP address you won't have
issues with firewalls, because from what the firewall is concerned the
request came from a port that was opened for this IP.

On Wed, Jul 24, 2019, 1:47 PM Sasmita Panda  wrote:

> My previous problem was solved .
>
> I am curious to learn what do you mean by multicast all servers ? How I
> will do the setup for this .
>
> If I have 3 opensips node and 1 domain mapped to 3 IP . Then when a user
> register it will anyways resolve a single IP and send the registration to
> that .
> In this case , the call to that user only get served by the same node
> through which it was earlier register .
>
> How this multicast will work .  Is there any document for this ?
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Senior Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
>
> On Wed, Jul 24, 2019 at 2:31 PM Schneur Rosenberg <
> rosenberg11...@gmail.com> wrote:
>
>> You would probably need some kind of shared table that tells you where
>> each user is registered and then redirect the call to the proper server.
>>
>> If you're using multicast all servers sould be able to handle the call no
>> matter which server accepted the registration.
>>
>> On Mon, Jul 22, 2019, 4:00 PM Sasmita Panda  wrote:
>>
>>> Please anybody help me . I am blocked in my testing .
>>>
>>>
>>> *Thanks & Regards*
>>> *Sasmita Panda*
>>> *Senior Network Testing and Software Engineer*
>>> *3CLogic , ph:07827611765*
>>>
>>>
>>> On Wed, Jul 17, 2019 at 6:04 PM Sasmita Panda 
>>> wrote:
>>>
>>>>I am trying to follow the above link for clustering .  But no
>>>> success . I must be doing something wrong .
>>>> [1]
>>>> https://opensips.org/html/docs/modules/3.0.x/usrloc.html#distributed-sip-user-location
>>>> [2]
>>>> https://opensips.org/Documentation/Tutorials-Distributed-User-Location-Federation
>>>>
>>>>
>>>> I have 2 opensips node and using mongo db as cache_db and the cluster
>>>> module .  there is a single mongo db in which both the nodes save data .
>>>> clusterer table looks like below .
>>>>
>>>> |  1 |  1 |   1 | bin:172.21.5.95:  | 1 |
>>>>   3 |   50 | 172.21.5.95  | seed  |  A
>>>> |  2 |  1 |   2 | bin:172.21.13.73: | 1 |
>>>>   3 |   50 | 172.21.13.73 | seed  |  B
>>>>
>>>> call work fine if both phone are registered through same server
>>>> resolving a domain .
>>>> call not working if both goes to different server .
>>>>
>>>> I am not getting any error in the logs . How will I solve this ? Please
>>>> do help me .
>>>>
>>>>
>>>> *Thanks & Regards*
>>>> *Sasmita Panda*
>>>> *Senior Network Testing and Software Engineer*
>>>> *3CLogic , ph:07827611765*
>>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 cluster module help .

2019-07-24 Thread Schneur Rosenberg
You would probably need some kind of shared table that tells you where each
user is registered and then redirect the call to the proper server.

If you're using multicast all servers sould be able to handle the call no
matter which server accepted the registration.

On Mon, Jul 22, 2019, 4:00 PM Sasmita Panda  wrote:

> Please anybody help me . I am blocked in my testing .
>
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Senior Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
>
> On Wed, Jul 17, 2019 at 6:04 PM Sasmita Panda  wrote:
>
>>I am trying to follow the above link for clustering .  But no success
>> . I must be doing something wrong .
>> [1]
>> https://opensips.org/html/docs/modules/3.0.x/usrloc.html#distributed-sip-user-location
>> [2]
>> https://opensips.org/Documentation/Tutorials-Distributed-User-Location-Federation
>>
>>
>> I have 2 opensips node and using mongo db as cache_db and the cluster
>> module .  there is a single mongo db in which both the nodes save data .
>> clusterer table looks like below .
>>
>> |  1 |  1 |   1 | bin:172.21.5.95:  | 1 |
>> 3 |   50 | 172.21.5.95  | seed  |  A
>> |  2 |  1 |   2 | bin:172.21.13.73: | 1 |
>> 3 |   50 | 172.21.13.73 | seed  |  B
>>
>> call work fine if both phone are registered through same server
>> resolving a domain .
>> call not working if both goes to different server .
>>
>> I am not getting any error in the logs . How will I solve this ? Please
>> do help me .
>>
>>
>> *Thanks & Regards*
>> *Sasmita Panda*
>> *Senior Network Testing and Software Engineer*
>> *3CLogic , ph:07827611765*
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips stops responding

2019-07-12 Thread Schneur Rosenberg
Another update, seems like my assumption that some requests were handeld
was wrong,  the keepalive script had a bug and therefore didn't failover, I
now believe OpenSIPs ignored all requests after the initial DB error, this
seems like a bug in OpenSIPs it shouldnt just stop responding to requests
because of one DB attempt that went wrong.

On Thu, Jul 11, 2019, 12:39 PM S. Rosenberg 
wrote:

> I want to add that a restart of OpenSIPs fixed the problem every time, I
> didnt restart the MySQL server.
>
>
>
> --
> Sent from:
> http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips stops responding

2019-07-11 Thread Schneur Rosenberg
Hi, I've had recently a few times that OpenSIPSs didnt crash but it
stopped responding to certain requests, perhaps INVITES that requeired
DB access, but I havent verified it becuase I always wanted to bring
it back up ASAP because it seems like it did respond to my requests
that my keepalived VRRP script which sends a notify to OpenSIPs and
OpenSIPS does a DB lookup and only on success it returns a true thats
how I make sure that MYSQL is working in addition to  OpenSIPs, but
opensips seems to have responded because it did not failover, and
thats why I didnt have time to investigate further to which requests
it responds and to which it didnt.

Here are the syslogs from the time of the crash, maybe it can shed
some light to the issue, the query in there that failed is the query
from keepalived, I assume it failed only once and then did respond,
otherwise the IP would of failed over to the backup, but its only an
assumption.

Jul 10 20:13:13 sipsvr1 /sbin/opensips[29446]:
INFO:db_mysql:switch_state_to_disconnected: disconnect event for
0x7f2ba43e7600
Jul 10 20:13:13 sipsvr1 /sbin/opensips[29446]:
INFO:db_mysql:reset_all_statements: resetting all statements on
connection: (0x7f2ba44062a0) 0x7f2ba43e7600
Jul 10 20:13:13 sipsvr1 /sbin/opensips[29446]:
INFO:db_mysql:connect_with_retry: re-connected successful for
0x7f2ba43e7600
Jul 10 20:13:13 sipsvr1 /sbin/opensips[29446]:
INFO:db_mysql:db_mysql_do_prepared_query: reconnected to mysql server
-> re-init the statement
Jul 10 20:13:13 sipsvr1 /sbin/opensips[29486]:
WARNING:core:handle_timer_job: utimer job  has a 3 us
delay in execution
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29400]:
INFO:clusterer:do_action_trans_2: Ping reply not received, node [2] is
down
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29400]:
INFO:clusterer:do_action_trans_2: Ping reply not received, node [2] is
down
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29478]:
INFO:clusterer:handle_internal_msg: Node [2] is UP
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29478]:
INFO:clusterer:handle_internal_msg: Node [2] is UP
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29422]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29425.374568.2]
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29419]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29431.1000819.1]
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29428]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29411.161103.9]
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29446]:
CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error
(1180): Got error 35 "Resource deadlock avoided" during COMMIT
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29446]:
ERROR:usrloc:db_update_ucontact: updating database failed
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29446]: ERROR:usrloc:wb_timer:
updating contact in db failed
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29388]:
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error
(1047): WSREP has not yet prepared node for application use
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29388]:
ERROR:core:db_do_raw_query: error while submitting query
Jul 10 20:13:15 sipsvr1 /sbin/opensips[29388]:
ERROR:avpops:db_query_avp: raw_query failed: db0(usr_preferences)
select domain from domain where domain='...
Jul 10 20:13:15 sipsvr1 Keepalived_vrrp[514]: pid 2092 exited with status 1
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29428]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29422.274079.61]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29429]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29421.236751.61]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29425]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29419.224887.28]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29422]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29413.165448.9]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29419]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29429.711965.1]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29411]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29431.1000786.2]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29428]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29411.161104.10]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29421]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29419.224888.10]
Jul 10 20:13:16 sipsvr1 /sbin/opensips[29433]:
INFO:presence:update_presentity: *** found in db but not in htable
[a.1561468443.29421.236752.28]

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] t_on_reply not catching 183

2019-06-07 Thread Schneur Rosenberg
Are you missing a fix_natted_contact somewhere? That should in most cases
eliminate the need of  stun.

On Fri, Jun 7, 2019, 2:14 PM Mark Farmer  wrote:

> Never mind, it seems the issue was triggered by my soft client not using
> STUN
>
> Fixed that bit now :)
>
> Mark.
>
>
> On Fri, 7 Jun 2019 at 10:53, Mark Farmer  wrote:
>
>> Sorry - version info:
>>
>> opensips -V
>> version: opensips 2.4.5 (x86_64/linux)
>> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
>> F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535
>> poll method support: poll, epoll, sigio_rt, select.
>> git revision: d025b4f61
>> main.c compiled on 11:39:27 Apr 12 2019 with gcc 7
>>
>>
>> On Fri, 7 Jun 2019 at 10:45, Mark Farmer  wrote:
>>
>>> Hi everyone, I'm trying to solve an issue related to reception of early
>>> media. I am getting 183 messages back to establish the audio path but
>>> OpenSIPS is passing the 183 back to an Asterisk box without changing the
>>> SDP "c" parameter. So Asterisk tries to send audio direct instead of to the
>>> rtpproxy.
>>>
>>> Doing some debugging, I can see that my reply route doesn't seem to be
>>> matching the 183 because I never get any logs from the reply route. Can
>>> anyone see anything wrong with it? I've checked the routing script & the
>>> reply route seems to be armed.
>>>
>>> onreply_route[DROUTING] {
>>>
>>> if (is_method("BYE|CANCEL")) {
>>> sip_trace("htid","d");
>>> rtpproxy_unforce();
>>> }
>>>
>>> #if ( $rs >= 200 )
>>> #$acc_extra(to_usr) = $tU;
>>>
>>> if ($rs=~"(2[0-9][0-9])|(183)" && has_body("application/sdp")) {
>>> xlog("Processing reply $fU");
>>> if (is_from_gw("1")) {
>>> xlog("Reply from Asterisk PBX");
>>> setflag(INT_R);
>>> } else if (is_from_gw("2")) {
>>> xlog("Reply from Provider");
>>> setflag(EXT_R);
>>> }
>>> }
>>>
>>> if (isflagset(INT_R)) {
>>> remove_hf("P-Asserted-Identity");
>>> rtpproxy_answer("corwfei");
>>> } else if (isflagset(EXT_R)) {
>>> rtpproxy_answer("corwfie");
>>> }
>>> }
>>>
>>>
>>> Many thanks for any & all help.
>>> Mark.
>>>
>>>
>>
>> --
>> Mark Farmer
>> farm...@gmail.com
>>
>
>
> --
> Mark Farmer
> farm...@gmail.com
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] first_hit_counter

2019-05-31 Thread Schneur Rosenberg
I assume the counter counts how many times the particular server has been
sent a call, the state is to set to active, inactive or probing the
particular switch, Weight is for the algorithm to decide how often to chose
this switch, the higher the state the more hits it would get, the priority
is to order all the switches in the same set.


On Thu, May 30, 2019, 10:36 PM Олег Подгуйко via Users <
users@lists.opensips.org> wrote:

> Hello!
>
> The question is about dispatcher module. I'm interested in one parameter.
>
> Sometimes I use this command
>
> [opodguyko@xx-spx-1 ~]$ opensipsctl fifo ds_list
> PARTITION:: default
> SET:: 1
> URI:: sip:10.10.31.21:5060 state=Active first_hit_counter=13
> socket:: udp:10.10.31.11:5060
> attr:: test
> [opodguyko@xx-spx-1 ~]$
>
>
> Could you explain what does it means "first_hit_counter" parameter?
>
> I haven't found anything  at all about it in your documentation.
>
> It would also be interesting to understand why the following parameters
> are needed
>
> state(int) weight(string) priority(int)
>
> The documentation gives a very poor description.
>
> Thank you.
>
> --
> Oleg Podguyko
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Query regarding opensips cluster module .

2019-01-16 Thread Schneur Rosenberg
It's not a cookie cutter pattern, there are different types of clustering
and how they sync and how they catch up after a restart, you might also
need to take care of who sends notifies for presence etc,  there is also
the option of anycast which is a great option if your hardware and ISP
supports it but more flags need to be set to avoid lots of network noise,
the online docs are your best bet.

On Thu, Jan 17, 2019, 7:42 AM Mohit Sachan  hi
> Could you help me to setup the opensips cluster replication in
> opensips-2.4.
> thanks.
>
>
>
>
> On Thu, Jan 3, 2019 at 11:05 PM Vlad Patrascu  wrote:
>
>> Hi,
>>
>> You should issue the 'clusterer_reload' MI command on all running nodes
>> after adding a new one in the DB and no restart is necessary.
>>
>> Regards,
>>
>> Vlad Patrascu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 12/28/2018 09:56 AM, Sasmita Panda wrote:
>>
>> version: opensips 2.2.4 (x86_64/linux)
>> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
>> F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> svn revision: 3247:3606M
>> main.c compiled on 09:50:32 Nov 12 2018 with gcc 4.8.3
>>
>>
>> This is the entire version . Can anyone let me know , whether I am in the
>> latest version or I need to update my code ??
>>
>>
>> *Thanks & Regards*
>> *Sasmita Panda*
>> *Senior Network Testing and Software Engineer*
>> *3CLogic , ph:07827611765*
>>
>>
>> On Thu, Dec 27, 2018 at 6:33 PM Sasmita Panda  wrote:
>>
>>> Hi All,
>>>
>>> I am using below version of opensips .
>>> version: opensips 2.2.4
>>>
>>> I have configured cluster module and I have 2 node in a single cluster .
>>> Lets say I am adding another node into the same cluster . Each time I
>>> have to update the config file with the new node information or add the new
>>> entry in the DB and restart the process .
>>>
>>> I don't want to disturb the running setup while adding new node .  Is
>>> there a way through which I can do it in runtime .
>>>
>>> for example : when I am updating something in dynamic routing , I am
>>> adding that through command line and reload the db to have the updated
>>> information . I am not force to restart the process .
>>>
>>> Can cluster module also work in the same way ? There is no option to add
>>> the DB entry through command line also . Is that's also a limitation in
>>> cluster module ?
>>>
>>> Please do help me . I am not getting anything regarding this in the
>>> module documentation .
>>>
>>> *Thanks & Regards*
>>> *Sasmita Panda*
>>> *Senior Network Testing and Software Engineer*
>>> *3CLogic , ph:07827611765*
>>>
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips caching

2019-01-16 Thread Schneur Rosenberg
I believe that dynamic routing runs a SQL query every time, I don't think
that can be cached, but if you do your own logic in opensips, you should be
able to use cashedb_memcached

On Thu, Jan 17, 2019, 9:40 AM Schneur Rosenberg  In the script you have multiple caching options, cache_store and
> cache_fetch from cachedb_mamcached work without external servers like
> cachedb_mongo that requires mongodb or other nosql modules.
>
> On Thu, Jan 17, 2019, 9:18 AM Vishal Pai 
>> Hello everyone
>>
>> what is the best way to implement the caching in opensips. I am doing
>> following
>>
>> we have a rate table with NPANXX with rate per minute. Every time when we
>> do outbound calls we get NPANXX of dialed number and search it in database.
>> Since in this way it will create a load on cpu for each select query.
>>
>> Can anyone help me in this also let me know if there is any caching
>> functionality is available in opensips ?
>>
>>
>> Vishal Pai
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips caching

2019-01-16 Thread Schneur Rosenberg
In the script you have multiple caching options, cache_store and
cache_fetch from cachedb_mamcached work without external servers like
cachedb_mongo that requires mongodb or other nosql modules.

On Thu, Jan 17, 2019, 9:18 AM Vishal Pai  Hello everyone
>
> what is the best way to implement the caching in opensips. I am doing
> following
>
> we have a rate table with NPANXX with rate per minute. Every time when we
> do outbound calls we get NPANXX of dialed number and search it in database.
> Since in this way it will create a load on cpu for each select query.
>
> Can anyone help me in this also let me know if there is any caching
> functionality is available in opensips ?
>
>
> Vishal Pai
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Happy Holidays

2018-12-24 Thread Schneur Rosenberg
Thank you and a happy holidays to the OpenSIPs team.

S. Rosenberg

On Mon, Dec 24, 2018, 2:01 PM Bogdan-Andrei Iancu 
>
> In the behalf of OpenSIPS team, we wish you all Happy Holidays and an even
> better 2019.
>
> And of course, an even better OpenSIPS release in 2019 ;)
>
>
>
> --
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] handle_publish wrong destination

2018-12-22 Thread Schneur Rosenberg
HI, my presence was working properly and now I realized that its not
working anymore for incoming calls, I dont have a external presence
server, I use the pua_dialoginfo, I did a trace and I saw that for
outgoing calls the system sends a PUBLISH to itself and then properly
sends a NOTIFY to the subscribers, but on incoming calls the PUBLISH
is sent to the internal IP address of the subscribers and of course
does not get anywhere, what am I doing wrong?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK increased Cseq on reinvite

2018-11-09 Thread Schneur Rosenberg
Bogdan, any update?
On Wed, Nov 7, 2018 at 11:59 AM Schneur Rosenberg
 wrote:
>
> For security reasons I will email it directly to you.
>
> thanks
> On Tue, Nov 6, 2018 at 11:21 PM Bogdan-Andrei Iancu  
> wrote:
> >
> > Hi Schneur,
> >
> > Could you please post a link to a pcap showing this exact problem - the
> > trace should be from the opensips machine, covering the traffic from
> > caller and callee side too for the whole duration of the call.
> >
> > Regards,
> >
> > Bogdan-Andrei Iancu
> >
> > OpenSIPS Founder and Developer
> >http://www.opensips-solutions.com
> > OpenSIPS Bootcamp 2018
> >http://opensips.org/training/OpenSIPS_Bootcamp_2018/
> >
> > On 11/06/2018 02:41 PM, Schneur Rosenberg wrote:
> > > Hi, I have this scenario, I'm sending to a carrier that requires
> > > authentication and I use uac_auth(), when I send a call to the carrier
> > > everything works fine, but when OpenSIPs sends a reinvite the carrier
> > > responds witha 200 OK, OpenSIPs  replies with a ACK but it falsely
> > > increments the CSeq , causing the carrier to ignore it, and then the
> > > carrier will keep on resending 200 OK's and OpenSIPs still returns the
> > > wrong ACK and eventually the carrier hangs up.
> > >
> > > I'm running OpenSIPs 2.4.1
> > >
> > > thanks
> > > Scot
> > >
> > > ___
> > > Users mailing list
> > > Users@lists.opensips.org
> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK increased Cseq on reinvite

2018-11-07 Thread Schneur Rosenberg
For security reasons I will email it directly to you.

thanks
On Tue, Nov 6, 2018 at 11:21 PM Bogdan-Andrei Iancu  wrote:
>
> Hi Schneur,
>
> Could you please post a link to a pcap showing this exact problem - the
> trace should be from the opensips machine, covering the traffic from
> caller and callee side too for the whole duration of the call.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 11/06/2018 02:41 PM, Schneur Rosenberg wrote:
> > Hi, I have this scenario, I'm sending to a carrier that requires
> > authentication and I use uac_auth(), when I send a call to the carrier
> > everything works fine, but when OpenSIPs sends a reinvite the carrier
> > responds witha 200 OK, OpenSIPs  replies with a ACK but it falsely
> > increments the CSeq , causing the carrier to ignore it, and then the
> > carrier will keep on resending 200 OK's and OpenSIPs still returns the
> > wrong ACK and eventually the carrier hangs up.
> >
> > I'm running OpenSIPs 2.4.1
> >
> > thanks
> > Scot
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ACK increased Cseq on reinvite

2018-11-06 Thread Schneur Rosenberg
Hi, I have this scenario, I'm sending to a carrier that requires
authentication and I use uac_auth(), when I send a call to the carrier
everything works fine, but when OpenSIPs sends a reinvite the carrier
responds witha 200 OK, OpenSIPs  replies with a ACK but it falsely
increments the CSeq , causing the carrier to ignore it, and then the
carrier will keep on resending 200 OK's and OpenSIPs still returns the
wrong ACK and eventually the carrier hangs up.

I'm running OpenSIPs 2.4.1

thanks
Scot

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] mi_xmlrpc_ng for ul_dump

2018-10-31 Thread Schneur Rosenberg
Hi, I was relying on the DB to get information regarding registered
users , but I'm having issues with the DB so I'm trying to get it
directly from opensips using mi_xmlrpc_ng, I'm using PHP with the
xmlrpc_encode_request function., but the ul_dump method does not seem
to have any params, when I remove the params I get a "401 Empty
request" reply, and if i place any other value in the params I get a
"500 Internal server error" reply, whats the proper way to get a
ul_dump using mi_xmlrpc_ng?

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Location table update instead of insert

2018-10-29 Thread Schneur Rosenberg
I do have a shared DB and "skip_replicated_db_ops" is set to "1" and I
have the problem that the lots of users were erased from the location
table somehow and the server thinks the record is there and just does
a update, I think the system should do a insert if it sees that 0 rows
were updated during the update query
On Sat, Oct 27, 2018 at 5:58 PM Liviu Chircu  wrote:
>
> Hi Schneur,
>
> Does each of your active/passive servers have its own DB, or do they
> share one?
>
> If they have individual DBs (which seems like it), then you should *not*
> enable "skip_replicated_db_ops".  Upon a node restart and sync
> operation, the node will properly dump its contacts to DB with INSERTs,
> followed by UPDATEs.
>
> If they use a shared DB: we do not recommend this setup anymore, however
> "skip_replicated_db_ops" should do the job.  After sync'ing up, the
> receiver node will avoid key conflicts by not re-doing the INSERTs when
> its boots up.  Later, when it switches to primary, the UPDATEs will work
> just fine.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 23.10.2018 10:39, Schneur Rosenberg wrote:
> > Hi, the last few days my location table displays only a fraction of
> > the registered users, I did some digging and I enabled query logging
> > on MySQL and I can see that OpenSIPS is doing updates instead of
> > inserts, and being that a update on a WHERE that does not
> >
> > My system is a cluster of 2 OpenSIPS servers version 2.4.1 running
> > "full-sharing" "cluster_mode", "restart_persistency" is set to
> > "load-from-sql", "sql_write_mode" is set to "write-back" and
> > "skip_replicated_db_ops" is set to "1" as of now its a active/passive
> > setup, when a server comes up it loads what its got in DB and then
> > after approx 3 minutes after all users have registered to the other
> > server the server will be syced.
> >
> > I tried bringing down one server at a time and the problem persists, I
> > suspect that when it comes up and it gets synced over binary it
> > assumes those users are in the DB and when the server becomes ACTIVE
> > it runs a update instead of a insert, I assume that if I would bring
> > down the entire cluster and delete the rows in the location table and
> > bring it back up it will operate properly but I would really love to
> > avoid that, is there another way?
> >
> > being that "contact_id"  is a PRIMARY KEY, is there a reason OpenSIPS
> > is not using  a INSERT with "ON DUPLICATE KEY"? or perhaps OpenSIPS
> > can run a INSERT if no rows were updated? and how can I avoid this in
> > the future?
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Location table update instead of insert

2018-10-23 Thread Schneur Rosenberg
Hi, the last few days my location table displays only a fraction of
the registered users, I did some digging and I enabled query logging
on MySQL and I can see that OpenSIPS is doing updates instead of
inserts, and being that a update on a WHERE that does not

My system is a cluster of 2 OpenSIPS servers version 2.4.1 running
"full-sharing" "cluster_mode", "restart_persistency" is set to
"load-from-sql", "sql_write_mode" is set to "write-back" and
"skip_replicated_db_ops" is set to "1" as of now its a active/passive
setup, when a server comes up it loads what its got in DB and then
after approx 3 minutes after all users have registered to the other
server the server will be syced.

I tried bringing down one server at a time and the problem persists, I
suspect that when it comes up and it gets synced over binary it
assumes those users are in the DB and when the server becomes ACTIVE
it runs a update instead of a insert, I assume that if I would bring
down the entire cluster and delete the rows in the location table and
bring it back up it will operate properly but I would really love to
avoid that, is there another way?

being that "contact_id"  is a PRIMARY KEY, is there a reason OpenSIPS
is not using  a INSERT with "ON DUPLICATE KEY"? or perhaps OpenSIPS
can run a INSERT if no rows were updated? and how can I avoid this in
the future?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CANCEL Reason is not propagated

2018-08-16 Thread Schneur Rosenberg
Wow I never knew this feature exists, do all phones implement this feature?

On Thu, Aug 16, 2018, 11:02 AM vasilevalex 
wrote:

> Hello Răzvan,
>
> Thank you very much for so fast response and fix!
>
> I built branch 2.4 from git and now it works fine, as it should.
>
> CANCEL Reason is propagated to client.
>
>
>
> --
> Sent from:
> http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] location table in MySQL when using full-sharing-cluster

2018-07-05 Thread Schneur Rosenberg
Thanks, that was the issue!!!

On Thu, Jul 5, 2018 at 5:43 PM, Liviu Chircu  wrote:
> Please don't set the "db_mode" [1] - it acts as a "working_mode_preset",
> overriding any other settings and putting your box into
> "single-instance-write-back".  Maybe I should emphasize this behavior even
> further both in the docs and logs.
>
> Best regards,
>
> [1]:
> http://www.opensips.org/html/docs/modules/2.4.x/usrloc.html#param_db_mode
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 05.07.2018 16:31, Schneur Rosenberg wrote:
>>
>> Liviu, can you help me out, I was playing around with the settings, by
>> doing a ngrep  I see the binary stuff going between servers, but the
>> second server does not actually load the registrations in memory.
>>
>> When I do a restart on the second server it loads from DB into memory,
>> but as soon as it expires it disappears, even though it received from
>> the binary re-registrations from the cluster.
>>
>> Here is what I have set now.
>> modparam("usrloc", "location_cluster", 1)
>> modparam("usrloc", "skip_replicated_db_ops", 1)
>> modparam("usrloc", "cluster_mode", "full-sharing")
>> modparam("usrloc", "location_cluster", 1)
>> modparam("usrloc", "restart_persistency", "load-from-sql")
>> #modparam("usrloc", "restart_persistency", "sync-from-cluster")
>> modparam("usrloc", "sql_write_mode", "write-back")
>> modparam("usrloc", "db_mode", 2) #is this the same as the previous line?
>>
>> On Thu, Jul 5, 2018 at 11:47 AM, Schneur Rosenberg
>>  wrote:
>>>
>>> Thanks liviu, the failover was just something nice to have, I can live
>>> without it, thanks again.
>>>
>>>
>>> On Thu, Jul 5, 2018, 11:32 AM Liviu Chircu  wrote:
>>>>
>>>> Sorry, I didn't fully read your request.  The "restart_persistency"
>>>> parameter is a selector: either A) or B). What you want is something
>>>> like: "perform A). if it fails, fall back to B)".  And this is, indeed,
>>>> not possible as of now.
>>>>
>>>> Liviu Chircu
>>>> OpenSIPS Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>> On 05.07.2018 10:30, Liviu Chircu wrote:
>>>>>
>>>>> Hi Schneur,
>>>>>
>>>>> Yes, this is possible.  Unset the "working_mode_preset" and
>>>>> individually set the "cluster_mode", "restart_persistency" and
>>>>> "sql_write_mode" so you achieve this effect.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Liviu Chircu
>>>>> OpenSIPS Developer
>>>>> http://www.opensips-solutions.com
>>>>>
>>>>> On 05.07.2018 09:43, Schneur Rosenberg wrote:
>>>>>>
>>>>>> Hi I have the working_mode_preset parameter in the usrloc module set
>>>>>> to full-sharing-cluster, is there anyway to have the location table
>>>>>> written to the MySQL database too? I need  to pull information from
>>>>>> the database.
>>>>>>
>>>>>> Basically the database should be for informational purposes, the
>>>>>> restart_persistency should still be sync-from-cluster and the
>>>>>> sql_write_mode should be write-back.
>>>>>>
>>>>>> A nice option would be if It can also be used as a backup for
>>>>>> restart_persistency if the entire cluster crashes at once.
>>>>>>
>>>>>> I assume I can get this done with NoSQL but that would mean that I
>>>>>> need to rewrite a lot of stuff that was written for MySQL
>>>>>>
>>>>>> S. Rosenberg
>>>>>>
>>>>>> ___
>>>>>> Users mailing list
>>>>>> Users@lists.opensips.org
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>> ___
>>>>> Users mailing list
>>>>> Users@lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] location table in MySQL when using full-sharing-cluster

2018-07-05 Thread Schneur Rosenberg
Liviu, can you help me out, I was playing around with the settings, by
doing a ngrep  I see the binary stuff going between servers, but the
second server does not actually load the registrations in memory.

When I do a restart on the second server it loads from DB into memory,
but as soon as it expires it disappears, even though it received from
the binary re-registrations from the cluster.

Here is what I have set now.
modparam("usrloc", "location_cluster", 1)
modparam("usrloc", "skip_replicated_db_ops", 1)
modparam("usrloc", "cluster_mode", "full-sharing")
modparam("usrloc", "location_cluster", 1)
modparam("usrloc", "restart_persistency", "load-from-sql")
#modparam("usrloc", "restart_persistency", "sync-from-cluster")
modparam("usrloc", "sql_write_mode", "write-back")
modparam("usrloc", "db_mode", 2) #is this the same as the previous line?

On Thu, Jul 5, 2018 at 11:47 AM, Schneur Rosenberg
 wrote:
> Thanks liviu, the failover was just something nice to have, I can live
> without it, thanks again.
>
>
> On Thu, Jul 5, 2018, 11:32 AM Liviu Chircu  wrote:
>>
>> Sorry, I didn't fully read your request.  The "restart_persistency"
>> parameter is a selector: either A) or B). What you want is something
>> like: "perform A). if it fails, fall back to B)".  And this is, indeed,
>> not possible as of now.
>>
>> Liviu Chircu
>> OpenSIPS Developer
>> http://www.opensips-solutions.com
>>
>> On 05.07.2018 10:30, Liviu Chircu wrote:
>> > Hi Schneur,
>> >
>> > Yes, this is possible.  Unset the "working_mode_preset" and
>> > individually set the "cluster_mode", "restart_persistency" and
>> > "sql_write_mode" so you achieve this effect.
>> >
>> > Best regards,
>> >
>> > Liviu Chircu
>> > OpenSIPS Developer
>> > http://www.opensips-solutions.com
>> >
>> > On 05.07.2018 09:43, Schneur Rosenberg wrote:
>> >> Hi I have the working_mode_preset parameter in the usrloc module set
>> >> to full-sharing-cluster, is there anyway to have the location table
>> >> written to the MySQL database too? I need  to pull information from
>> >> the database.
>> >>
>> >> Basically the database should be for informational purposes, the
>> >> restart_persistency should still be sync-from-cluster and the
>> >> sql_write_mode should be write-back.
>> >>
>> >> A nice option would be if It can also be used as a backup for
>> >> restart_persistency if the entire cluster crashes at once.
>> >>
>> >> I assume I can get this done with NoSQL but that would mean that I
>> >> need to rewrite a lot of stuff that was written for MySQL
>> >>
>> >> S. Rosenberg
>> >>
>> >> ___
>> >> Users mailing list
>> >> Users@lists.opensips.org
>> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] location table in MySQL when using full-sharing-cluster

2018-07-05 Thread Schneur Rosenberg
Thanks liviu, the failover was just something nice to have, I can live
without it, thanks again.

On Thu, Jul 5, 2018, 11:32 AM Liviu Chircu  wrote:

> Sorry, I didn't fully read your request.  The "restart_persistency"
> parameter is a selector: either A) or B). What you want is something
> like: "perform A). if it fails, fall back to B)".  And this is, indeed,
> not possible as of now.
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 05.07.2018 10:30, Liviu Chircu wrote:
> > Hi Schneur,
> >
> > Yes, this is possible.  Unset the "working_mode_preset" and
> > individually set the "cluster_mode", "restart_persistency" and
> > "sql_write_mode" so you achieve this effect.
> >
> > Best regards,
> >
> > Liviu Chircu
> > OpenSIPS Developer
> > http://www.opensips-solutions.com
> >
> > On 05.07.2018 09:43, Schneur Rosenberg wrote:
> >> Hi I have the working_mode_preset parameter in the usrloc module set
> >> to full-sharing-cluster, is there anyway to have the location table
> >> written to the MySQL database too? I need  to pull information from
> >> the database.
> >>
> >> Basically the database should be for informational purposes, the
> >> restart_persistency should still be sync-from-cluster and the
> >> sql_write_mode should be write-back.
> >>
> >> A nice option would be if It can also be used as a backup for
> >> restart_persistency if the entire cluster crashes at once.
> >>
> >> I assume I can get this done with NoSQL but that would mean that I
> >> need to rewrite a lot of stuff that was written for MySQL
> >>
> >> S. Rosenberg
> >>
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] location table in MySQL when using full-sharing-cluster

2018-07-05 Thread Schneur Rosenberg
Hi I have the working_mode_preset parameter in the usrloc module set
to full-sharing-cluster, is there anyway to have the location table
written to the MySQL database too? I need  to pull information from
the database.

Basically the database should be for informational purposes, the
restart_persistency should still be sync-from-cluster and the
sql_write_mode should be write-back.

A nice option would be if It can also be used as a backup for
restart_persistency if the entire cluster crashes at once.

I assume I can get this done with NoSQL but that would mean that I
need to rewrite a lot of stuff that was written for MySQL

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Crash

2018-06-08 Thread Schneur Rosenberg
A malformed sip packet should not crash OpenSIPS it should just give
an error and move on

On Fri, Jun 8, 2018 at 3:00 PM, Ben Newlin  wrote:
> Liviu,
>
>
>
> I am very impressed! I was indeed sending a malformed invite just like the
> one you posted, specifically with the missing line termination before the
> Call-ID.
>
>
>
> Thanks,
>
> Ben Newlin
>
>
>
>
>
> From: Users  on behalf of Liviu Chircu
> 
> Reply-To: OpenSIPS users mailling list 
> Date: Friday, June 8, 2018 at 5:17 AM
> To: "users@lists.opensips.org" 
> Subject: Re: [OpenSIPS-Users] OpenSIPS Crash
>
>
>
> Hi Ben,
>
> Excellent report! I managed to reproduce the crash on first try:
>
> Core was generated by `./opensips -m64 -M16 -f
> cfg/opensips-2.4-sipp-siptrace.cfg -w .'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x7f7987cd7f2a in sip_trace (msg=0x7f799817fd20,
> info=0x7f799468d5e0) at siptrace.c:1646
> 1646db_vals[1].val.str_val.s = msg->callid->body.s;
> (gdb) bt
> #0  0x7f7987cd7f2a in sip_trace (msg=0x7f799817fd20,
> info=0x7f799468d5e0) at siptrace.c:1646
> #1  0x7f7987cd7c8d in sip_trace_w (msg=0x7f799817fd20,
> param1=0x7f7998169110 "\001", param2=0x2  address 0x2>, param3=0x7f79981691f8 "\001", param4=0x0) at siptrace.c:1590
> #2  0x00445082 in do_action (a=0x7f79981589a0, msg=0x7f799817fd20)
> at action.c:1864
> #3  0x0043ccf7 in run_action_list (a=0x7f79981589a0,
> msg=0x7f799817fd20) at action.c:172
>
> Quick question for you: you are sending a malformed INVITE, correct? Here is
> how mine looked like:
>
> INVITE sip:sipp@127.0.0.1:5060 SIP/2.0.
> Via: SIP/2.0/UDP 127.0.0.1:7000;branch=z9hG4bK-1988-1-0.
> From: sipp ;tag=123456789.
> To: sut .
> CSeq: 1 INVITE.
> Contact:Call-ID: 1-1988@127.0.0.1.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Type: application/sdp.
> Content-Length:   129.
> .
> v=0.
> o=user1 53655765 2353687637 IN IP4 127.0.0.1.
> s=-.
> c=IN IP4 127.0.0.1.
> t=0 0.
> m=audio 6001 RTP/AVP 0.
> a=rtpmap:0 PCMU/8000.
>
> Notice how OpenSIPS will be unable to parse the Call-ID header field, hence
> the immediate crash in sip_trace(), as it's unable to handle a NULL Call-ID.
>
> Best regards,
>
> Liviu Chircu
>
> OpenSIPS Developer
>
> http://www.opensips-solutions.com
>
> On 07.06.2018 22:24, Ben Newlin wrote:
>
> Hi,
>
>
>
> While running a new test scenario I encountered an OpenSIPS crash.
>
>
>
> version: opensips 2.3.3 (x86_64/linux)
>
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC,
> FAST_LOCK-ADAPTIVE_WAIT
>
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
>
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>
> git revision: a0bed9d
>
> main.c compiled on 21:08:28 May 16 2018 with gcc 4.8.5
>
>
>
> Logs: https://pastebin.com/3vL3rbG4
>
> BT: https://pastebin.com/tTp32ASC
>
>
>
> Let me know if anything else is needed.
>
>
>
> Thanks,
>
> Ben Newlin
>
>
>
>
>
>
> ___
>
> Users mailing list
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] libmariadbclient crashes opensips 2.4

2018-05-06 Thread Schneur Rosenberg
I opened a ticket on Github with a new BT, please see if you can take
care of it, because my system crashes every few minutes

https://github.com/OpenSIPS/opensips/issues/1351

thank you
Scot (Schneur)

On Sun, May 6, 2018 at 12:23 AM, Schneur Rosenberg
<rosenberg11...@gmail.com> wrote:
> Bogdan, I downloaded the latest copy from gihub as you suggested, but
> I'm still getting the same segfault.
>
>
> Scot
>
> On Sat, May 5, 2018 at 11:53 AM, Schneur Rosenberg
> <rosenberg11...@gmail.com> wrote:
>> Opensips keeps on crashing with the following error
>>
>> kernel: [64912.190539] opensips[3377]: segfault at 4 ip
>> 7fdb8054f2ae sp 7ffc78fd45f0 error 4 in
>> libmariadbclient.so.18.0.0[7fdb80524000+37c000]
>>
>> Below is a bt from the dump file
>>
>> [New LWP 3377]
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> Core was generated by `/usr/local/sbin/opensips -P
>> /var/run/opensips/opensips.pid -m 128 -M 4 -u opens'.
>> Program terminated with signal SIGSEGV, Segmentation fault.
>> #0  0x7fdb8054f2ae in ?? () from
>> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
>> #0  0x7fdb8054f2ae in ?? () from
>> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
>> No symbol table info available.
>> #1  0x7fdb805512ba in mysql_stmt_execute () from
>> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
>> No symbol table info available.
>> #2  0x7fdb80b30b59 in wrapper_single_mysql_stmt_execute
>> (conn=0x7fdb89247990, stmt=0x55f7f23e6778) at dbase.c:148
>> code = 
>> error = 
>> #3  db_mysql_do_prepared_query (conn=conn@entry=0x7fdb89247990,
>> v=v@entry=0x7ffc78fd4990, n=n@entry=1, uv=uv@entry=0x0, un=un@entry=0,
>> query=0x7fdb80d4e5e0 <query_hold$
>> i = 
>> j = 
>> pq_ptr = 0x7fdb89247c90
>> ctx = 0x7fdb89247bf0
>> mysql_bind = 0x7fdb89247cd0
>> start = {tv_sec = 94523385831424, tv_usec = 140580733817260}
>> buffered_rows = 0x0
>> #4  0x7fdb80b37cd8 in db_mysql_delete (_h=0x7fdb89247990,
>> _k=0x7ffc78fd48a0, _o=0x7ffc78fd4890, _v=0x7ffc78fd4990, _n=1) at
>> dbase.c:1316
>> ret = 
>> #5  0x7fdb7ad459c3 in update_db_subs (db=0x7fdb89247990,
>> dbf=dbf@entry=0x7fdb7af7bbe0 , hash_table=,
>> htable_size=, no_lock=no$
>> my_ps_delete = 0x7fdb89247c90
>> my_ps_update = 0x0
>> my_ps_insert = 0x0
>> query_cols = {0x7fdb7af7ae60 ,
>> 0x7fdb7af7af20 , 0x7fdb7af7af30 ,
>> 0x7fdb7af7af40 , 0x7$
>> update_cols = {0x7fdb7af7aed0 ,
>> 0x7fdb7af7aec0 , 0x7fdb7af7aeb0 ,
>> 0x7fdb7af7af00 , 0x7fdb$
>> query_vals = {{type = DB_STR, nul = 0, free = 65448, val =
>> {int_val = 2063050128, bigint_val = 140580637615504, double_val =
>> 6.9456063516278221e-310, time_val $
>> update_vals = {{type = DB_INT, nul = 0, free = -230745857, val
>> = {int_val = 1525508903, bigint_val = 140580100074279, double_val =
>> 6.9455797935625725e-310, tim$
>> update_ops = {0x7fdb7ad6e0d1 "<"}
>> del_s = 
>> i = 
>> s = 
>> prev_s = 
>> n_query_cols = 20
>> n_update_cols = 7
>> buffered_rows = 0x0
>> #4  0x7fdb80b37cd8 in db_mysql_delete (_h=0x7fdb89247990,
>> _k=0x7ffc78fd48a0, _o=0x7ffc78fd4890, _v=0x7ffc78fd4990, _n=1) at
>> dbase.c:1316
>> ret = 
>> #5  0x7fdb7ad459c3 in update_db_subs (db=0x7fdb89247990,
>> dbf=dbf@entry=0x7fdb7af7bbe0 , hash_table=,
>> htable_size=, no_lock=no$
>> my_ps_delete = 0x7fdb89247c90
>> my_ps_update = 0x0
>> my_ps_insert = 0x0
>> query_cols = {0x7fdb7af7ae60 ,
>> 0x7fdb7af7af20 , 0x7fdb7af7af30 ,
>> 0x7fdb7af7af40 , 0x7$
>> update_cols = {0x7fdb7af7aed0 ,
>> 0x7fdb7af7aec0 , 0x7fdb7af7aeb0 ,
>> 0x7fdb7af7af00 , 0x7fdb$
>> query_vals = {{type = DB_STR, nul = 0, free = 65448, val =
>> {int_val = 2063050128, bigint_val = 140580637615504, double_val =
>> 6.9456063516278221e-310, time_val $
>> update_vals = {{type = DB_INT, nul = 0, free = -230745857, val
>> = {int_val = 1525508903, bigint_val = 140580100074279, double_val =
>> 6.9455797935625725e-310, tim$
>> update_ops = {0x7fdb7ad6e0d1 "<"}
>> del_s = 
>> i = 
>> s = 
>> prev_s = 
>> n_query_cols = 20
>> n_upda

Re: [OpenSIPS-Users] libmariadbclient crashes opensips 2.4

2018-05-05 Thread Schneur Rosenberg
Bogdan, I downloaded the latest copy from gihub as you suggested, but
I'm still getting the same segfault.


Scot

On Sat, May 5, 2018 at 11:53 AM, Schneur Rosenberg
<rosenberg11...@gmail.com> wrote:
> Opensips keeps on crashing with the following error
>
> kernel: [64912.190539] opensips[3377]: segfault at 4 ip
> 7fdb8054f2ae sp 7ffc78fd45f0 error 4 in
> libmariadbclient.so.18.0.0[7fdb80524000+37c000]
>
> Below is a bt from the dump file
>
> [New LWP 3377]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by `/usr/local/sbin/opensips -P
> /var/run/opensips/opensips.pid -m 128 -M 4 -u opens'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x7fdb8054f2ae in ?? () from
> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
> #0  0x7fdb8054f2ae in ?? () from
> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
> No symbol table info available.
> #1  0x7fdb805512ba in mysql_stmt_execute () from
> /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
> No symbol table info available.
> #2  0x7fdb80b30b59 in wrapper_single_mysql_stmt_execute
> (conn=0x7fdb89247990, stmt=0x55f7f23e6778) at dbase.c:148
> code = 
> error = 
> #3  db_mysql_do_prepared_query (conn=conn@entry=0x7fdb89247990,
> v=v@entry=0x7ffc78fd4990, n=n@entry=1, uv=uv@entry=0x0, un=un@entry=0,
> query=0x7fdb80d4e5e0 <query_hold$
> i = 
> j = 
> pq_ptr = 0x7fdb89247c90
> ctx = 0x7fdb89247bf0
> mysql_bind = 0x7fdb89247cd0
> start = {tv_sec = 94523385831424, tv_usec = 140580733817260}
> buffered_rows = 0x0
> #4  0x7fdb80b37cd8 in db_mysql_delete (_h=0x7fdb89247990,
> _k=0x7ffc78fd48a0, _o=0x7ffc78fd4890, _v=0x7ffc78fd4990, _n=1) at
> dbase.c:1316
> ret = 
> #5  0x7fdb7ad459c3 in update_db_subs (db=0x7fdb89247990,
> dbf=dbf@entry=0x7fdb7af7bbe0 , hash_table=,
> htable_size=, no_lock=no$
> my_ps_delete = 0x7fdb89247c90
> my_ps_update = 0x0
> my_ps_insert = 0x0
> query_cols = {0x7fdb7af7ae60 ,
> 0x7fdb7af7af20 , 0x7fdb7af7af30 ,
> 0x7fdb7af7af40 , 0x7$
> update_cols = {0x7fdb7af7aed0 ,
> 0x7fdb7af7aec0 , 0x7fdb7af7aeb0 ,
> 0x7fdb7af7af00 , 0x7fdb$
> query_vals = {{type = DB_STR, nul = 0, free = 65448, val =
> {int_val = 2063050128, bigint_val = 140580637615504, double_val =
> 6.9456063516278221e-310, time_val $
> update_vals = {{type = DB_INT, nul = 0, free = -230745857, val
> = {int_val = 1525508903, bigint_val = 140580100074279, double_val =
> 6.9455797935625725e-310, tim$
> update_ops = {0x7fdb7ad6e0d1 "<"}
> del_s = 
> i = 
> s = 
> prev_s = 
> n_query_cols = 20
> n_update_cols = 7
> buffered_rows = 0x0
> #4  0x7fdb80b37cd8 in db_mysql_delete (_h=0x7fdb89247990,
> _k=0x7ffc78fd48a0, _o=0x7ffc78fd4890, _v=0x7ffc78fd4990, _n=1) at
> dbase.c:1316
> ret = 
> #5  0x7fdb7ad459c3 in update_db_subs (db=0x7fdb89247990,
> dbf=dbf@entry=0x7fdb7af7bbe0 , hash_table=,
> htable_size=, no_lock=no$
> my_ps_delete = 0x7fdb89247c90
> my_ps_update = 0x0
> my_ps_insert = 0x0
> query_cols = {0x7fdb7af7ae60 ,
> 0x7fdb7af7af20 , 0x7fdb7af7af30 ,
> 0x7fdb7af7af40 , 0x7$
> update_cols = {0x7fdb7af7aed0 ,
> 0x7fdb7af7aec0 , 0x7fdb7af7aeb0 ,
> 0x7fdb7af7af00 , 0x7fdb$
> query_vals = {{type = DB_STR, nul = 0, free = 65448, val =
> {int_val = 2063050128, bigint_val = 140580637615504, double_val =
> 6.9456063516278221e-310, time_val $
> update_vals = {{type = DB_INT, nul = 0, free = -230745857, val
> = {int_val = 1525508903, bigint_val = 140580100074279, double_val =
> 6.9455797935625725e-310, tim$
> update_ops = {0x7fdb7ad6e0d1 "<"}
> del_s = 
> i = 
> s = 
> prev_s = 
> n_query_cols = 20
> n_update_cols = 7
> __FUNCTION__ = "update_db_subs"
> #6  0x7fdb7ad46337 in timer_db_update (ticks=,
> param=) at subscribe.c:1341
> no_lock = 
> __FUNCTION__ = "timer_db_update"
> #7  0x55f7f094093c in handle_timer_job () at timer.c:730
> t = 0x7fdb81531488
> l = 
> __FUNCTION__ = "handle_timer_job"
> #8  0x55f7f0a72d03 in handle_io (idx=,
> event_type=, fm=) at net/net_udp.c:265
> n = 
> read = -1
> #9  io_wait_loop_epoll (h=, t=,
> repeat=) at net/../io_wait_loop.h:284
> ep_event = {events = 4040413608, data = {ptr =
> 0xf093fa5f55f7,

[OpenSIPS-Users] libmariadbclient crashes opensips 2.4

2018-05-05 Thread Schneur Rosenberg
Opensips keeps on crashing with the following error

kernel: [64912.190539] opensips[3377]: segfault at 4 ip
7fdb8054f2ae sp 7ffc78fd45f0 error 4 in
libmariadbclient.so.18.0.0[7fdb80524000+37c000]

Below is a bt from the dump file

[New LWP 3377]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -M 4 -u opens'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7fdb8054f2ae in ?? () from
/usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
#0  0x7fdb8054f2ae in ?? () from
/usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
No symbol table info available.
#1  0x7fdb805512ba in mysql_stmt_execute () from
/usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
No symbol table info available.
#2  0x7fdb80b30b59 in wrapper_single_mysql_stmt_execute
(conn=0x7fdb89247990, stmt=0x55f7f23e6778) at dbase.c:148
code = 
error = 
#3  db_mysql_do_prepared_query (conn=conn@entry=0x7fdb89247990,
v=v@entry=0x7ffc78fd4990, n=n@entry=1, uv=uv@entry=0x0, un=un@entry=0,
query=0x7fdb80d4e5e0 

Re: [OpenSIPS-Users] MySQL Insert Statement

2018-04-29 Thread Schneur Rosenberg
Look at the avp_db_query function.

On Mon, Apr 30, 2018, 2:27 AM Alexander Perkins <
alexanderhenryperk...@gmail.com> wrote:

> Hi.  I've been trying to figure out how to insert a statement into MySQL
> from the opensips.cfg file and I am having a hard time.  Basically, I am
> checking the userblacklist and would like to insert into a MySQL table when
> that number is attempted.  Is that possible?  I've already successfully
> loaded the db_mysql module.  Here's the line I am referring to:
>
> if (check_blacklist("BlackList"))
> sl_send_reply("403", "Forbidden");
> #I would like to have something here like INSERT INTO
> Attempts(User) Value($rU)
> exit;
>
> Any help is appreciated,
> Alex
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] sip_trace causes retransmissions

2018-03-26 Thread Schneur Rosenberg
Hi, I've realized that some of my packets get ignored after OpenSIPS
runs for a while, I tried a stress test with SIPp without any
configuration basically sending an invite, the server responding with
a 407 Proxy Authentication Required and the SIPp responds with a ACK,
once I reached 1500 calls per second it started having
re-transmissions, but moving it back down even to one call per second
did not solve the issue the re-transmissions kept on happening only a
restart of OpenSIPS helped.

I suspected its related to Homer so I removed the sip_trace command
and restarted OpenSIPS  and only after hitting approx 3500 cps did the
re-transmissions, but as soon as I lowered it back a little everything
was back to usual.

The problem also happens after the system runs for a while with very
low call volume, this and the fact that it does not get corrected
after lowering the stress makes me believe its a memory leak.

How can I check whats causing it, would a "opensipsctl fifo
get_statistics all" reveal if it is, I don't know how to read it.

Scot (Schneur) Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Port changes

2018-02-14 Thread Schneur Rosenberg
You're right, I noticed that the port was wrong at the first invite,
but I didn't realize that it was fixed, I thought it left it
untouched, I just checked again and you're correct it  did fix it.

Is there any downside (besides for obvious performance reasons) to
call fix_nated_contact() on each packet? 99% of  our customers are
behind NAT anyway, I assume it cant hurt, I assume it uses the
received IP and port to rewrite the contact,  so even if the correct
IP and port was sent with the initial invite it wont do any harm, is
my assumption correct?


http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png;
alt="" width="46" height="29" style="width: 46px; height: 29px;"
/>
Virus-free. http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank" style="color: #4453ea;">www.avg.com




On Wed, Feb 14, 2018 at 11:24 AM, Bogdan-Andrei Iancu
<bog...@opensips.org> wrote:
> Hi Schneur,
>
> I see at initial INVITE you have the same issue - the contact advertises the
> 34063 port, but the source IP is 1090; and you do fix_nated_contact(). So,
> based on the initial contact, you learned that the caller device is behind a
> NAT (or with a bogus ALG). The idea is to remember this (caller requires
> help) during the whole dialog (maybe using some dialog flags) and each time
> you receive a request / reply from it -> do the fix_nated_contact(). This
> will trigger the fix on the 200 OK and to get a routable URI there.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 02/13/2018 12:16 PM, Schneur Rosenberg wrote:
>>
>> Bogdan its only happening when the clients SIP ALG fixes the contact,
>> when the contact is broken I'm already using fix_nated_contact, do you
>> think I should use fix_nated_contact even when the contact was already
>> fixed by the SIP ALG?
>>
>> The clients router does not support disabling SIP ALG, I can try using
>> a non standard port, I've sen some routers ALG ignoring the packets
>> when sent to alternative port.
>>
>> On Tue, Feb 13, 2018 at 12:04 PM, Bogdan-Andrei Iancu
>> <bog...@opensips.org> wrote:
>>>
>>> Hi Schneur,
>>>
>>> The ACK is routed back via the Route set (the Record Route headers from
>>> the
>>> initial Invite) and the Contact received in the final reply (in the 200
>>> OK
>>> in your case). This is called in-dialog routing and is exclusively based
>>> on
>>> Route set (RR headers + Contact).
>>>
>>> The rport as part of via is used only for routing back the replies for a
>>> requests (in transaction routing) and has no impact on the in-dialog
>>> routing.
>>>
>>> So, if the RURI in ACK (which should be the Contact in the received 200
>>> OK)
>>> is broken, maybe you should do a fix_nated_contact() for the Contact when
>>> handling the 200 OK reply.
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>http://www.opensips-solutions.com
>>> OpenSIPS Summit 2018
>>>http://www.opensips.org/events/Summit-2018Amsterdam
>>>
>>>
>>> On 02/12/2018 05:05 PM, Schneur Rosenberg wrote:
>>>>
>>>> I have this interesting scenario, caller sends call to our OpenSIPS
>>>> who actsd as a loadbalancer which sends the call to a gateway for
>>>> termination and the gateway sets Session-Expires: 1800;refresher=uas,
>>>> the caller sends call the call through port 1090 and the rport in the
>>>> Via shows rport=1090 and so far everything is ok, but after 15 minutes
>>>> the gateway sends a reinvite,  OpenSIPS sends it to the client and the
>>>> client sends a OK and OpenSIPS properly sends the OK to the gateway,
>>>> the gateway sends a ACK to OpenSIPS, but here the problem starts
>>>> OpenSIPS sends the ACK to the port in the Contact header which is not
>>>> the same port as the rport, the clients router does not recognize the
>>>> packet and blocks it, the client sends multiple OK's to OpenSIPS who
>>>> ignores it because he has already moved on, as far as OpenSIPS is
>>>> concerned the ACK has already been 

Re: [OpenSIPS-Users] Port changes

2018-02-13 Thread Schneur Rosenberg
Bogdan its only happening when the clients SIP ALG fixes the contact,
when the contact is broken I'm already using fix_nated_contact, do you
think I should use fix_nated_contact even when the contact was already
fixed by the SIP ALG?

The clients router does not support disabling SIP ALG, I can try using
a non standard port, I've sen some routers ALG ignoring the packets
when sent to alternative port.

I feel like its a bug in OpenSIPS, because the reinvite is routed to
the proper port, the issue starts with the ACK for the reinvite, I
will email the trace  directly to you.

On Tue, Feb 13, 2018 at 12:04 PM, Bogdan-Andrei Iancu
<bog...@opensips.org> wrote:
> Hi Schneur,
>
> The ACK is routed back via the Route set (the Record Route headers from the
> initial Invite) and the Contact received in the final reply (in the 200 OK
> in your case). This is called in-dialog routing and is exclusively based on
> Route set (RR headers + Contact).
>
> The rport as part of via is used only for routing back the replies for a
> requests (in transaction routing) and has no impact on the in-dialog
> routing.
>
> So, if the RURI in ACK (which should be the Contact in the received 200 OK)
> is broken, maybe you should do a fix_nated_contact() for the Contact when
> handling the 200 OK reply.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
>
> On 02/12/2018 05:05 PM, Schneur Rosenberg wrote:
>>
>> I have this interesting scenario, caller sends call to our OpenSIPS
>> who actsd as a loadbalancer which sends the call to a gateway for
>> termination and the gateway sets Session-Expires: 1800;refresher=uas,
>> the caller sends call the call through port 1090 and the rport in the
>> Via shows rport=1090 and so far everything is ok, but after 15 minutes
>> the gateway sends a reinvite,  OpenSIPS sends it to the client and the
>> client sends a OK and OpenSIPS properly sends the OK to the gateway,
>> the gateway sends a ACK to OpenSIPS, but here the problem starts
>> OpenSIPS sends the ACK to the port in the Contact header which is not
>> the same port as the rport, the clients router does not recognize the
>> packet and blocks it, the client sends multiple OK's to OpenSIPS who
>> ignores it because he has already moved on, as far as OpenSIPS is
>> concerned the ACK has already been sent to the next hop, and after
>> approx 30 seconds the client does not receive the ACK and sends a BYE
>> and the call terminates.
>>
>> Why is OpenSIPS changing the port to the Contact port? and what can I
>> do to fix it?
>> 
>> 
>>  >
>> href="http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
>> target="_blank">>
>> src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png;
>> alt="" width="46" height="29" style="width: 46px; height: 29px;"
>> />
>> Virus-free. >
>> href="http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
>> target="_blank" style="color: #4453ea;">www.avg.com
>> 
>> 
>> > height="1">
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Database search inside opensips

2018-02-12 Thread Schneur Rosenberg
You can use avp_db_query


http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png;
alt="" width="46" height="29" style="width: 46px; height: 29px;"
/>
Virus-free. http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank" style="color: #4453ea;">www.avg.com




On Mon, Feb 12, 2018 at 4:48 PM, Brian Southworth
 wrote:
> Hi Opensips,
>
>
>
> Sorry for all my emails lately.
>
>
>
> Is there any way I can run a database search in opensips config while a
> route is being processed.
>
>
>
> Example scenario: Company has over 15 clients each with their own user id
> (lets call this a callgroup ID), so the call group id needs to be changed
> based on the extension calling to match the correct call group.
>
> $rU->accountcode (this is just an example).
>
>
>
> I just thought being able to change this on the fly would be easier than
> writing loads of new call groups into the Even based routing.
>
>
>
> Regards,
>
>
>
> Brian Southworth
>
> Communications Developer
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Port changes

2018-02-12 Thread Schneur Rosenberg
I have this interesting scenario, caller sends call to our OpenSIPS
who actsd as a loadbalancer which sends the call to a gateway for
termination and the gateway sets Session-Expires: 1800;refresher=uas,
the caller sends call the call through port 1090 and the rport in the
Via shows rport=1090 and so far everything is ok, but after 15 minutes
the gateway sends a reinvite,  OpenSIPS sends it to the client and the
client sends a OK and OpenSIPS properly sends the OK to the gateway,
the gateway sends a ACK to OpenSIPS, but here the problem starts
OpenSIPS sends the ACK to the port in the Contact header which is not
the same port as the rport, the clients router does not recognize the
packet and blocks it, the client sends multiple OK's to OpenSIPS who
ignores it because he has already moved on, as far as OpenSIPS is
concerned the ACK has already been sent to the next hop, and after
approx 30 seconds the client does not receive the ACK and sends a BYE
and the call terminates.

Why is OpenSIPS changing the port to the Contact port? and what can I
do to fix it?


http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png;
alt="" width="46" height="29" style="width: 46px; height: 29px;"
/>
Virus-free. http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail;
target="_blank" style="color: #4453ea;">www.avg.com




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] explode function

2017-06-02 Thread Schneur Rosenberg
Hi, I'm trying to store a list of gateways in memcache, due to NoSQL
nature I can't store a avp with multiple values, so I used the avp
with the [*] which gave me a comma delimited list which I can store,
now I want to create a array of all the values similar to explode() in
php.

The closest thing I can think of is to use {s.select,index,separator}
but that would be very messy, as I would need to use a while loop with
{s.index} until it returns -1 and use the {s.select,index,separator}
to populate the array, I was hoping that there is a easier way, does a
easier way exist?

thank you
S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] List of load_balancer group

2017-05-29 Thread Schneur Rosenberg
Hi Giovanni

Thanks, by using memcache I meant to do a cache_fetch and if its not
there then do avp_db_query and then use cache_store to store it for
next time, I'm going to look into the sql cacher now, it seems to be a
better solution.

Schneur

On Mon, May 29, 2017 at 5:00 PM, Giovanni Maruzzelli <gmar...@gmail.com> wrote:
> Hello Schneur,
>
> you may also use http://www.opensips.org/html/docs/modules/2.2.x/avpops.html
> for querying the db, then cache the result with sql cacher, or do the query
> and put the result in an avp if not already there.
>
> -giovanni
>
>
> On 29 May 2017 at 14:37, Schneur Rosenberg <rosenberg11...@gmail.com> wrote:
>>
>> Is there anyway to get in the script a list of destinations in the
>> load_balancer group? I can get it directly from the DB but I want to
>> avoid querying the DB, I want to use it to parallel fork certain calls
>> to all servers in the load balancer group.
>>
>> I couldn't find anything in the load balancer documentations, the
>> closest thing I could find is lb_list through fifo, but I want it in
>> the script, I guess worst case I can query it and then memcache it.
>>
>> S. Rosenberg
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
>
> Sincerely,
>
> Giovanni Maruzzelli
> OpenTelecom.IT
> cell: +39 347 266 56 18
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] List of load_balancer group

2017-05-29 Thread Schneur Rosenberg
Is there anyway to get in the script a list of destinations in the
load_balancer group? I can get it directly from the DB but I want to
avoid querying the DB, I want to use it to parallel fork certain calls
to all servers in the load balancer group.

I couldn't find anything in the load balancer documentations, the
closest thing I could find is lb_list through fifo, but I want it in
the script, I guess worst case I can query it and then memcache it.

S. Rosenberg

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Ghost calls 1001

2017-04-21 Thread Schneur Rosenberg
Sending a 200 ok will notify the hacker that a sip server exists on the
IP/port, simply ignoring the request is best.

On Apr 21, 2017 12:20 PM, "johan de clercq" <jo...@democon.be> wrote:

> Another approach is sending 200 ok and then exit().
>
>
>
> *From:* Users [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Schneur
> Rosenberg
> *Sent:* Friday, April 21, 2017 11:00 AM
> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
> *Subject:* Re: [OpenSIPS-Users] Ghost calls 1001
>
>
>
> User agent variable is stored in $ua do a if and drop()
>
>
>
> Regarding iptables do something like this
>
>
>
>
>
> https://community.freepbx.org/t/stop-sipvicious-friendly-scanner/28580
>
>
>
>
>
> On Apr 21, 2017 10:12 AM, "Uzair Hassan" <uzairhas...@shaw.ca> wrote:
>
> Is there any documentation I could read to understand the process you just
> described?
>
> On April 20, 2017 11:15:54 PM Schneur Rosenberg <rosenberg11...@gmail.com>
> wrote:
>
> In addition to iptables/fail2ban you should inspect the useragent that the
> packets come from, most of them will come from sip vicious or friendly
> scanner etc, you can block them with iptables and/or with drop() in
> opensips, this will stop the scanner right away because he won't get any
> replies so he will just move on.
>
>
>
> On Apr 21, 2017 8:11 AM, "Uzair Hassan" <uzairhas...@shaw.ca> wrote:
>
> Is there a way to change opensips port ? Whenever I try it doesn't even
> start.
>
> On April 20, 2017 9:09:55 PM "Alexander Jankowsky" <
> e75a4...@exemail.com.au> wrote:
>
>
>
> You might need to do a Wireshark trace and find out if the calls originate
> externally into the system.
>
> If you are in an open DMZ with the router, that could be just the start of
> your problems.
>
> I had Opensips 2.3.0-beta in the open on DMZ with the router for only a
> few hours and
>
> I then had a couple of dozen automated break in attempts trying to access
> the system.
>
> You need to pay a lot of attention to the system logs otherwise you may
> not even notice.
>
> Go over your router very carefully and restrict everything you do not need
> exposed.
>
> Port 5060 is a very popular target with automated robots, use another port
> if your able to.
>
>
>
> Alex
>
>
>
>
>
> *From:* Users [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Uzair
> Hassan
> *Sent:* Friday, 21 April 2017 6:16 AM
> *To:* users@lists.opensips.org
> *Subject:* [OpenSIPS-Users] Ghost calls 1001
>
>
>
> Hello all,
>
>
>
> I have setup a opensips 2.3 on a new server and I'm getting ghost calls
> into my system. How do I stop these ghost call? The opensips server is
> brand new. the install is clean and nothing has been touched after the
> initial simple residential script setup. What can I do to defend myself
> from these ghost calls.
>
> Thank you so much.
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Ghost calls 1001

2017-04-21 Thread Schneur Rosenberg
User agent variable is stored in $ua do a if and drop()

Regarding iptables do something like this


https://community.freepbx.org/t/stop-sipvicious-friendly-scanner/28580


On Apr 21, 2017 10:12 AM, "Uzair Hassan" <uzairhas...@shaw.ca> wrote:

> Is there any documentation I could read to understand the process you just
> described?
>
> On April 20, 2017 11:15:54 PM Schneur Rosenberg <rosenberg11...@gmail.com>
> wrote:
>
>> In addition to iptables/fail2ban you should inspect the useragent that
>> the packets come from, most of them will come from sip vicious or friendly
>> scanner etc, you can block them with iptables and/or with drop() in
>> opensips, this will stop the scanner right away because he won't get any
>> replies so he will just move on.
>>
>> On Apr 21, 2017 8:11 AM, "Uzair Hassan" <uzairhas...@shaw.ca> wrote:
>>
>>> Is there a way to change opensips port ? Whenever I try it doesn't even
>>> start.
>>>
>>> On April 20, 2017 9:09:55 PM "Alexander Jankowsky" <
>>> e75a4...@exemail.com.au> wrote:
>>>
>>>>
>>>>
>>>> You might need to do a Wireshark trace and find out if the calls
>>>> originate externally into the system.
>>>>
>>>> If you are in an open DMZ with the router, that could be just the start
>>>> of your problems.
>>>>
>>>> I had Opensips 2.3.0-beta in the open on DMZ with the router for only a
>>>> few hours and
>>>>
>>>> I then had a couple of dozen automated break in attempts trying to
>>>> access the system.
>>>>
>>>> You need to pay a lot of attention to the system logs otherwise you may
>>>> not even notice.
>>>>
>>>> Go over your router very carefully and restrict everything you do not
>>>> need exposed.
>>>>
>>>> Port 5060 is a very popular target with automated robots, use another
>>>> port if your able to.
>>>>
>>>>
>>>>
>>>> Alex
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *From:* Users [mailto:users-boun...@lists.opensips.org] *On Behalf Of 
>>>> *Uzair
>>>> Hassan
>>>> *Sent:* Friday, 21 April 2017 6:16 AM
>>>> *To:* users@lists.opensips.org
>>>> *Subject:* [OpenSIPS-Users] Ghost calls 1001
>>>>
>>>>
>>>>
>>>> Hello all,
>>>>
>>>>
>>>>
>>>> I have setup a opensips 2.3 on a new server and I'm getting ghost calls
>>>> into my system. How do I stop these ghost call? The opensips server is
>>>> brand new. the install is clean and nothing has been touched after the
>>>> initial simple residential script setup. What can I do to defend myself
>>>> from these ghost calls.
>>>>
>>>> Thank you so much.
>>>>
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Ghost calls 1001

2017-04-21 Thread Schneur Rosenberg
In addition to iptables/fail2ban you should inspect the useragent that the
packets come from, most of them will come from sip vicious or friendly
scanner etc, you can block them with iptables and/or with drop() in
opensips, this will stop the scanner right away because he won't get any
replies so he will just move on.

On Apr 21, 2017 8:11 AM, "Uzair Hassan"  wrote:

> Is there a way to change opensips port ? Whenever I try it doesn't even
> start.
>
> On April 20, 2017 9:09:55 PM "Alexander Jankowsky" <
> e75a4...@exemail.com.au> wrote:
>
>>
>>
>> You might need to do a Wireshark trace and find out if the calls
>> originate externally into the system.
>>
>> If you are in an open DMZ with the router, that could be just the start
>> of your problems.
>>
>> I had Opensips 2.3.0-beta in the open on DMZ with the router for only a
>> few hours and
>>
>> I then had a couple of dozen automated break in attempts trying to access
>> the system.
>>
>> You need to pay a lot of attention to the system logs otherwise you may
>> not even notice.
>>
>> Go over your router very carefully and restrict everything you do not
>> need exposed.
>>
>> Port 5060 is a very popular target with automated robots, use another
>> port if your able to.
>>
>>
>>
>> Alex
>>
>>
>>
>>
>>
>> *From:* Users [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Uzair
>> Hassan
>> *Sent:* Friday, 21 April 2017 6:16 AM
>> *To:* users@lists.opensips.org
>> *Subject:* [OpenSIPS-Users] Ghost calls 1001
>>
>>
>>
>> Hello all,
>>
>>
>>
>> I have setup a opensips 2.3 on a new server and I'm getting ghost calls
>> into my system. How do I stop these ghost call? The opensips server is
>> brand new. the install is clean and nothing has been touched after the
>> initial simple residential script setup. What can I do to defend myself
>> from these ghost calls.
>>
>> Thank you so much.
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence dialoginfo_set problem

2017-03-22 Thread Schneur Rosenberg
Ok please ignore this issue, I just realized I had set some user do go
with a different route which did not call dialoginfo_set

On Wed, Mar 22, 2017 at 1:15 PM, Schneur Rosenberg
<rosenberg11...@gmail.com> wrote:
> I'm trying to set up presence on OpenSIPS 2.2.2 I am successful in
> registering watchers with a subscribe, I can see them in the
> active_watchers table, but for some reason only some users will send a
> PUBLISH, I can't figure out why some users trigger the PUBLISH and
> some don't (even though they have watchers registered), what am I
> missing?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Presence dialoginfo_set problem

2017-03-22 Thread Schneur Rosenberg
I'm trying to set up presence on OpenSIPS 2.2.2 I am successful in
registering watchers with a subscribe, I can see them in the
active_watchers table, but for some reason only some users will send a
PUBLISH, I can't figure out why some users trigger the PUBLISH and
some don't (even though they have watchers registered), what am I
missing?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Siptrace crash

2017-03-19 Thread Schneur Rosenberg
Would this help? I dont have a memory dump

Mar 17 19:27:01 sip10 kernel: [115810.179291] opensips[1297]: segfault
at 18 ip 7f3e0ddf1592 sp 7ffeda1c2fe0 error 4 in
siptrace.so[7f3e0dde5000+22000]
Mar 17 19:27:01 sip10 /sbin/opensips[1601]: CRITICAL:core:receive_fd: EOF on 33

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips backup

2017-02-08 Thread Schneur Rosenberg
Only if they are sharing a floating IP, if it's in a different network it
won't work properly

On Feb 9, 2017 08:45, "Denis via Users"  wrote:

> Sorry, but one more time.
> If both instance: muster and slave are in active mode (i.e. running), will
> slave properly handle dialogs (for example when BYE has been received)
> initiated on muster (in case of fail one)?
> I am using dialog module with db_mode = 1.
>
> Thank you.
>
> --
> С уважением, Денис.
> Best regards, Denis
>
>
>
> 08.02.2017, 10:46, "Johan De Clercq" :
>
> as long as your sql instances are in perfect sync and if you use dialogs
> with db in realtime, it should work.
> I think however that it is much better to share an instance of mysql
> instead of using one for each opensips with replication .
>
> 2017-02-08 7:55 GMT+01:00 Denis via Users :
>
> Hello!
>
> There is one consulting question.
>
> If i have a two instance of the Opensips which are working with
> active/standby mode and there is mysql replication between two instance.
>
> Suppose standby Opensips will run permanently because listen parameter
> will be, for example, udp:eth1:5060.
>
> So, the question is, if active Opensips will fail, will standby Opensips
> be handle dialogs properly which have been initiated on active one early?
>
> Thank you.
>
> --
> С уважением, Денис.
> Best regards, Denis
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ACK for invite with wrong Cseq

2017-01-31 Thread Schneur Rosenberg
Hi, I'm using OpenSIPS 2.2.2 and I'm using create_dialog with the "Pp"
options, most calls run fine, but I have got complaints about calls
getting disconnected after about 30 seconds, I ran a trace and I
realized that OpenSIPS sent a INVITE with CSeq 601, the called party
picked up after approx 34 seconds and sent a OK with CSeq 601 which
the gateway (Freeswitch in this instance) forwarded to OpenSIPS, but
before OpenSIPS responded with a ACK it sent a ping Options to the
gateway with CSeq 602 and the gateway replied with a OK, and then
OpenSIPS sent the ACK for the INVITE  but used the CSeq of the Options
602 and not from the INVITE,601, therefore the gateway kept on sending
OK's with CSeq 601 which OpenSIPS responded every time with the ACK
but again with the CSeq 602. then after approx 30 seconds the gateway
sent a bye with Reason: SIP;cause=408;text="ACK Timeout"

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Binary replication errors

2017-01-15 Thread Schneur Rosenberg
I removed the modparam("dialog", "replicate_profiles_to", 1) and the
modparam("dialog", "accept_replicated_profiles", 1) (which was in my
script but forgot to paste it in previous post) and now it works.

Seems like its a old problem, when I had the profile replication I was
getting "WARNING:dialog:receive_prof_binary_packet: bad packet type"
Liviu was aware of it
(https://github.com/OpenSIPS/opensips/issues/938) , but I still have
issues in latest build.

I wonder why the old replication methods were removed and replaced
with a module thats still in Alpha (clusterer) ?

The documentation of clusterer and replication is also outdated, for
example opensips does not recognize the parameter persistent_mode
which is supposed to work according to the docs. also the binary
replication docs for 2.2 still tells you to use bin_listen which has
been replaced with listen=bin, it also tells you to use bin_children
which was phased out as, see the following link.
https://www.opensips.org/Documentation/Interface-Binary-2-2

S. Rosenberg



On Sat, Jan 14, 2017 at 10:59 PM, Schneur Rosenberg
<rosenberg11...@gmail.com> wrote:
>
> Hi, I tried to implement binary replication with OpenSIPS ver 2.2.2 and it 
> floods my logs with the following errors on both servers
>
> Jan 14 21:12:20 sips /sbin/opensips[4484]: 
> WARNING:dialog:receive_dlg_binary_packet: Invalid dialog binary packet 
> command: 4 (from XXX.XXX.XXX.XXX:45107)
> Jan 14 21:12:20 sip /sbin/opensips[4484]: 
> ERROR:dialog:receive_dlg_binary_packet: Failed to process a binary packet!
>
> when I do a ngrep its flooding with messsage
>
> T XXX.XXX.XXX.01:46514 -> XXX.XXX.XXX.02:5799 [AP]
> P4CKdialog
>
> T XXX.XXX.XXX.02:45107 -> XXX.XXX.XXX.01:5799 [AP]
> P4CKdialog
>
> Here are the relevant lines in my config file
>
> listen=bin:xxx.xxx.xxx.01:5799 and on server 2  
> listen=bin:xxx.xxx.xxx.02:5799
>
> loadmodule "proto_bin.so"
>
> loadmodule "clusterer.so"
> modparam("clusterer", "server_id", 1) and the second server is 
> modparam("clusterer", "server_id", 2)
>
> modparam("dialog", "accept_replicated_dialogs", 1)
> modparam("dialog", "replicate_dialogs_to", 1)
> modparam("dialog", "replicate_profiles_to", 1)
>
> modparam("usrloc", "accept_replicated_contacts", 1)
> modparam("usrloc", "replicate_contacts_to", 1)
> modparam("usrloc", "skip_replicated_db_ops", 1)
>
> I entered both servers in the clusterer table and of course I have the 
> "db_url" set
>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Binary replication errors

2017-01-14 Thread Schneur Rosenberg
Hi, I tried to implement binary replication with OpenSIPS ver 2.2.2 and it
floods my logs with the following errors on both servers

Jan 14 21:12:20 sips /sbin/opensips[4484]:
WARNING:dialog:receive_dlg_binary_packet: Invalid dialog binary packet
command: 4 (from XXX.XXX.XXX.XXX:45107)
Jan 14 21:12:20 sip /sbin/opensips[4484]:
ERROR:dialog:receive_dlg_binary_packet: Failed to process a binary packet!

when I do a ngrep its flooding with messsage

T XXX.XXX.XXX.01:46514 -> XXX.XXX.XXX.02:5799 [AP]
P4CKdialog

T XXX.XXX.XXX.02:45107 -> XXX.XXX.XXX.01:5799 [AP]
P4CKdialog

Here are the relevant lines in my config file

listen=bin:xxx.xxx.xxx.01:5799 and on server 2
 listen=bin:xxx.xxx.xxx.02:5799

loadmodule "proto_bin.so"

loadmodule "clusterer.so"
modparam("clusterer", "server_id", 1) and the second server is
modparam("clusterer", "server_id", 2)

modparam("dialog", "accept_replicated_dialogs", 1)
modparam("dialog", "replicate_dialogs_to", 1)
modparam("dialog", "replicate_profiles_to", 1)

modparam("usrloc", "accept_replicated_contacts", 1)
modparam("usrloc", "replicate_contacts_to", 1)
modparam("usrloc", "skip_replicated_db_ops", 1)

I entered both servers in the clusterer table and of course I have
the "db_url" set
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS crashes on sip_capture()

2016-12-29 Thread Schneur Rosenberg
I just added modparam("sipcapture", "hep_capture_on", 1) and its not
crashing anymore but now my syslog gets flooded with the following error

WARNING:sipcapture:w_sip_capture: not a hep message!

On Thu, Dec 29, 2016 at 3:34 PM, Schneur Rosenberg <rosenberg11...@gmail.com
> wrote:

> I'm trying to use Homer on OpenSIPS 2.2 and when I call sip_capture() the
> system crashes without creating a dump and this is what I find in my syslog
> file
>
> Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a:
> unknown address family 825112372
> Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a:
> unknown address family 775435057
> Dec 29 08:28:52 sip kernel: [675596.209597] opensips[15524]: segfault at
> 40 ip 7f361a810e46 sp 7ffcd8f850a0 error 4 in
> sipcapture.so[7f361a7fc000+26000]
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] OpenSIPS crashes on sip_capture()

2016-12-29 Thread Schneur Rosenberg
I'm trying to use Homer on OpenSIPS 2.2 and when I call sip_capture() the
system crashes without creating a dump and this is what I find in my syslog
file

Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a:
unknown address family 825112372
Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a:
unknown address family 775435057
Dec 29 08:28:52 sip kernel: [675596.209597] opensips[15524]: segfault at 40
ip 7f361a810e46 sp 7ffcd8f850a0 error 4 in
sipcapture.so[7f361a7fc000+26000]
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Major performance issues question

2016-12-21 Thread Schneur Rosenberg
No this server is running only OpenSIPS and mysql, here is a report of
iotop which I took when the resources was going down

Actual DISK READ:   0.00 B/s | Actual DISK WRITE:  78.77 K/s
  TID  PRIO  USER DISK READ  DISK WRITE  SWAPIN IO>COMMAND
  153 be/3 root0.00 B/s0.00 B/s  0.00 %  0.08 % [jbd2/vda1-8]
 1681 be/4 mysql   0.00 B/s7.88 K/s  0.00 %  0.06 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
 1711 be/4 mysql   0.00 B/s3.94 K/s  0.00 %  0.05 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
  647 be/4 root0.00 B/s3.94 K/s  0.00 %  0.00 % rsyslogd -n
[rs:main Q:Reg]
 2048 be/4 mysql   0.00 B/s0.00 B/s  0.00 %  0.00 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
1 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % init
2 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kthreadd]
3 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/0]
 2052 be/4 mysql   0.00 B/s0.00 B/s  0.00 %  0.00 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
5 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/0:0H]
6 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/u16:0]
7 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [rcu_sched]
8 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [rcu_bh]
9 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/0]
   10 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/0]
   11 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/1]
   12 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/1]
   13 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/1]
 1038 be/4 mysql   0.00 B/s0.00 B/s  0.00 %  0.00 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
   15 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/1:0H]
   16 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/2]
   17 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/2]
   18 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/2]
 2051 be/4 opensips0.00 B/s0.00 B/s  0.00 %  0.00 % opensips -P
/var/run/opensips/opensips.pid -m 128 -M 4 -u opensips -g opensips -f
/etc/opensips/opensips.cfg
   20 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/2:0H]
   21 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/3]
   22 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/3]
   23 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/3]
 2072 be/4 mysql   0.00 B/s0.00 B/s  0.00 %  0.00 % mysqld
--basedir=/usr --datadir=/var/lib/mysql --plug~d.pid
--socket=/var/run/mysqld/mysqld.sock --port=3306
   25 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/3:0H]
   26 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/4]
   27 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/4]
   28 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/4]
 2077 be/4 opensips0.00 B/s0.00 B/s  0.00 %  0.00 % opensips -P
/var/run/opensips/opensips.pid -m 128 -M 4 -u opensips -g opensips -f
/etc/opensips/opensips.cfg
   30 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/4:0H]
   31 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/5]
   32 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [migration/5]
   33 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [ksoftirqd/5]
   34 be/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/5:0]
   35 be/0 root0.00 B/s0.00 B/s  0.00 %  0.00 % [kworker/5:0H]
   36 rt/4 root0.00 B/s0.00 B/s  0.00 %  0.00 % [watchdog/6]


On Wed, Dec 21, 2016 at 7:25 PM, Liviu Chircu <li...@opensips.org> wrote:

> Okay, so it seems lots of CPU cycles are spent in the kernel!
>
> Are you sure there isn't any intensive I/O going on? For example, maybe
> you are pushing lots of gateway pings. You could run "iostat 1" to assess
> this.
>
> Regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 21.12.2016 18:58, Schneur Rosenberg wrote:
>
> procs ---memory-- ---swap-- -io -system--
> --cpu-
>  r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
> wa st
>  7  0  0 9966412 296728 523915200 36000  0  0
> 99  0  0
>  6  0  0 9966684 296728 523915200 020 2075 1569 12 64
> 24  0  0
>  7  0  0 9966588 296728 523915200 020 2023 1408 12 64
&

Re: [OpenSIPS-Users] Major performance issues question

2016-12-21 Thread Schneur Rosenberg
top - 12:26:45 up 23 days,  7:32,  2 users,  load average: 1.91, 2.08, 2.58
Tasks: 160 total,   5 running, 155 sleeping,   0 stopped,   0 zombie
%Cpu(s): 12.9 us, 63.9 sy,  0.0 ni, 23.2 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem:  16469164 total,  6479024 used,  9990140 free,   296740 buffers
KiB Swap:0 total,0 used,0 free.  5268140 cached Mem

  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
 6759 opensips  20   0  335392  19512  17552 R 100.0  0.1  13:47.21 opensips
 6746 opensips  20   0  335396  19548  17604 R  99.9  0.1  12:08.76 opensips
 6760 opensips  20   0  335396  19728  17736 R  99.5  0.1  16:17.60 opensips
 6743 opensips  20   0  335404  19704  17740 S  57.6  0.1   9:05.29 opensips
 6753 opensips  20   0  335404  19576  17640 S  57.6  0.1  11:53.10 opensips
 6745 opensips  20   0  335388  19608  17648 S  57.3  0.1  11:07.58 opensips
 6750 opensips  20   0  335400  19696  17740 S  57.3  0.1   9:09.70 opensips
 6762 opensips  20   0  335388  19604  17652 S  57.3  0.1  12:50.60 opensips


On Wed, Dec 21, 2016 at 6:58 PM, Schneur Rosenberg <rosenberg11...@gmail.com
> wrote:

> procs ---memory-- ---swap-- -io -system--
> --cpu-
>  r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
> wa st
>  7  0  0 9966412 296728 523915200 36000  0  0
> 99  0  0
>  6  0  0 9966684 296728 523915200 020 2075 1569 12 64
> 24  0  0
>  7  0  0 9966588 296728 523915200 020 2023 1408 12 64
> 24  0  0
>  4  0  0 9966492 296728 523915200 0   108 2027 1434 11 63
> 26  0  0
>  5  0  0 9966588 296728 523915200 044 1687 1232 11 52
> 38  0  0
>  5  0  0 9966620 296728 523915600 072 1704 1136  9 53
> 37  0  0
>  6  0  0 9966492 296728 523915600 040 1874 1133 11 64
> 25  0  0
>  6  0  0 9966524 296728 523915600 020 1794  853 11 65
> 25  0  0
>  6  0  0 9966556 296728 523915600 056 1810  951 11 64
> 25  0  0
>  6  0  0 9966620 296728 523915600 0 0 1802  934 10 65
> 25  0  0
>  7  0  0 9966556 296728 523916000 0  2328 2356 1489 12 76
> 12  0  0
>  7  0  0 9966460 296728 523916000 0 0 2074  929 12 76
> 12  0  0
>  7  0  0 9966588 296728 523916400 0 0 2022  728 11 76
> 12  0  0
>  7  0  0 9966620 296728 523916400 0 0 2015  802 14 74
> 12  0  0
>  5  0  0 9966652 296728 523916400 072 2275 1049 14 81
>  5  0  0
>
>
> On Wed, Dec 21, 2016 at 6:42 PM, Liviu Chircu <li...@opensips.org> wrote:
>
>> Hi Schneur,
>>
>> Those warnings are due to a rather harmless bug, which was fixed and
>> backported ~ two weeks ago.
>>
>> Regarding 100% CPU usage though, could you please run "vmstat 1" for 10
>> seconds and paste the full output? Thanks!
>>
>> Regards,
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 21.12.2016 18:17, Schneur Rosenberg wrote:
>>
>> Hi, I'm running a instance of OpenSIPS (just signalling no RTP on this
>> machine) on a DigitalOcean VM, it was running fine for a while and it does
>> not process lots of CPS (4-5 max) and today I was getting complaints of
>> dropped calls, I checked the logs and I saw lots of
>>  WARNING:core:utimer_ticker: utimer task  already scheduled
>> for 3956760 ms (now 3956860 ms), it may overlap
>> and
>>  WARNING:core:handle_timer_job: utimer job  has a 3 us
>> delay in execution
>>
>> I had 4 children and I upped it to 15, I think it helped but not
>> completely solved the problem.
>>
>> When running top I see all of the sudden a few opensips processes jumping
>> to 100% and the idle resources slowly going down sometimes even to 0% then
>> it recovers, I haven't changed anything in my cfg file lately and the
>> traffic has not increased etc.
>>
>> Is there anyway to see in the logs whats taking so much resources? I'm
>> also wondering if its can be a DigitalOcean issue where other users on the
>> same Hyperviser are using very high resources and its stealing my resources.
>>
>> thank you
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Major performance issues question

2016-12-21 Thread Schneur Rosenberg
procs ---memory-- ---swap-- -io -system--
--cpu-
 r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
wa st
 7  0  0 9966412 296728 523915200 36000  0  0
99  0  0
 6  0  0 9966684 296728 523915200 020 2075 1569 12 64
24  0  0
 7  0  0 9966588 296728 523915200 020 2023 1408 12 64
24  0  0
 4  0  0 9966492 296728 523915200 0   108 2027 1434 11 63
26  0  0
 5  0  0 9966588 296728 523915200 044 1687 1232 11 52
38  0  0
 5  0  0 9966620 296728 523915600 072 1704 1136  9 53
37  0  0
 6  0  0 9966492 296728 523915600 040 1874 1133 11 64
25  0  0
 6  0  0 9966524 296728 523915600 020 1794  853 11 65
25  0  0
 6  0  0 9966556 296728 523915600 056 1810  951 11 64
25  0  0
 6  0  0 9966620 296728 523915600 0 0 1802  934 10 65
25  0  0
 7  0  0 9966556 296728 523916000 0  2328 2356 1489 12 76
12  0  0
 7  0  0 9966460 296728 523916000 0 0 2074  929 12 76
12  0  0
 7  0  0 9966588 296728 523916400 0 0 2022  728 11 76
12  0  0
 7  0  0 9966620 296728 523916400 0 0 2015  802 14 74
12  0  0
 5  0  0 9966652 296728 523916400 072 2275 1049 14 81
 5  0  0


On Wed, Dec 21, 2016 at 6:42 PM, Liviu Chircu <li...@opensips.org> wrote:

> Hi Schneur,
>
> Those warnings are due to a rather harmless bug, which was fixed and
> backported ~ two weeks ago.
>
> Regarding 100% CPU usage though, could you please run "vmstat 1" for 10
> seconds and paste the full output? Thanks!
>
> Regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 21.12.2016 18:17, Schneur Rosenberg wrote:
>
> Hi, I'm running a instance of OpenSIPS (just signalling no RTP on this
> machine) on a DigitalOcean VM, it was running fine for a while and it does
> not process lots of CPS (4-5 max) and today I was getting complaints of
> dropped calls, I checked the logs and I saw lots of
>  WARNING:core:utimer_ticker: utimer task  already scheduled for
> 3956760 ms (now 3956860 ms), it may overlap
> and
>  WARNING:core:handle_timer_job: utimer job  has a 3 us
> delay in execution
>
> I had 4 children and I upped it to 15, I think it helped but not
> completely solved the problem.
>
> When running top I see all of the sudden a few opensips processes jumping
> to 100% and the idle resources slowly going down sometimes even to 0% then
> it recovers, I haven't changed anything in my cfg file lately and the
> traffic has not increased etc.
>
> Is there anyway to see in the logs whats taking so much resources? I'm
> also wondering if its can be a DigitalOcean issue where other users on the
> same Hyperviser are using very high resources and its stealing my resources.
>
> thank you
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Major performance issues question

2016-12-21 Thread Schneur Rosenberg
procs ---memory-- ---swap-- -io -system--
--cpu-
 r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
wa st
 7  0  0 9966412 296728 523915200 36000  0  0
99  0  0
 6  0  0 9966684 296728 523915200 020 2075 1569 12 64
24  0  0
 7  0  0 9966588 296728 523915200 020 2023 1408 12 64
24  0  0
 4  0  0 9966492 296728 523915200 0   108 2027 1434 11 63
26  0  0
 5  0  0 9966588 296728 523915200 044 1687 1232 11 52
38  0  0
 5  0  0 9966620 296728 523915600 072 1704 1136  9 53
37  0  0
 6  0  0 9966492 296728 523915600 040 1874 1133 11 64
25  0  0
 6  0  0 9966524 296728 523915600 020 1794  853 11 65
25  0  0
 6  0  0 9966556 296728 523915600 056 1810  951 11 64
25  0  0
 6  0  0 9966620 296728 523915600 0 0 1802  934 10 65
25  0  0
 7  0  0 9966556 296728 523916000 0  2328 2356 1489 12 76
12  0  0
 7  0  0 9966460 296728 523916000 0 0 2074  929 12 76
12  0  0
 7  0  0 9966588 296728 523916400 0 0 2022  728 11 76
12  0  0
 7  0  0 9966620 296728 523916400 0 0 2015  802 14 74
12  0  0
 5  0  0 9966652 296728 523916400 072 2275 1049 14 81
 5  0  0


On Wed, Dec 21, 2016 at 6:17 PM, Schneur Rosenberg <rosenberg11...@gmail.com
> wrote:

> Hi, I'm running a instance of OpenSIPS (just signalling no RTP on this
> machine) on a DigitalOcean VM, it was running fine for a while and it does
> not process lots of CPS (4-5 max) and today I was getting complaints of
> dropped calls, I checked the logs and I saw lots of
>  WARNING:core:utimer_ticker: utimer task  already scheduled for
> 3956760 ms (now 3956860 ms), it may overlap
> and
>  WARNING:core:handle_timer_job: utimer job  has a 3 us
> delay in execution
>
> I had 4 children and I upped it to 15, I think it helped but not
> completely solved the problem.
>
> When running top I see all of the sudden a few opensips processes jumping
> to 100% and the idle resources slowly going down sometimes even to 0% then
> it recovers, I haven't changed anything in my cfg file lately and the
> traffic has not increased etc.
>
> Is there anyway to see in the logs whats taking so much resources? I'm
> also wondering if its can be a DigitalOcean issue where other users on the
> same Hyperviser are using very high resources and its stealing my resources.
>
> thank you
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Major performance issues question

2016-12-21 Thread Schneur Rosenberg
Hi, I'm running a instance of OpenSIPS (just signalling no RTP on this
machine) on a DigitalOcean VM, it was running fine for a while and it does
not process lots of CPS (4-5 max) and today I was getting complaints of
dropped calls, I checked the logs and I saw lots of
 WARNING:core:utimer_ticker: utimer task  already scheduled for
3956760 ms (now 3956860 ms), it may overlap
and
 WARNING:core:handle_timer_job: utimer job  has a 3 us delay
in execution

I had 4 children and I upped it to 15, I think it helped but not completely
solved the problem.

When running top I see all of the sudden a few opensips processes jumping
to 100% and the idle resources slowly going down sometimes even to 0% then
it recovers, I haven't changed anything in my cfg file lately and the
traffic has not increased etc.

Is there anyway to see in the logs whats taking so much resources? I'm also
wondering if its can be a DigitalOcean issue where other users on the same
Hyperviser are using very high resources and its stealing my resources.

thank you
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] is_ip_registered in invite

2016-12-12 Thread Schneur Rosenberg
Thanks Razvan, I had no choice and I did it the non lazy way, we have lots
of carriers for incoming DID's, until now I did not want to have the
headache of constantly updating my carriers IP's used for incoming traffic,
so I allowed unauthenticated DID calls to come in from any IP address, but
it was really not smart, I needed to do extra database queries, and my
database even crashed once when someone brute forced my server and by the
time the firewall script kicked in to block him my database has crashed
because it was doing a MYSQL query for each invite.

So now I use the permission module to load all did providers IP addresses
and therefore I don't need to do extra tests and queries on every single
INVITE and all my problems have been solved :-)

On Mon, Dec 5, 2016 at 11:03 AM, Răzvan Crainea <raz...@opensips.org> wrote:

> Hi, Schneur!
>
> The second parameter of the is_ip_registered() function[1] should be the
> AOR of the caller, in the sip:SIP_USER@SIP_DOMAIN format. The source IP
> is only checked against the contacts of that specific subscriber.
> However, if I understand correctly, your problem is determining what is
> the correct AOR to use, because the From username and domain might be
> different between REGISTER and INVITE, right? If that's the case, you
> don't have that many choices: either you search through all registered IPs
> (but there is no OpenSIPS function to do that, so you'll need someting
> external as you've already done), or you create some sort of mappings
> between the REGISTER and INVITE users/formats. Or you impose your customers
> to comply with a specific format, that can help you figure out the mapping.
>
> [1] http://www.opensips.org/html/docs/modules/2.2.x/registrar.
> html#id294953
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 12/04/2016 01:20 PM, Schneur Rosenberg wrote:
>
> Hi, I would like to check during the initial  invite if the request comes
> from a IP that is registered (I don't care about the user credentials at
> this time), I use it to know if the invite is from a registered user or if
> it is from a unauthenticated source (DID's or hacking attempt) I can't use
>  is_contact_registered()  because not all clients send the user name in the
> initial invite, and they only send it in the authentication username which
> is absent in the initial invite, therefore I want to use is_ip_registered()
> but I'm having issues and I don't understand exactly what the second
> parameter is for, I want to check for the ip in the $si variable if it is
> registered (either in the contact field or in the received field).
>
> When leaving blank the AOR field, some devices work well but some don't.
>
> Due to NAT some devices register the IP in the contact field, and some in
> the received field, I want to try to match to either one, and it should
> parse the contact field that it should ignore the username from the contact
> field.
>
> I was doing a avp_db_query() until now, but it had 2 major issues.
>
> 1) It runs a MYSQL query on each REQUEST which reduces performance, I
> couldn't use memcache because IP's are dynamic in nature.
> 2)  I use db_mode 2 on usrloc and it takes about a minute for the
> registration to appear in the DB and the user can't call out during that
> minute, and even worse if he tries multiple times and it gets rejected my
> iptables will block his IP.
>
> thank you
> S. Rosenberg
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] is_ip_registered in invite

2016-12-04 Thread Schneur Rosenberg
Hi, I would like to check during the initial  invite if the request comes
from a IP that is registered (I don't care about the user credentials at
this time), I use it to know if the invite is from a registered user or if
it is from a unauthenticated source (DID's or hacking attempt) I can't use
 is_contact_registered()  because not all clients send the user name in the
initial invite, and they only send it in the authentication username which
is absent in the initial invite, therefore I want to use is_ip_registered()
but I'm having issues and I don't understand exactly what the second
parameter is for, I want to check for the ip in the $si variable if it is
registered (either in the contact field or in the received field).

When leaving blank the AOR field, some devices work well but some don't.

Due to NAT some devices register the IP in the contact field, and some in
the received field, I want to try to match to either one, and it should
parse the contact field that it should ignore the username from the contact
field.

I was doing a avp_db_query() until now, but it had 2 major issues.

1) It runs a MYSQL query on each REQUEST which reduces performance, I
couldn't use memcache because IP's are dynamic in nature.
2)  I use db_mode 2 on usrloc and it takes about a minute for the
registration to appear in the DB and the user can't call out during that
minute, and even worse if he tries multiple times and it gets rejected my
iptables will block his IP.

thank you
S. Rosenberg
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Pickup group help

2016-11-10 Thread Schneur Rosenberg
No, I mean where a phone or group of phones ring, and you are at another
extension that does not ring, you dial a code and grab the ringing
extension.

On Wed, Nov 9, 2016 at 5:40 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi,
>
> You mean parallel calling groups, where a call to the group is sent to all
> the parties of the group (simultaneous ringing) and first to answer will
> pick up the call ? if so , this is parallel forking.
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 08.11.2016 16:02, Schneur Rosenberg wrote:
>
> Can someone please guide me how I should build pickup groups feature in
> OpenSIPS?
>
> thank you
> S. Rosenberg
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Asterisk Unrecognized sip header

2016-04-01 Thread Schneur Rosenberg
Travis just replace the public IP with a different public IP, just make
sure that all the references to the public IP are the same, or just replace
it with the word publicIP etc
On Mar 31, 2016 10:57 PM, "Travis Manson-Drake" 
wrote:

> Alex,
>
> Thank you again for all your help!
>
> I apologize on being so new to this. I went ahead and sent a linkedin
> request if that's ok.
>
> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:
> users-boun...@lists.opensips.org] On Behalf Of Alex Balashov
> Sent: Thursday, March 31, 2016 11:51 AM
> To: users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] Asterisk Unrecognized sip header
>
> On 03/31/2016 02:49 PM, Travis Manson-Drake wrote:
>
> > I would be more than happy to send it to you privately if that's ok?
>
> Of course!
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 1447 Peachtree Street NE, Suite 700
> Atlanta, GA 30309
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Adding user accounts without using opensipsctl command line or OpenSIPS Control Panel

2016-03-07 Thread Schneur Rosenberg
You can directly enter users in the db if using db mode.
On Mar 7, 2016 12:41 PM, "Adrian Newell"  wrote:

> Is there any way to add user accounts into OpenSIPS without using the
> opensipsctl command line (opensipsctl  add *userName* *password)* or the
> OpenSIPS Control Panel ?
>
>
>
> I was hoping there might be an interface using XML-RPC so I could call
> such functionality from a process that is remote to the server that
> OpenSIPS is running on.
>
>
>
> Many thanks in advance for any assistance.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Best way to load data into local cache

2016-02-19 Thread Schneur Rosenberg
Why don't u use avp_db_query on demand and cache the info so u don't need
to run this particular query again?
On Feb 19, 2016 4:47 PM, "John Quick"  wrote:

> Using version 2.1.1 of OpenSIPS
> I want to load several hundred records into local cache memory on startup.
> I've tried avp_db_query to read all data into an avp, then a loop to write
> it from the avp into cache memory, but it can only do 100 records at a
> time.
> Is this simply a limitation of all avp's?
>
> Is there another way, a better way?
>
> Why do I want to do this? Because I want to check each INVITE ruri
> destination username against a list of known "suspicious" destination
> prefixes (perhaps 1000 records). Each call may require several checks
> because the list contains prefixes of varying lengths. I am concerned that
> queries made directly to the MySQL table as each INVITE request is received
> could impair performance and would put constant unwanted load on the MySQL
> server.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [BOOK] Building Telephony Systems with OpenSIPS - 2.1 version

2016-02-15 Thread Schneur Rosenberg
Hi Bogdan

On page 250 of the book the third line from the top it says

if (is_dlg_flag_set("5")) setflag(NAT_FLAG);

Is that correct, or is it supposed to be?

if (is_dlg_flag_set(NAT_FLAG)) setflag(NAT_FLAG);

The dialog flag on the bottom of page 249 is set

set_dlg_flag(NAT_FLAG); and not set_dlg_flag("5");

On Thu, Feb 11, 2016 at 11:35 AM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Schneur,
>
> OK, I will check with the editor if they can push fixes to the book.
> Thanks for reporting it!
>
> Thanks and Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 09.02.2016 13:20, Schneur Rosenberg wrote:
>
> Chapter 1, page 11 (page 36 of the eBook) on the bottom of the page there
> is a initial invite of userA calling userB, and the contact is of userB, it
> should be userA
> On Feb 8, 2016 3:13 PM, "Bogdan-Andrei Iancu" <bog...@opensips.org> wrote:
>
>> Hi Schneur,
>>
>> Could you point the name of the chapter and the context of that mistake,
>> so I can double check it ?
>>
>> Thanks & Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 07.02.2016 14:53, Schneur Rosenberg wrote:
>>
>> I bought the book and I think I found the first mistake, in the initial
>> invite packet on page 11, the contact header is of the destination and not
>> of the origination UAC
>> On Feb 4, 2016 3:37 PM, "Bogdan-Andrei Iancu" <bog...@opensips.org>
>> wrote:
>>
>>> Hello all,
>>>
>>> Flavio Goncalves and I are happy to announce the publishing of the
>>> second edition of "Building Telephony Systems with OpenSIPS", covering
>>> OpenSIPS version 2.1 .
>>>
>>> Also many thanks to the Packt Publishing house for making it happened
>>> and to all our reviewers who help us to make this book better.
>>>
>>>
>>> https://www.packtpub.com/networking-and-servers/building-telephony-systems-opensips-second-edition
>>>
>>> Enjoy !
>>>
>>> --
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [BOOK] Building Telephony Systems with OpenSIPS - 2.1 version

2016-02-09 Thread Schneur Rosenberg
Chapter 1, page 11 (page 36 of the eBook) on the bottom of the page there
is a initial invite of userA calling userB, and the contact is of userB, it
should be userA
On Feb 8, 2016 3:13 PM, "Bogdan-Andrei Iancu" <bog...@opensips.org> wrote:

> Hi Schneur,
>
> Could you point the name of the chapter and the context of that mistake,
> so I can double check it ?
>
> Thanks & Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 07.02.2016 14:53, Schneur Rosenberg wrote:
>
> I bought the book and I think I found the first mistake, in the initial
> invite packet on page 11, the contact header is of the destination and not
> of the origination UAC
> On Feb 4, 2016 3:37 PM, "Bogdan-Andrei Iancu" <bog...@opensips.org> wrote:
>
>> Hello all,
>>
>> Flavio Goncalves and I are happy to announce the publishing of the second
>> edition of "Building Telephony Systems with OpenSIPS", covering OpenSIPS
>> version 2.1 .
>>
>> Also many thanks to the Packt Publishing house for making it happened and
>> to all our reviewers who help us to make this book better.
>>
>>
>> https://www.packtpub.com/networking-and-servers/building-telephony-systems-opensips-second-edition
>>
>> Enjoy !
>>
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Pike Module Question

2016-02-09 Thread Schneur Rosenberg
If you have no other choice you can always use avp_dp_query to check the
contact and received fields in the location table, if you're afraid from
too many mysql requests you can cache it with memcache etc
On Feb 9, 2016 1:02 PM, "Bogdan-Andrei Iancu"  wrote:

> Hi Brian,
>
> Only the development version (2.2) has such a function, is_ip_registered()
> :
>
> http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294953
>
> Still you should not skip from pike checking the IPs where users did
> registered from. They can also do flood (by mistake or on purpose).
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 09.02.2016 11:41, Brian :: wrote:
>
> Hi List
>
> When checking incoming requests with pike how would I do a lookup to see
> if the IP belongs to a UA in the location table? ie - is there a function
> to check if request is from registered subscriber while using pike?
>
> Thanks
> Brian
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [BOOK] Building Telephony Systems with OpenSIPS - 2.1 version

2016-02-07 Thread Schneur Rosenberg
I bought the book and I think I found the first mistake, in the initial
invite packet on page 11, the contact header is of the destination and not
of the origination UAC
On Feb 4, 2016 3:37 PM, "Bogdan-Andrei Iancu"  wrote:

> Hello all,
>
> Flavio Goncalves and I are happy to announce the publishing of the second
> edition of "Building Telephony Systems with OpenSIPS", covering OpenSIPS
> version 2.1 .
>
> Also many thanks to the Packt Publishing house for making it happened and
> to all our reviewers who help us to make this book better.
>
>
> https://www.packtpub.com/networking-and-servers/building-telephony-systems-opensips-second-edition
>
> Enjoy !
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-04 Thread Schneur Rosenberg
Alax you're correct, but not all sip device manufacturers really know the
sip rfc etc, soft phones and phone manufacturers are better, but in my case
its a SIP door bell, when there is only one sip server as is the case with
most of these units that they are connected to a small business PBX like
FreePBX it works, the problem starts when there is more than one server in
the path, I spoke their tech support and its been 2 days and they still
don't have a fix yet, so its nice to have a workaround for cases like these.

On Thu, Feb 4, 2016 at 5:09 PM, Alex Balashov 
wrote:

> On 02/04/2016 11:08 AM, Alex Balashov wrote:
>
> Bogdan,
>>
>> That's interesting. I had no idea OpenSIPS had a module specifically
>> devoted to fixing bad SIP that really shouldn't be fixed. :-)
>>
>
> s/a module/dialog module functionality/
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ACK not forwarding

2016-02-02 Thread Schneur Rosenberg
My ACK coming from this device does not get forwarded to its designated
destination, I see that the RURI is to my OpenSIPS server even though the
contact has been rewritten in the OK, is that the reason the OpenSIPS
thinks its for himself? if yes how can I workaround the issue, perhaps with
dialog module etc?

Below please find the OK and the ACK, it has a Record route and proper
contact.

U 104.131.18.123:5060 -> 80.64.118.39:64308
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 80.64.118.39:64308
;rport=64308;received=80.64.118.39;branch=z9hG4bK-1131176229.
Record-Route: .
From: SORSTestDoor1 ;tag=628175012.
To: ;tag=as3223454f.
Call-ID: 10007@192.168.1.8.
CSeq: 1018 INVITE.
Server: SIP Server 9.21/CS.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Contact: .
Content-Type: application/sdp.
Content-Length: 236.


U 88.64.118.39:64308 -> 104.131.18.123:5060
ACK sip:2...@sip.sipserver.info SIP/2.0.
Via: SIP/2.0/UDP 80.64.118.39:64308;branch=z9hG4bK-608413784.
Route: .
From: SORSTestDoor1 ;tag=628175012.
To: ;tag=as3223454f.
Call-ID: 10007@192.168.1.8.
User-Agent: Valcom xp1.50.14-10-14-14.
CSeq: 1018 ACK.
Content-Length: 0.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-02 Thread Schneur Rosenberg
Thanks I will open a ticket with the hardware manufacturer, lets hope they
will fix it

On Tue, Feb 2, 2016 at 8:25 PM, Alex Balashov <abalas...@evaristesys.com>
wrote:

> The RURI of an end-to-end ACK should always be equal to the remote dialog
> target, i.e. in this case the Contact URI in the 200 OK.
>
> ‎If the RURI of the ACK is not equal to the remote target, it's not a
> properly formed ACK. And certainly, it should not point to the OpenSIPS
> proxy itself. There's no reasonable way to work around it: the UA in
> question needs to be fixed.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> Sent from my BlackBerry.
>   Original Message
> From: Schneur Rosenberg
> Sent: Tuesday, February 2, 2016 13:22
> To: OpenSIPS users mailling list
> Reply To: OpenSIPS users mailling list
> Subject: [OpenSIPS-Users] ACK not forwarding
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips regster issue

2016-01-25 Thread Schneur Rosenberg
I'm having similar issue for some ACK messages, but I was wondering how
come OpenSIPS does not check the domain table to know that this is a known
domain and it should check upon those addresses?

On Mon, Jan 25, 2016 at 1:18 PM, Bogdan-Andrei Iancu 
wrote:

> Hi Michael,
>
> Actually there is simpler solution, if you want to keep your listener with
> the IP. Just add:
> alias="yourdomain.com"
>
> So, even OpenSIPS is listening on IP x.y.z.w, it will know it is
> responsible for handling traffic for the yourdomain.com SIP domain.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 23.01.2016 11:50, MichaelLeung wrote:
>
> i fix the problem myself
>
> just add your domain name to opensips.cfg
> like:
>  listen:udp:yourdoamdin.com:5060
>
>
> On 01/23/2016 02:59 PM, MichaelLeung wrote:
>
> any reply ?
>
> On 01/23/2016 01:17 AM, MichaelLeung wrote:
>
> Hi team
>
> my opensips server can accept regster request using IP address from client
> , but will not accept with domain name.
>
> there is the output log from debug 4
>
> please help me to find out what cause  the problem , thanks
>
>
> ---
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_msg: SIP Request:
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_msg:  method:  
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_msg:  uri: 
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_msg:  version: 
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: flags=2
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_via_param: found param type 232,  =
> ; state=6
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_via_param: found param type 235,  = ; state=17
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_via: end of header reached, state=5
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: via found, flags=2
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: this is the first via
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:receive_msg: After parse_msg...
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:receive_msg: preparing to run routing scripts...
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: flags=100
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]: DBG:core:parse_to:
> end of header reached, state=9
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]: DBG:core:parse_to:
> display={}, ruri={sip:1...@sip2.x.eu.org}
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:get_hdr_field:  [30]; uri=[ 
> sip:1...@sip2.x.eu.org]
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:get_hdr_field: to body [sip:1...@sip2.x.eu.org#015#012]
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:get_hdr_field: cseq : <30> 
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:maxfwd:is_maxfwd_present: value = 70
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]: DBG:uri:has_totag:
> no totag
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: flags=78
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:tm:t_lookup_request: start searching: hash=920, isACK=0
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:tm:matching_3261: RFC3261 transaction matching failed
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:tm:t_lookup_request: no transaction found
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:parse_headers: flags=200
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:get_hdr_field: found end of header
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:rr:find_first_route: No Route headers found
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:rr:loose_route: There is no Route HF
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:grep_sock_info: checking if host==us: 20==13 &&  [
> sip2.x.eu.org] == [192.168.29.57]
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:grep_sock_info: checking if port 5060 matches port 5060
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:grep_sock_info: checking if host==us: 20==7 &&  [
> sip2.x.eu.org] == [9.9.9.9]
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:grep_sock_info: checking if port 5060 matches port 5060
> Jan 23 01:09:52 ali /opt/opensips/sbin/opensips[30344]:
> DBG:core:grep_sock_info: checking if host==us: 20==13 &&  [
> sip2.x.eu.org] == 

Re: [OpenSIPS-Users] Unable to handle fax calls through Opensips

2015-12-14 Thread Schneur Rosenberg
I had similar issue and it was related to the t38 reinvite was routed
wrong, post a sip trace.
On Dec 15, 2015 9:00 AM, "Siju Nair"  wrote:

> Hi Team,
> I have a query related to Opensips. So far i have configured opensips for
> load balancing. Calls are working fine but am unable to send Fax calls
> through opensips, can some on help me with this. I am using Freeswitch as
> media servers.
>
> Also, does opensips handle media ? if so how can i configure it.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Managing Concurrent Calls

2015-09-04 Thread Schneur Rosenberg
I limit mine on account and I used memcache to store the limits because its
not something that changes on a constant basis, so it only does a db query
maximum once a hour per device.
On Sep 4, 2015 4:52 AM, "Bogdan-Andrei Iancu"  wrote:

> Hi Terrance,
>
> That check is not expensive as it is done in memory cache (the "address"
> table is cached at startup).
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 03.09.2015 21:42, Terrance Devor wrote:
>
>> Lovely!
>>
>> For those that need to limit concurrent call on OpenSIPS, here is the
>> solution:
>>
>> route[limit] {
>> set_dlg_profile("ip","$si");
>> get_profile_size("ip","$si","$var(calls)");
>> check_address("0","$si","$sp","$proto","$avp(ctx)");
>> xlog("$avp(ctx)\n");
>> xlog("L_INFO","Customer IP $si has $var(calls) concurrent calls,
>> and limit is 12\n");
>>
>> if($var(calls)>$avp(ctx)) {
>> xlog("Customer IP $si exceeded number of calls
>> $var(calls)/12\n");
>> send_reply("486", "Busy here, channel limit exceeded.");
>> exit;
>> }
>> }
>>
>> Bogdan, how expensive is
>> `check_address("0","$si","$sp","$proto","$avp(ctx)")`?
>>
>> Terrance
>>
>>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Managing Concurrent Calls

2015-09-04 Thread Schneur Rosenberg
No, I created 2 tables, one has a record for each device and to what
account code they belong to, 2nd table lists every account code and how
many simultaneous calls they can make, then I just run a query to get
account code and maximum concurrent calls allowed for the account code  the
query obviously is a perfect candidate for memcaching because the info
rarely changes so I run cache_fetch before running the query.

This allows me to limit the channels on an account and not just on a single
device, for a virtual PRI setting.

Here is the simple query "select dev.username, ent.chLimit from
custom_deviceToEnterprise as dev, custom_enterpriseConcurrent as ent where
dev.username='$fU' and dev.enterprise=ent.enterprise;"

1st table

CREATE TABLE `custom_deviceToEnterprise` (

  `id` bigint(20) NOT NULL AUTO_INCREMENT,

  `username` varchar(50) NOT NULL,

  `enterprise` varchar(50) NOT NULL,

  PRIMARY KEY (`id`)

)

2nd table

CREATE TABLE `custom_enterpriseConcurrent` (

  `id` bigint(20) NOT NULL AUTO_INCREMENT,

  `enterprise` varchar(25) NOT NULL,

  `chLimit` varchar(5) NOT NULL,

  PRIMARY KEY (`id`)

)

▶ Show quoted text
On Sep 4, 2015 6:42 AM, "Bogdan-Andrei Iancu" <bog...@opensips.org> wrote:

> Hi Schneur,
>
> Do you originally load the limit from the subscriber table ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 04.09.2015 12:36, Schneur Rosenberg wrote:
>
> I limit mine on account and I used memcache to store the limits because
> its not something that changes on a constant basis, so it only does a db
> query maximum once a hour per device.
> On Sep 4, 2015 4:52 AM, "Bogdan-Andrei Iancu" <bog...@opensips.org> wrote:
>
>> Hi Terrance,
>>
>> That check is not expensive as it is done in memory cache (the "address"
>> table is cached at startup).
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 03.09.2015 21:42, Terrance Devor wrote:
>>
>>> Lovely!
>>>
>>> For those that need to limit concurrent call on OpenSIPS, here is the
>>> solution:
>>>
>>> route[limit] {
>>> set_dlg_profile("ip","$si");
>>> get_profile_size("ip","$si","$var(calls)");
>>> check_address("0","$si","$sp","$proto","$avp(ctx)");
>>> xlog("$avp(ctx)\n");
>>> xlog("L_INFO","Customer IP $si has $var(calls) concurrent calls,
>>> and limit is 12\n");
>>>
>>> if($var(calls)>$avp(ctx)) {
>>> xlog("Customer IP $si exceeded number of calls
>>> $var(calls)/12\n");
>>> send_reply("486", "Busy here, channel limit exceeded.");
>>> exit;
>>> }
>>> }
>>>
>>> Bogdan, how expensive is
>>> `check_address("0","$si","$sp","$proto","$avp(ctx)")`?
>>>
>>> Terrance
>>>
>>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS vs Asterisk as SIP server

2015-07-26 Thread Schneur Rosenberg
One disadvantage is performance for example if you have too many
registrations on Asterisk the system will just crash.
On Jul 26, 2015 1:34 PM, Nabeel nabeelshik...@gmail.com wrote:

 Perhaps a better way to word my question: what are advantages of using
 OpenSIPS over Asterisk for a basic SIP service?
 On 25 Jul 2015 21:33, Nabeel nabeelshik...@gmail.com wrote:

 I understand that Asterisk is a PBX but it also has core SIP
 functionality.  What are the disadvantages of using Asterisk over OpenSIPS
 for a basic SIP service?


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] changing $rU number

2015-07-23 Thread Schneur Rosenberg
$rU is read/write so you can use regexp and just rewrite the variable

On Thu, Jul 23, 2015 at 10:33 AM, dpa denis7...@mail.ru wrote:

 Hello!



 Opensips 1.10.



 I am using DROUTING module from making routing.

 But some SIP UA sends to Opensips tel. number with  some unnecessary
 characters, such as “%20” and “-”.



 The question is how can I delete these characters from request user?



 Thank you for any help.







 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] changing $rU number

2015-07-23 Thread Schneur Rosenberg
http://www.opensips.org/html/docs/modules/1.10.x/regex.html

On Thu, Jul 23, 2015 at 10:49 AM, dpa denis7...@mail.ru wrote:

 Thank you.

 But what can I use for do it?



 *From:* users-boun...@lists.opensips.org [mailto:
 users-boun...@lists.opensips.org] *On Behalf Of *Schneur Rosenberg
 *Sent:* Thursday, July 23, 2015 10:40 AM
 *To:* OpenSIPS users mailling list
 *Subject:* Re: [OpenSIPS-Users] changing $rU number



 $rU is read/write so you can use regexp and just rewrite the variable



 On Thu, Jul 23, 2015 at 10:33 AM, dpa denis7...@mail.ru wrote:

 Hello!



 Opensips 1.10.



 I am using DROUTING module from making routing.

 But some SIP UA sends to Opensips tel. number with  some unnecessary
 characters, such as “%20” and “-”.



 The question is how can I delete these characters from request user?



 Thank you for any help.








 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call transfer problem

2015-03-10 Thread Schneur Rosenberg
Sorry I meant to place call on hold, not transfer

On Mon, Mar 9, 2015 at 8:40 PM, Schneur Rosenberg rosenberg11...@gmail.com
wrote:

 I have a OpenSIPS server that acts as a load balancing server for a couple
 of asterisk servers, and lately I'm having a issue with asterisk responding
 with a 488 Not acceptable here for transfer requests when it comes to port
 5060 on the Opensips server, but if I send it to another port it works
 fine, I realized that when using port 5060 the sdp has port 0  ie  (m=audio
 0 RTP/AVP 0 8 101.) but when using another port it does have a port number
 (ie m=audio 16422 RTP/AVP 0 8 101.)

 Im attaching both traces, I changed ips for security 212.212.212.212. is
 the opensips server, 212.212.212.213 is the asterisk server,
 and 91.176.221.245 is the end user.

 Can anyone please help me make this work on port 5060 too, and can you
 please explain why it would act differently, the NAT is also handeled
 differently as can be seen in the VIA header (maybe router is trying to use
 some ALG?)

 Here is the trace using port 5060

 U 91.176.221.245:49242 - 212.212.212.212:5060
 INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
 Via: SIP/2.0/UDP 91.176.221.245:32781;branch=z9hG4bK-a6635dda.
 From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
 To: sip:19174250...@sip.myserver.com;tag=as7f636018.
 Call-ID: f8a392e9-f1139d80@192.168.0.101.
 CSeq: 103 INVITE.
 Max-Forwards: 70.
 Route: sip:212.212.212.212:5060
 ;lr;ftag=3189bbd5cf53a984o0;did=d97.6c4d2422.
 Proxy-Authorization: Digest


 username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

 212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
 Contact: EXT 101 sip:WindowP1@91.176.221.245:32781.
 Expires: 30.
 User-Agent: Cisco/SPA525G2-7.5.6.
 Content-Length: 226.
 Content-Type: application/sdp.
 .
 v=0.
 o=- 33523926 33523927 IN IP4 192.168.0.101.
 s=-.
 c=IN IP4 0.0.0.0.
 t=0 0.
 m=audio 0 RTP/AVP 0 8 101.
 a=rtpmap:0 PCMU/8000.
 a=rtpmap:8 PCMA/8000.
 a=rtpmap:101 telephone-event/8000.
 a=fmtp:101 0-15.
 a=ptime:30.
 a=sendonly.

 U 212.212.212.212:5060 - 91.176.221.245:49242
 SIP/2.0 100 Giving a try.
 Via: SIP/2.0/UDP 91.176.221.245:32781
 ;received=91.176.221.245;rport=49242;branch=z9hG4bK-a6635dda.
 From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
 To: sip:19174250...@sip.myserver.com;tag=as7f636018.
 Call-ID: f8a392e9-f1139d80@192.168.0.101.
 CSeq: 103 INVITE.
 Server: OpenSIPS (1.7.2-notls (x86_64/linux)).
 Content-Length: 0.
 .

 U 212.212.212.212:5060 - 212.212.212.213:5060
 INVITE sip:1917425@212.212.212.213:5060 SIP/2.0.
 Record-Route: sip:212.212.212.212;lr;ftag=3189bbd5cf53a984o0.
 Via: SIP/2.0/UDP 212.212.212.212;branch=z9hG4bKe66e.0702ec92.0.
 Via: SIP/2.0/UDP 91.176.221.245:32781
 ;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
 From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
 To: sip:19174250...@sip.myserver.com;tag=as7f636018.
 Call-ID: f8a392e9-f1139d80@192.168.0.101.
 CSeq: 103 INVITE.
 Max-Forwards: 69.
 Proxy-Authorization: Digest


 username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

 212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
 Contact: EXT 101 sip:WindowP1@91.176.221.245:49242;nat=yes.
 Expires: 30.
 User-Agent: Cisco/SPA525G2-7.5.6.
 Content-Length: 226.
 Content-Type: application/sdp.
 .
 v=0.
 o=- 33523926 33523927 IN IP4 192.168.0.101.
 s=-.
 c=IN IP4 0.0.0.0.
 t=0 0.
 m=audio 0 RTP/AVP 0 8 101.
 a=rtpmap:0 PCMU/8000.
 a=rtpmap:8 PCMA/8000.
 a=rtpmap:101 telephone-event/8000.
 a=fmtp:101 0-15.
 a=ptime:30.
 a=sendonly.

 U 212.212.212.213:5060 - 212.212.212.212:5060
 SIP/2.0 488 Not acceptable here.
 Via: SIP/2.0/UDP
 212.212.212.212;branch=z9hG4bKe66e.0702ec92.0;received=212.212.212.212;rport=5060.
 Via: SIP/2.0/UDP 91.176.221.245:32781
 ;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
 From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
 To: sip:19174250...@sip.myserver.com;tag=as7f636018.
 Call-ID: f8a392e9-f1139d80@192.168.0.101.
 CSeq: 103 INVITE.
 Server: SIP Server 9.21/CS.
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
 PUBLISH.
 Supported: replaces, timer.
 X-Asterisk-HangupCause: Normal Clearing.
 X-Asterisk-HangupCauseCode: 16.
 Content-Length: 0.
 .
 here is the trace using port 5744
 U 91.176.221.245:63719 - 212.212.212.212:5744
 INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
 Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK-6f0161f0.
 From: EXT 101 sip:windo...@sip.myserver.com;tag=f8c2b14a55549ac2o0.
 To: sip:19174250...@sip.myserver.com;tag=as1fcb82f4.
 Call-ID: 5832b9ea-a4a32aa2@192.168.0.101.
 CSeq: 103 INVITE.
 Max-Forwards: 70.
 Route: sip:212.212.212.212:5744
 ;lr;ftag=f8c2b14a55549ac2o0;did=9ae.775cc5c5.
 Proxy-Authorization: Digest
 username=WindowP1,realm

[OpenSIPS-Users] Problem with placing call on hold

2015-03-10 Thread Schneur Rosenberg
I have a OpenSIPS server that acts as a load balancing server for a couple
of asterisk servers, and lately I'm having a issue with asterisk responding
with a 488 Not acceptable here for hold requests when it comes to port 5060
on the Opensips server, but if I send it to another port it works fine, I
realized that when using port 5060 the sdp has port 0  ie  (m=audio 0
RTP/AVP 0 8 101.) but when using another port it does have a port number
(ie m=audio 16422 RTP/AVP 0 8 101.)

Im attaching both traces, I changed ips for security 212.212.212.212. is
the opensips server, 212.212.212.213 is the asterisk server,
and 91.176.221.245 is the end user.

Can anyone please help me make this work on port 5060 too, and can you
please explain why it would act differently, the NAT is also handeled
differently as can be seen in the VIA header (maybe router is trying to use
some ALG?)

Here is the trace using port 5060

U 91.176.221.245:49242 - 212.212.212.212:5060
INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
Via: SIP/2.0/UDP 91.176.221.245:32781;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 70.
Route: sip:212.212.212.212:5060
;lr;ftag=3189bbd5cf53a984o0;did=d97.6c4d2422.
Proxy-Authorization: Digest

username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
Contact: EXT 101 sip:WindowP1@91.176.221.245:32781.
Expires: 30.
User-Agent: Cisco/SPA525G2-7.5.6.
Content-Length: 226.
Content-Type: application/sdp.
.
v=0.
o=- 33523926 33523927 IN IP4 192.168.0.101.
s=-.
c=IN IP4 0.0.0.0.
t=0 0.
m=audio 0 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:30.
a=sendonly.

U 212.212.212.212:5060 - 91.176.221.245:49242
SIP/2.0 100 Giving a try.
Via: SIP/2.0/UDP 91.176.221.245:32781
;received=91.176.221.245;rport=49242;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Server: OpenSIPS (1.7.2-notls (x86_64/linux)).
Content-Length: 0.
.

U 212.212.212.212:5060 - 212.212.212.213:5060
INVITE sip:1917425@212.212.212.213:5060 SIP/2.0.
Record-Route: sip:212.212.212.212;lr;ftag=3189bbd5cf53a984o0.
Via: SIP/2.0/UDP 212.212.212.212;branch=z9hG4bKe66e.0702ec92.0.
Via: SIP/2.0/UDP 91.176.221.245:32781
;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 69.
Proxy-Authorization: Digest

username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
Contact: EXT 101 sip:WindowP1@91.176.221.245:49242;nat=yes.
Expires: 30.
User-Agent: Cisco/SPA525G2-7.5.6.
Content-Length: 226.
Content-Type: application/sdp.
.
v=0.
o=- 33523926 33523927 IN IP4 192.168.0.101.
s=-.
c=IN IP4 0.0.0.0.
t=0 0.
m=audio 0 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:30.
a=sendonly.

U 212.212.212.213:5060 - 212.212.212.212:5060
SIP/2.0 488 Not acceptable here.
Via: SIP/2.0/UDP
212.212.212.212;branch=z9hG4bKe66e.0702ec92.0;received=212.212.212.212;rport=5060.
Via: SIP/2.0/UDP 91.176.221.245:32781
;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Server: SIP Server 9.21/CS.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
X-Asterisk-HangupCause: Normal Clearing.
X-Asterisk-HangupCauseCode: 16.
Content-Length: 0.
.
here is the trace using port 5744
U 91.176.221.245:63719 - 212.212.212.212:5744
INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK-6f0161f0.
From: EXT 101 sip:windo...@sip.myserver.com;tag=f8c2b14a55549ac2o0.
To: sip:19174250...@sip.myserver.com;tag=as1fcb82f4.
Call-ID: 5832b9ea-a4a32aa2@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 70.
Route: sip:212.212.212.212:5744
;lr;ftag=f8c2b14a55549ac2o0;did=9ae.775cc5c5.
Proxy-Authorization: Digest
username=WindowP1,realm=myserver,nonce=54f46d7a081272baa39f9e34a0ee81f471dec7b034ba,uri=
sip:1917425@212.212.212.213:5060
,algorithm=MD5,response=4096f485853bf6a209424c36dac2342b.
Contact: EXT 101 sip:WindowP1@192.168.0.101:5060.
Expires: 30.
User-Agent: Cisco/SPA525G2-7.5.6.

[OpenSIPS-Users] Call transfer problem

2015-03-09 Thread Schneur Rosenberg
I have a OpenSIPS server that acts as a load balancing server for a couple
of asterisk servers, and lately I'm having a issue with asterisk responding
with a 488 Not acceptable here for transfer requests when it comes to port
5060 on the Opensips server, but if I send it to another port it works
fine, I realized that when using port 5060 the sdp has port 0  ie  (m=audio
0 RTP/AVP 0 8 101.) but when using another port it does have a port number
(ie m=audio 16422 RTP/AVP 0 8 101.)

Im attaching both traces, I changed ips for security 212.212.212.212. is
the opensips server, 212.212.212.213 is the asterisk server,
and 91.176.221.245 is the end user.

Can anyone please help me make this work on port 5060 too, and can you
please explain why it would act differently, the NAT is also handeled
differently as can be seen in the VIA header (maybe router is trying to use
some ALG?)

Here is the trace using port 5060

U 91.176.221.245:49242 - 212.212.212.212:5060
INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
Via: SIP/2.0/UDP 91.176.221.245:32781;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 70.
Route: sip:212.212.212.212:5060
;lr;ftag=3189bbd5cf53a984o0;did=d97.6c4d2422.
Proxy-Authorization: Digest

username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
Contact: EXT 101 sip:WindowP1@91.176.221.245:32781.
Expires: 30.
User-Agent: Cisco/SPA525G2-7.5.6.
Content-Length: 226.
Content-Type: application/sdp.
.
v=0.
o=- 33523926 33523927 IN IP4 192.168.0.101.
s=-.
c=IN IP4 0.0.0.0.
t=0 0.
m=audio 0 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:30.
a=sendonly.

U 212.212.212.212:5060 - 91.176.221.245:49242
SIP/2.0 100 Giving a try.
Via: SIP/2.0/UDP 91.176.221.245:32781
;received=91.176.221.245;rport=49242;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Server: OpenSIPS (1.7.2-notls (x86_64/linux)).
Content-Length: 0.
.

U 212.212.212.212:5060 - 212.212.212.213:5060
INVITE sip:1917425@212.212.212.213:5060 SIP/2.0.
Record-Route: sip:212.212.212.212;lr;ftag=3189bbd5cf53a984o0.
Via: SIP/2.0/UDP 212.212.212.212;branch=z9hG4bKe66e.0702ec92.0.
Via: SIP/2.0/UDP 91.176.221.245:32781
;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 69.
Proxy-Authorization: Digest

username=WindowP1,realm=myserver,nonce=54f468a5000180cd88bd6cead37ab9d1920cc4c54a0ecdd3,uri=sip:1917425@212.212.

212.213:5060,algorithm=MD5,response=0a5a118e2b318621f32b5d60b600229c.
Contact: EXT 101 sip:WindowP1@91.176.221.245:49242;nat=yes.
Expires: 30.
User-Agent: Cisco/SPA525G2-7.5.6.
Content-Length: 226.
Content-Type: application/sdp.
.
v=0.
o=- 33523926 33523927 IN IP4 192.168.0.101.
s=-.
c=IN IP4 0.0.0.0.
t=0 0.
m=audio 0 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:30.
a=sendonly.

U 212.212.212.213:5060 - 212.212.212.212:5060
SIP/2.0 488 Not acceptable here.
Via: SIP/2.0/UDP
212.212.212.212;branch=z9hG4bKe66e.0702ec92.0;received=212.212.212.212;rport=5060.
Via: SIP/2.0/UDP 91.176.221.245:32781
;rport=49242;received=91.176.221.245;branch=z9hG4bK-a6635dda.
From: EXT 101 sip:windo...@sip.myserver.com;tag=3189bbd5cf53a984o0.
To: sip:19174250...@sip.myserver.com;tag=as7f636018.
Call-ID: f8a392e9-f1139d80@192.168.0.101.
CSeq: 103 INVITE.
Server: SIP Server 9.21/CS.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
X-Asterisk-HangupCause: Normal Clearing.
X-Asterisk-HangupCauseCode: 16.
Content-Length: 0.
.
here is the trace using port 5744
U 91.176.221.245:63719 - 212.212.212.212:5744
INVITE sip:1917425@212.212.212.213:5060;nat=yes SIP/2.0.
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK-6f0161f0.
From: EXT 101 sip:windo...@sip.myserver.com;tag=f8c2b14a55549ac2o0.
To: sip:19174250...@sip.myserver.com;tag=as1fcb82f4.
Call-ID: 5832b9ea-a4a32aa2@192.168.0.101.
CSeq: 103 INVITE.
Max-Forwards: 70.
Route: sip:212.212.212.212:5744
;lr;ftag=f8c2b14a55549ac2o0;did=9ae.775cc5c5.
Proxy-Authorization: Digest
username=WindowP1,realm=myserver,nonce=54f46d7a081272baa39f9e34a0ee81f471dec7b034ba,uri=
sip:1917425@212.212.212.213:5060
,algorithm=MD5,response=4096f485853bf6a209424c36dac2342b.
Contact: EXT 101 sip:WindowP1@192.168.0.101:5060.
Expires: 30.
User-Agent: 

[OpenSIPS-Users] Binary replication

2015-02-18 Thread Schneur Rosenberg
I have a question regarding binary replication, I was using OpenSIPS 1.7
until now, my backup was passive, because when they were all up at the same
time, the usrloc timer from the backup kept on removing users from the
database, even though I'm using mode 2, I still rely on the DB for some
actions, I recently watched Vlad Paiu video presentation on Binary
Interface replication and he says that he advises to leave the backup open
too, so I built 2 test servers with OpenSIPS 1.11 and I have a few
questions.

1) will this solve the issue of the usrloc timer deleting records?
2) will it also update the backups database if I use mode 2? this way I
dont need to replicate the db's, i will have 2 separate db's and have each
server update its own db, if it does this will also solve problem 1.
3) I tested the bin replication, when doing a ngrep I see the packet coming
in on the backup when a new user registers, but when doing a opensipsctl
ul show  it only shows the contact line and nothing else and it disappears
completely  after a few moments and it does not update the db.
4) Does it have a built in security mechanism besides manually doing it
with iptables?
5) It seems like this is mainly used with a floating ip, I have servers on
the same network using floating ip, I also have servers on different
networks using failover dns, how will it affect my redundancy, I assume the
backup server wont be able to reach the client before the client does a new
DNS lookup and re registers, because the clients NAT wont allow it through,
is that correct? and is there a solution for that?

thanks in advance
S. Rosenberg
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Binary replication

2015-02-18 Thread Schneur Rosenberg
Here is the error, I see it checking the ip address against the listening
ip address, and of course it does not match, if I add the other ip address
as a listening address opensips wont start.



Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
ERROR:usrloc:receive_ucontact_update: non-local socket udp:45.45.99.95:5060

Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
ERROR:usrloc:receive_ucontact_update: failed to process replication event.
dom: 'location', aor: 'solho...@sipsvr5.myserver.com'
Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
ERROR:usrloc:receive_binary_packet: failed to process a binary packet!


On Wed, Feb 18, 2015 at 5:02 PM, Liviu Chircu li...@opensips.org wrote:

  Hello Schneur,

 1) If REGISTER request replication properly works (same messages received
 on both sides), then the backup should not delete contacts like you are
 mentioning.
 2) Yes, it will. You can disable this behaviour with
 skip_replicated_db_ops [1]
 3) Any specific ERRORs in the logfile? Please open a GitHub ticket for any
 obvious issues [2]
 4) Only integrity checking. But that can be bypassed by a potential
 attacker. Immediate solutions are the use of private interfaces and/or
 iptables rules.
 5) Yes, replication is only to be used with floating IPs. Regarding the
 distributed redundant setup, a big discussion was started in 2013, yet did
 not really come to a final conclusion [3]

 [1]:
 http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#skip_replicated_db_ops
 [2]: https://github.com/OpenSIPS/opensips/issues
 [3]: http://opensips.org/pipermail/users/2013-April/025204.html

 Best regards,

 Liviu Chircu
 OpenSIPS Developerhttp://www.opensips-solutions.com

 On 18.02.2015 12:19, Schneur Rosenberg wrote:

 I have a question regarding binary replication, I was using OpenSIPS 1.7
 until now, my backup was passive, because when they were all up at the same
 time, the usrloc timer from the backup kept on removing users from the
 database, even though I'm using mode 2, I still rely on the DB for some
 actions, I recently watched Vlad Paiu video presentation on Binary
 Interface replication and he says that he advises to leave the backup open
 too, so I built 2 test servers with OpenSIPS 1.11 and I have a few
 questions.

  1) will this solve the issue of the usrloc timer deleting records?
 2) will it also update the backups database if I use mode 2? this way I
 dont need to replicate the db's, i will have 2 separate db's and have each
 server update its own db, if it does this will also solve problem 1.
 3) I tested the bin replication, when doing a ngrep I see the packet
 coming in on the backup when a new user registers, but when doing a
 opensipsctl ul show  it only shows the contact line and nothing else and
 it disappears completely  after a few moments and it does not update the
 db.
 4) Does it have a built in security mechanism besides manually doing it
 with iptables?
 5) It seems like this is mainly used with a floating ip, I have servers on
 the same network using floating ip, I also have servers on different
 networks using failover dns, how will it affect my redundancy, I assume the
 backup server wont be able to reach the client before the client does a new
 DNS lookup and re registers, because the clients NAT wont allow it through,
 is that correct? and is there a solution for that?

  thanks in advance
 S. Rosenberg


 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Binary replication

2015-02-18 Thread Schneur Rosenberg
THANKS, this solved the problem, I think this should be placed in the
documentation.


On Wed, Feb 18, 2015 at 8:11 PM, Liviu Chircu li...@opensips.org wrote:

  You should be able to solve that problem with:
 echo 1  /proc/sys/net/ipv4/ip_nonlocal_bind

  Liviu Chircu
 OpenSIPS Developerhttp://www.opensips-solutions.com

 On 18.02.2015 19:20, Schneur Rosenberg wrote:

 Here is the error, I see it checking the ip address against the listening
 ip address, and of course it does not match, if I add the other ip address
 as a listening address opensips wont start.



  Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
 ERROR:usrloc:receive_ucontact_update: non-local socket udp:
 45.45.99.95:5060
 Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
 ERROR:usrloc:receive_ucontact_update: failed to process replication event.
 dom: 'location', aor: 'solho...@sipsvr5.myserver.com'
 Feb 18 17:17:10 sipsvr6 /sbin/opensips[26864]:
 ERROR:usrloc:receive_binary_packet: failed to process a binary packet!


 On Wed, Feb 18, 2015 at 5:02 PM, Liviu Chircu li...@opensips.org wrote:

  Hello Schneur,

 1) If REGISTER request replication properly works (same messages received
 on both sides), then the backup should not delete contacts like you are
 mentioning.
 2) Yes, it will. You can disable this behaviour with
 skip_replicated_db_ops [1]
 3) Any specific ERRORs in the logfile? Please open a GitHub ticket for
 any obvious issues [2]
 4) Only integrity checking. But that can be bypassed by a potential
 attacker. Immediate solutions are the use of private interfaces and/or
 iptables rules.
 5) Yes, replication is only to be used with floating IPs. Regarding the
 distributed redundant setup, a big discussion was started in 2013, yet did
 not really come to a final conclusion [3]

 [1]:
 http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#skip_replicated_db_ops
 [2]: https://github.com/OpenSIPS/opensips/issues
 [3]: http://opensips.org/pipermail/users/2013-April/025204.html

 Best regards,

 Liviu Chircu
 OpenSIPS Developerhttp://www.opensips-solutions.com

  On 18.02.2015 12:19, Schneur Rosenberg wrote:

  I have a question regarding binary replication, I was using OpenSIPS
 1.7 until now, my backup was passive, because when they were all up at the
 same time, the usrloc timer from the backup kept on removing users from the
 database, even though I'm using mode 2, I still rely on the DB for some
 actions, I recently watched Vlad Paiu video presentation on Binary
 Interface replication and he says that he advises to leave the backup open
 too, so I built 2 test servers with OpenSIPS 1.11 and I have a few
 questions.

  1) will this solve the issue of the usrloc timer deleting records?
 2) will it also update the backups database if I use mode 2? this way I
 dont need to replicate the db's, i will have 2 separate db's and have each
 server update its own db, if it does this will also solve problem 1.
 3) I tested the bin replication, when doing a ngrep I see the packet
 coming in on the backup when a new user registers, but when doing a
 opensipsctl ul show  it only shows the contact line and nothing else and
 it disappears completely  after a few moments and it does not update the
 db.
 4) Does it have a built in security mechanism besides manually doing it
 with iptables?
 5) It seems like this is mainly used with a floating ip, I have servers
 on the same network using floating ip, I also have servers on different
 networks using failover dns, how will it affect my redundancy, I assume the
 backup server wont be able to reach the client before the client does a new
 DNS lookup and re registers, because the clients NAT wont allow it through,
 is that correct? and is there a solution for that?

  thanks in advance
 S. Rosenberg


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] usrloc disable timer

2014-08-27 Thread Schneur Rosenberg
Hi

I'm using usrloc with db_mode set to 2, I'm using a backup server which is
always running and is using the same database, my problem is that the
second server constantly removes records from the location table, is it
possible to  disable the expired contacts timer? would setting
timer_interval to 0 disable the timer? I can write a cron that would delete
expired contacts. is there any downside to this? does the timer do anything
else? the documentation says The timer deletes all expired contacts and
flushes all modified or new contacts to database I'm not exactly what they
mean by flushing the modified or new contacts.

Both servers have exact same system time so that's not the issue.

If there is a better way please let me know.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] False dialogs due to network failures

2014-07-16 Thread Schneur Rosenberg
create_dialog with Pp flag.
On Jul 16, 2014 10:45 AM, Jorge Luis Ortea dar...@hotmail.com wrote:


 Hi all,

 I'm using OpenSIPS 1.8. with several Asterisk. When Proxy SIP manages a
 call keeps a dialog with (called,caller,Asterisk) through store_dlg_value
 function from dialog module. Later through get_dialog_info function it
 match calls and resolves transfers issue.

 I have the following problem, when a network failure occurs those dialogs
 keep on and this generate errors.
 How can I avoid this and remove those dialogs?

 Note: I don't know if it can be useful but 'Failure Route' is performed
 shortly after the failure.

 Thanks.
 Regards.

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


  1   2   >