Hello For each voice session I need to know the used codec (for bandwith calculation). For that I need to parse the SIP message body. I didn't find in OpenSER such a functionality. Is there a module that doing that? Or maybe someone is working on it? A suggestion for an open source?
Thanks.
Regards, Michel.
Parsing the SDP does not give you the used codec as there may be several codecs in the SDP and you do not know which codec is used by the clients.
But for example you can use mediaproxy. Mediaproxy allows you to retrieve the status of all current calls (codecs, bandwidth, ...)
regards klaus
Michel Bensoussan wrote:
Klaus Darilion wrote:
This is true for INVITE message but as I understand (but I'm not familiar with SIP), in the OK message, we can determine which codec is used. No?
But for example you can use mediaproxy. Mediaproxy allows you to retrieve the status of all current calls (codecs, bandwidth, ...)
Well, the mediaproxy module needs an external proxy server. So it seems to be too heavy for my needs. The real time session statistics (from MediaProxy Server) will be very useful but I'm not sure it's a good idea to use the server it if I don't need the NAT traversal features.
Hi Michel,
actually you cannot find out what is the used codec based on signalling - each party sends a list of supported codecs (in INVITE and 200 OK), letting the other party the actual codec to be used for sending media.
AFAIK, the only way is to look into the RTP stream.
Of course, if there is only one advertised codec, there is no mystery ;)/
regards, bogdan
Michel Bensoussan wrote:
Michel Bensoussan wrote:
Not always. Often the 200 OK contains only one codec which will be used by both parties. But I think there may also be asynchronous codec (caller sends G711, callee sends G729).
If the media goes directly from caller to callee I wonder why you need to know the bandwidth at all as the RTP packets may be out of your network.
regards klaus
"If the media goes directly from caller to callee I wonder why you need to know the bandwidth at all as the RTP packets may be out of your network."
I need to write a CAC (Call Admission Control) module for an 802.11 AP (Access Point). The idea is to use a SIP Proxy to monitoring bandwith utilization according to codec, and allow or disallow new sessions, depending on resources.
Regards, Michel.
Klaus Darilion wrote:
Michel Bensoussan wrote:
Do you need to know the bandwidth in advance (thus guessing the neede bandwidth during call setup and eventually deny the call setup if the required bandwidth can not be guaranteed) (a) or do you need to know the exact current bandwidth need (b)?
In case of (a) I think you need a B2BUA in the AP.
In case of (b) you can parse the RTP sockets and then count the media packets routed by the AP to calculate the bandwidth.
Or you can port mediaproxy to the accesspoint and use thus capabilities.
regards klaus
Hi Michel,
It all depends on what you want to do. Here are the two approaches and the associated issues:
1. SIP Proxy: - you don't have control over the negotiated codec(s) - if the two parties agrees on a set of codecs, you don't know which one will be used. Even worst, the parties may change the codec without renegotiating, since it is part of the negotiated set. - you don't have control over the stream packetization.
2. B2BUA: - you may force a single code to be used. - you may force the packetization for outgoing media, but you have no control over the packetization of the incoming stream.
Computing the required bandwidth for VoIP calls is really tough unless you work with well known SIP UAs and you know what to expect.
Hope this helps, Ovidiu Sas
PS: you might wanna take a look at http://www.nslu2-linux.org/ There are several VoIP packages (openSER, rtpproxy, asterisk) that were ported to several embedded platforms including dd-wrt.
On 2/20/07, Michel Bensoussan michel@extricom.com wrote:
Hi everybody. In the topology:
INTERNET | PIX (NAT static translate 200.x.x.2 to 10.1.1.2) | SER (10.1.1.2)
I can´t register UA from internet.(unauthorized)
The PIX is configured with the "fixup SIP" and "fixup udp SIP" commands. I guess there is a problem when UA generates HA1 with the external IP, then de PIX translates this to internal IP, and the SER can´t authenticate it by the erroneous hash.
Anybody know some solution for it?
Thanks!
Diego
Hi Diego,
When you challenge the SIP UA from openSER, provide the realm and configure the SIP UA to use that particular realm for authorization.
see: http://openser.org/docs/modules/1.2.x/auth_db.html#AEN170 (do not use an empty string for realm)
Regards, Ovidiu Sas
On 2/20/07, Diego Valencia dvalencia@ip-tel.com.ar wrote:
Hi Ovidiu, I´m currently configured on this way on my openser:
if (!www_authorize("ser.ip-tel.com.ar", "subscriber")) { www_challenge("ser.ip-tel.com.ar", "0"); break; };
Is it right?
Thanks
Diego
----- Original Message ----- From: "Ovidiu Sas" sip.nslu@gmail.com To: "Diego Valencia" dvalencia@ip-tel.com.ar Cc: users@openser.org Sent: Tuesday, February 20, 2007 4:39 PM Subject: Re: [Users] SER behind PIX
Hi Diego,
When you challenge the SIP UA from openSER, provide the realm and configure the SIP UA to use that particular realm for authorization.
see: http://openser.org/docs/modules/1.2.x/auth_db.html#AEN170 (do not use an empty string for realm)
Regards, Ovidiu Sas
On 2/20/07, Diego Valencia dvalencia@ip-tel.com.ar wrote:
yup. Make sure that your subscriber's domain matches the one that you created in openser db (see subscriber table).
Regards, Ovidiu Sas
On 2/20/07, Diego Valencia dvalencia@ip-tel.com.ar wrote: