[OpenSIPS-Users] mediaproxy KBIn and KBOut

2011-04-15 Thread Dani Popa

Hi,

Mediaproxy radius request does not populate Kbin and Kbout. Also i tried 
to see sessions on port 25061 and also there callee_bytes and 
caller_bytes are 0.


opensips:~# telnet localhost  25061
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
sessions
[]
sessions
[{"from_tag": "2a476a89", "start_time": 1302867244.13, "call_id": 
"f2c9ca5f8ffe0e5ea422b57d7b93aa28@0:0:0:0:0:0:0:0", "duration": 5, 
"streams": [{"status": "active", "caller_codec": "G711u", 
"post_dial_delay": 3.43099498749, "callee_codec": "G711u", 
"caller_bytes": 0, "start_time": 0, "callee_packets": 0, "callee_bytes": 
0, "caller_packets": 0, "callee_remote": "192.5.32.12:8152", "end_time": 
5, "caller_remote": "189.8.7.161:5105", "media_type": "audio", 
"callee_local": "167.14.19.35:50010", "timeout_wait": 0, "caller_local": 
"167.14.19.35:50008"}], "to_tag": 
"a94c095b773be1dd6e8d668a785a9c8498c8c4db", "to_uri": 
"cal...@domain.org", "caller_ua": 
"Jitsi1.0-beta1-nightly.build.3408Linux", "callee_ua": "Cisco", 
"from_uri": "cal...@domain.org"}]



[{"from_tag": "2a476a89", "start_time": 1302867244.13, "call_id": 
"f2c9ca5f8ffe0e5ea422b57d7b93aa28@0:0:0:0:0:0:0:0", "duration": 11, 
"streams": [{"status": "active", "caller_codec": "G711u", 
"post_dial_delay": 3.43099498749, "callee_codec": "G711u", 
"caller_bytes": 0, "start_time": 0, "callee_packets": 0, "callee_bytes": 
0, "caller_packets": 0, "callee_remote": "192.5.32.12:8152", "end_time": 
11, "caller_remote": "189.8.7.161:5105", "media_type": "audio", 
"callee_local": "167.14.19.35:50010", "timeout_wait": 0, "caller_local": 
"167.14.19.35:50008"}], "to_tag": 
"a94c095b773be1dd6e8d668a785a9c8498c8c4db", "to_uri": 
"cal...@domain.org", "caller_ua": 
"Jitsi1.0-beta1-nightly.build.3408Linux", "callee_ua": "Cisco", 
"from_uri": "cal...@domain.org"}]




Can someone give me a hint ?

Thanks,
Dani

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


Re: [OpenSIPS-Users] dialog and CANCEL

2011-04-15 Thread Denis Putyato
Hello Bogdan

 

And if I use in onreply_route 

 

if (status=~"200||18[0,3]" && $rm=="INVITE") {

if (t_was_cancelled()) {

   exit;

  }

}

 

This will help?

 

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Wednesday, April 06, 2011 6:35 PM
To: OpenSIPS users mailling list
Cc: Denis Putyato
Subject: Re: [OpenSIPS-Users] dialog and CANCEL

 

Hi Denis,

On 03/21/2011 01:55 PM, Denis Putyato wrote: 

Hello

 

There is such scheme of call

 

One gateway – 1.1.1.1

Opensips – 2.2.2.2

Another gateway – 3.3.3.3

Calls from 1.1.1.1 to 3.3.3.3 through 2.2.2.2

I use CDR_flag for accounting

 

As you can see in testlog file, 1.1.1.1 trying cancel initial request by 
sending CANCEL, this CANCEL Opensips forwarding to 3.3.3.3 but from 3.3.3.3 
Opensips receives 200 OK on INVITE. Because of this there is no CANCEL of the 
dialog on Opensips and after 1800 sec (see “default_timeout”) I have a CDR 
record in Opensips with duration of 1800 sec.

 

The question. Why does Opensips forward 200 OK from 3.3.3.3 to 1.1.1.1 when 
initial request was cancelled, and why Opensips makes accounting dialog when 
initial request was cancelled?  

RFC3261 says a proxy must forward all 2xx replies (disregarding the transaction 
state), just to solve the possible race between CANCEL and 2xx -> such race 
must be handled by end point and not by proxy.

So, it your case, if caller sent a CANCEL but still receives a 200 (callee 
picked up before actually receiving the CANCEL from caller), the caller must 
sent a BYE and the callee should send a negative reply to the CANCEL.

So, it is a bug in the caller device.

Regards,
Bogdan




-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [RFC] Default value of db_url in OpenSIPS

2011-04-15 Thread Henk Hesselink

Hi Bogdan.

Thanks, wasn't thinking when I posted that, we indeed use separate URLs.

Regards,

Henk


On 4/15/11 10:40 AM, Bogdan-Andrei Iancu wrote:

Hi Henk,

As each module can have its own DB URL, I do not see a problem here -
you can create separate URL, pointing to the 2 different DBs (real and
caching).
In your case the setup is a bit different as you are using different DBs
- in what we were discussion is about keeping RW and RO separate mysql
users for accessing the same DB.

Regards,
Bogdan

On 04/15/2011 01:03 AM, Henk Hesselink wrote:

Definitely 1 vote for making the URL explicit. Principle of least
surprise and all that.

I'd also like to vote for keeping the rw/ro split. We don't use it for
security but for performance: modules that need to write to the database
get a rw URL pointing at the real DB, the rest gets a ro URL pointing to
a caching copy.

Regards,

Henk


On 4/14/11 4:35 PM, Bogdan-Andrei Iancu wrote:

On 04/14/2011 05:25 PM, Ovidiu Sas wrote:

On Thu, Apr 14, 2011 at 10:18 AM, Bogdan-Andrei Iancu
 wrote:

On 04/14/2011 03:15 PM, Saúl Ibarra Corretgé wrote:

On 14/4/11 1:02 PM, Bogdan-Andrei Iancu wrote:

Hi all,

Following some discussions on the value of db_url, we end up with
the
idea of chancing the way of definition the db_url in opensips.

The problem with the current approach (having builtin - hidden-
default
values) is confusing as, if you do no explicitly set a db_url, the
modules will try do connect to the default db_url, without you even
knowing that.

So the idea is to remove the builtin default value and to have a new
global parameter in opensips cfg to define the default value for
db_urls.
This will allow:
- to have single default db_url for simple default scripts (as we
have now)
- to see (no mote hidden) the default value for db_url in your cfg
- to change the default db_url without re-compilling
- still be able to individually change the db_urls for each
module...

Already there are three +votes for this, but I would like to see
other
opinions on thatpro or against :)


+1

Would this global db_url be overridable with the per-module one,
or are
they mutually exclusive?

per module (if defined in script) will override the global one (for
that
module).

And if there's no per-module defined and no global defined, then the
init will fail with proper error message, right?

If the module really requires a db, then it will fail to start.



Also, we may want to have two global urls:
- one r/w for modules that require writing to the db;
- one r/o for modules that require only reading from db.

Does it make sense to keep this separation between RW and RO ?
personally I never used it...somehow is non-sense (as security) for a
single application to connect in the same time, to the same DB with RW
and RO (for different modules).my 2 cents..

Regards,
Bogdan






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


Re: [OpenSIPS-Users] [RFC] Default value of db_url in OpenSIPS

2011-04-15 Thread Bogdan-Andrei Iancu

Hi Henk,

As each module can have its own DB URL, I do not see a problem here - 
you can create separate URL, pointing to the 2 different DBs (real and 
caching).
In your case the setup is a bit different as you are using different DBs 
- in what we were discussion is about keeping RW and RO separate mysql 
users for accessing the same DB.


Regards,
Bogdan

On 04/15/2011 01:03 AM, Henk Hesselink wrote:

Definitely 1 vote for making the URL explicit.  Principle of least
surprise and all that.

I'd also like to vote for keeping the rw/ro split.  We don't use it for
security but for performance: modules that need to write to the database
get a rw URL pointing at the real DB, the rest gets a ro URL pointing to
a caching copy.

Regards,

Henk


On 4/14/11 4:35 PM, Bogdan-Andrei Iancu wrote:

On 04/14/2011 05:25 PM, Ovidiu Sas wrote:

On Thu, Apr 14, 2011 at 10:18 AM, Bogdan-Andrei Iancu
 wrote:

On 04/14/2011 03:15 PM, Saúl Ibarra Corretgé wrote:

On 14/4/11 1:02 PM, Bogdan-Andrei Iancu wrote:

Hi all,

Following some discussions on the value of db_url, we end up with 
the

idea of chancing the way of definition the db_url in opensips.

The problem with the current approach (having builtin - hidden-
default
values) is confusing as, if you do no explicitly set a db_url, the
modules will try do connect to the default db_url, without you even
knowing that.

So the idea is to remove the builtin default value and to have a new
global parameter in opensips cfg to define the default value for
db_urls.
This will allow:
- to have single default db_url for simple default scripts (as we
have now)
- to see (no mote hidden) the default value for db_url in your cfg
- to change the default db_url without re-compilling
- still be able to individually change the db_urls for each 
module...


Already there are three +votes for this, but I would like to see 
other

opinions on thatpro or against :)


+1

Would this global db_url be overridable with the per-module one, 
or are

they mutually exclusive?
per module (if defined in script) will override the global one (for 
that

module).

And if there's no per-module defined and no global defined, then the
init will fail with proper error message, right?

If the module really requires a db, then it will fail to start.



Also, we may want to have two global urls:
- one r/w for modules that require writing to the db;
- one r/o for modules that require only reading from db.

Does it make sense to keep this separation between RW and RO ?
personally I never used it...somehow is non-sense (as security) for a
single application to connect in the same time, to the same DB with RW
and RO (for different modules).my 2 cents..

Regards,
Bogdan




--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"


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