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

2016-11-21 Thread Maciej Bylica
Ok, i figured it out, that the problem relies in port number definition.
I am getting no issues with 11211.

Thanks
Maciej

2016-11-21 22:20 GMT+01:00 Maciej Bylica :

> Hi Bogdan,
>
> Thanks for the reply.
>
> It seems it is related to the key, it doesn't matter which query is it.
> First query on the second key does not change anything.
> I've just added additional key 49101112233 and it works (query was fired),
> but 49331112233 does not.
>
> Thanks
> Maciej.
>
>
> 2016-11-21 12:59 GMT+01:00 Bogdan-Andrei Iancu :
>
>> Hi Maciej,
>>
>> Thanks for the detailed report.
>>
>> Do you think the error is related to the key you are trying to fetch or
>> is it related to the simply being the second query you perform ?  What if
>> you perform from the very beginning a a query on the second key ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 18.11.2016 19:53, Maciej Bylica wrote:
>>
>> 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

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

2016-11-21 Thread Maciej Bylica
Hi Bogdan,

Thanks for the reply.

It seems it is related to the key, it doesn't matter which query is it.
First query on the second key does not change anything.
I've just added additional key 49101112233 and it works (query was fired),
but 49331112233 does not.

Thanks
Maciej.


2016-11-21 12:59 GMT+01:00 Bogdan-Andrei Iancu :

> Hi Maciej,
>
> Thanks for the detailed report.
>
> Do you think the error is related to the key you are trying to fetch or is
> it related to the simply being the second query you perform ?  What if you
> perform from the very beginning a a query on the second key ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.11.2016 19:53, Maciej Bylica wrote:
>
> 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.

Re: [OpenSIPS-Users] nat issue

2016-11-21 Thread Miha

Hello Bogdan

i think it is no need to do that if this client is broken. You already 
doing so much good with opensips ;)


Tnx so much with all explanation and all you work!
Miha

On 21/11/2016 11:13, Bogdan-Andrei Iancu wrote:

Hi Miha,

According the SIP grammar, that parameter is perfectly legitimate. The 
client is broken as it is not able to cope with it (in the worst case, 
to simply ignore it).


There is no out of the box way to disable it, but I may provide you a 
patch for that - just to see if that fixes your problem.


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

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

Re: [OpenSIPS-Users] $ai transformation

2016-11-21 Thread Ehrny
Hi Răzvan,
Thanks for your help.
The call needs to be done through multi homed OpenSIPs  (I don’t use mhomed 
flag)
Caller  -> Carrier1 -> OpenSIPs(eth1)---OpenSIPs(eth0) -> pbx -> Callee

$var(upstream1) = $(hdr(Via)[0]{via.host}); returned the IP  address I 
needed

OpenSIPs(eth1) has private IP , so on requests I use   
force_send_socket(udp:OpenSIPs_PUB_IP:5060)  to be able to send call to further 
destinations. When replies are back I need to change send _socket back to 
privateIP for the answers to Carrier1.

I’ve got the IP address of the Carrier1 in the onreply_route .

onreply_route[1] {
…
if ($(var(upstream1)) == "10.250.242.74") {
force_send_socket(udp:10.197.26.170:5060);
}
…
}

It doesn’t seem to change ip address for replies .

Would you please advise me how to change send_socket in onreply_route ?

Kind regards,
Ehrny



From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Monday, November 21, 2016 1:32 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] $ai transformation

Hi, Ehrny!

You need the IP address of whom? Caller? Callee?
$rd is null because a reply does not have a R-URI. Perhaps the reply doesn't 
have a received parameter in the reply either, that's why it is empty.

Best regards,


Răzvan Crainea

OpenSIPS Solutions

www.opensips-solutions.com
On 11/21/2016 12:13 PM, Ehrny wrote:
Hello Răzvan,
I need to do some routing in onreply_route[] based on destination IP.
Tried  $rd with no avail , it returns null
If I get you right regarding context, the var$var(upstream0) = 
$(hdr(Via)[0]{via.received});   Is empty also.
What is the right way to get an IP address in replies and do further routing?
Kind regards,
Ehrny


From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Monday, November 21, 2016 11:50 AM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] $ai transformation

Hi, Ehrny!

You don't need to use contexts in the onreply_route[], because that route is 
already ran in the context of the reply message.

Best regards,



Răzvan Crainea

OpenSIPS Solutions

www.opensips-solutions.com

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


Re: [OpenSIPS-Users] Possible Memory Leak in rest_client module.

2016-11-21 Thread Bogdan-Andrei Iancu

Hi Jim,

sorry for the late reply. Unfortunately the memory debugging is not 
properly enabled. What version of OpenSIPS are you using there ?


Regards,

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

On 14.11.2016 16:20, Jim DeVito wrote:

Hi Bogdan,

Took about a week in production for the problem to crop up again so I 
was able to get the mem dump. I hope this can provide you some 
insight. Let me know if you need anything else.


http://pastebin.com/WQWqhhiA

Thanks!!

---
Jim DeVito

On 2016-11-07 12:04, Bogdan-Andrei Iancu wrote:

Hi Jim,

Please see
http://www.opensips.org/Documentation/TroubleShooting-OutOfMem - let
me know if you managed to get the mem dump.

Regards,

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

On 07.11.2016 21:20, Jim DeVito wrote:

Hi All,

This happened prior to 2.2.2 and I thought I saw a bug report that 
was fixed in 2.2.2. However it still seems to be a thing with using 
the res_curl module. After about a week I get this...


Nov  7 13:33:44 sip-proxy01 opensips: Nov  7 13:33:44 [20811] 
ERROR:core:fm_malloc: not enough free pkg memory (4296 bytes left), 
please increase the "-M" command line parameter!
Nov  7 13:33:44 sip-proxy01 opensips: Nov  7 13:33:44 [20811] 
INFO:core:fm_malloc: attempting defragmentation... (need 1808 bytes)
Nov  7 13:33:44 sip-proxy01 opensips: Nov  7 13:33:44 [20811] 
INFO:core:fm_malloc: unable to alloc a big enough fragment!
Nov  7 13:33:44 sip-proxy01 opensips: Nov  7 13:33:44 [20811] 
ERROR:rest_client:rest_get_method: curl_easy_perform: Out of memory


I reboot and all is well for another week. Like res_client is not 
releasing the memory it is using. shmem:used_size:: seems to always 
be going up until it runs out of the memory I allotted with the -M 
switch. What else can I do to see where this is coming from?


Thanks!!




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


[OpenSIPS-Users] Want to create opensips subscriber from restful api or from web application

2016-11-21 Thread vishal dubey
Hi Team,
I want to create opensips subscriber from other web application. I think it is 
possible through pi_httpd or db_httpd. but i am not able to find any example 
hot to do this.
Please help.
Thanks,Vishal___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to configure two different domain in listen .

2016-11-21 Thread Bogdan-Andrei Iancu

Hi Sasmita,

The URI in RR header is dictated by the interfaces / listeners involved 
in routing the call.


In your case, on which interface is the call received ? on .xxx or .xyy ?

Regards,

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

On 21.11.2016 13:26, Sasmita Panda wrote:

Hi All ,

 I am using opensips-1.11 . I need to configure multiple domains 
in the listen field and I want the particular domain get exposed to 
outside depending upon the request .



bellow is my config file .

listen=10.165.yy.xxx:5507 AS test1.i3clogic.com:5507 



listen=10.165.yy.xyy:5507 AS test2.i3clogic.com:5507 



alias="test1.i3clogic.com "
alias="test1.i3clogic.com:5507 "

alias="test2.i3clogic.com "
alias="test2.i3clogic.com:5507 "

  So what I want is , When an Invite comes with request uri 
 "test2.i3clogic.com " , then it should add 
the same domain in the Record_route while forwarding the call .


 But now its adding "test1.i3clogic.com 
" domain always . I think it giving 
priority to the listen domain added first .


 How can i achieve my goal . Is this possible or not . If possible 
then how can I do this .



*/Thanks & Regards/*
/Sasmita Panda/
/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] CACHEDB_MEMCACHED Module - libmemcached undefined symbol issue

2016-11-21 Thread Bogdan-Andrei Iancu

Hi Maciej,

Thanks for the detailed report.

Do you think the error is related to the key you are trying to fetch or 
is it related to the simply being the second query you perform ?  What 
if you perform from the very beginning a a query on the second key ?


Regards,

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

On 18.11.2016 19:53, Maciej Bylica wrote:

Hello

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


netstat -plnt | grep 

tcp 0  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 followingcache_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 Developer
http://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
mailto:bog...@opensips.org>>:

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 Developer
http://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 list
Users@lists.opensips.org 

[OpenSIPS-Users] How to configure two different domain in listen .

2016-11-21 Thread Sasmita Panda
Hi All ,

 I am using opensips-1.11 . I need to configure multiple domains in the
listen field and I want the particular domain get exposed to outside
depending upon the request .


bellow is my config file .

listen=10.165.yy.xxx:5507 AS test1.i3clogic.com:5507

listen=10.165.yy.xyy:5507 AS test2.i3clogic.com:5507

alias="test1.i3clogic.com"
alias="test1.i3clogic.com:5507"

alias="test2.i3clogic.com"
alias="test2.i3clogic.com:5507"


  So what I want is , When an Invite comes with request uri  "
test2.i3clogic.com" , then it should add the same domain in the
Record_route while forwarding the call .

 But now its adding "test1.i3clogic.com" domain always . I think it
giving priority to the listen domain added first .

 How can i achieve my goal . Is this possible or not . If possible then
how can I do this .



*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memory free problem

2016-11-21 Thread Bogdan-Andrei Iancu
Denis, please try this and see if the PRACK gets routed correctly (and 
you should also get rid of the warnings and memory issues).


Regards,

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

On 21.11.2016 13:22, Denis wrote:

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

Yes, sure, i will test it.

Server:: OpenSIPS (2.2.1 (x86_64/linux))

mailto:denis7...@mail.ru


Hi Denis,

Yes, I see you use Topo Hiding, and as the PRACK is after the 200 OK + 
ACK, OpenSIPS dialog module does not match the PRACK -> it sticks to 
the OpenSIPS IP and loops on it.


If I send you a small patch (to allow PRACK inside dialog) could you 
test it ?


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.11.2016 10:24, Denis wrote:

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

Yes, the ngrep shows that PRACK has been received, but not sent to 
dest SIP UA.

The question is, why "is looping big time on your OpenSIPS"?

Here you can find SIP log  of one of the call, mentioned early, with 
callid '4gk2hpk433lgdt1d6ys7ifkwd 
'

https://cloud.mail.ru/public/BvpZ/SJHLQmqEZ

In the log:
1.1.1.1 - Caller
2.2.2.2 - Opensips
3.3.3.3 - Callee

Top hiding has been applied for this call.

Thank you.

mailto:denis7...@mail.ru


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



diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index d8c8be1..92b9844 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -1004,6 +1004,7 @@ void next_state_dlg(struct dlg_cell *dlg, int event, int 
dir, int *old_state,
switch (dlg->state) {
case DLG_STATE_EARLY:
case DLG_STATE_CONFIRMED_NA:
+   case DLG_STATE_CONFIRMED:
break;
default:
log_next_state_dlg(event, dlg);
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memory free problem

2016-11-21 Thread Denis
Hello, Bogdan!

Yes, sure, i will test it.

Server:: OpenSIPS (2.2.1 (x86_64/linux))

mailto:denis7...@mail.ru


Hi Denis,

Yes, I see you use Topo Hiding, and as the PRACK is after the 200 OK + ACK, 
OpenSIPS dialog module does not match the PRACK -> it sticks to the OpenSIPS IP 
and loops on it.

If I send you a small patch (to allow PRACK inside dialog) could you test it ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.11.2016 10:24, Denis wrote:

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

Yes, the ngrep shows that PRACK has been received, but not sent to dest SIP UA.
The question is, why "is looping big time on your OpenSIPS"?

Here you can find SIP log  of one of the call, mentioned early, with callid 
'4gk2hpk433lgdt1d6ys7ifkwd'
https://cloud.mail.ru/public/BvpZ/SJHLQmqEZ

In the log:
1.1.1.1 - Caller 
2.2.2.2 - Opensips
3.3.3.3 - Callee

Top hiding has been applied for this call.

Thank you.

mailto:denis7...@mail.ru


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] Memory free problem

2016-11-21 Thread Bogdan-Andrei Iancu

Hi Denis,

Yes, I see you use Topo Hiding, and as the PRACK is after the 200 OK + 
ACK, OpenSIPS dialog module does not match the PRACK -> it sticks to the 
OpenSIPS IP and loops on it.


If I send you a small patch (to allow PRACK inside dialog) could you 
test it ?


Regards,

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

On 21.11.2016 10:24, Denis wrote:

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

Yes, the ngrep shows that PRACK has been received, but not sent to 
dest SIP UA.

The question is, why "is looping big time on your OpenSIPS"?

Here you can find SIP log  of one of the call, mentioned early, with 
callid '4gk2hpk433lgdt1d6ys7ifkwd 
'

https://cloud.mail.ru/public/BvpZ/SJHLQmqEZ

In the log:
1.1.1.1 - Caller
2.2.2.2 - Opensips
3.3.3.3 - Callee

Top hiding has been applied for this call.

Thank you.

mailto:denis7...@mail.ru


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

2016-11-21 Thread Răzvan Crainea

Hi, Ehrny!

You need the IP address of whom? Caller? Callee?
$rd is null because a reply does not have a R-URI. Perhaps the reply 
doesn't have a received parameter in the reply either, that's why it is 
empty.


Best regards,

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

On 11/21/2016 12:13 PM, Ehrny wrote:


Hello Răzvan,

I need to do some routing in onreply_route[] based on destination IP.

Tried  $rd with no avail , it returns null

If I get you right regarding context, the var$var(upstream0) = 
$(hdr(Via)[0]{via.received});   Is empty also.


What is the right way to get an IP address in replies and do further 
routing?


Kind regards,

Ehrny

*From:*users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Razvan Crainea

*Sent:* Monday, November 21, 2016 11:50 AM
*To:* users@lists.opensips.org
*Subject:* Re: [OpenSIPS-Users] $ai transformation

Hi, Ehrny!

You don't need to use contexts in the onreply_route[], because that 
route is already ran in the context of the reply message.


Best regards,


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

On 11/19/2016 10:40 PM, Ehrny wrote:

Dear Răzvan,

… I’ve tried to add variable to onreply_route[1]

$var(upstream0) = $(hdr(Via)[0]{via.param,received});

xlog("upstream0  =  $var(upstream0) \n");

and in the log I get critical alert:

CRITICAL:tm:tm_pv_context_reply: no picked branch (-1) for a final
response

*From:*users-boun...@lists.opensips.org

[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Ehrny
*Sent:* Saturday, November 19, 2016 2:06 PM
*To:* OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] $ai transformation

Hi Răzvan,

I gues so.

I’ve got  t_on_reply("1");   in the route

and at the end of the script there is:

onreply_route[1] {

force_send_socket(udp:10.197.26.170:5060);

}

But it doesn’t seem to change send_socket back to priv IP addr ((

Kind regards,

Ehrny

*From:*users-boun...@lists.opensips.org

[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Razvan
Crainea
*Sent:* Friday, November 18, 2016 12:22 PM
*To:* users@lists.opensips.org 
*Subject:* Re: [OpenSIPS-Users] $ai transformation

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

Re: [OpenSIPS-Users] nat issue

2016-11-21 Thread Bogdan-Andrei Iancu

Hi Miha,

According the SIP grammar, that parameter is perfectly legitimate. The 
client is broken as it is not able to cope with it (in the worst case, 
to simply ignore it).


There is no out of the box way to disable it, but I may provide you a 
patch for that - just to see if that fixes your problem.


Regards,

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

On 18.11.2016 19:54, Miha wrote:

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="bc0c757c17f9b0976af35ec6

Re: [OpenSIPS-Users] $ai transformation

2016-11-21 Thread Ehrny
Hello Răzvan,
I need to do some routing in onreply_route[] based on destination IP.
Tried  $rd with no avail , it returns null
If I get you right regarding context, the var$var(upstream0) = 
$(hdr(Via)[0]{via.received});   Is empty also.
What is the right way to get an IP address in replies and do further routing?
Kind regards,
Ehrny


From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Monday, November 21, 2016 11:50 AM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] $ai transformation

Hi, Ehrny!

You don't need to use contexts in the onreply_route[], because that route is 
already ran in the context of the reply message.

Best regards,



Răzvan Crainea

OpenSIPS Solutions

www.opensips-solutions.com
On 11/19/2016 10:40 PM, Ehrny wrote:
Dear Răzvan,
… I’ve tried to add variable to onreply_route[1]
$var(upstream0) = $(hdr(Via)[0]{via.param,received});
xlog("upstream0  =  $var(upstream0) \n");

and in the log I get critical alert:
CRITICAL:tm:tm_pv_context_reply: no picked branch (-1) for a final response




From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ehrny
Sent: Saturday, November 19, 2016 2:06 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] $ai transformation

Hi Răzvan,
I gues so.
I’ve got  t_on_reply("1");   in the route

and at the end of the script there is:

onreply_route[1] {
force_send_socket(udp:10.197.26.170:5060);
}

But it doesn’t seem to change send_socket back to priv IP addr ((

Kind regards,
Ehrny




From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Friday, November 18, 2016 12:22 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] $ai transformation

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

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


Re: [OpenSIPS-Users] $ai transformation

2016-11-21 Thread Răzvan Crainea

Hi, Ehrny!

You don't need to use contexts in the onreply_route[], because that 
route is already ran in the context of the reply message.


Best regards,

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

On 11/19/2016 10:40 PM, Ehrny wrote:


Dear Răzvan,

… I’ve tried to add variable to onreply_route[1]

$var(upstream0) = $(hdr(Via)[0]{via.param,received});

xlog("upstream0  =  $var(upstream0) \n");

and in the log I get critical alert:

CRITICAL:tm:tm_pv_context_reply: no picked branch (-1) for a final 
response


*From:*users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Ehrny

*Sent:* Saturday, November 19, 2016 2:06 PM
*To:* OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] $ai transformation

Hi Răzvan,

I gues so.

I’ve got  t_on_reply("1");   in the route

and at the end of the script there is:

onreply_route[1] {

force_send_socket(udp:10.197.26.170:5060);

}

But it doesn’t seem to change send_socket back to priv IP addr ((

Kind regards,

Ehrny

*From:*users-boun...@lists.opensips.org 
 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Razvan Crainea

*Sent:* Friday, November 18, 2016 12:22 PM
*To:* users@lists.opensips.org 
*Subject:* Re: [OpenSIPS-Users] $ai transformation

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


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


Re: [OpenSIPS-Users] Memory free problem

2016-11-21 Thread Denis
Hello, Bogdan!

Yes, the ngrep shows that PRACK has been received, but not sent to dest SIP UA.
The question is, why "is looping big time on your OpenSIPS"?

Here you can find SIP log  of one of the call, mentioned early, with callid 
'4gk2hpk433lgdt1d6ys7ifkwd'
https://cloud.mail.ru/public/BvpZ/SJHLQmqEZ

In the log:
1.1.1.1 - Caller 
2.2.2.2 - Opensips
3.3.3.3 - Callee

Top hiding has been applied for this call.

Thank you.

mailto:denis7...@mail.ru


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