[OpenSIPS-Users] Error creating presence tables with MySQL 5.7

2016-11-18 Thread Pat Burke

When running "opensipsdbctl create" I get the following error message.


Install presence related tables? (y/n): y
INFO: creating presence tables into opensips_2_2 ...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1101 (42000) at line 2: BLOB, TEXT, GEOMETRY or JSON column 'extra_hdrs' 
can't have a default value
ERROR: Failed to create presence tables!


Regards,
Pat Burke




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


Re: [OpenSIPS-Users] nat issue

2016-11-18 Thread Miha

Hello bogdan

I guess, but it looks like so. Is it possible to remove it?


tnx
miha

On 18/11/2016 15:39, Bogdan-Andrei Iancu wrote:
I guess your UAC freezes when receiving back in the 200 OK REGISTER 
the "received" hdr param in Contact ??


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 16:33, Bogdan-Andrei Iancu wrote:

HI Miha,

Sorry, but I'm not able to follow the case you mentioned with 
Innovaphone PBX - maybe you can post (to see the differences) the 
sent and returned contact hdrs in the REGISTER request + reply for 
the 2 cases (OpenSIPS and Innovaphone PBX).


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 11:20, Miha wrote:
I do not know if this is the case. But from what I can see what I 
register it on some Innovaphone PBX, innovaphone sends back in 
contact (200 ok) just ip of IPBX and also when INVITE is send in 
contact there is URI of PBX and only and it works.


i tried this but did not have any luck.

br
miha

On 18/11/2016 09:48, Bogdan-Andrei Iancu wrote:

Hi Miha,

You mean the UAC does not like the multi-URI Contact header in the 
200 OK  If so, that UAC is really broken as 1) breaks the SIP 
syntax (which allows it) and 2) breaks the the SIP Registration as 
per RFC3261.


What about the second contact (the one already existing in usrloc 
when this registration comes) ? can it be discarded ? If YES, you 
can try passing the "c1f" flags to save() :

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

That will make OpenSIPS to accept only 1 contact per AOR/user and 
any new contact will override the existing one.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 10:15, Miha wrote:

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i 
can do in this case in OpenSIPS so that it will only reply with 
one URI in contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts 
only).


Are you sure your DB was sync'ed? OpenSIPS is periodically 
flushing the memory cache into the location table (see the 
"state" of the contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe 
about callings?) - for REGISTERs, any number of URIs are allowed 
AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and 
first will try  to register, 200 ok will will have contact of 
both phones?
In location table I can see only one registration for this user 
but for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC 
replay with Busy all the time due to two contacts (this what i 
have been told).


Ok, but if you look at rfc there is only one URI allowed in 
contact if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong.


tnx so much!
Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may 
have).


I guess your user has 2 registrations, so the 200 OK will 
report back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I 
noticed today this (Opensips reply only in this case with two 
URI on contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 
;ex

pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 
;tag=0c7ff67d927afc274

b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 R

Re: [OpenSIPS-Users] CACHEDB_MEMCACHED Module - libmemcached undefined symbol issue

2016-11-18 Thread Maciej Bylica
Hello

As i mentioned before memcached is already installed. I am using
innodb_memcache.containers to implement memcached as a plugin.

netstat -plnt | grep 

tcp0  0 127.0.0.1:  0.0.0.0:*
LISTEN  18421/mysqld


Everything looks fine i have full transparency, data provided by memcached
CLI (telnet) are seen inside innodb table and vise versa.

I am using the latest 2.2.2 git opensips rel. and memcached module loaded:

loadmodule "cachedb_memcached.so"

modparam("cachedb_memcached", "cachedb_url","memcached:default:
//localhost:,127.0.0.1/")

The script i am using is just the basic one, without any additional
configuration.
Inside the script there is following operation provided:

cache_fetch("memcached:default","$tU",$avp(i:601));

Innodb table contains following data:

+-+-+--+--+--+

| id  | num | c3   | c4   | c5   |

+-+-+--+--+--+

| 49121112233 | 49121112233 |0 |3 |0 |

| 49221112233 | 49221112233 |0 |1 |0 |

| 49221112234 | 49221112234 |0 |2 |0 |

+-+-+--+--+--+

Now, i am sending INVITE with tU = 49121112233 and getting proper behavior
which means:
- no error inside the opensips.log, xlog following cache_fetch returns
correct $avp(i:601)
- mysqld.log shows

<95 get 49121112233

>95 sending key 49121112233

>95 END

but really strange is that calling tU = 49221112233 is causing quite
opposite results:
- following error is shown

DBG:core:cachedb_fetch: from script [memcached] - with grp [default]

ERROR:cachedb_memcached:wrap_memcached_get: Failed to get: SYSTEM ERROR

- no mysqld debug is produced


The last one example(tU = 49221112234)is failing with the same error.


Memcached is loaded with all those data

Connected to localhost.

Escape character is '^]'.

get 49221112233

VALUE 49221112233 0 11

49221112233

END

get 49221112234

VALUE 49221112234 0 11

49221112234

END


but because of some reasons memcached module is not utilized.
As aforementioned, opensips script does not have any $rU filtering setup,
so should query for any data it is asked for.
Maybe i am wrong with some of my assumptions or the way memcached is
configured, so kindly help me to understand where the problem is located.

Thanks
Maciej.







2016-11-15 18:09 GMT+01:00 Bogdan-Andrei Iancu :

> OK, thank you for the update Maciej,
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 15.11.2016 18:28, Maciej Bylica wrote:
>
> Hi Bogdan,
>
> Thanks for reply.
> Right, Opensips module was not the source of the problem.
> I've managed to solve the issue, memcache is working fine.
>
> Thanks
> Maciej.
>
> 2016-11-10 12:56 GMT+01:00 Bogdan-Andrei Iancu :
>
>> Hi Maciej,
>>
>> As I see, you are manually compiling and installing the memcached stuff -
>> any special reason for doing that ? (versus using packages)
>>
>> As the problem seems to be in the lib, not in the OpenSIPS module.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 09.11.2016 18:41, Maciej Bylica wrote:
>>
>> Hello I am struggling with memcached installation with the latest git
>> opensips 2.2.2 and centos 6.8 Here are version releases i am using:
>> libmemcached-1.0.18 (./configure, make && make install) memcached-1.4.33
>> (./configure, make && make install) with 
>> LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
>> memcached -d -u nobody -m 1048 -p  127.0.0.1 does not produce any error
>> but what is really puzzling me during the opensips start is the error
>> below: DBG:core:load_module: loading module 
>> /usr/local/lib64/opensips/modules/cachedb_memcached.so
>> ERROR:core:sr_load_module: could not open module
>> :
>> /usr/local/lib/libmemcached.so.11: undefined symbol: pthread_once Can
>> someone please guide me how to put memcached up and running ?
>> Opensips is compiled with cachedb_memcached module.
>> Thanks in advance.
>> Maciej
>>
>> ___
>> 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] Memory free problem

2016-11-18 Thread Bogdan-Andrei Iancu

Hi Denis,

It looks to me you have a PRACK request that is looping big time on your 
OpenSIPS, consuming CPU and memory - see how often the warning with 
bogus state appears. Check the routing for PRACK.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.11.2016 11:43, Denis wrote:

Re: [OpenSIPS-Users] Memory free problem Hello, Bogdan!

The log you can find here
https://cloud.mail.ru/public/84c1/Fw9VGe2J9

mailto:denis7...@mail.ru


Hi Denis,

I do not think they are related. The warnings report some traffic 
anomalies - a PRACK request for a confirmed dialog (with 200 OK).


On the memory part, if the log is correct, it says you have 180M free. 
What are the ERROR line just after that log ? I want to see which was 
the module trying to allocate memory.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 09:11, Denis wrote:

Memory free problem Hello!

Today i have a temporary problem with out of free memory (about 4 
minutes).
Unfortunately, i noticed the problem when everything became fine, so i 
didn`t make standard procedure of detecting problems with memory which 
has been described in documentation.


In syslog i see such sequence of events.

Before the first message about out of free memory

"ERROR:core:fm_malloc: not enough free shm memory (180803792 bytes 
left), please increase the "-m" command line parameter!"


i see many messages

"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c531c95f0 [3855:951170645] with clid 
'4gk2hpk433lgdt1d6ys7ifkwd@1.1.1.1 
' and tags '96x8v2xkj9of92j' 
'332693C-EF5'"
"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c4735d130 [4072:1150064691] with clid 
'eht08t1eovzlqahle6xhfeiln@2.2.2.2 
' and tags '1czw3nbhw632pzn' 
'3326728-1DC1'"


dialing with two callid.

The question is, can such Warning influence on shm. allocation?

Thank you for any help.

mailto:denis7...@mail.ru

___
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] nat issue

2016-11-18 Thread Bogdan-Andrei Iancu
I guess your UAC freezes when receiving back in the 200 OK REGISTER the 
"received" hdr param in Contact ??


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.11.2016 16:33, Bogdan-Andrei Iancu wrote:

HI Miha,

Sorry, but I'm not able to follow the case you mentioned with 
Innovaphone PBX - maybe you can post (to see the differences) the sent 
and returned contact hdrs in the REGISTER request + reply for the 2 
cases (OpenSIPS and Innovaphone PBX).


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 11:20, Miha wrote:
I do not know if this is the case. But from what I can see what I 
register it on some Innovaphone PBX, innovaphone sends back in 
contact (200 ok) just ip of IPBX and also when INVITE is send in 
contact there is URI of PBX and only and it works.


i tried this but did not have any luck.

br
miha

On 18/11/2016 09:48, Bogdan-Andrei Iancu wrote:

Hi Miha,

You mean the UAC does not like the multi-URI Contact header in the 
200 OK  If so, that UAC is really broken as 1) breaks the SIP 
syntax (which allows it) and 2) breaks the the SIP Registration as 
per RFC3261.


What about the second contact (the one already existing in usrloc 
when this registration comes) ? can it be discarded ? If YES, you 
can try passing the "c1f" flags to save() :

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

That will make OpenSIPS to accept only 1 contact per AOR/user and 
any new contact will override the existing one.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 10:15, Miha wrote:

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i 
can do in this case in OpenSIPS so that it will only reply with one 
URI in contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts 
only).


Are you sure your DB was sync'ed? OpenSIPS is periodically 
flushing the memory cache into the location table (see the "state" 
of the contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe 
about callings?) - for REGISTERs, any number of URIs are allowed 
AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and 
first will try  to register, 200 ok will will have contact of 
both phones?
In location table I can see only one registration for this user 
but for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC replay 
with Busy all the time due to two contacts (this what i have been 
told).


Ok, but if you look at rfc there is only one URI allowed in 
contact if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on 
contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", 
stale=true.

Server: Ope

Re: [OpenSIPS-Users] nat issue

2016-11-18 Thread Bogdan-Andrei Iancu

HI Miha,

Sorry, but I'm not able to follow the case you mentioned with 
Innovaphone PBX - maybe you can post (to see the differences) the sent 
and returned contact hdrs in the REGISTER request + reply for the 2 
cases (OpenSIPS and Innovaphone PBX).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.11.2016 11:20, Miha wrote:
I do not know if this is the case. But from what I can see what I 
register it on some Innovaphone PBX, innovaphone sends back in contact 
(200 ok) just ip of IPBX and also when INVITE is send in contact there 
is URI of PBX and only and it works.


i tried this but did not have any luck.

br
miha

On 18/11/2016 09:48, Bogdan-Andrei Iancu wrote:

Hi Miha,

You mean the UAC does not like the multi-URI Contact header in the 
200 OK  If so, that UAC is really broken as 1) breaks the SIP 
syntax (which allows it) and 2) breaks the the SIP Registration as 
per RFC3261.


What about the second contact (the one already existing in usrloc 
when this registration comes) ? can it be discarded ? If YES, you can 
try passing the "c1f" flags to save() :

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

That will make OpenSIPS to accept only 1 contact per AOR/user and any 
new contact will override the existing one.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 10:15, Miha wrote:

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i 
can do in this case in OpenSIPS so that it will only reply with one 
URI in contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts only).

Are you sure your DB was sync'ed? OpenSIPS is periodically flushing 
the memory cache into the location table (see the "state" of the 
contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe about 
callings?) - for REGISTERs, any number of URIs are allowed AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and first 
will try  to register, 200 ok will will have contact of both phones?
In location table I can see only one registration for this user 
but for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC replay 
with Busy all the time due to two contacts (this what i have been 
told).


Ok, but if you look at rfc there is only one URI allowed in 
contact if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on 
contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", 
stale=true.

Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.


U UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKb5f2bbbf80e346f48.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040

Re: [OpenSIPS-Users] Memory free problem

2016-11-18 Thread Denis
Hello, Bogdan!

The log you can find here
https://cloud.mail.ru/public/84c1/Fw9VGe2J9

mailto:denis7...@mail.ru


Hi Denis,

I do not think they are related. The warnings report some traffic anomalies - a 
PRACK request for a confirmed dialog (with 200 OK).

On the memory part, if the log is correct, it says you have 180M free. What are 
the ERROR line just after that log ? I want to see which was the module trying 
to allocate memory.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 09:11, Denis wrote:

Memory free problem Hello!

Today i have a temporary problem with out of free memory (about 4 minutes).
Unfortunately, i noticed the problem when everything became fine, so i didn`t 
make standard procedure of detecting problems with memory which has been 
described in documentation.

In syslog i see such sequence of events.

Before the first message about out of free memory

"ERROR:core:fm_malloc: not enough free shm memory (180803792 bytes left), 
please increase the "-m" command line parameter!"

i see many messages 

"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c531c95f0 [3855:951170645] with clid '4gk2hpk433lgdt1d6ys7ifkwd@1.1.1.1' 
and tags '96x8v2xkj9of92j' '332693C-EF5'" 
"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c4735d130 [4072:1150064691] with clid 'eht08t1eovzlqahle6xhfeiln@2.2.2.2' 
and tags '1czw3nbhw632pzn' '3326728-1DC1'"

dialing with two callid.  

The question is, can such Warning influence on shm. allocation?

Thank you for any help.

mailto:denis7...@mail.ru 

___

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] $ai transformation

2016-11-18 Thread Răzvan Crainea

Hi, Ehrny!

Did you try setting the private socket on the reply?

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/17/2016 01:00 AM, Ehrny wrote:


Dear Răzvan,

Thanks again for the prompt help. I was able to change the headers as 
needed but I’m stuck with another problem(


I’ve got opensips with two Ethernet adapters, eth1 as a private and 
another one eth0 as public.  Opensips works fine when the call is 
coming on the public eth0 and leaves opensips through the same public 
adapter. (All the GWs are behind that public eth0 instead of one ). 
The problem happens when the call comes in through the private eth1, 
please see the drawing in attachment.


-sip1.  After I’ve got invite from provider on the private eth1 , I 
send it through the public eth0.


-sip2.  I use force_send_socket(udp:PUBLIC_IP:PORT) for the call to be 
able to pass through the opensips and come back from external GW 
(x.x.82.139). I also change SIP Request's URI and use uac_replace_to 
() to change these fields as needed.


-sip4.  Opensips has got 180 Ringing from external GW (x.x.82.139)

-sip5.  Opensips tries to send it back to originator (10.250.242.74) 
which is behind private NIC eth0 (10.197.26.170)


the call can not be set up because I send reply from my public eth1

2016-11-16 18:56:14  : x.x.80.43:5060 -> 10.250.242.74:5060

SIP/2.0 *180*Ringing Via: SIP/2.0/UDP 
10.250.242.74:5060;branch=*z9hG4bKqci5ec***Record-Route: 
> 
Record-Route: 
> 
From: sip:300...@domain.com;tag=*2F81324631* 
 To: 
sip:300...@domain.com:5060;tag=231469dIr894 
 Call-ID: 
*020A3EA03A8@SFESIP4-id1-ext*CSeq: 1 INVITE Contact: 



I’m not sure if I do it right way because the packet (sip5) goes to 
10.250.242.74 with the source ip of public eth0 and not the one it 
should pass through to be able to come back.


What is the right way in my case to get the call through?

Thank you for all of your help,

Regards,

Ehrny



___
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] nat issue

2016-11-18 Thread Miha
I do not know if this is the case. But from what I can see what I 
register it on some Innovaphone PBX, innovaphone sends back in contact 
(200 ok) just ip of IPBX and also when INVITE is send in contact there 
is URI of PBX and only and it works.


i tried this but did not have any luck.

br
miha

On 18/11/2016 09:48, Bogdan-Andrei Iancu wrote:

Hi Miha,

You mean the UAC does not like the multi-URI Contact header in the 200 
OK  If so, that UAC is really broken as 1) breaks the SIP syntax 
(which allows it) and 2) breaks the the SIP Registration as per RFC3261.


What about the second contact (the one already existing in usrloc when 
this registration comes) ? can it be discarded ? If YES, you can try 
passing the "c1f" flags to save() :

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

That will make OpenSIPS to accept only 1 contact per AOR/user and any 
new contact will override the existing one.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.11.2016 10:15, Miha wrote:

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i 
can do in this case in OpenSIPS so that it will only reply with one 
URI in contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts only).

Are you sure your DB was sync'ed? OpenSIPS is periodically flushing 
the memory cache into the location table (see the "state" of the 
contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe about 
callings?) - for REGISTERs, any number of URIs are allowed AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and first 
will try  to register, 200 ok will will have contact of both phones?
In location table I can see only one registration for this user but 
for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC replay 
with Busy all the time due to two contacts (this what i have been 
told).


Ok, but if you look at rfc there is only one URI allowed in contact 
if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on 
contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", stale=true.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.


U UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKb5f2bbbf80e346f48.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d81135a8
8b92d0287a7460acce0a84e5d2a200b33",uri="sip:opsp.test.net:5060",res
ponse="9ce3622addeedf74622a23697e6f3728".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
S

Re: [OpenSIPS-Users] Memory free problem

2016-11-18 Thread Bogdan-Andrei Iancu

Hi Denis,

I do not think they are related. The warnings report some traffic 
anomalies - a PRACK request for a confirmed dialog (with 200 OK).


On the memory part, if the log is correct, it says you have 180M free. 
What are the ERROR line just after that log ? I want to see which was 
the module trying to allocate memory.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 17.11.2016 09:11, Denis wrote:

Memory free problem Hello!

Today i have a temporary problem with out of free memory (about 4 
minutes).
Unfortunately, i noticed the problem when everything became fine, so i 
didn`t make standard procedure of detecting problems with memory which 
has been described in documentation.


In syslog i see such sequence of events.

Before the first message about out of free memory

"ERROR:core:fm_malloc: not enough free shm memory (180803792 bytes 
left), please increase the "-m" command line parameter!"


i see many messages

"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c531c95f0 [3855:951170645] with clid 
'4gk2hpk433lgdt1d6ys7ifkwd@1.1.1.1' and tags '96x8v2xkj9of92j' 
'332693C-EF5'"
"WARNING:dialog:log_next_state_dlg: bogus event 5 in state 4 for dlg 
0x7f1c4735d130 [4072:1150064691] with clid 
'eht08t1eovzlqahle6xhfeiln@2.2.2.2' and tags '1czw3nbhw632pzn' 
'3326728-1DC1'"


dialing with two callid.

The question is, can such Warning influence on shm. allocation?

Thank you for any help.

mailto:denis7...@mail.ru


___
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] nat issue

2016-11-18 Thread Bogdan-Andrei Iancu

Hi Miha,

You mean the UAC does not like the multi-URI Contact header in the 200 
OK  If so, that UAC is really broken as 1) breaks the SIP syntax 
(which allows it) and 2) breaks the the SIP Registration as per RFC3261.


What about the second contact (the one already existing in usrloc when 
this registration comes) ? can it be discarded ? If YES, you can try 
passing the "c1f" flags to save() :

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

That will make OpenSIPS to accept only 1 contact per AOR/user and any 
new contact will override the existing one.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.11.2016 10:15, Miha wrote:

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i can 
do in this case in OpenSIPS so that it will only reply with one URI in 
contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts only).

Are you sure your DB was sync'ed? OpenSIPS is periodically flushing 
the memory cache into the location table (see the "state" of the 
contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe about 
callings?) - for REGISTERs, any number of URIs are allowed AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and first 
will try  to register, 200 ok will will have contact of both phones?
In location table I can see only one registration for this user but 
for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC replay 
with Busy all the time due to two contacts (this what i have been told).


Ok, but if you look at rfc there is only one URI allowed in contact 
if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", stale=true.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.


U UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKb5f2bbbf80e346f48.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d81135a8
8b92d0287a7460acce0a84e5d2a200b33",uri="sip:opsp.test.net:5060",res
ponse="9ce3622addeedf74622a23697e6f3728".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.
.


UOpenSIPS:5060 -> UAC:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKb5f2b
bbf80e346f48.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=766e4f757c55b3450
c9992a50fb64799-9163.
Call-ID: 61c67f739bef5a2e.
C

Re: [OpenSIPS-Users] nat issue

2016-11-18 Thread Bogdan-Andrei Iancu

Hi Miha,

In the "ul show" output, each contact has a "State" field:
State:: CS_SYNC
It can be CS_SYNC which means the contact from memory was synced to DB 
or CS_DIRTY which means the contact in memory was changed since the last 
sync to DB.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 17.11.2016 14:36, Miha wrote:

Hello Bogdan

how would I know that is marked as DIRTY? how this will look like?


tnx
miha

On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts only).

Are you sure your DB was sync'ed? OpenSIPS is periodically flushing 
the memory cache into the location table (see the "state" of the 
contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe about 
callings?) - for REGISTERs, any number of URIs are allowed AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and first 
will try  to register, 200 ok will will have contact of both phones?
In location table I can see only one registration for this user but 
for "opensipsctl ul show" it shows me two contacts, which is 
strange? (When i do trace only one invite is send) and UAC replay 
with Busy all the time due to two contacts (this what i have been told).


Ok, but if you look at rfc there is only one URI allowed in contact 
if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", stale=true.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.


U UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKb5f2bbbf80e346f48.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d81135a8
8b92d0287a7460acce0a84e5d2a200b33",uri="sip:opsp.test.net:5060",res
ponse="9ce3622addeedf74622a23697e6f3728".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.
.


UOpenSIPS:5060 -> UAC:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKb5f2b
bbf80e346f48.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=766e4f757c55b3450
c9992a50fb64799-9163.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Contact: ;expires=3600
;received="sip:UAC:5060",  ;expires=119.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.

Do you see where could be an issue?


tnx
miha


On 16/11/2016 08:11, Miha wrote:

Hello Bogdan

yes this was the case...

thank you!


br
miha

On 15/11/2016 18:35, Bogdan-Andrei Iancu wrote:

Hi Miha,

When you handle REGISTER requests (from behind NAT) most 
probably you use fix_nated_contact() instead of 
fix_nated_register().


Regards,
Bogdan-A

Re: [OpenSIPS-Users] nat issue

2016-11-18 Thread Miha

Hi Bogdan

I did few more test. This contact bothers UAC. Is there anything i can 
do in this case in OpenSIPS so that it will only reply with one URI in 
contact?


Contact:;expires=1518
;received="sip:84.41.125.21:5060",;
expires=180.


tnx so much!
MIha


On 17/11/2016 12:11, Bogdan-Andrei Iancu wrote:

Hi Miha,

yes, that is parallel forking (you may have more than 2 contacts only).

Are you sure your DB was sync'ed? OpenSIPS is periodically flushing 
the memory cache into the location table (see the "state" of the 
contact (as per "ul show") if marked as DIRTY).


In regards to RFC, I think you quote the wrong section (maybe about 
callings?) - for REGISTERs, any number of URIs are allowed AFAIK.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:35, Miha wrote:

Bodan

so this is dual forking...?
So if you have one account and you have two phones on it and first 
will try  to register, 200 ok will will have contact of both phones?
In location table I can see only one registration for this user but 
for "opensipsctl ul show" it shows me two contacts, which is strange? 
(When i do trace only one invite is send) and UAC replay with Busy 
all the time due to two contacts (this what i have been told).


Ok, but if you look at rfc there is only one URI allowed in contact 
if I understand this right?



The Contact header field MUST be present and contain exactly one SIP
or SIPS URI in any request that can result in the establishment of a
dialog

Please correct me if I am wrong. tnx so much! Miha

On 17/11/2016 11:22, Bogdan-Andrei Iancu wrote:

Hi Miha,

OpenSIPS returns in the 200 OK for a REGISTER all the valid 
registrations for that user (for all the devices the user may have).


I guess your user has 2 registrations, so the 200 OK will report 
back both of them. You can check via "opensipsctl ul show"


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 17.11.2016 12:13, Miha wrote:

Hello Bogdan

i changed this and it works in all cases, only in one I noticed 
today this (Opensips reply only in this case with two URI on contact):


 UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKa40225bd7495297c6.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d810c58b
d73adccf0d455c2a2159b3a3403c1f7a3",uri="sip:opsp.test.net:5060",res
ponse="bc0c757c17f9b0976af35ec633dd83ca".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.

UOpenSIPS:5060 -> UAC:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKa4022
5bd7495297c6.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=0c7ff67d927afc274
b272138ce65100a.ac4d.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289391 REGISTER.
WWW-Authenticate: Digest realm="opsp.test.net",
nonce="582d81135a88b92d0287a7460acce0a84e5d2a200b33", stale=true.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.


U UAC:5060 ->OpenSIPS:5060
REGISTER sip:opsp.test.net:5060 SIP/2.0.
Via: SIP/2.0/UDP opsp.test.net;branch=z9hG4bKb5f2bbbf80e346f48.
Max-Forwards: 70.
From: 042335040 ;tag=1f62205074.
To: 042335040 .
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
PRACK, INFO.
Authorization: Digest
username="99942335040",realm="opsp.test.net",nonce="582d81135a8
8b92d0287a7460acce0a84e5d2a200b33",uri="sip:opsp.test.net:5060",res
ponse="9ce3622addeedf74622a23697e6f3728".
Contact: 042335040 ;ex
pires=3600.
Privacy: none.
Supported: path.
User-Agent: Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2.
Content-Length: 0.
.


UOpenSIPS:5060 -> UAC:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
opsp.test.net;received=UAC;rport=5060;branch=z9hG4bKb5f2b
bbf80e346f48.
From: 042335040 ;tag=1f62205074.
To: 042335040 ;tag=766e4f757c55b3450
c9992a50fb64799-9163.
Call-ID: 61c67f739bef5a2e.
CSeq: 1804289392 REGISTER.
Contact: ;expires=3600
;received="sip:UAC:5060",  ;expires=119.
Server: OpenSIPS (1.10.0beta-tls (x86_64/linux)).
Content-Length: 0.

Do you see where could be an issue?


tnx
miha


On 16/11/2016 08:11, Miha wrote:

Hello Bogdan

yes this was the case...

thank you!


br
miha

On 15/11/2016 18:35, Bogdan-Andrei Iancu wrote:

Hi Miha,

When you handle REGISTER requests (from behind NAT) most probably 
you use fix_nated_contact() instead of fix_nated_register().


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 15.11.2016 09:11, Miha wrote:

Hello

i need one info.
I have one phone behind NAT and it is registered on OpenSIPS. IN 
register pack