Re: [OpenSIPS-Users] Opensips + rtpengine + Sipml5 webrtc

2016-06-23 Thread sevpal
Take a look at the “fingerprint:” line. 

From: John Nash 
Sent: Thursday, June 23, 2016 3:42 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Opensips + rtpengine + Sipml5 webrtc

Actually the issue is i hear no audio on either side and just after session 
progress (I guess when media starts coming from remote media server) i see 
error "SRTP output wanted, but no crypto suite was negotiated" 


I had also checked media logs i could see RTP packets being sent from 
freeswitch to RTPengine IP but there was no packet at all just after that. 
Ideally after RTP packet from freeswitch to rtpengine, Rtpengine should send 
that packet to browser using wss?

On Fri, Jun 24, 2016 at 1:05 AM, Eric Tamme  wrote:

  So - i dont see a problem here - Chrome is getting UDP/TLS/RTP/SAVPF and 
Freeswitch is getting RTP/AVP.  Freeswitch responded to the offer in the invite 
with an answer in the 183, and in the 200.  What is the failure you are seeing, 
and where is it happening (in freeswitch? in the browser?)

  The only thing that looks bad is that you are retransmitting the ACK which FS 
either ... doesnt like, or is never getting,  because it keeps retransmitting 
the 200, which is why you get a 481 when you send BYE.

  -Eric 



  On 06/23/2016 01:24 PM, John Nash wrote:

OK here is the log 
https://gist.github.com/johnnash13/0d2cb5238f3551cd3a8c6b4e638dd744 

Sorry took me a while to convert wireshark trace to text file.

My freeswitch is running on private IP (127.0.0.1) and opensips I run on 
both public and private so that for outside world opensips is the only public 
IP they see. In proxy log I pasted Opensips ===> Freeswitch logs and back.






On Fri, Jun 24, 2016 at 12:43 AM, Eric Tamme  wrote:

  No - it's annoying to look at a trace that's had information removed and 
try and piece together whats happening.  Your paranoid side is wrong, sorry.

  -Eric 



  On 06/23/2016 01:06 PM, Patrick Wakano wrote:

my paranoic side would recommend to hide/change private informations, 
specially any authentication line that might appear... this is certainly a sort 
of social engineering threat we should worry...

better be safe than sorry



On Thu, Jun 23, 2016 at 3:31 PM, Eric Tamme  wrote:

  I mean you can use a private gist, but you will be publishing the 
link in a public email list.  In general I personally dont believe revealing ip 
addresses etc. is any problem - to put my money where my mouth is here is a 
gist link to an unaltered SIP trace on my server :)

  https://gist.github.com/etamme/b864010448a29007b7e0457682e81d52

  -Eric 



  On 06/23/2016 12:23 PM, John Nash wrote:

Ok i am ready with logs. About gist may I use private option as 
traces have our IPs, user

On Thu, Jun 23, 2016 at 10:32 PM, Eric Tamme  
wrote:

  Hey John,

  Please paste a full UNALTERED sip trace into a gist 
(gist.github.com) from the proxy servers perspective and provide a link so that 
we can see what comes in, and what goes out from both sides.

  EG: ngrep -qtd any -W byline port 5060

  This will show us the traffic that is leaving the proxy destined 
for the Freeswitch box, and what the freeswitch box sends back.

  Also - you can look in your browsers console log and provide the 
SIP trace from there in a seperate gist, so that we can see what opensips sends 
back up to your browser.

  -Eric 



Am I using correct sip.js example? I copied it to my server and 
accessing it using https: (used letsencrypt)

On Thu, Jun 23, 2016 at 7:58 PM, Eric Tamme  
wrote:

  1. I would suggest using SIP.js - 
https://github.com/onsip/SIP.js it is a much more active project that sipml5.

  2. Im guessing that you are not properly passing flags to 
RTPEngine.  If you want to have DTLS-SRTP between the browser, and plain 
RTP/AVP between RTPEngine and freeswitch, you need to "offer" rtp/avp to 
freeswitch, and "answer" dtls-srtp back up to the browser.

  the offer to freeswitch would be:  

$var(rtpengine_flags) = "RTP/AVP replace-session-connection 
replace-origin ICE=remove";

and the answer back up to the browswer would be:


$var(rtpengine_flags) = "UDP/TLS/RTP/SAVPF ICE=force";
  -Eric 




  On 06/23/2016 08:20 AM, John Nash wrote:

I am following 
http://www.opensips.org/Documentation/Tutorials-WebSocket-2-2 and trying to 
test a call  

sipml5 --->Opensips + rtpengine > SIP end 
point (Freeswitch)


But I do not have any audio on both sides. I see this error 
at rtpengine log "SRTP output wanted, but no crypto suite was negotiated"


Anyone tested this scenario positive?

 

__

Re: [OpenSIPS-Users] Opensips + rtpengine + Sipml5 webrtc

2016-06-23 Thread sevpal
Hi, the rtpengine cannot negotiate SRTP between the two points, both must 
support the same cryptography and protocol. eg; SRTP to SRTP , DTLS/SRTP to 
DTLS/SRTP cipher 128 to 128 and 256 to 256.

You can print the request body ($rb) on the INVITE with “application/sdp” and 
visually compare the exchange, do this on offer and answer.

From: John Nash 
Sent: Thursday, June 23, 2016 3:42 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Opensips + rtpengine + Sipml5 webrtc

Actually the issue is i hear no audio on either side and just after session 
progress (I guess when media starts coming from remote media server) i see 
error "SRTP output wanted, but no crypto suite was negotiated" 


I had also checked media logs i could see RTP packets being sent from 
freeswitch to RTPengine IP but there was no packet at all just after that. 
Ideally after RTP packet from freeswitch to rtpengine, Rtpengine should send 
that packet to browser using wss?

On Fri, Jun 24, 2016 at 1:05 AM, Eric Tamme  wrote:

  So - i dont see a problem here - Chrome is getting UDP/TLS/RTP/SAVPF and 
Freeswitch is getting RTP/AVP.  Freeswitch responded to the offer in the invite 
with an answer in the 183, and in the 200.  What is the failure you are seeing, 
and where is it happening (in freeswitch? in the browser?)

  The only thing that looks bad is that you are retransmitting the ACK which FS 
either ... doesnt like, or is never getting,  because it keeps retransmitting 
the 200, which is why you get a 481 when you send BYE.

  -Eric 



  On 06/23/2016 01:24 PM, John Nash wrote:

OK here is the log 
https://gist.github.com/johnnash13/0d2cb5238f3551cd3a8c6b4e638dd744 

Sorry took me a while to convert wireshark trace to text file.

My freeswitch is running on private IP (127.0.0.1) and opensips I run on 
both public and private so that for outside world opensips is the only public 
IP they see. In proxy log I pasted Opensips ===> Freeswitch logs and back.






On Fri, Jun 24, 2016 at 12:43 AM, Eric Tamme  wrote:

  No - it's annoying to look at a trace that's had information removed and 
try and piece together whats happening.  Your paranoid side is wrong, sorry.

  -Eric 



  On 06/23/2016 01:06 PM, Patrick Wakano wrote:

my paranoic side would recommend to hide/change private informations, 
specially any authentication line that might appear... this is certainly a sort 
of social engineering threat we should worry...

better be safe than sorry



On Thu, Jun 23, 2016 at 3:31 PM, Eric Tamme  wrote:

  I mean you can use a private gist, but you will be publishing the 
link in a public email list.  In general I personally dont believe revealing ip 
addresses etc. is any problem - to put my money where my mouth is here is a 
gist link to an unaltered SIP trace on my server :)

  https://gist.github.com/etamme/b864010448a29007b7e0457682e81d52

  -Eric 



  On 06/23/2016 12:23 PM, John Nash wrote:

Ok i am ready with logs. About gist may I use private option as 
traces have our IPs, user

On Thu, Jun 23, 2016 at 10:32 PM, Eric Tamme  
wrote:

  Hey John,

  Please paste a full UNALTERED sip trace into a gist 
(gist.github.com) from the proxy servers perspective and provide a link so that 
we can see what comes in, and what goes out from both sides.

  EG: ngrep -qtd any -W byline port 5060

  This will show us the traffic that is leaving the proxy destined 
for the Freeswitch box, and what the freeswitch box sends back.

  Also - you can look in your browsers console log and provide the 
SIP trace from there in a seperate gist, so that we can see what opensips sends 
back up to your browser.

  -Eric 



Am I using correct sip.js example? I copied it to my server and 
accessing it using https: (used letsencrypt)

On Thu, Jun 23, 2016 at 7:58 PM, Eric Tamme  
wrote:

  1. I would suggest using SIP.js - 
https://github.com/onsip/SIP.js it is a much more active project that sipml5.

  2. Im guessing that you are not properly passing flags to 
RTPEngine.  If you want to have DTLS-SRTP between the browser, and plain 
RTP/AVP between RTPEngine and freeswitch, you need to "offer" rtp/avp to 
freeswitch, and "answer" dtls-srtp back up to the browser.

  the offer to freeswitch would be:  

$var(rtpengine_flags) = "RTP/AVP replace-session-connection 
replace-origin ICE=remove";

and the answer back up to the browswer would be:


$var(rtpengine_flags) = "UDP/TLS/RTP/SAVPF ICE=force";
  -Eric 




  On 06/23/2016 08:20 AM, John Nash wrote:

I am following 
http://www.opensips.org/Documentation/Tutorials-WebSocket-2-2 and trying to 
test a call  

sipml5 --->Opensips + rtpengin

Re: [OpenSIPS-Users] How to invok lookup() and get attr from the caller, without side effects?

2016-06-21 Thread sevpal
Hi, have you tried/considered running a simple query on the database and 
parsing for the information you need?

From: Rodrigo Pimenta Carvalho 
Sent: Tuesday, June 21, 2016 10:39 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] How to invok lookup() and get attr from the 
caller, without side effects?

Hi Răzvan.



I have tried that idea. But that didn't work. The SIP INVITE message is being 
changed by the OpenSIPS in a wrong way, in my point of view.

Do you know some way to save the entire SIP INVITE message before calling 
lookup() and then make the saved message take place after the lookup() 
execution?



My original message is:



INVITE sip:6...@mydomain.com.br SIP/2.0
Via: SIP/2.0/TCP 192.168.21.40:5090;rport;branch=z9hG4bK876727215
From: ;tag=179920819
To: 
Call-ID: 1410250893
CSeq: 21 INVITE
Contact: 
Proxy-Authorization: Digest username="crdphmacl_SPnuV5xqtnSX", 
realm="localhost", nonce="5769458c01cc263a7c0d6995dc48d42288ec6f8e4048", 
uri="sip:6...@mydomain.com.br", response="0f4c122d2a0a28dea6194c235cd77430", 
algorithm=MD5
Content-Type: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Max-Forwards: 70
User-Agent: Linphone/3.6.1 (eXosip2/4.0.0)
Subject: Phone call
Content-Length:   227


This is being changed to:



INVITE 
sip:crdphmacl_SPnuV5xqtnSX@131.221.240.204:60672;transport=tcp;line=c6356a7d87d6f81
 SIP/2.0
Record-Route: 
Via: SIP/2.0/TCP myDomain.com.br:5060;branch=z9hG4bKe2db.49d54587.0;i=1
Via: SIP/2.0/TCP 
192.168.21.40:5090;received=xxx.yyy.240.204;rport=60672;branch=z9hG4bK716249970
From: ;tag=12586028
To: 
Call-ID: 1106771604
CSeq: 21 INVITE
Contact: 
Content-Type: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Max-Forwards: 70
User-Agent: Linphone/3.6.1 (eXosip2/4.0.0)
Subject: Phone call
Content-Length:   224


So, the caller is receiving its own SIP INVITE.


That is why when A calls B, is A that rings, not B.



It is becoming a bit complicated. So, I suspect I'm going to the incorrect 
direction 




Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979







De: users-boun...@lists.opensips.org  em nome 
de Răzvan Crainea 
Enviado: terça-feira, 21 de junho de 2016 04:24
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to invok lookup() and get attr from the 
caller, without side effects? 

Hi, Rodrigo!




Have you tried restoring the R-URI after the caller lookup? Something like:




$var(ru) = $ru;

lookup("location", "", "$fu"); # this takes the caller from FROM uri, which I 
think is more suitable than from contact uri

$ru = $var(ru);

# continue your processing here




# now do the real lookup for the callee

lookup("location");




Don't do the lookups in the reversed way, because you might loose some contacts.




Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.comHome — OpenSIPS Solutions
  www.opensips-solutions.com
  OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS 
is more than a SIP proxy/router as it includes application-level 
functionalities. 

On 06/20/2016 09:02 PM, Rodrigo Pimenta Carvalho wrote:

  Dear OpenSIPS-users,



  The table location has the column attr where I use to store specific 
additional information for each registration.

  Whenever A calls B, I have to read this specific information from the A 
record and from the B record. That is, I need to get and handle specific 
information about the caller and callee.



  For the callee, I use to invoke the lookup("location") function that put the 
needed information in the attr_avp. That is good and works very well. Then, I 
just have to read the attr_avp to get such specific information.



  For the caller, I use to invoke:



  $var(aorChamador) = $(ct.fields(uri));

  lookup("location","","$var(aorChamador)");




  However it causes amazing side effect in the SIP signaling. Ex: When A calls 
B, B stays quiet and A rings. So A can answer A. Crazy!

  According to the documentation, lookup will overwritten the Request-URI. I 
guess that is why the SIP signaling become incoherent.




  How could I get the caller attr specific information without side effects?




  Any hint will be very helpful!!




  Best regards.




  RODRIGO PIMENTA CARVALHO
  Inatel Competence Center
  Software
  Ph: +55 35 3471 9200 RAMAL 979


   

___
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 mai

Re: [OpenSIPS-Users] Connecting to mongodb Replica set from opensips .

2016-06-01 Thread sevpal
Hi, some modules are not safe to use with mongodb, namely; acc (Cannot write to 
missed_call), msilo (Does not delete stored messages after sent), avpops(do not 
recall the issue with this one) and there may be others.

To connect to the replica set (Minimum 3 replicas for proper master election):
All the modules (cachedb_mongodb.so, db_cachedb.so etc.) should point to the 
same db name in the xdb_url module parameter.

loadmodule "cachedb_mongodb.so"
loadmodule "db_cachedb.so"  
modparam("cachedb_mongodb", 
"cachedb_url","mongodb:replicaset1://root:password@1.2.3.4:27017,2.3.4.5:27017,5.5.5.5:27017,/jack.db.CallCenter_Info")
modparam("db_cachedb","cachedb_url","mongodb:replicaset1://root:password@1.2.3.4:27017,2.3.4.5:27017,5.5.5.5:27017,/jack.db.CallCenter_Info")


loadmodule "usrloc.so"  
modparam("usrloc", 
"db_url","mongodb:replicaset1://root:password@1.2.3.4:27017,2.3.4.5:27017,5.5.5.5:27017,/jack.db.CallCenter_Info")

Use the mongo slave_ok,1 parameter to read write via slaves.

For the version table, you will need to create a copy in mongodb with the same 
name as the version table in mysql. Use the db_version_table= global parameter 
if you want to change the default name of the table. >From mongo shell do this:

use db
db.version.insert({ table_version : NumberInt(1009),  table_name : "location"})
db.version.insert({ table_version : NumberInt(10),  table_name : "dialog"})
From: Sasmita Panda 
Sent: Wednesday, June 01, 2016 6:17 AM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] Connecting to mongodb Replica set from opensips .

HI Guys , 

 i am trying to use mongodb in replica set . I have tested my opensips-1.11 
with a stand alone mongodb instance . Its working fine .

   Now I am trying to connect to a replica set . But somehow I amnot able 
to do this . Opensips is getting connected to the replica set but its not able 
to run raw query .

My opensips configuration is like bellow :

loadmodule "cachedb_mongodb.so"
loadmodule "db_cachedb.so"  
modparam("cachedb_mongodb", 
"cachedb_url","mongodb:replicaset1://root:password@1.2.3.4:27017,2.3.4.5:27017/jack.db.CallCenter_Info")
modparam("db_cachedb","cachedb_url","mongodb:replicaset1://root:password@1.2.3.4:27017,2.3.4.5:27017/jack.db.test")

modparam("acc", "db_url", "cachedb://mongodb:replicaset1")
modparam("acc", "db_flag", 2)
modparam("acc", "log_flag", 2)
modparam("acc", "cdr_flag", 1)
modparam("acc", "log_facility", "LOG_LOCAL7")


Opensips is not able to execute version check query for acc module .  Bellow is 
the logs of opensips .

INFO:cachedb_mongodb:mongo_new_connection: Connected at server 
52.71.216.67:27017,23.21.65.168:27017 with version 3.0.12 , to db db.test
DBG:db_cachedb:db_cachedb_init: Succesfully initiated connection to 
[mongodb:replicaset1]
DBG:cachedb_mongodb:mongo_db_query_trans: Running raw mongo query on table 
db.my_version_table
ERROR:cachedb_mongodb:mongo_db_query_trans: Failed to run query. Err = 0, 0 , 0
DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key lastOp
DBG:cachedb_mongodb:mongo_db_query_trans: (unknown type 17)
DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key connectionId
DBG:cachedb_mongodb:mongo_db_query_trans: (int) 516
DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key n
DBG:cachedb_mongodb:mongo_db_query_trans: (int) 0
DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key syncMillis
DBG:cachedb_mongodb:mongo_db_query_trans: (int) 0
DBG:core:wait_status_code: read code 0 ? rc = 0, errno=Success
INFO:core:daemonize: pre-daemon process exiting with -1


   In my mongodb instance there is some error printing also .
[initandlisten] connection accepted from 104.131.6.7:35857 #565 (7 connections 
now open)
2016-06-01T10:09:14.802+ I QUERY[conn565] assertion 13 not authorized 
for query on db.my_version_table ns:db.my_version_table query:{ $query: { 
table_name: "acc" } }

   By login through a remote machine with same username and password . I am 
able to execute all query manually . But why my opensips cant do this . If 
anybody have tried this can you suggest me any solution . What else I should do 
in my replica set or in opensips to make it happen ?

 Please help me . As I am quite new to mongodb replica set so not able to 
understand the actual problem also .


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] Un recognized sip header from asterisk to OpenSIPS

2016-04-10 Thread sevpal
Hi, do a normal sip trace using the sip trace module in opensips and post the 
output here. From what that can be understood from this log though, is that 
there are headers “x-asterisk-hangupcause:” “x-asterisk-hangupcausecode:”  that 
are being rejected due to validity or case sensitivity, possibly the response 
from the user agent. 

Where are these headers being added?

From: Travis Manson-Drake 
Sent: Thursday, March 31, 2016 1:47 PM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] Un recognized sip header from asterisk to OpenSIPS

Hello everyone.

 

Hope your all doing well!

 

I seem to be having an issue in which when a call is sent through OpenSIPS to 
my Asterisk PBX asterisk with eventually send a BYE with a hang up Cause of 
111/unrecognized sip header. I looked at the headers of all my packets but 
can’t find anything out of the norm. has anyone experienced this before and 
ideas on what it might be or what I might check?

 



 

I found a few article on asterisk forums mention NAT issues, but I’ve 
implemented a NAT helper into my routing logic so that shouldn’t be the case.

 

Thank you all for your time

 

  Travis Manson-Drake
  Voice Systems Analyst
 

 

  Simply Bits, LLC
  T: 520.545.0311  F: 520.545.7252
  E: trav...@simplybits.com 
  5225 N. Sabino Canyon Road
  Tucson, AZ 85750
  Support Hotline: 520.545.0333
 

 

 




___
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] RTPEngine - garbage collector deletes active branch

2016-03-11 Thread sevpal
Hi, don’t send the rtpengine_delete command and let rtpengine handle it 
automatically. The logic is that, in a multi-branch call only one can 
answer, therefore there is only one established session even though multiple 
'offers' . You can really only delete an established session,  sending the 
delete will delete that session.  Only send the delete when missed call to 
free the proxy quickly. This is how I handle it anyway, the unanswered 
offers are just discarded.


-Original Message- 
From: Julian Santer

Sent: Tuesday, March 08, 2016 5:47 AM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] RTPEngine - garbage collector deletes active 
branch



Hi guys,

we are implementing OpenSips 2.1.2 with rptengine version 4.3.0.0-git 
git-master-926d9d3.

Now we got a problem on calls with multiple branches.
We call rtpengine_manage("replace-origin replace-session-connection 
ICE=remove via-branch=extra");

The extra-id is containing the call ID and the branch ID

Here a example with 2 branches:

INVITE 1. branch 
(ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0):

Mar  8 11:14:25  Received command 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Dump for 'offer' from 1.2.3.4:59038: { "sdp": 
"v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 
2.3.4.5#015#012s=SIP
Call#015#012c=IN IP4 2.3.4.6#015#012t=0 0#015#012m=audio 59482 RTP/AVP 18 8 
0 4 125 101#015#012c=IN IP4 2.3.4.6#015#012a=rtpmap:18
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 
bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101
telephone-event/8000#015#012a=fmtp:101 0-16#015#012", "ICE": "remove", 
"replace": [ "origin", "session-connection" ], "call-id":

"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBc ...
Mar  8 11:14:25  ... BWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0",
"received-from": [ "IP4", "1.2.3.5" ], "from-tag": "D40356B0-22E3", 
"command": "offer" }

Mar  8 11:14:25  Creating new call
Mar  8 11:14:25  set FILLED flag for stream 2.3.4.6:59482
Mar  8 11:14:25  set FILLED flag for stream 2.3.4.6:59483
Mar  8 11:14:25  Replying to 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Response dump for 'offer' to 1.2.3.4:59038: { "sdp": 
"v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 
1.2.3.6#015#012s=SIP
Call#015#012c=IN IP4 1.2.3.6#015#012t=0 0#015#012m=audio 5 RTP/AVP 18 8 
0 4 125 101#015#012c=IN IP4 1.2.3.6#015#012a=rtpmap:18
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 
bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101
telephone-event/8000#015#012a=fmtp:101 
0-16#015#012a=sendrecv#015#012a=rtcp:50001#015#012", "result": "ok" }


INVITE 1. branch 
(ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1):

Mar  8 11:14:25  Received command 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Dump for 'offer' from 1.2.3.4:59038: { "sdp": 
"v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 
2.3.4.5#015#012s=SIP
Call#015#012c=IN IP4 2.3.4.6#015#012t=0 0#015#012m=audio 59482 RTP/AVP 18 8 
0 4 125 101#015#012c=IN IP4 2.3.4.6#015#012a=rtpmap:18
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 
bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101
telephone-event/8000#015#012a=fmtp:101 0-16#015#012", "ICE": "remove", 
"replace": [ "origin", "session-connection" ], "call-id":

"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBc ...
Mar  8 11:14:25  ... BWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1",
"received-from": [ "IP4", "1.2.3.5" ], "from-tag": "D40356B0-22E3", 
"command": "offer" }

Mar  8 11:14:25  Replying to 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Response dump for 'offer' to 1.2.3.4:59038: { "sdp": 
"v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 
1.2.3.6#015#012s=SIP
Call#015#012c=IN IP4 1.2.3.6#015#012t=0 0#015#012m=audio 50040 RTP/AVP 18 8 
0 4 125 101#015#012c=IN IP4 1.2.3.6#015#012a=rtpmap:18
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 
bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101
telephone-event/8000#015#012a=fmtp:101 
0-16#015#012a=sendrecv#015#012a=rtcp:50041#015#012", "result": "ok" }


OK 1. branch 
(ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0):

Mar  8 11:14:33  Received command 'offer' from 1.2.3.4:47625
Mar  8 11:14:33  Dump for 'offer' from 1.2.3.4:47625: { "sdp": 
"v=0#015#012o=root 2042928516 2042928517 IN IP4 
3.4.5.6#015#012s=call#015#012c=IN IP4
3.4.5.6#015#012t=0 0#015#012m=audio 51372 RTP/AVP 18 8 0 
101#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 
annexb=yes#015#012a=rtpmap:8
PCMA/8000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:101 
telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=sendrecv#015#012", 
"ICE": "remove",
"replace": [ "origin", "session-connection" ], "call-id": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", 
"via-branch" ...
Mar  8 11:14:33  ... : 
"Zz

Re: [OpenSIPS-Users] Bflag problem!

2016-03-03 Thread sevpal
I noticed that too with 2.1 latest git version, branch flags are not being 
saved in the location table. I reverted as a result. This is just to confirm. 

From: Dragomir Haralambiev 
Sent: Thursday, March 03, 2016 9:41 AM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] Bflag problem!

Hello, 

After latest update of Opensips 2.2 I have problem with "setbflag".
I can not set bflag.
Here is example:


modparam("nathelper", "remove_on_timeout_bflag", "RM_ONTO_FLAG")

.

setbflag(RM_ONTO_FLAG); 
if (isbflagset(RM_ONTO_FLAG)) {
xlog("L_ERR", "RM_ONTO_FLAG is set");

}

Best regards,
Dragomir



___
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] New OpenXCAP release 2.4.0

2016-02-28 Thread sevpal
Hi, there is a message "No Module named sipsimple.core" when tried to start 
the OpenXCAP server. How can this be resolved? I'm thinking it is referring 
to the "python-sipsimple" package but that is a beast to compile along with 
ffmpeg.



-Original Message- 
From: Adrian Georgescu

Sent: Thursday, January 07, 2016 1:06 PM
To: OpenSIPS users mailling list ; OpenSIPS devel mailling list
Subject: [OpenSIPS-Users] New OpenXCAP release 2.4.0

Hello,

There is a new release of OpenXCAP with various bug fixes

openxcap (2.4.0) unstable; urgency=medium

 * Removed runtime dependency check
 * Updated copyright years

openxcap (2.3.0) unstable; urgency=medium

 * Refactor xcapdiff publishing for OpenSIPS backend
 * Fix dependency name
 * Drop dependency on twisted-web
 * Raise python-application version dependency
 * Add dependency on python-sipsimple

http://openxcap.org

Regards,
Adrian



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



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


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

2016-02-18 Thread sevpal
Hi, set_dlg_flag() only accepts indices 0-31 , so should be set_dlg_flag(“5”);

From: Flavio Goncalves 
Sent: Monday, February 15, 2016 6:05 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] [BOOK] Building Telephony Systems with OpenSIPS - 
2.1 version

Hi Schneur,  

That's correct, it is NAT_FLAG. These typos were identified and fixed in the 
reviews. I don't know how they appeared in the final version. Whenever you find 
5 is (NAT_FLAG) and 6 (NAT_BFLAG)

Best regards, 

Flavio E. Goncalves
CEO - V.Office Redes e Telecomunicações Ltda. 
Phone: +55 48-3332-8590
Skype:flaviogoncalves1
Linkedin: www.linkedin.com/in/flavioegoncalves 
Twitter: www.twitter.com/asteriskguide


2016-02-15 8:07 GMT-02:00 Schneur Rosenberg :

  Hi Bogdan 

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


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


  Is that correct, or is it supposed to be?

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

  The dialog flag on the bottom of page 249 is set

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


  On Thu, Feb 11, 2016 at 11:35 AM, Bogdan-Andrei Iancu  
wrote:

Hi Schneur,

OK, I will check with the editor if they can push fixes to the book. Thanks 
for reporting it!

Thanks and Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 09.02.2016 13:20, Schneur Rosenberg wrote:

  Chapter 1, page 11 (page 36 of the eBook) on the bottom of the page there 
is a initial invite of userA calling userB, and the contact is of userB, it 
should be userA

  On Feb 8, 2016 3:13 PM, "Bogdan-Andrei Iancu"  wrote:

Hi Schneur,

Could you point the name of the chapter and the context of that 
mistake, so I can double check it ?

Thanks & Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 07.02.2016 14:53, Schneur Rosenberg wrote:

  I bought the book and I think I found the first mistake, in the 
initial  invite packet on page 11, the contact header is of the destination and 
not of the origination UAC

  On Feb 4, 2016 3:37 PM, "Bogdan-Andrei Iancu"  
wrote:

Hello all,

Flavio Goncalves and I are happy to announce the publishing of the 
second edition of "Building Telephony Systems with OpenSIPS", covering OpenSIPS 
version 2.1 .

Also many thanks to the Packt Publishing house for making it 
happened and to all our reviewers who help us to make this book better.


https://www.packtpub.com/networking-and-servers/building-telephony-systems-opensips-second-edition

Enjoy !

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


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


   

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



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



   

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



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




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






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


Re: [OpenSIPS-Users] Linphone and OpenSIPS over TCP

2016-02-03 Thread sevpal
Video and voice calls work fine with Linphone client over UDP, TCP, 3G/4G and 
wifi and when using a media proxy. Did not even try to install a TURN server to 
test your case, because Opensips does not have any modules to interact with a 
TURN server, you may be at a dead end with that. 

In the case of the SDP bodies being received by Opensips from the UA, these 
would need to be forwarded to the TURN server for modification and then 
returned to Opensips to be sent to the UA for the  media to be redirected.

Opensips interacts with the TURN in server MediaProxy only. 

From: Nabeel 
Sent: Tuesday, February 02, 2016 2:30 AM
To: OpenSIPS users mailling list ; hamid2kv...@hotmail.com 
Subject: Re: [OpenSIPS-Users] Linphone and OpenSIPS over TCP

Hi Hamid, 

I am not using the location table, I am using memory only to store the 
contacts. 

If you use TCP within the same network, where a TURN server is not required 
(TURN server not set in Linphone settings), I found that the calls then work 
depending on what the network allows. Within the same Wi-Fi network, in my case 
audio calls work but not video calls. But using 3G/4G only, with or without a 
TURN server set in Linphone settings, calls do not work at all. This is why I 
think the behaviour of TURN server has something to do with this. To those 
people stating that TCP works with Linphone, please test over 3G/4G where a 
TURN server might be required. 



On 2 Feb 2016 7:07 am, "Hamid Hashmi"  wrote:

  Nabeel I have been using Linphone 3.6.1 with opensips for a long time. And 
its working fine on both UDP and TCP. I have gone through your logs, there is 
log line DBG:tm:matching_3261: RFC3261 transaction matching failed  Please 
check contact of your "to number" in location table.   


  Hamid R. Hashmi 
  Software Engineer - VoIP
  Vopium A/S




--
  Date: Mon, 1 Feb 2016 19:35:53 +
  From: nabeelshik...@gmail.com
  To: bog...@opensips.org; users@lists.opensips.org
  Subject: Re: [OpenSIPS-Users] Linphone and OpenSIPS over TCP


  Hi Bogdan, 

  Below is the requested log for TCP call attempt.  User  is trying to call 
user  via OpenSIPS server 162.248.6.120 :

  http://pastebin.com/UQ9mEemd


  On 1 February 2016 at 09:41, Bogdan-Andrei Iancu  wrote:

Hi,

I strongly suggest to look into the opensips logs and see what opensips try 
to do with the call. Based on your saying (that you see a timeout), I suspect 
your OpenSIPS tries to deliver the call over TCP to a destination which does 
not listen on TCP.
If you do not know hoe to interpret the logs, run opensips in debug=4 mode, 
upload the logs corresponding the INVITE execution and provide the link.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 31.01.2016 16:28, Nabeel wrote:

  Without using alias=domain.com, TCP still does not work.  My initial 
request for someone to test this using Linphone remains. Please test and let me 
know if you can call using TCP with OpenSIPS listening on an IP address.

  On 31 January 2016 at 09:28, Nabeel  wrote:

On further testing, using the IP address instead of the domain name in 
the URI setting of Linphone works with TCP, so I think this might be to do with 
SRV/NAPTR records associated with the domain.

On 31 January 2016 at 08:29, Nabeel  wrote:

  Hello, 

  There seems to be a problem with calls over TCP using Linphone, and 
since Linphone is a popular open source application, I would like someone to 
please verify this problem. Calls work fine with Linphone over UDP, but after 
registering with TCP using the same credentials, calls do not connect at all 
and lead to a request timeout.  A request timeout does not say much about the 
cause, but in this case I suspect there is something wrong with TCP on the 
server side. I would like someone to please install Linphone on your phone and 
connect to your OpenSIPS server using UDP and TCP.  Please report here if the 
calls work over both transports.  



   

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




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

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





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


Re: [OpenSIPS-Users] Linphone and OpenSIPS over TCP

2016-01-31 Thread sevpal
It’s just a configuration issue you are having, start by:

1. In windows, do an “nslookup your.domain.net”
if the returned IP’s are not what you expect, then correct this. You may 
also want to do a reverse lookup “nslookup xxx.xxx.xxx.xxx” to return its 
domain name.

2. Configure your Opensips to listen on these IP’s

3. Add “your.domain.net” in your domain table (these are the domains your sips 
is responsible for, IP’s can go in this table but not recommended if you are 
strictly using domain names in the clients for authentication)

By the way, TCP works with Linphone very well.


From: Nabeel 
Sent: Sunday, January 31, 2016 9:28 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Linphone and OpenSIPS over TCP

Without using alias=domain.com, TCP still does not work.  My initial request 
for someone to test this using Linphone remains. Please test and let me know if 
you can call using TCP with OpenSIPS listening on an IP address.

On 31 January 2016 at 09:28, Nabeel  wrote:

  On further testing, using the IP address instead of the domain name in the 
URI setting of Linphone works with TCP, so I think this might be to do with 
SRV/NAPTR records associated with the domain.

  On 31 January 2016 at 08:29, Nabeel  wrote:

Hello, 

There seems to be a problem with calls over TCP using Linphone, and since 
Linphone is a popular open source application, I would like someone to please 
verify this problem. Calls work fine with Linphone over UDP, but after 
registering with TCP using the same credentials, calls do not connect at all 
and lead to a request timeout.  A request timeout does not say much about the 
cause, but in this case I suspect there is something wrong with TCP on the 
server side. I would like someone to please install Linphone on your phone and 
connect to your OpenSIPS server using UDP and TCP.  Please report here if the 
calls work over both transports.  





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


Re: [OpenSIPS-Users] [OpenSIPS Public Meeting] Follow-up: Scripting variables in OpenSIPS 3.x

2016-01-28 Thread sevpal
I want to suggest allowing some key functions to also accept variables as 
input. To name a few: save(), lookup(), remove(), force_send_socket(). For 
example, when using mongo, multiple Opensips servers and multiple location 
tables  it’s inflexible in the script to use some of these functions when you 
have to hardcode something like,  lookup(“location”,””) .   

From: Liviu Chircu 
Sent: Thursday, January 28, 2016 1:09 PM
To: OpenSIPS devel mailling list ; OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] [OpenSIPS Public Meeting] Follow-up: Scripting 
variables in OpenSIPS 3.x

Hello!


The conclusions of yesterday's Public Meeting can be found here [1]

Here is a quick summary of the decided upon changes for variable restructuring 
in OpenSIPS 3.x:

* variable referencing will now mandate an explicit scope (local, msg 
(read/write into the SIP msg), tm, dlg, global)
* variables will still be dynamically typed
* improvements to explicit casting (from a couple of transformations to int(), 
str(), list() and json())
* new data types: list and json, along with contructors and specific operators 
("+" for concat, [] for indexing)
* AVPs dropped
* NULL special value to be kept
* find the best way of adapting the multi-index pseudo-vars, e.g. 
$(hdr(Contact)[1])

This is still an ongoing effort, any feature is subject to change as we go 
along with the development of OpenSIPS 3.0, so this is the ideal time to reply 
to this thread and suggest improvements!

[1]: http://www.opensips.org/Community/IRCmeeting20160127

Best regards,

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


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


Re: [OpenSIPS-Users] User location replication

2016-01-23 Thread sevpal
When you do the mongo query of the location table, the socket field corresponds 
to the transport being used by the UAS. That can be used along with the 
$branch(q) to construct the branch. 

From: Tito Cumpen 
Sent: Friday, January 22, 2016 6:46 PM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] User location replication

Group, 

At the previous opensips summit I heard mention of a new module that could aid 
with user replication to other servers. I am currently using a dns srv aware 
client and I'd like to know how this would work with active-active scenarios? 
Say a user exist in several servers. I am currently using a rabbit&mongo 
solution to keep track of where a user is registered and a mongo query add the 
branch and fork calls to other servers. Is there another solution to this? I am 
hitting a roadblock due to the necessity to change priority of a branch based 
on the callee transport type. This requirement is one that is enforced by 
rtpengine since it cannot deal with parallel branches that require different 
media attributes. My issue is if the user exist in another server how do I 
prioritize based on transport without knowing?


Thanks,
Tito



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


[OpenSIPS-Users] STUN Server Question

2015-10-02 Thread sevpal
Hi, the documentation states  “The sockets come from existing SIP sockets or 
are created”. Based the example in the documentation, “two sockets are defined 
and two are created”.

The stun server will use 4 sockets: 
  a.. socket1 = ip1 : port1 (assuming 5060 inbound/outbound) 
  b.. socket2 = ip1 : port2 (inbound/outbound?) 
  c.. socket3 = ip2 : port1 (assuming 3478 inbound/outbound) 
  d.. socket4 = ip2 : port2 ((inbound/outbound?))
How to determine the port of the two sockets that are created (port2) to allow 
in a restrictive firewall?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Module EXEC exec command stdout stderr values

2015-10-02 Thread sevpal
Hi list, there seems to be a bit of inconsistency when using a statement such 
as this:
...
exec(“/usr/local/sbin/script.sh”,,”$var(out)”,”$var(err)”);
...


if $var(err) had a value from another process it could hold contents from 
memory. Not a big issue, but when performing a xlog() with those variables, 
sometimes values show up from unrelated requests. This can be misleading.

I think if the function is successful, then $var(err) and $var(out) should be 
set to empty.___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Message Compression Feedback

2015-10-02 Thread sevpal
Hi, in testing the compression module, these below messages appear in the log 
when using mc_compress(“1”,bhs,). However, it works (compress/decompress) when 
the second param is “bhe”.

ERROR:compression:check_zlib_rc: not enough room in output buffer
ERROR:compression:mc_compress_cb: Compression failed
ERROR:compression:wrap_tm_func: compression failed
ERROR:compression:check_zlib_rc: not enough room in output buffer
ERROR:compression:mc_compress_cb: Compression failed
ERROR:compression:wrap_msg_func: compression failed. Probably not requested 
message
ERROR:core:run_raw_processing_cb: failed to run callback


When using mc_compress(“0”,bhs,) there is no error message, but on the 
receiving proxy this error is displayed.

ERROR:compression:check_zlib_rc: input data incomplete or corrupted
ERROR:compression:mc_decompress: decompression failed




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


Re: [OpenSIPS-Users] Realtime monitoring of registered end-points

2015-10-01 Thread sevpal

Is this now compatible with the location table existing in mongodb?

Secondly, some mobile clients do not respond to "opensipsctrl ping uri" but 
can still receive calls, does the module discern this?


-Original Message- 
From: Ionut Ionita

Sent: Thursday, October 01, 2015 4:33 AM
To: n...@lists.opensips.org ; de...@lists.opensips.org ; OpenSIPS users 
mailling list

Subject: [OpenSIPS-Users] Realtime monitoring of registered end-points

*Hello all,

I’m glad to announce a new feature that allows OpenSIPS to monitor
(via SIP OPTIONS probing) and disable/delete in realtime the registrations
which are not responding.
The previous approach had two issues when came to so called “zombie”
registrations (registrations which are not valid anymore):
* resources - such zombie registrations may waste resources in your
OpenSIPS server (memory,  processing time, DB space, useless NAT pinging,
TCP connect attempts);
* user experience - using the zombie registration to reach un-existing
users translates into useless calls (calls that will simply timeout),
giving delays in the call setup (instead of going straight to VM, you may
burn 5-10 seconds in trying to reach the user);
The main idea  behind these features is to delete contacts that do not
respond to a certain number of SIP pings. The SIP pinging is provided by the
nathelper module which was enhanced to keep the state of each pinging
requests
(basically, the module is waiting and checking the reply of each SIP request
sent to the registered users). For registrations detected as “dead” (not
responding),
the nathelper module interacts directly with the usrloc module in order to
remove the zombie contact.
For usage perspective, the nathelper module now has two new parameters:
* ping_threshold - timeout to consider a ping as unanswered;
* max_pings_lost - the number of unresponded pings after which the
contact is
removed from usrloc;
In order to activate this feature, every contact must have the
sipping_bflag
(to be pinged) and remove_on_timeout_bflag (to be deleted on no-answer)
activated.
This means these flags must also be configured in the nathelper module. [0]
For full documentation of the nathelper module including the newly
added
feature see [1]. Any feedback is highly appreciated.

Regards,
Ionut Ionita

[0]http://www.opensips.org/html/docs/modules/2.2.x/nathelper.html#id248011
[1]http://www.opensips.org/html/docs/modules/2.2.x/nathelper.html
*

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



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


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-20 Thread sevpal
Does it start in the usual way with “opensipsctl start”? If not, try to fix 
that method of starting, check /etc/opensips/opensipsctrl. 

Some things you might want to check.
With systemd , opensips cannot normally create files in /tmp or /var/run. for 
your pid file directory, create /var/run/opensips from /etc/rc.d/rc.local on 
each boot as /var/run is cleaned on shutdown.

From: Nabeel 
Sent: Sunday, September 20, 2015 1:11 AM
To: Podrigal, Aron ; OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Restart=always and After=mysql.service

No, I just compiled and installed OpenSIPS in the normal manner while logged in 
as root.

On 20 September 2015 at 06:00, Podrigal, Aron  wrote:

  Are you running this on a container / chrooted env?

  On Sun, Sep 20, 2015 at 12:39 AM, Nabeel  wrote:

This is what it says:

  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Starting OpenSIPS is a 
very fast and flexible SIP (RFC3261) server...
  -- Subject: Unit opensips.service has begun with start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- Unit opensips.service has begun starting up.
  Sep 20 05:21:45 server1.sipdomain.com systemd[4022]: Failed at step EXEC 
spawning /usr/sbin/opensips: Permission denied
  -- Subject: Process /usr/sbin/opensips could not be executed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- The process /usr/sbin/opensips could not be executed and failed.
  --
  -- The error number returned while executing this process is 13.
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: opensips.service: 
control process exited, code=exited status=203
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Failed to start 
OpenSIPS is a very fast and flexible SIP (RFC3261) server.
  -- Subject: Unit opensips.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- Unit opensips.service has failed.
  --
  -- The result is failed.
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Unit opensips.service 
entered failed state.


On 20 September 2015 at 05:12, Podrigal, Aron  
wrote:

  Do you see anything informative in your journal after trying to start 
opensips? 

  sudo journalctl -xn 350


  On Sat, Sep 19, 2015 at 11:46 PM, Nabeel  wrote:

Please see the strace output at these links: 

http://pastebin.com/G1Uv5s1E


http://pastebin.com/gnesw4tW


On 20 September 2015 at 04:30, Podrigal, Aron 
 wrote:

  Can you post the strace output by running 

  sudo strace -ff -o /tmp/opensips_strace_output systemctl start 
opensips.service

  cat /tmp/opensips_strace_output*

  That will help see where the error occurs.

  On Sat, Sep 19, 2015 at 11:21 PM, Nabeel  
wrote:

Why can't the service file be automatically generated at the time 
of installation/compilation on the relevant OS?  
It seems to be quite a basic feature missing.

On 20 September 2015 at 04:16, Nabeel  
wrote:

  Unfortunately, changing the user/group to 'root' did not work 
either. 

  The same error occurs and OpenSIPS fails to start:


Failed at step EXEC spawning /usr/sbin/opensips: Permission 
denied

  Hasn't anyone else seen this on CentOS?


  On 18 September 2015 at 22:21, sevpal  wrote:

If you change User= and Group= in the service file to root, you 
might not see such a message. To run as user opensips, then user opensips must 
exist on the system; in addition, ownership on files/folders that will be 
accessed by Opensips needs to be changed.
From: Nabeel 
Sent: Tuesday, September 15, 2015 9:47 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Restart=always and 
After=mysql.service

I tried that service file on CentOS 7 but got the following 
error when trying to start the service: 


  Failed at step EXEC spawning /usr/sbin/opensips: Permission 
denied


Changing permissions of that directory did not solve the 
problem:


chmod +x /usr/sbin/opensips


chmod -R 777 /usr/sbin/opensips 


Does the service file need modification for CentOS?




On 7 September 2015 at 19:14, Nabeel  
wrote:

  Hi, 


  Most of my services have a .service file located at 
/usr/lib/systemd/system where I can set 'Restart=always' or 
'After=mysql.service' / 'After=mariadb.service' to make sure the server starts 
at the appropriate times.


  However, there is no such 

Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-18 Thread sevpal
If you change User= and Group= in the service file to root, you might not see 
such a message. To run as user opensips, then user opensips must exist on the 
system; in addition, ownership on files/folders that will be accessed by 
Opensips needs to be changed.
From: Nabeel 
Sent: Tuesday, September 15, 2015 9:47 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Restart=always and After=mysql.service

I tried that service file on CentOS 7 but got the following error when trying 
to start the service: 


  Failed at step EXEC spawning /usr/sbin/opensips: Permission denied


Changing permissions of that directory did not solve the problem:


chmod +x /usr/sbin/opensips


chmod -R 777 /usr/sbin/opensips 


Does the service file need modification for CentOS?




On 7 September 2015 at 19:14, Nabeel  wrote:

  Hi, 


  Most of my services have a .service file located at /usr/lib/systemd/system 
where I can set 'Restart=always' or 'After=mysql.service' / 
'After=mariadb.service' to make sure the server starts at the appropriate times.


  However, there is no such .service file for OpenSIPS.  Please advise how to 
create this .service file for OpenSIPS.  I heard about 'respawn' but don't know 
how exactly to use this and would prefer to use a .service file like other 
services.




___
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] perl_exec parameter variable issue

2015-08-07 Thread sevpal
Could try a round-about way if you don't need the API and function is 
already written in perl:

$var(duration) = $DLG_lifetime;
exec("/bin/perl/update_user_balance 
$var(duration)",,"$var(out)","$var(err)");



-Original Message- 
From: Bogdan-Andrei Iancu

Sent: Friday, August 07, 2015 1:02 PM
To: OpenSIPS users mailling list ; smont...@twc.com
Subject: Re: [OpenSIPS-Users] perl_exec parameter variable issue

Hi,

the perl_exec() function does not support variables for its arguments.

It is not hard to add, but please open a feature request on the GITHUB
tracker :
https://github.com/OpenSIPS/opensips/issues?page=1&q=is%3Aopen+is%3Aissue

Best regards,

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

On 07.08.2015 06:04, Admin wrote:

Hi,
  When passing a variable to perl_exec as a parameter, i received a
parsing error in the opensips log and won't start. Here is what I am
doing inside the opensips config. file

$var(duration) = $DLG_lifetime;
perl_exec("update_user_balance", $var(duration));

It seems that it wants the parameter in quotes ("$var(duration)") but i
don't get the variable value when i pass it in quotes.

There was a similar problem posted in the archives but no solution was
presented.

Any suggestion on how to work this around is very appreciated. May be
something similar to dialogue lifetime from the OPENSIPS Perl API.

I am running OpenSIPS (2.1.0 (x86_64/linux)).

Thanks.



___
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] Again BLF and Presence with Snom 7xx phones and OpenSips

2015-03-19 Thread sevpal
You need to handle the in-dialog SUBSCRIBE requests. eg:

if has_totag() {
...
if (loose_route()) {
...
} else {
...
if (is_method("SUBSCRIBE")) { 
  route(2);
  exit; 
}
...
  }
  ...
}

From: Bogdan-Andrei Iancu 
Sent: Thursday, February 26, 2015 7:56 AM
To: OpenSIPS users mailling list ; mailto:michele.pina...@unisi.it 
Subject: Re: [OpenSIPS-Users] Again BLF and Presence with Snom 7xx phones and 
OpenSips

Hi Michele,

The problem in your script is that you do not handle the sequential (in-dialog) 
SUBSCRIBE requests (as you have the second one in your trace, ending with 404 
and terminating the subscription).

In the " if ( has_totag() ) " block, you have:
} else { 
if (is_method("SUBSCRIBE") && $rd == "127.0.0.1:5060") { # CUSTOMIZE ME

The $rd detection does not cover all your cases, as you configure the presence 
module to advertise as SIP contact "sip:prese...@voip.unisi.it:5060". So, the 
test fails.

You can adapt the test like:
if (is_method("SUBSCRIBE") && $rd == "voip.unisi.it") { # CUSTOMIZE ME

Or set the contact in presence with the real IP:
modparam("presence", "server_address", 
mailto:sip:presence@127.0.0.1:5060)

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 24.02.2015 12:04, Michele Pinassi wrote:

  Hi all,

  I'm still stuck on this issue: BLF not working. For example, on my SNOM 760 
(ext 5002) i activated BLF for some ext, like 5020. Using SIPGREP i saw:

  SUBSCRIBE sip:5...@voip.unisi.it;user=phone SIP/2.0.
  Via: SIP/2.0/UDP 172.20.1.10:57286;branch=z9hG4bK-nprg3gvnk4q1;rport.
  From: mailto:sip:5...@voip.unisi.it:5060;tag=nyux2omhly.
  To: mailto:sip:5...@voip.unisi.it;user=phone.
  Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
  CSeq: 2 SUBSCRIBE.
  Max-Forwards: 70.
  Contact: mailto:sip:5002@172.20.1.10:57286;reg-id=1.
  Event: dialog.
  Accept: application/dialog-info+xml.
  User-Agent: snom760/8.7.3.25.9.
  Proxy-Authorization: Digest 
  Expires: 3600.
  Content-Length: 0.

  SIP/2.0 200 OK.
  Via: SIP/2.0/UDP 
172.20.1.10:57286;received=172.20.1.10;branch=z9hG4bK-nprg3gvnk4q1;rport=57286.
  From: mailto:sip:5...@voip.unisi.it:5060;tag=nyux2omhly.
  To: 
mailto:sip:5...@voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-163d.
  Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
  CSeq: 2 SUBSCRIBE.
  Expires: 3600.
  Contact: mailto:sip:prese...@voip.unisi.it:5060.
  Server: OpenSIPS (1.11.3-tls (i386/linux)).
  Content-Length: 0.

  NOTIFY sip:5002@172.20.1.10:57286 SIP/2.0.
  Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.
  To: mailto:sip:5...@voip.unisi.it;tag=nyux2omhly.
  From: mailto:sip:5...@voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-163d.
  CSeq: 1 NOTIFY.
  Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
  Max-Forwards: 70.
  Content-Length: 147.
  User-Agent: OpenSIPS (1.11.3-tls (i386/linux)).
  Event: dialog.
  Contact: mailto:sip:prese...@voip.unisi.it:5060.
  Subscription-State: active;expires=3600.
  Content-Type: application/dialog-info+xml.
  .
  
  mailto:sip:5...@voip.unisi.it/>

  SIP/2.0 200 Ok.
  Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.
  From: mailto:sip:5...@voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-163d.
  To: mailto:sip:5...@voip.unisi.it;tag=nyux2omhly.
  Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
  CSeq: 1 NOTIFY.
  Content-Length: 0.

  SUBSCRIBE sip:prese...@voip.unisi.it:5060 SIP/2.0.
  Via: SIP/2.0/UDP 172.20.1.25:32768;branch=z9hG4bK-lbgnea3kuorq;rport.
  From: mailto:sip:5...@voip.unisi.it:5060;tag=w8vp9q5iyn.
  To: 
mailto:sip:5...@voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-29cc.
  Call-ID: 54ec3a578c9e-klgn0s3i32zo.
  CSeq: 75 SUBSCRIBE.
  Max-Forwards: 70.
  Contact: mailto:sip:5007@172.20.1.25:32768;reg-id=1.
  Event: dialog.
  Accept: application/dialog-info+xml.
  User-Agent: snom710/8.7.3.25.9.
  Expires: 3600.
  Content-Length: 0.

  SIP/2.0 404 Not here.
  Via: SIP/2.0/UDP 
172.20.1.25:32768;received=172.20.1.25;branch=z9hG4bK-lbgnea3kuorq;rport=32768.
  From: mailto:sip:5...@voip.unisi.it:5060;tag=w8vp9q5iyn.
  To: 
mailto:sip:5...@voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-29cc.
  Call-ID: 54ec3a578c9e-klgn0s3i32zo.
  CSeq: 75 SUBSCRIBE.
  Server: OpenSIPS (1.11.3-tls (i386/linux)).
  Content-Length: 0.

  NOTIFY sip:5002@172.20.1.10:57286 SIP/2.0.
  Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.
  To: mailto:sip:5...@voip.unisi.it;tag=iklb1qjh1v.
  From: mailto:sip:5...@voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-b571.
  CSeq: 2 NOTIFY.
  Call-ID: ee35ec54a72b-draf1nwo4qn7.
  Max-Forwards: 70.
  Content-Length: 0.
  User-Agent: OpenSIPS (1.11.3-tls (i386/linux)).
  Event: dialog.
  Contact: mailto:sip:prese...@voip.unisi.it:5060.
  Subscription-State: terminated;reason=timeout.

  SIP/2.0 200 Ok.
  Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.
  From: mailto:sip:5...@voip.unisi.i

Re: [OpenSIPS-Users] Last Modified AOR for User

2015-02-17 Thread sevpal
Thank you, I have it working. To complete the process though, I also needed to 
create a bubble sort in the script to sort the Json keys on the last_modified 
field.

I’d like to make a feature request for a sort facility in the raw query.  

From: Vlad Paiu 
Sent: Tuesday, February 10, 2015 4:54 AM
To: sevpal ; OpenSIPS users mailling list ; Bogdan-Andrei Iancu 
Subject: Re: [OpenSIPS-Users] Last Modified AOR for User

Hello,

Indeed, date fields where not properly supported in the cachedb_mongodb module.
I've just committed a fix for this - so please update your GIT sources to the 
latest ones.

I've just tested this with a small script like :

if (!save("location"))
sl_reply_error();

sleep("1");

cache_raw_query("mongodb:instance1","{ \"op\" : \"find\", 
\"ns\" : \"location.location\", \"query\": {\"username\" : \"vlad\"} 
}","$avp(mongo_result)");
$json(json_res) := $avp(mongo_result);
$avp(expiration) = $json(json_res/expires)-$Ts;
$avp(last_edited) = $Ts-$json(json_res/last_modified);
xlog("Username vlad will expired in $avp(expiration) seconds 
and was edited $avp(last_edited) seconds ago \n"); 

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com On 10.02.2015 04:26, sevpal wrote:

  The data in the DB are stored correctly, there aren’t any problems there, I 
can view all the fields properly set with “db.location.find()” . On a raw Query 
though, all the other fields return with Json data except the date/time fields. 
It seems mongo needs a different kind of directive than what is currently in 
the module to retrieve the data.

  From: Bogdan-Andrei Iancu 
  Sent: Monday, February 09, 2015 4:24 AM
  To: sevpal ; OpenSIPS users mailling list 
  Subject: Re: [OpenSIPS-Users] Last Modified AOR for User

  Hi Jalung,

  If you list the records in mongoDB collection, do you see the "last_modified" 
field properly set ? (I'm trying to understand if you have a problem with the 
data in DB or with the query itself)

  Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 07.02.2015 01:47, sevpal wrote:

If I’m storing the location table in a mongodb collection, how to query the 
most current AOR for a user? I can query all the fields except the date/time 
fields eg; “last_modified”, they return empty. I’m doing this using the mongo 
raw  query in Opensips.

Jalung 

 

___
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] Last Modified AOR for User

2015-02-09 Thread sevpal
The data in the DB are stored correctly, there aren’t any problems there, I can 
view all the fields properly set with “db.location.find()” . On a raw Query 
though, all the other fields return with Json data except the date/time fields. 
It seems mongo needs a different kind of directive than what is currently in 
the module to retrieve the data.

From: Bogdan-Andrei Iancu 
Sent: Monday, February 09, 2015 4:24 AM
To: sevpal ; OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Last Modified AOR for User

Hi Jalung,

If you list the records in mongoDB collection, do you see the "last_modified" 
field properly set ? (I'm trying to understand if you have a problem with the 
data in DB or with the query itself)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 07.02.2015 01:47, sevpal wrote:

  If I’m storing the location table in a mongodb collection, how to query the 
most current AOR for a user? I can query all the fields except the date/time 
fields eg; “last_modified”, they return empty. I’m doing this using the mongo 
raw  query in Opensips.

  Jalung 

   

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

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


[OpenSIPS-Users] Last Modified AOR for User

2015-02-06 Thread sevpal
If I’m storing the location table in a mongodb collection, how to query the 
most current AOR for a user? I can query all the fields except the date/time 
fields eg; “last_modified”, they return empty. I’m doing this using the mongo 
raw  query in Opensips.

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