Re: [OpenSIPS-Users] Port changes

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Schneur,

It is not 100% correct, as a sip message may come from a another SIP 
server and in this case the Contact (belong to the end point) should not 
be re-written with the IP OPenSIPS sees as source (which is the other 
SIP server).
Shortly said, you can force the re-write as time as you know that you 
are dealing with traffic from a SIP endpoint (or acting as an endpoint), 
and not from a SIP proxy.


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/14/2018 01:45 PM, Schneur Rosenberg wrote:

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?

On Wed, Feb 14, 2018 at 11:24 AM, Bogdan-Andrei Iancu
 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
 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?



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


Re: [OpenSIPS-Users] Avpops and db_virtual modules

2018-02-14 Thread Bogdan-Andrei Iancu

Ben, emails are welcome, as they provide valuable feedback for us ;)

Do you say that avpops + db_virtual combination was working in 1.11 ? I 
remember there were some fixes couple of months ago in regards to how 
the capabilities do propagate via the virtual module.


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/15/2018 02:36 AM, Ben Newlin wrote:


Hi,

Sorry for all of the emails! I have found one more issue while trying 
to upgrade from OpenSIPS 1.11 to 2.x. We use the db_virtual module in 
front of our redundant Postgres DB instances to facilitate failover 
between the DBs. We also use the avpops module to perform raw queries 
against the DB. In both 2.2.6 and 2.3.3 I get the following error when 
trying to load this configuration:


CRITICAL:avpops:avpops_db_bind: database modules (virtual://set1) does 
not provide all functions needed by avpops module


ERROR:core:init_mod: failed to initialize module avpops

My configuration is as follows:

#// PostgreSQL Database module

loadmodule "db_postgres.so"

modparam("db_postgres", "exec_query_threshold", 50)

#// Virtual DB module

loadmodule "db_virtual.so"

modparam("db_virtual", "db_urls", "define set1 ROUND")

modparam("db_virtual", "db_urls", 
"postgres://postgres:postgres@127.0.0.1:5432/postgres")


#//  AVP OPerationS module

loadmodule "avpops.so"

modparam("avpops", "db_url", "virtual://set1")

Is db_virtual simply not compatible with the new OpenSIPS versions or 
has something changed in the configuration that I am missing?


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


Re: [OpenSIPS-Users] Dialog module requires clusterer

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Ben,

Do you have any of the following module parameters set in your cfg :
* accept_replicated_dialogs
* replicate_dialogs_to
* accept_replicated_profiles
* replicate_profiles_to

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/14/2018 10:32 PM, Ben Newlin wrote:


Hi,

I’m trying to upgrade from 1.11 to 2.3.3. We use the dialog module but 
we do not use dialog or profile replication. When I try to run my 
server it fails with the following error:


WARNING:core:solve_module_dependencies: module dialog depends on 
module clusterer, but it was not loaded!


ERROR:core:main: failed to solve module dependencies

This dependency is not documented [1] and also doesn’t seem right. Why 
is clusterer required if we are not using any of the cluster 
functionality?


[1] - 
http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#idp5554560


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


Re: [OpenSIPS-Users] Proto_hep listeners

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Ben,

Even if you do not actually act a HEP traffic receiver (so no need for 
listening), you *need* to define a HEP listener in the config file. This 
constrain comes from the generic TCP stack in OpenSIPS (which also 
re-used to implement the HEP protocol)  - this stack work only in a 
symmetric way (sending and receiving).


So, just add a listener to make it happy :)

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/14/2018 08:55 PM, Ben Newlin wrote:


Hi,

I’m trying to upgrade from 1.11 to 2.3.3. We use the siptrace module 
to replicate messages via HEP, so I had to load in the proto_hep 
module as well. On startup, I’m getting the following errors:


ERROR:proto_hep:mod_init: No HEP listener defined, neither TCP nor UDP!

ERROR:core:init_mod: failed to initialize module proto_hep

It is intentional that I have not defined any listeners as I do not 
wish to listen for HEP messages. I am only using the proto_hep module 
to enabling **sending** HEP messages via siptrace. Why are listeners 
required for the proto_hep module to start successfully?


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


Re: [OpenSIPS-Users] acc extra_fields param

2018-02-14 Thread Pasan Meemaduma via Users
Hi Bogdan,
your fix worked :). Thanks for that. it converts the int properly now.
 

On Wednesday, 14 February 2018, 14:12, Bogdan-Andrei Iancu 
 wrote:
 

  Hi Pasan,
 
 This is for OpenSIPS 2.3:
    
https://github.com/OpenSIPS/opensips/commit/42cba2c0de9cb07e31c055bc82514c14735bd2e8
 
 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/14/2018 04:06 AM, Pasan Meemaduma wrote:
  
  Hi Bogdan, 
  Thanks for the response. I'll get my opensips rebuild , can you let me know 
the commit id so I know I got it correctly ?
   
 
  On Tuesday, 13 February 2018, 17:38, Bogdan-Andrei Iancu 
 wrote:
  
 
Hi Pasan,
 
 The "extra" support in ACC is always producing output as strings (when 
performing the DB query). Nevertheless this should not prevent you pushing 
integer or string values into the $acc_extra() variable. 
 
 But, it seems you discovered a BUG here :D...if the pushed value is a static 
int (from the script), it is not properly converted :(. I just pushed a fix on 
GIT repo (master and 2.3) - so please update you checkout or if using packages, 
 use the nightly build (of course, wait for the night :) first )
 
 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/13/2018 03:39 AM, Pasan Meemaduma via Users wrote:
  
Hi List, 
  I'm working on getting my opensips 1.10 -> 2.3.3 :) 
  As db_extra param is not there anymore I tried to use extra_fields param in 
acc module and it appears it can hold string values only. Is it the  case ? 
  I tried to use it to hold an integer value and it comes up as  empty string 
''. 
  
  Is it a bug or purpose set only to accept string data only ? cause  my db 
column has integer type for it. 
  
  following is my config 
  modparam("acc", "extra_fields", "db: fu->from_uri; ru->to_uri; 
islocal->islocal; callid->\"exe-callid\"; direction->direction")
  
  
  
  $acc_extra(islocal) = 1; 
  
  When call hangups it failed to insert the cdr record to acc table as  islocal 
comes up as ''. 
  Ex:- ERROR:db_postgres:db_postgres_submit_query: 0x7fd07fb45d18 PQsendQuery 
Error: ERROR:  invalid input syntax for integer: ""#012LINE 
1:...sip:xx@xx;transport=UDP','','376ab2...#012 
    ^#012 Query: insert into 
acc(method,from_tag,to_tag,callid,sip_code,sip_reason,time,from_uri,to_uri,islocal,"exe-callid",direction,setuptime,created,duration,ms_duration
 ) 
values('INVITE','101c267c','464b920d','6m1aTeUcif5ctoXI7ZSq9A..','200','OK','2018-02-09
  
17:55:41','sip:xx@xx;transport=UDP','sip:xx@xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09
 17:55:30',4,4298)
   
  
 ___
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] warning on postgres data type

2018-02-14 Thread Pasan Meemaduma via Users
Hi Bogdan,
Thanks for the reply. I'll see if I can use call-Id + from_tag for it. But at 
the moment we are using uuid version 1 for this to make sure we get more 
accurate uniqueness. 


 

On Wednesday, 14 February 2018, 15:54, Bogdan-Andrei Iancu 
 wrote:
 

  Hi,
 
 OK, the uuid is custom data type (specific to postgres ??), so doing the cast 
at DB level is the proper way to address the warning.
 
 But, why not using the call-Id + from_tag as uuid for the calls ?
 
 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/14/2018 12:03 PM, Pasan Meemaduma wrote:
  
  Hi Bogdan, 
  It returns the postgres data type uuid. I put that in acc extra field to keep 
track calls. 
  
  If I use following, I'm not getting the warning anymore. 
  
  avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)") 
   
 
  On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:
  
 
Hi Pasan,
 
 But from the DB point of view, what data type does your procedure return ?
 
 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/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:
  
  Hi List,
  
  I got another issue where opensips issue a warning I'm trying to load a uuid 
from a postgres database as opensips doesn't have a built-in function to 
generate a uuid. How do I get rid of this warning ? 
  
  WARNING:db_postgres:db_postgres_get_columns: unhandled data type column 
(uuid_generate_v1mc) type id (2950), use  DB_STRING as default
  
  Its caused by following line in my config 
  avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)"); 
  
  does this mean I need to convert it to string before returning from postgres 
via the sql I use ? 
   
  
 ___
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] Avpops and db_virtual modules

2018-02-14 Thread Ben Newlin
Hi,

Sorry for all of the emails! I have found one more issue while trying to 
upgrade from OpenSIPS 1.11 to 2.x. We use the db_virtual module in front of our 
redundant Postgres DB instances to facilitate failover between the DBs. We also 
use the avpops module to perform raw queries against the DB. In both 2.2.6 and 
2.3.3 I get the following error when trying to load this configuration:

CRITICAL:avpops:avpops_db_bind: database modules (virtual://set1) does not 
provide all functions needed by avpops module
ERROR:core:init_mod: failed to initialize module avpops

My configuration is as follows:

#// PostgreSQL Database module
loadmodule "db_postgres.so"
modparam("db_postgres", "exec_query_threshold", 50)

#// Virtual DB module
loadmodule "db_virtual.so"
modparam("db_virtual", "db_urls", "define set1 ROUND")
modparam("db_virtual", "db_urls", 
"postgres://postgres:postgres@127.0.0.1:5432/postgres")

#//  AVP OPerationS module
loadmodule "avpops.so"
modparam("avpops", "db_url", "virtual://set1")

Is db_virtual simply not compatible with the new OpenSIPS versions or has 
something changed in the configuration that I am missing?

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


[OpenSIPS-Users] Dialog module requires clusterer

2018-02-14 Thread Ben Newlin
Hi,

I’m trying to upgrade from 1.11 to 2.3.3. We use the dialog module but we do 
not use dialog or profile replication. When I try to run my server it fails 
with the following error:

WARNING:core:solve_module_dependencies: module dialog depends on module 
clusterer, but it was not loaded!
ERROR:core:main: failed to solve module dependencies

This dependency is not documented [1] and also doesn’t seem right. Why is 
clusterer required if we are not using any of the cluster functionality?
[1] - http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#idp5554560

Thanks,
Ben Newlin


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


[OpenSIPS-Users] Proto_hep listeners

2018-02-14 Thread Ben Newlin
Hi,

I’m trying to upgrade from 1.11 to 2.3.3. We use the siptrace module to 
replicate messages via HEP, so I had to load in the proto_hep module as well. 
On startup, I’m getting the following errors:

ERROR:proto_hep:mod_init: No HEP listener defined, neither TCP nor UDP!
ERROR:core:init_mod: failed to initialize module proto_hep

It is intentional that I have not defined any listeners as I do not wish to 
listen for HEP messages. I am only using the proto_hep module to enabling 
*sending* HEP messages via siptrace. Why are listeners required for the 
proto_hep module to start successfully?

Thanks,
Ben Newlin


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


Re: [OpenSIPS-Users] Modules in apt.opensips.org

2018-02-14 Thread Liviu Chircu

Hi John,

Yes, it would appear so, currently:

root@localhost:~# apt-cache search opensips | grep mongo
opensips-mongodb-module - Interface module to interact with a MongoDB server
root@localhost:~# apt-cache search opensips | grep cassa
root@localhost:~# apt-cache search opensips | grep redis
opensips-redis-module - Interface module to interact with a Redis server
root@localhost:~# apt-cache search opensips | grep couch
root@localhost:~#

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 14.02.2018 18:19, John Quick wrote:

I was hoping to simplify my installation by only using apt-get to install
binaries on a Debian box, but I
cannot see an apt package for the module cachedb_couchbase in the
apt.opensips.org repository.

Does this mean I have to make opensips from source if I want to use this
module?

John Quick
Smartvox Limited



___
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] Modules in apt.opensips.org

2018-02-14 Thread John Quick
I was hoping to simplify my installation by only using apt-get to install
binaries on a Debian box, but I
cannot see an apt package for the module cachedb_couchbase in the
apt.opensips.org repository.

Does this mean I have to make opensips from source if I want to use this
module?

John Quick
Smartvox Limited



___
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&utm_source=link&utm_campaign=sig-email&utm_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&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
target="_blank" style="color: #4453ea;">www.avg.com




On Wed, Feb 14, 2018 at 11:24 AM, Bogdan-Andrei Iancu
 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
>>  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&utm_source=link&utm_campaign=sig-email&utm_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_m

Re: [OpenSIPS-Users] warning on postgres data type

2018-02-14 Thread Bogdan-Andrei Iancu

Hi,

OK, the uuid is custom data type (specific to postgres ??), so doing the 
cast at DB level is the proper way to address the warning.


But, why not using the call-Id + from_tag as uuid for the calls ?

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/14/2018 12:03 PM, Pasan Meemaduma wrote:

Hi Bogdan,

It returns the postgres data type uuid. I put that in acc extra field 
to keep track calls.


If I use following, I'm not getting the warning anymore.

avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)")



On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:



Hi Pasan,

But from the DB point of view, what data type does your procedure return ?

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/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:

Hi List,

I got another issue where opensips issue a warning I'm trying to load 
a uuid from a postgres database as opensips doesn't have a built-in 
function to generate a uuid. How do I get rid of this warning ?



WARNING:db_postgres:db_postgres_get_columns: unhandled data type 
column (uuid_generate_v1mc) type id (2950), use DB_STRING as default


Its caused by following line in my config

avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)");


does this mean I need to convert it to string before returning from 
postgres via the sql I use ?




___
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] warning on postgres data type

2018-02-14 Thread Pasan Meemaduma via Users
Hi Bogdan,
It returns the postgres data type uuid. I put that in acc extra field to keep 
track calls. 

If I use following, I'm not getting the warning anymore. 

avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)")
 

On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:
 

  Hi Pasan,
 
 But from the DB point of view, what data type does your procedure return ?
 
 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/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:
  
  Hi List,
  
  I got another issue where opensips issue a warning I'm trying to load a uuid 
from a postgres database as opensips doesn't have a built-in function to 
generate a uuid. How do I get rid of this warning ? 
  
  WARNING:db_postgres:db_postgres_get_columns: unhandled data type column 
(uuid_generate_v1mc) type id (2950), use DB_STRING as default
  
  Its caused by following line in my config 
  avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)"); 
  
  does this mean I need to convert it to string before returning from postgres 
via the sql I use ? 
   
  
 ___
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] migrating to opensips 2.3 from 2.2

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Brian,

Are you sure you are using the right opensipdbctl version ? The one 
provided by the 2.3 installation has the right info text - see:

https://github.com/OpenSIPS/opensips/blob/2.3/scripts/opensipsdbctl#L309

Maybe due a version mixing, you use the opensipsdbctl from the 2.2 
version (that ensure migration from 2.1 to 2.2). And you need to use the 
opensipsdbctl from 2.3 (to get a migration from 2.2 to 2.3).


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 05:35 PM, Brian Southworth wrote:


Hi All,

I seem to be getting an error when running the migration. It is also 
saying the  following when I run the following command: opensipsdbctl 
migrate opensips_2_2 opensips_2_3


INFO: MySQL DB migration tool for OpenSIPS 2.1.x databases

--

WARNING: We recommend using this tool ONLY in order to upgrade an existing

OpenSIPS 2.1.x MySQL database to the 2.2 schema. Behaviour when 
automatically


migrating earlier DB versions (1.8, 1.9, 1.10, 1.11) to 2.2 is undefined

my version is 2.2.3

also when I enter my password for mysql (this is an external DB not 
internal) I get this


ERROR 1045 (28000): Access denied for user 
'opensips'@'local_ip.lightspeed.jcsnms.sbcglobal.net' (using password: 
YES)


ERROR 1045 (28000): Access denied for user 
'opensips'@'local_ip.lightspeed.jcsnms.sbcglobal.net' (using password: 
YES)


Any idea how I fix this ? I want to start trying to use the EBR module 
which was made available in opensips 2.3


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


Re: [OpenSIPS-Users] warning on postgres data type

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Pasan,

But from the DB point of view, what data type does your procedure return ?

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/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:

Hi List,

I got another issue where opensips issue a warning I'm trying to load 
a uuid from a postgres database as opensips doesn't have a built-in 
function to generate a uuid. How do I get rid of this warning ?



WARNING:db_postgres:db_postgres_get_columns: unhandled data type 
column (uuid_generate_v1mc) type id (2950), use DB_STRING as default


Its caused by following line in my config

avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)");


does this mean I need to convert it to string before returning from 
postgres via the sql I use ?




___
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] Port changes

2018-02-14 Thread Bogdan-Andrei Iancu

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

 
  http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_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&utm_source=link&utm_campaign=sig-email&utm_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





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


Re: [OpenSIPS-Users] acc extra_fields param

2018-02-14 Thread Pasan Meemaduma via Users
Thanks Bogdan,
I found it. I'll let you know how it goes.
 

On Wednesday, 14 February 2018, 14:12, Bogdan-Andrei Iancu 
 wrote:
 

  Hi Pasan,
 
 This is for OpenSIPS 2.3:
    
https://github.com/OpenSIPS/opensips/commit/42cba2c0de9cb07e31c055bc82514c14735bd2e8
 
 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/14/2018 04:06 AM, Pasan Meemaduma wrote:
  
  Hi Bogdan, 
  Thanks for the response. I'll get my opensips rebuild , can you let me know 
the commit id so I know I got it correctly ?
   
 
  On Tuesday, 13 February 2018, 17:38, Bogdan-Andrei Iancu 
 wrote:
  
 
Hi Pasan,
 
 The "extra" support in ACC is always producing output as strings (when 
performing the DB query). Nevertheless this should not prevent you pushing 
integer or string values into the $acc_extra() variable. 
 
 But, it seems you discovered a BUG here :D...if the pushed value is a static 
int (from the script), it is not properly converted :(. I just pushed a fix on 
GIT repo (master and 2.3) - so please update you checkout or if using packages, 
 use the nightly build (of course, wait for the night :) first )
 
 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/13/2018 03:39 AM, Pasan Meemaduma via Users wrote:
  
Hi List, 
  I'm working on getting my opensips 1.10 -> 2.3.3 :) 
  As db_extra param is not there anymore I tried to use extra_fields param in 
acc module and it appears it can hold string values only. Is it the  case ? 
  I tried to use it to hold an integer value and it comes up as  empty string 
''. 
  
  Is it a bug or purpose set only to accept string data only ? cause  my db 
column has integer type for it. 
  
  following is my config 
  modparam("acc", "extra_fields", "db: fu->from_uri; ru->to_uri; 
islocal->islocal; callid->\"exe-callid\"; direction->direction")
  
  
  
  $acc_extra(islocal) = 1; 
  
  When call hangups it failed to insert the cdr record to acc table as  islocal 
comes up as ''. 
  Ex:- ERROR:db_postgres:db_postgres_submit_query: 0x7fd07fb45d18 PQsendQuery 
Error: ERROR:  invalid input syntax for integer: ""#012LINE 
1:...sip:xx@xx;transport=UDP','','376ab2...#012 
    ^#012 Query: insert into 
acc(method,from_tag,to_tag,callid,sip_code,sip_reason,time,from_uri,to_uri,islocal,"exe-callid",direction,setuptime,created,duration,ms_duration
 ) 
values('INVITE','101c267c','464b920d','6m1aTeUcif5ctoXI7ZSq9A..','200','OK','2018-02-09
  
17:55:41','sip:xx@xx;transport=UDP','sip:xx@xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09
 17:55:30',4,4298)
   
  
 ___
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] acc extra_fields param

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Pasan,

This is for OpenSIPS 2.3:
https://github.com/OpenSIPS/opensips/commit/42cba2c0de9cb07e31c055bc82514c14735bd2e8

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/14/2018 04:06 AM, Pasan Meemaduma wrote:

Hi Bogdan,

Thanks for the response. I'll get my opensips rebuild , can you let me 
know the commit id so I know I got it correctly ?



On Tuesday, 13 February 2018, 17:38, Bogdan-Andrei Iancu 
 wrote:



Hi Pasan,

The "extra" support in ACC is always producing output as strings (when 
performing the DB query). Nevertheless this should not prevent you 
pushing integer or string values into the $acc_extra() variable.


But, it seems you discovered a BUG here :D...if the pushed value is a 
static int (from the script), it is not properly converted :(. I just 
pushed a fix on GIT repo (master and 2.3) - so please update you 
checkout or if using packages, use the nightly build (of course, wait 
for the night :) first )


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/13/2018 03:39 AM, Pasan Meemaduma via Users wrote:

Hi List,

I'm working on getting my opensips 1.10 -> 2.3.3 :)

As db_extra param is not there anymore I tried to use extra_fields 
param in acc module and it appears it can hold string values only. Is 
it the case ?


I tried to use it to hold an integer value and it comes up as empty 
string ''.


Is it a bug or purpose set only to accept string data only ? cause my 
db column has integer type for it.


following is my config

modparam("acc", "extra_fields", "db: fu->from_uri; ru->to_uri; 
islocal->islocal; callid->\"exe-callid\"; direction->direction")




$acc_extra(islocal) = 1;


When call hangups it failed to insert the cdr record to acc table as 
islocal comes up as ''.


Ex:-
ERROR:db_postgres:db_postgres_submit_query: 0x7fd07fb45d18 
PQsendQuery Error: ERROR:  invalid input syntax for integer: 
""#012LINE 1: ...sip:xx@xx;transport=UDP','','376ab2...#012 ^#012 
Query: insert into acc 
(method,from_tag,to_tag,callid,sip_code,sip_reason,time,from_uri,to_uri,islocal,"exe-callid",direction,setuptime,created,duration,ms_duration 
) values 
('INVITE','101c267c','464b920d','6m1aTeUcif5ctoXI7ZSq9A..','200','OK','2018-02-09 
17:55:41','sip:xx@xx;transport=UDP','sip:xx@xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09 
17:55:30',4,4298)




___
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