Hi,

    I've been messing around here with the code, but with no success.
    *After* pjsip_udp_transport_start, I have added:

    pj_status_t statQoS;
    _debug("Getting socket");
    pj_sock_t socket = pjsip_udp_transport_get_socket( transport );
    statQoS = pj_sock_set_qos_type( socket, PJ_QOS_TYPE_VOICE );
    if ( statQoS == PJ_SUCCESS ){
        _debug("QoS type setted");
        pj_qos_params qos_params;
        statQoS = pj_sock_get_qos_params(socket, &qos_params);
        if ( statQoS == PJ_SUCCESS ){
            _debug("qos_params getted");
            qos_params.flags = PJ_QOS_PARAM_HAS_DSCP;
            qos_params.dscp_val = 0xB8;
            _debug("Setting qos_params");
            statQoS = pj_sock_set_qos_params(socket, &qos_params);
            if ( statQoS == PJ_SUCCESS ){
                _debug("Params setted");
            }
        }
    }

Also, I have put this code after another transport search, in method SIPVoIPLink::acquireTransport (const AccountID& accountID).

But Wireshark shows me that only packets from the server to my machine have DSCP/TOS field value of 0xB8. From my machine to the server nothing changes and the DSCP/TOS field is 0x00.

I don't know exactly when I can set the QoS parameters. Before pjsip_udp_transport_start the transport variable is NULL, so I cannot get the socket, right?

Regards,
Thomas

On 10/26/2010 05:23 PM, Thomas Alexander Ewald wrote:
Alexandre,

      Thanks for the help.
      Sure I'll test it here!
      For now I will try to activate QoS in a hacky and ugly way, just do
see if it works.
      Are there any plans for a configuration option/interface?

Again, thanks,
Thomas

On 10/26/2010 04:36 PM, Alexandre Savard wrote:
Hi,

We are sometimes experiencing slow behavior on some networks so implementing QoS
would be definitely a solution.

We are using PJSIP implemented in 
sflphone/sflphone-common/src/sip/sipvoiplink.cpp
The library is staticaly linked to sflphone from 
sflphone/sflphone-common/libs/pjproject

The unencripted udp sip transports are created in method:

int SIPVoIPLink::createUdpTransport (AccountID id)

using pjsip_udp_transport_start.


I found documentation describing activation of QoS with PJSIP using teh high 
level API here http://trac.pjsip.org/repos/wiki/QoS . Unfortunately we are 
dealing with the low level API.

So we would need to acquire the internal socket from the transport using:

pj_sock_t pjsip_udp_transport_get_socket( pjsip_transport *transport )

And then activating the QoS type using the following API:

http://www.pjsip.org/pjlib/docs/html/group__socket__qos.htm#gadbfe233355bf536b85ef39203d842715


I will take a look at it on my side. If you could test on yoour using your 
setup that would be great!

Regards,

Alexandre


On 10/26/2010 02:46 PM, Thomas Alexander Ewald wrote:
Hi,

        After struggling with my local SIP server, which only accepts
clients with a fixed UserAgent ( and some SIP protocol changes too ), I
have a new problem to solve.
        Now the server is QoS enabled, and the client has a configuration
screen that allow to change the DSCP/TOS setting ( screen shot attached ).
        With this change, sflphone calls are extremely lagged, and the
"authorized" clients are just fine.
        I search the code, but sincerely I'm lost.
        Where can I set the DSCP and TOS bytes for SIP packets?
        It can be hard coded, as I don't mind compiling all again ( anyway
is what I actually do with every server change ) ;-)

Thanks,
Thomas
_______________________________________________
SFLphone mailing list
[email protected]
http://lists.savoirfairelinux.net/mailman/listinfo/sflphone

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
SFLphone mailing list
[email protected]
http://lists.savoirfairelinux.net/mailman/listinfo/sflphone

Reply via email to