Custom Query (2195 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1901 - 2000 of 2195)

Ticket Summary Owner Type Priority Milestone Component
#1269 Audio video sync ming enhancement normal release-2.x pjsua-lib
#1299 New callback to notify that sound device needs to be opened or closed bennylp enhancement minor release-2.0-alpha pjsua-lib
Description

Implement a new callback to notify application that sound device is about to be opened or closed. This is useful if application wants to keep track whether the sound device is currently active or idle, and also will be very useful if application manages the sound device by itself since this callback notifies the application when the library needs to use the sound device and when it's safe to close it, taking into account the sound device idle timer.

Prototype of the callback:

    /**
     * Callback when the sound device is about to be opened or closed.
     * This callback will be called even when null sound device or no
     * sound device is configured by the application (i.e. the
     * #pjsua_set_null_snd_dev() and #pjsua_set_no_snd_dev() APIs).
     * This API is mostly useful when the application wants to manage
     * the sound device by itself (i.e. with #pjsua_set_no_snd_dev()),
     * to get notified when it should open or close the sound device.
     *
     * @param operation	The value will be set to 0 to signal that sound
     * 			device is about to be closed, and 1 to be opened.
     *
     * @return		The callback must return PJ_SUCCESS at the moment.
     */
    pj_status_t (*on_snd_dev_operation)(int operation);
#1302 Bug in soft deadlock detection may cause program to block indefinitely (thanks Attila Magyar for the fix) bennylp defect normal release-1.12 pjsua-lib
Description

Bug in the acquire_call() function in pjsua_call.c:

the timeout variable is not fully initialized. The msec is set, but sec is not set to any value, so it may contain random value. This will cause program to block for random time when soft deadlock is detected.

#1305 Bug in pjsua_call_hangup_all() may freeze the app for few seconds (thanks Kees van der Bent for the report) bennylp defect normal release-1.12 pjsua-lib
Description

The pjsua_call_hangup_all() may freeze the app for few seconds since it is not protected by the deadlock prevention code. Note that the pjsua_call_hangup() is not affected by this bug.

#1310 Possible crash in registration callback after deleting account and restarting pjsua bennylp defect normal release-1.12 pjsua-lib
Description

Validation of account registration object in the registration callback is not protected by pjsua lock. This may cause race condition that lead to crash.

Detail scenario:

  1. when entering registration callback, the account registration object validation passes and about to get pjsua lock
  2. context switch, application deletes the account, pjsua_acc_del(), until the deleting account finished,
  3. context switch back to registration callback, from this point, any access to the just deleted account will lead to crash!
#1311 Locking account to specific TCP/TLS listener will cause registration loop (thanks Tony Million for the report) bennylp defect normal release-2.5 pjsua-lib
Description

When PJSUA-LIB account is locked to a specific TCP or TLS listener, re-registration will occur in a loop. This happens because when specific listener is requested, TCP/TLS listener will always create a new transport for each registration request, and PJSUA-LIB will keep detecting IP address changed for the account, causing continuous reregistration.

Note:

while the issue occurs in PJSUA-LIB, the bug is in PJSIP because it keeps creating new transport.

#1313 Account option to disable registration when account is added (thanks Tony Jago Million for the patch) bennylp enhancement normal release-1.12 pjsua-lib
Description

A new option is added to pjsua_acc_config to control whether REGISTER should be sent as soon as the account is added:

    /**
     * Specify whether the account should register as soon as it is
     * added to the UA. Application can set this to PJ_FALSE and control
     * the registration manually with pjsua_acc_set_registration().
     *
     * Default: PJ_TRUE
     */
    pj_bool_t         register_on_acc_add;

The default is PJ_TRUE to be compatible with current behavior.

#1314 New callback to notify application when registration or unregistration has been initiated (thanks Tony Jago Million for the patch) bennylp enhancement normal release-1.12 pjsua-lib
Description

A new callback is added to pjsua_callback to allow application to be notified when the library has started or stopped registration:

    /**
     * Notify application when registration or unregistration has been
     * initiated. Note that this only notifies the initial registration
     * and unregistration. Once registration session is active, subsequent
     * refresh will not cause this callback to be called.
     *
     * @param acc_id	    The account ID.
     * @param renew	    Non-zero for registration and zero for
     * 			    unregistration.
     */
    void (*on_reg_started)(pjsua_acc_id acc_id, pj_bool_t renew);
#1338 Apply the new fields in account configs to pjsua_modify_acc() bennylp enhancement normal release-2.0-alpha pjsua-lib
#1339 Add renderer device ID into video window info bennylp enhancement normal release-2.0-alpha pjsua-lib
Description

Useful for application to track the active renderer devices.

#1341 Revisit pjsua_acc_modify() for newly added fields in the pjsua_acc_config bennylp defect normal release-1.12 pjsua-lib
Description

Some newly added account settings may haven't been handled properly by pjsua_acc_modify() (and also perhaps other API such as pjsua_acc_config_dup()), e.g: outbound stuffs (rfc5626) and call_hold_type.

#1347 Various cases of bad SDP answer generated when receiving offer with multiple media. bennylp defect normal release-2.0-alpha pjsua-lib
Description

Sample cases (note that video is disabled and max_audio_cnt is 1/default):

  1. Rejected all media offer while it should accept one (scripts-sendto/125_sdp_with_multi_audio_2.py and scripts-sendto/320_srtp_with_unknown_transport_2.py).
    • offer:
      m=audio 4000 UNKNOWN 0
      m=audio 5000 RTP/AVP 0
      
    • answer generated:
      m=audio 0 UNKNOWN 0
      m=audio 0 RTP/AVP 0
      
    • answer should be:
      m=audio 0 UNKNOWN 0
      m=audio 4000 RTP/AVP 0
      
  1. Selected unsecured media over secured media in SRTP optional mode (scripts-sendto/330_srtp_prefer_rtp_savp.py).
    • offer:
      m=audio 4000 RTP/AVP 0
      m=audio 5000 RTP/SAVP 0
      a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
      
    • answer generated:
      m=audio 4000 RTP/AVP 0
      m=audio 0 RTP/SAVP 0
      
    • answer should be:
      m=audio 0 UNKNOWN 0
      m=audio 4000 RTP/AVP 0
      
  1. Rejected both unsecured media and secured media offered in SRTP disabled mode (scripts-sendto/331_srtp_prefer_rtp_avp.py).
    • offer:
      m=audio 4000 RTP/SAVP 0
      a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
      m=audio 5000 RTP/AVP 0
      
    • answer generated:
      SIP/2.0 406 Not Acceptable
      
    • answer should be:
      m=audio 0 RTP/SAVP 0
      m=audio 5000 RTP/AVP 0
      
#1349 Crash if pjsua is shutdown without turning off preview bennylp defect normal release-2.0-alpha pjsua-lib
Description

Tested with quitting vidgui without turning off preview.

#1351 Option to initially hide preview window, otherwise the window will float initially bennylp enhancement normal release-2.0-alpha pjsua-lib
#1352 Problem when a capture device shared among multiple video calls bennylp defect normal release-2.0-alpha pjsua-lib
Description

The maximum port count of video tee in video preview (for capture device sharing) is currently hardcoded to 2, while it should be set to at least (PJSUA_MAX_CALLS+1) so a capture device can be shared among multiple calls.

Known symptoms:

  • some calls send no video packet even the video direction is send-receive,
  • crash on hanging up calls.
#1357 Temporarily disable event in pjsua bennylp defect normal release-2.0-alpha pjsua-lib
Description

It crashed upon receiving re-INVITE or UPDATE. This problem is to be fixed by #1358

#1358 Crash in event handling in pjsua-lib nanang defect normal release-2.0-alpha2 pjsua-lib
Description

Crash on receiving UPDATE or re-INVITE.

#1363 Invalid Contact URI is used if display name contains reserved characters (thanks Dmitry Valegov for the report) bennylp defect normal release-1.12 pjsua-lib
Description

PJSUA-LIB will emit invalid (i.e. non-standard) Contact URI if the display name of the AOR contains reserved characters. For example, if this is the AOR:

"Lastname, Firstname" <sip:joe@example.com>

then the following Contact URI will be generated:

Lastname, Firstname <sip:joe@example.com>

Note the missing enclosing double quotes in the display name, which makes the URI invalid since the display name contains reserved character (i.e. comma).

The solution is to always enclose the display name of the generated Contact URI with double quotes.

#1369 Local state is set to HOLD even if hold operation fails bennylp defect normal release-1.12 pjsua-lib
Description

When outgoing hold request failed (e.g. rejected with 488 for some reason), the library still put the call state to local hold.

#1371 Soft deadlock when application query call info of other call inside a callback (Thanks Marcus Froeschl for the report) bennylp defect normal release-1.12 pjsua-lib
Description

A soft deadlock will occur in the following scenario:

Thread 1 Thread 2
1. Call A state has changed, on_call_state() callback is called. 1. Call B state has changed
2. In on_call_state() callback, application calls pjsua_call_get_info() on call B2. Call B is entering PJSUA-LIB
3. Thread 1 is holding call A and PJSUA mutex and attempting to acquire call B mutex3. Thread 2 is holding call B mutex and attempting to acquire PJSUA mutex
#1375 Option to control first re-registration retry interval bennylp enhancement normal release-1.12 pjsua-lib
Description

Ticket #1044 adds pjsua_acc_config.reg_retry_interval to control account interval to retry registration in case it failed. However when the registration is disconnected because of transport failure (e.g. TCP transport closure), the initial retry would happen immediately.

This ticket adds new setting, pjsua_acc_config.reg_first_retry_interval, to control the interval of the first retry. The default value is zero, which means registration retry will be done immediately after failure.

Note that in case there are calls active when the TCP transport is disconnected, these calls will be hung up only after the first registration retry fails, hence it is recommended to set pjsua_acc_config.reg_first_retry_interval to low value.

This ticket also adds random +/- 10 seconds to the interval, so that clients wouldn't re-register at the same time thus causing high load to server.

#1376 Crash if pjsua_call_get_info() is called with disconnected call bennylp defect major release-1.12 pjsua-lib
Description

#1371 has caused crash if pjsua_call_get_info() is called with call ID that is within range but points to a disconnected call.

Thank you Marcus Froeschl for the report!

#1377 Crash on receiving call hold+unhold in pjsua-lib bennylp defect normal release-2.0-alpha2 pjsua-lib
#1379 API to check if video stream is running bennylp task normal release-2.0-alpha2 pjsua-lib
Description

New API is added to allow application to quickly check if a particular video stream is currently running (i.e. has been created and started and not currently being paused):

PJ_DECL(pj_bool_t) pjsua_call_vid_stream_is_running(pjsua_call_id call_id,
                                                    int med_idx,
                                                    pjmedia_dir dir);

PJ_DECL(pj_bool_t) pjmedia_vid_stream_is_running(pjmedia_vid_stream *stream,
                                                 pjmedia_dir dir);


#1398 TURN initialization failure scenario bennylp defect normal release-2.0-beta pjsua-lib
Description

When TURN is configured with bad server name, couple of error scenarios will occur. For example, configure pjsua with the following:

--use-ice
--use-turn
--turn-srv turn.baddomain.com

Scenario 1:

Crash will occur with the above config.

Scenario 2:

if nameserver is configured (i.e add --nameserver cmdline option containing your local router IP address), the crash will not happen, but the application is not notified that the call has failed (i.e on_call_state() callback is not called).

#1402 Crash when adding new media bennylp defect normal release-2.0-beta pjsua-lib
Description

Crash when adding new media.

#1403 Assertion in generating SDP re-offer containing unknown media types bennylp defect normal release-2.0-beta pjsua-lib
Description

Unknown media types may be introduced by previous remote offer and those unknown media types are not handled correctly in generating re-offer.

#1406 Add info about ICE candidates being used in transport info and pjsua's call dump output bennylp enhancement normal release-2.0-beta pjsua-lib
Description

Add candidates info in pjmedia ICE transport's specific info, and output it in pjsua dump. It will look something like this:

    Call time: 00h:00m:35s, 1st res in 3301 ms, conn in 3305ms
    #0 audio PCMU @8kHz, sendrecv, peer=10.0.0.178:46930
       SRTP status: Not active Crypto-suite: (null)
       ICE role: Controlled, state: Negotiation Success, comp_cnt: 2
          [0]: L:1.1.1.1:32838 (h) --> R:1.2.2.2:46930 (h)
          [1]: L:1.1.1.1:37090 (h) --> R:1.2.2.2:33720 (h)
#1407 Deadlock in initial resolution of STUN server bennylp defect normal release-1.12 pjsua-lib
Description

Deadlock may occur when trying to resolve and test the STUN servers in pjsua-lib.

#1412 Account specific NAT settings: STUN, ICE, and TURN bennylp enhancement normal release-2.1 pjsua-lib
Description

With #539 it is now possible to configure STUN, ICE, and TURN settings on per account basis. This is needed for example when application is supporting multiple accounts where one is connecting through Internet and the other is through VPN. The specification is as follows.

Enable/disable STUN per account

The STUN server settings are still in the global pjsua_config. New settings are introduced in the account config to disable or enable STUN for either SIP or media transports: sip_stun_use and media_stun_use:

/**
 * This enumeration controls the use of STUN in the account.
 */
typedef enum pjsua_stun_use
{
    /**
     * Follow the default setting in the global \a pjsua_config.
     */
    PJSUA_STUN_USE_DEFAULT,

    /**
     * Disable STUN. If STUN is not enabled in the global \a pjsua_config,
     * this setting has no effect.
     */
    PJSUA_STUN_USE_DISABLED

} pjsua_stun_use;

struct pjsua_acc_config
{
    ...

    /**
     * Control the use of STUN for the SIP signaling.
     *
     * Default: PJSUA_STUN_USE_DEFAULT
     */
    pjsua_stun_use 		sip_stun_use;

    /**
     * Control the use of STUN for the media transports.
     *
     * Default: PJSUA_STUN_USE_DEFAULT
     */
    pjsua_stun_use 		media_stun_use;

    ...
};

ICE and TURN settings per account

New ICE and TURN configurations in the account config to override the global config in the pjsua_media_config:

/**
 * This enumeration controls the use of ICE settings in the account.
 */
typedef enum pjsua_ice_config_use
{
    /**
     * Use the default settings in the global \a pjsua_media_config.
     */
    PJSUA_ICE_CONFIG_USE_DEFAULT,

    /**
     * Use the custom \a pjsua_ice_config setting in the account.
     */
    PJSUA_ICE_CONFIG_USE_CUSTOM

} pjsua_ice_config_use;

/**
 * This enumeration controls the use of TURN settings in the account.
 */
typedef enum pjsua_turn_config_use
{
    /**
     * Use the default setting in the global \a pjsua_media_config.
     */
    PJSUA_TURN_CONFIG_USE_DEFAULT,

    /**
     * Use the custom \a pjsua_turn_config setting in the account.
     */
    PJSUA_TURN_CONFIG_USE_CUSTOM

} pjsua_turn_config_use;

/**
 * ICE setting. This setting is used in the pjsua_acc_config.
 */
typedef struct pjsua_ice_config
{
    /**
     * Enable ICE.
     */
    pj_bool_t		enable_ice;

    /**
     * Set the maximum number of host candidates.
     *
     * Default: -1 (maximum not set)
     */
    int			ice_max_host_cands;

    /**
     * ICE session options.
     */
    pj_ice_sess_options	ice_opt;

    /**
     * Disable RTCP component.
     *
     * Default: no
     */
    pj_bool_t		ice_no_rtcp;

} pjsua_ice_config;

/**
 * TURN setting. This setting is used in the pjsua_acc_config.
 */
typedef struct pjsua_turn_config
{
    /**
     * Enable TURN candidate in ICE.
     */
    pj_bool_t		enable_turn;

    /**
     * Specify TURN domain name or host name, in in "DOMAIN:PORT" or
     * "HOST:PORT" format.
     */
    pj_str_t		turn_server;

    /**
     * Specify the connection type to be used to the TURN server. Valid
     * values are PJ_TURN_TP_UDP or PJ_TURN_TP_TCP.
     *
     * Default: PJ_TURN_TP_UDP
     */
    pj_turn_tp_type	turn_conn_type;

    /**
     * Specify the credential to authenticate with the TURN server.
     */
    pj_stun_auth_cred	turn_auth_cred;

} pjsua_turn_config;

struct pjsua_acc_config
{
    ...

    /**
     * Control the use of ICE in the account. By default, the settings in the
     * \a pjsua_media_config will be used.
     *
     * Default: PJSUA_ICE_CONFIG_USE_DEFAULT
     */
    pjsua_ice_config_use	ice_cfg_use;

    /**
     * The custom ICE setting for this account. This setting will only be
     * used if \a ice_cfg_use is set to PJSUA_ICE_CONFIG_USE_CUSTOM
     */
    pjsua_ice_config		ice_cfg;

    /**
     * Control the use of TURN in the account. By default, the settings in the
     * \a pjsua_media_config will be used
     *
     * Default: PJSUA_TURN_CONFIG_USE_DEFAULT
     */
    pjsua_turn_config_use	turn_cfg_use;

    /**
     * The custom TURN setting for this account. This setting will only be
     * used if \a turn_cfg_use is set to PJSUA_TURN_CONFIG_USE_CUSTOM
     */
    pjsua_turn_config		turn_cfg;

    ...
};

Contact header generation

The initial value of Contact header will take into account whether STUN is enabled or disabled in the account. If it is disabled, local IP will be used. More over, for UDP transport, if STUN is not used or disabled for the account, an attempt will be made to use the correct IP interface to be placed in the Contact URI.

No change for TCP; the correct IP has already been selected in the Contact URI.

Subsequent update to the Contact header doesn't change.

Via sent-by generation

Initial Via sent-by value now will be affected by STUN setting in the account. If it is disabled, local IP will be used. More over, for UDP transport, if STUN is not used or disabled for the account, an attempt will be made to use the correct IP interface to be placed in the Contact URI.

No change for TCP; the correct IP has already been displayed in the Via sent-by.

Subsequent update of the value doesn't change; it follows the rules in #1537.

Media transports

STUN, ICE, and TURN setup of the media transports now will follow the account config settings instead.

pjsua

New option --disable-stun is added.

#1415 Handle potential crash if joining worker thread fails in pjsua_destroy() bennylp defect normal release-1.12 pjsua-lib
Description

This is to handle hypothetical situation when pj_thread_join() calls in pjsua_destroy2() fail to wait for the worker thread to terminate. In this case, we would expect the worker thread to crash because things would have been cleaned up by pjsua_destroy2().

#1418 Library restart fails with PJLIB_UTIL_ESTUNNOTRESPOND error after several times bennylp defect normal release-1.14 pjsua-lib
Description

Restarting the library may fail with PJLIB_UTIL_ESTUNNOTRESPOND error, after the library has been restarted several times. The only way to fix is to close and restart the application.

This is mainly observed on Android platform when ICE is disabled and STUN is enabled.

This isssue was first discussed in the discussion in csipsimple issue tracker.

#1419 Media count manipulation in call basis (thanks Bogdan Krakowski for the suggestion) bennylp enhancement normal release-2.0-beta pjsua-lib
Description

Currently, media count setting is configurable via account setting only, which not really ideal for application, e.g: need to modify the account setting just for enabling video in an audio only session. So, media count manipulation should be done per call basis rather than per account basis.

#1423 Verify call media states after a re-offer rejected by peer bennylp defect normal release-2.0-rc pjsua-lib
Description

Sending a re-offer with new call setting will modify call media states, and the call media states need to be reverted back when the re-offer is rejected by peer.

#1424 New PJSUA callback of incoming re-offer bennylp enhancement normal release-2.0-beta pjsua-lib
Description

Currently, any incoming re-offer will be auto answered with 200/OK and the SDP answer is generated based on the current call setting. With this new callback, application will have a chance to reject the re-offer (so the existing media session will remain active), or accept the re-offer with updated call setting.

#1425 Assertion on format type check when using conference switchboard bennylp defect normal release-2.0-beta pjsua-lib
#1426 Race condition in auto-closing and/or auto-opening of the sound device bennylp defect normal release-1.14 pjsua-lib
Description

Lack of mutex protection in auto-closing and auto-opening of the sound device may cause incorrect closing or opening of the sound device.

#1427 Assertion in initiating video in an audio only call bennylp defect normal release-2.0-beta pjsua-lib
Description

Steps to reproduce:

  • start pjsua w/ video disabled, i.e: omit '--video'
  • receive incoming call w/ video
  • accept the call
  • enable video, e.g: 'vid call enable 1'

Assertion raised in pjsua_media_channel_update() in pjsua_media.c:2689:

PJ_ASSERT_RETURN(neg && !pjmedia_sdp_neg_was_answer_remote(neg),
			 PJMEDIA_SDPNEG_EINSTATE);
#1428 Review the case of no active media after SDP negotiation bennylp defect normal release-2.0-rc pjsua-lib
Description

Even there is no matching codec in all media, pjsua will always respond 200/OK with all media disabled (no active media), this occurs in initial and subsequent offers.

Potential issue with such behaviour:

  • initial offer: incoming call callback is invoked, so user may answer the call but suddenly the call got hung up (by remote pjsua as it detects no active media).
  • subsequent offer: existing media streams may get updated to disabled mode (as the 200/OK response).

Note:

  • the behaviour of 1.x seems okay:
    • initial offer: auto reject with 488/500, so no incoming call callback is invoked.
    • subsequent offer: auto reject with 488/500, so existing the media session remain active.
  • need to check the behaviour when no active media is caused by all media are originally disabled in the offer?
#1430 Crash when dialog is prematurely destroyed during outgoing call (thanks Bogdan Krakowski for the report) bennylp defect normal release-2.0-beta pjsua-lib
Description

The crash happened when a dialog usage for OPTIONS is added at the end of making a call.

#1433 Assertion in re-enable video when ICE is enabled bennylp defect normal release-2.0-beta pjsua-lib
Description

When ICE transport initialization is to be done in synchronized mode, currently PJSUA always releases PJSUA lock first to let other thread use the lock while waiting for the transport initialization, however if the lock is actually not being held by this thread, it will trigger assertion.

#1434 Add PJSUA_LOCK_IS_LOCKED() bennylp enhancement normal release-2.0-beta pjsua-lib
#1436 Review access to account config in call bennylp defect normal release-2.x pjsua-lib
Description

PJSUA call accesses account config after the call initialization is done (e.g: media update gets srtp setting, default video device setting directly from account config), this causes problem as account can be deleted without hanging up its calls.

#1442 Unable to make call if disabled media is included bennylp defect normal release-2.0-rc pjsua-lib
Description

When making call using the flag PJSUA_CALL_INCLUDE_DISABLED_MEDIA with video being disabled, call initialization will get stuck because we are waiting for all media (including disabled) to finish media transport creations.

#1444 Video stream not transmitting when native preview is used (thanks Régis Montoya for the fix) bennylp defect normal release-2.0-rc pjsua-lib
Description

It turns out that video capture port is not connected to anywhere when video capture device uses native preview.

#1445 Optimization: disconnect/reconnect video preview window from video tee when hidden/shown bennylp enhancement minor release-2.x pjsua-lib
#1452 Wrong call media state is reported if hold request is challenged with authentication (thanks Bogdan Krakowski for the fix) bennylp defect normal release-1.14 pjsua-lib
Description

Wrong call media state is reported if hold request is challenged with authentication. In this case, pjsua will report call media status as ACTIVE even if the call is successfully put on hold after the authentication retry. This is because the call's local_hold state is cleared the first time 401/407 response is received.

Thanks Bogdan Krakowski for the fix.

#1459 Assertion when making call to any destination with unresolved host name (thanks Curt Sampson for the report) bennylp defect normal release-2.0-rc pjsua-lib
Description

The original report can be found here.

When I make a call to a SIPS URI with a host part that resolves to an
IP address, albeit one with nobody listening for SIP connections on it,
the program fails in the appropriate manner. However, when I make a call
with a SIPS URI that does not resolve in DNS (i.e., there's no A or any
other type of record for it), the program instead dies due to an ABRT
(6) signal, which appears to be due to the following assertion failure:

 ../src/pj/os_core_unix.c:1201: pj_mutex_lock: Assertion `mutex' failed.

Easily reproduced by making a call to any unresolved destination or via unresolved proxy without specifying DNS server and without STUN/ICE (synchronous media channel init).

#1461 pjsua_call_make_call: assertion failure when rapidly making calls bennylp defect normal release-2.0-rc pjsua-lib
Description

When user makes calls pretty rapidly, he will get:

Assertion failed: (a->addr.sa_family == PJ_AF_INET
a->addr.sa_family == PJ_AF_INET6), function pj_sockaddr_get_len, file ../src/pj/sock_common.c, line 387.

The problem happens because if a call hasn't created an invite session, its call id can still be allocated to another call.

#1463 Separation of PJMEDIA specific implementation to support third party media stack/library in PJSUA-LIB bennylp enhancement normal release-2.0-rc pjsua-lib
Description

This ticket implements support for integrating third party media stack into PJSUA-LIB. By following these steps below, application can use third party media stack to perform audio and video functionality while still making use of the full SIP, NAT, and security (including SRTP) features provided by PJSUA-LIB API.

By disabling PJMEDIA, the following features will not be available in PJSUA-LIB (unless the equivalent implementation is provided by the third party media library):

  • sound device management
  • echo cancellation
  • codecs
  • jitter buffer
  • RTP and RTCP
  • WAV playback and recording
  • conference bridge
  • DTMF with RFC 2833
  • and so on, except explicitly mentioned below

The following features will still be available:

  • all SIP features, including SIP registration, etc.
  • SDP and SDP negotiation
  • NAT traversal features (including ICE)
  • security features including TLS and SRTP
  • media transports

Follow these steps to integrate third party media library with PJSUA-LIB:

  1. Declare this in pjlib/include/pj/config_site.h:
    #define PJSUA_MEDIA_HAS_PJMEDIA    0
    
    to exclude PJMEDIA specific implementation from PJSUA-LIB library. Understandably you will loose all media features in PJSUA-LIB (this will be handled by your third party media stack).
  2. Also copy suggested settings from pjsip-apps/src/3rdparty_media_sample/config_site.h into pjlib/include/pj/config_site.h. These settings are mostly used to exclude unneeded media components from the link process.
  3. Build the libraries, but this time using
    $ make lib
    
    instead of just make or make all. This is because most samples will no longer build due to missing media in PJSUA-LIB, hence normal make will fail on these apps. The make lib command only builds the libraries and unit tests for the libraries.
  4. Go to directory pjsip-apps/src/3rdparty_media_sample. This is a sample application with hook points to integrate third party media library. Fill in the media implementation in the alt_pjsua_xxx.c files, following the "TODO" notes. Run make to build the application. Once it's built, run alt_pjsua just as you run the usual pjsua application (it's essentially the same app!).
#1464 Deadlock between PJSUA LOCK and conference mutex (thanks Marcus Froeschl for the report) bennylp defect normal release-1.14 pjsua-lib
Description

Deadlock scenario:

Thread 1 (audio playback thread):

  1. play_cb() calls conference get_frame()
  2. conference mutex is acquired, and conf starts collecting frames from ports
  3. wav player (a conf port member) triggers EOF callback to application
  4. application calls pjsua_conf_disconnect()
  5. check_snd_dev_idle() in pjsua_conf_disconnect() tries to acquire PJSUA LOCK that is being held by thread 2.

Thread 2 (pjsua worker thread):

  1. pjsua_call_on_state_changed() invoked
  2. PJSUA LOCK is acquired
  3. pjsua triggers on_call_state() callback to application
  4. application calls pjsua_conf_connect()
  5. pjsua_conf_connect() waits for conference mutex that is being held by thread 1.
#1467 Crash in destroying pjsua with an active call and sound device managed by app (thanks Thomas Martin for the report). bennylp defect normal release-2.0-rc pjsua-lib
Description

Assertion (and sometimes access violations) when calling pjsua_destroy2(PJSUA_DESTROY_NO_NETWORK) in response to a network change (e.g. WiFi? to 3G or vice versa), if an incoming call happens to ring at that moment.

Assertion:

Assertion failed: (mutex->owner == pj_thread_this()),
function pj_mutex_unlock, file ../src/pj/os_core_unix.c, line 1256.

Crash callstack trace:

#0	0x00081410 in pjmedia_conf_get_connect_count ()
#1	0x00054dbe in check_snd_dev_idle ()
#2	0x00055f3a in pjsua_media_channel_deinit ()
#3	0x00057be8 in pjsua_media_subsys_destroy ()
#4	0x000510e4 in pjsua_destroy2 ()
#1481 Registration client should release transport when TCP/TLS transport gets disconnected bennylp defect normal release-1.14 pjsua-lib
Description

The regc keeps a reference to the last transport being used in order to prevent it from being destroyed. In some situation however, such as when the transport is disconnected, it is necessary to instruct the regc to release this reference so that the transport can be destroyed.

#1483 Unexpected re-registration in modifying account config bennylp defect normal release-1.14 pjsua-lib
Description

Modifying account config settings, i.e: via pjsua_acc_modify(), is not supposed to always trigger re-registration, for example modifying call or media settings such as SIP session timer, SRTP settings. However, such unexpected re-registration case has been found.

After investigation, it seems to be caused by that proxy setting is mistakenly detected as being modified. The proxy change detection is done using CRC comparison, and the initial CRC calculation in pjsua_acc_add() is performed before the proxy URI normalization.

#1484 pjsua_modify_acc() does not apply registration timeout/expire setting update (thanks Samuel Vinson for the report) bennylp defect normal release-1.14 pjsua-lib
Description

Issues reported:

  • No re-registration after updating registration timeout.
  • If manual re-registration is performed, still the SIP REGISTER message doesn't use the new timeout setting.

Original report can be found here.

#1492 The echo options field in the media config and pjsua_set_ec() argument are ignored bennylp defect minor release-1.14 pjsua-lib
Description

Both the EC options (ec_options) field in the media config and in pjsua_set_ec() argument are ignored and don't have any effect to the echo cancellation setting.

#1493 Fixed bug in terminating the invite session when accepting incoming call bennylp defect normal release-2.0-rc pjsua-lib
#1495 UDP keep-alive is still running even after account is deleted. It cannot be updated with pjsua_acc_modify() either. bennylp defect normal release-1.14 pjsua-lib
Description

The UDP keep-alive on the account is still running even after the account is deleted with pjsua_acc_del(). Updating the ka_interval with pjsua_acc_modify() also has no effect on the keep-alive.

#1496 Crash in destroying pjsua while a call is disconnecting with incomplete SDP negotiation bennylp defect normal release-2.0-rc pjsua-lib
Description

Crash occurs in pjsua_media_prov_clean_up() as it tries to close (mistakenly detected as unused) transports which actually already closed by pjsua_media_subsys_destroy().

Easily reproducible with python tests: scripts-recvfrom/300_timer_good.py, scripts-recvfrom/301_timer_good_retry_after_422.py, scripts-sendto/360_non_sip_uri.py, scripts-sendto/362_non_sip_uri.py

#1497 Crash in pjsua destroy after an incoming call rejected with session timer too small bennylp defect normal release-2.0-rc pjsua-lib
Description

The call is terminated prematurely (before 100 response is sent), in a normal way (remote session timer value is too small than the minimum value specified), but call->inv pointer is not resetted to NULL. When pjsua is being destroyed, any access to the bad pointer call->inv, e.g: by pjsua_call_hangup_all(), will trigger crash.

Reproducible with python test scripts-sendto\174_timer_se_too_small.py.

#1505 Cannot modify account ID or registrar (thanks Peter Koletzki for the report) bennylp defect normal release-1.14.2 pjsua-lib
Description

When an account is already registered, modifying id or reg_uri via pjsua_acc_modify() does not works as expected. The new parameter are stored, but not used for the following REGISTER.

#1506 Add PJSUA callback for SDP creation (thanks Peter Koletzki for the feedback) bennylp enhancement normal release-2.0 pjsua-lib
Description

Use cases (identified so far):

  • applying codecs priorities per account/call basis
  • adding proprietary SDP attributes
  • ...
#1507 pjsua_transport_get_info() not support TLS (thanks Gustavo Garcia Bernardo for the patch) bennylp defect normal release-1.14.2 pjsua-lib
Description

Reported that the implementation doesn't support SIP TLS transport (PJ_EINVALIDOP is returned and it may trigger assertion). This is specially needed as pjsua_transport_get_info() is automatically invoked when creating the transport using the python wrapper.

Original report+patch can be found here.

#1511 Assertion after peer removes a media line in an SDP reoffer and adds it back in the next SDP reoffer (thanks Ilya Kalinin for the report) bennylp defect normal release-2.0 pjsua-lib
Description

The assertion line:

Assertion failed: (!"Currently no media transport reuse"), function 
pjsua_call_media_init, file ../src/pjsua-lib/pjsua_media.c, line 1260.

Scenario:

  1. call established with audio and video (two "m=" lines)
  2. receive SDP re-offer with one "m=" line, i.e: audio only, answered with one "m=" line too, and media is updated fine
  3. receive another SDP re-offer with two "m=" lines, i.e: audio and video.
#1514 Assertion when media transport initialization fails and NULL instead DISCONNECTED is reported in the on_call_state() callback bennylp defect normal release-2.0 pjsua-lib
Description

There are two problems:

  1. When media transport initialization fails, it looks like PJSUA-LIB ignores this and continue with the call, causing assertion that looks like this:
    pjsua-x86_64-unknown-linux-gnu: ../src/pjmedia/endpoint.c:770: 
    pjmedia_endpt_create_base_sdp: Assertion `!"Invalid address family"' failed.
    
  2. When the above is fixed, the call gets disconnected as expected. But during disconnection callback via on_call_state() callback, call state is reported as NULL instead of DISCONNECTED.
#1515 Sound device is not closed when the call fails to connect (thanks Régis Montoya for the report) bennylp defect normal release-2.0.1 pjsua-lib
Description

The sound device is opened when call is initiated. When the call fails to connect, the sound device is not closed by the library.

#1519 pjsua2: New high level API in C++ on top of PJSUA-LIB bennylp enhancement normal release-2.2 pjsua-lib
Description

A new object oriented (C++) API on top of PJSUA-LIB. Currently lives in pjsua2 branch.

#1526 Assertion when receiving INVITE with no SDP and video is deactivated (thanks Bogdan Krakowski for the report) bennylp defect normal release-2.0.1 pjsua-lib
Description

Reproducing steps with pjsua:

  1. build pjsua with video feature
  2. run the pjsua without --video param, so video is deactivated
  3. send INVITE to pjsua without SDP
  4. answer the call, e.g: "a" then "200", there will be video in the SDP (which should not!)
  5. send ACK to pjsua with SDP answer with video in the answer is enabled too

After investigation, after receiving incoming call, PJSUA will immediately start media channel init and create SDP with default call setting, i.e: audio and video count both set to 1, and when application call pjsua_call_answer() with different call setting, e.g: video count set to 0, the media channel update doesn't like such inconsistency when we are as SDP offerer and will trigger an assertion.

The solution should consider the requirements below:

  • be able to initialize media with the settings based on user confirmation
  • should avoid excessive/repeated initialization (e.g: multiple SDP or transport creation)
  • simple and minimal changes is prefered
#1533 Deadlock in processing media transport asynchronous creation completion (thank you Itay Bianco for the report) bennylp defect normal release-2.0.1 pjsua-lib
Description

ICE media transport creation completes asynchronously. Deadlock may occur when this even happens simultaneously with an incoming request (such as CANCEL), due to different mutex locking order that the two flows use.

#1534 Add provisional media info into call info (thanks Claudio De Angelis for the feedback) bennylp enhancement normal release-2.0.1 pjsua-lib
Description

Since #1423, the media info in the call info corresponds to active media, so in call setup, it will remain empty/unset until the media channel update is done. While some applications may need to retrieve the provisioning media info, e.g: for setting up media transport adapter based on media type from on_create_media_transport() callback.

#1540 Modify MWI subscription setting on run-time and add callback for the subscription state change bennylp enhancement normal release-2.0.1 pjsua-lib
Description

Modifiable settings to be implemented:

  • pjsua_acc_config.mwi_expires: subscription expiration interval (compile-time default & run-time)
  • pjsua_acc_config.mwi_enabled: to enable or disable MWI subscription. It can be updated via pjsua_acc_modify() to start or stop MWI subscription.

When there is a MWI subscription state change, pjsua callback on_mwi_state() will be called.

MWI subscription will be terminated when deleting the associated account.

Thanks Peter Koletzki and Matynka Bartosz for the feedbacks.

#1550 Auto re-registration does not work if application does not set on_transport_state(). bennylp defect normal release-2.1 pjsua-lib
Description

PJSUA auto-registration is not invoked unless the application is listening for the PJSUA on_transport_state() callback.

Original report and the proposed fix can be found here.

Thanks Gustavo Garcia Bernardo for the report and fix.

#1553 Account setting to disable re-INVITE or UPDATE to lock codec bennylp enhancement normal release-2.1 pjsua-lib
Description

When remote sends SDP answer containing more than one formats or codecs in the media line, PJSUA-LIB sends re-INVITE or UPDATE with just one codec to lock which codec to use.

This behavior can now be disabled by setting pjsua_acc_config.lock_codec to zero.

#1555 Bug with via_rewrite feature when the account gets deleted (thanks to Regis Montoya for the report) bennylp defect normal release-2.1 pjsua-lib
Description

If allow_via_rewrite option is enabled and the account is deleted with pjsua_acc_del(), the unregistration will send a via address with weird characters or without address at all.

This is because the account's via address is already deleted while the unregistration process is not finished yet.

#1563 Crash when resolving STUN when there is no network connectivity bennylp defect normal release-2.1 pjsua-lib
Description

To reproduce: run pjsua with --stun-server <IP-ADDRESS> without network connectivity.

#1567 Option to use STUN2 format for resolving mapped address bennylp enhancement normal release-2.1 pjsua-lib
Description

Currently pjstun_get_mapped_addr() is using old STUN format (RFC3489). While some STUN servers may not like STUN request with old STUN format and will not respond to such requests.

Thanks Marcus Froeschl for the report.

#1568 Smarter media re-initialization on call refresh with SDP re-offer/answer bennylp enhancement normal release-2.1 pjsua-lib
Description

Always re-initializing the media on call refresh can be annoying, especially for a call with video as video re-init may take several seconds.

Thanks Matynka Bartosz for the feedback.

#1572 Modifying video stream in a call caused duplicate transport attributes in the SDP (thanks to Itay Bianco for the report) bennylp defect normal release-2.1 pjsua-lib
Description

When pjsua_vid.c's call_modify_video() is called, the current SDP will be cloned then the media transport attributes will be added to the SDP by calling pjmedia_transport_encode_sdp(). This can cause duplicate attributes if the current SDP already has media transport attributes.

To reproduce using pjsua: Enable ICE, establish a call, modify the video stream (such as "vid call rx off 1")

#1574 Failure to initialize media channel when answering call using pjsua_call_answer()/answer2() with opt set to NULL (thanks to Regis for the report) bennylp defect normal release-2.1 pjsua-lib
Description

Related to the fix of ticket #1526, when answering call using pjsua_call_answer()/answer2() with opt set to NULL, the media channel is never initialized because the condition:

(call->opt_inited || (code==183 && code/100==2))

can never be TRUE.

#1578 Possible deadlock when call is adding new media with ICE and STUN enabled bennylp defect normal release-2.1 pjsua-lib
Description

Deadlock may happen if call is adding new media (e.g. adding video) with ICE enabled and more than one worker threads are used. The flow is below:

  1. Call is established with audio only.
  2. Re-INVITE with video is received, on_call_rx_offer() is called, which eventually calls create_ice_media_transport() which works synchronously. The dialog mutex is held by current thread at this point. The current thread then runs pjsua_handle_events() in a loop.
  3. on_ice_complete() is called called with PJ_ICE_STRANS_OP_INIT, which posts the job as timer event.
  4. another thread picks up the timer event, med_tp_timer_cb() is called, which calls acquire_call() and got stuck when acquiring dialog mutex which is being held by the polling thread above.

Thanks Itay Bianco for the report!

#1580 Assertion in local SDP validation when using SRTP mandatory and receiving offer with SRTP optional duplicated media bennylp defect normal release-2.1 pjsua-lib
Description

Reproducing steps:

  1. Start pjsua with --srtp-secure 0 --use-srtp 2
  2. Send INVITE to the pjsua with SDP offer such as:
    v=0
    o=- 518818627584 526334820353 IN IP4 127.0.0.1
    s=Audio call
    c=IN IP4 127.0.0.1
    t=0 0
    m=audio 7016 RTP/SAVP 0
    c=IN IP4 127.0.0.1
    a=crypto:1 AES_CM_128_HMAC_SHA1_80 
      inline:qgQj9Tl/cb2VQxxDAkoy6CATjPrlsqtGJU7DYST/
    m=audio 7016 RTP/AVP 0
    

Thanks Peter Koletzki for the report.

#1584 Custom media transport creation callback is not always called (thanks to Fredrik Hansson for the report) bennylp defect normal release-1.16 pjsua-lib
Description

Steps to reproduce: First, create a call that doesn't use custom med tp. Then disconnect the call and make a call again (that is assigned to the same call id), custom media transport creation callback will not be called since call->med_orig is not NULL.

#1588 State PJSIP_INV_STATE_NULL is called after call has been disconnected bennylp defect normal release-2.1 pjsua-lib
Description

When sending initial INVITE fails due to network failure (for example, setting iPhone iOS to AirPlane mode, or network is down), the on_call_state() callback will be called twice: first with PJSIP_INV_STATE_DISCONNECTED, then followed by PJSIP_INV_STATE_NULL.

This may cause unexpected state transition in the application. With pjsua for example, it causes the call to be set as active call when there is no other call.

Thanks Kees van der Bent for the report.

#1591 Fixed dialog locking in acquire_call() when media transport is created asynchronously. bennylp defect normal release-2.1 pjsua-lib
#1595 Allow call hangup immediately after outgoing call bennylp enhancement normal release-2.1 pjsua-lib
Description

Currently for outgoing call, app has to wait until media transport creation is completed before it can hang up the call. This ticket allows call hangup request at any time, when media transport creation hasn't finished, PJSIP will queue the request and process it once media tp completes.

#1597 Handle socket failure in STUN resolution when coming back from iPhone/iOS background mode bennylp defect normal release-2.1 pjsua-lib
Description

Normally UDP socket operations will fail with "Broken pipe" or "Socket is not connected" error after the app is woken up from background mode. This has been handled automatically by the ioqueue. However the STUN resolution in PJSUA-LIB does not use ioqueue hence this will cause media transport initialization (and ultimately the call) to fail.

#1599 Fixed bug that caused new contact not being used in UPDATE/re-INVITE bennylp defect normal release-2.1 pjsua-lib
#1605 Cannot enable video via pjsua_call_reinvite2()/update2() bennylp defect normal release-2.1 pjsua-lib
Description

Reproducing steps:

  1. A makes a video call to B, with vid_cnt == 1 in the call setting.
  2. B rejects the video
  3. A tries to enable video by sending re-INVITE with vid_cnt == 1 in the new call setting.
  4. The SDP offer sent by A still has video media line disabled (port zero).

After investigation, the SDP generation for the re-INVITE doesn't initialize the video media, technically because the pjsua_media_channel_init() is skipped due to "no update" on media count setting (vid_cnt in this case). So it is the check of media-count-update that is actually buggy.

Thanks Itay Bianco for the report.

#1607 Send UDP keep-alive to original request address if response comes from different address bennylp defect normal release-2.1 pjsua-lib
Description

For UDP, the spec says that server MUST send the response from the same address where the request was received (RFC 3581 Section 4). However, in case the server is violating this spec, PJSIP would send the UDP keep-alive to the source address of the response instead.

This ticket fixes this behavior so that the keep alive will be sent to the original request address instead.

Thanks Fredrik Hansson for the report.

#1626 Assertion when remote sends re-INVITE with less media bennylp defect normal release-2.1 pjsua-lib
Description

When remote sends re-INVITE with less media, it will cause subsequent outgoing re-INVITE to produce an assertion: (mi < s_->media_count) in pjsua_media_channel_create_sdp().

#1627 Callback on_tsx_state_changed() not invoked on call disconnection bennylp defect normal release-2.1 pjsua-lib
Description

When a call is disconnected, SIP invite module will call on_call_state(DISCONNECTED) first before on_tsx_state_changed(). However, in PJSUA, the on_call_state(DISCONNECTED) will reset PJSUA call states and the next incoming on_tsx_state_changed() will not be forwarded to the application, as it will not make sense for the application to still receive on_tsx_state_changed() after the call is disconnected (and the PJSUA call states are resetted).

An easy or low-risk workaround will be 'manually' invoking on_tsx_state_changed() from on_call_state(DISCONNECTED).

#1629 Add pjsua_call_set_hold2() API to allow update of Contact header bennylp enhancement normal release-2.2 pjsua-lib
#1632 Remove Contact header in MESSAGE requests (thanks to Anil Giri for the report) bennylp defect normal release-2.2 pjsua-lib
Description

According to RFC 3428: MESSAGE requests do not initiate dialogs. User Agents MUST NOT insert Contact header fields into MESSAGE requests.

#1635 Fixed the backport of ticket #1568 (smarter media update) to version 1.x (thanks to Toni Rutar for the report) bennylp defect normal release-1.16 pjsua-lib
#1637 Fixed crash in pjsua_media_channel_update() if one media gets rejected bennylp defect normal release-2.2 pjsua-lib
Description

If one of the medias gets disabled, the codec param of stream info is not set (i.e. NULL), causing the crash

#1642 Media transport may not be cleaned up if call is hung up quickly bennylp defect normal release-2.2 pjsua-lib
Description

Hanging up call quickly after making call may cause media transport to leak. This media transports will not get destroyed forever.

#1650 Close sound device when outgoing call fails bennylp defect normal release-2.2 pjsua-lib
#1652 Media feature tag "+sip.ice" is not used because of wrong account initialization sequence bennylp defect normal release-2.2 pjsua-lib
Description

Normally pjsua-lib would add "+sip.ice" media feature tag to account Contact parameters if ICE is enabled. However wrong initialization sequence in initialize_acc() function in pjsua_acc.c has caused this parameter to be omitted.

#1653 [incompatible] pjsua_call_update() API should not release hold bennylp defect normal release-2.2 pjsua-lib
Description

Bug in pjsua_call_update() API causes is to behave differently than pjsua_call_reinvite() in relation to call hold. With pjsua_call_update(), the default flags will cause call hold to be released, while with pjsua_call_reinvite() application has to explicitly specify PJSUA_CALL_UNHOLD to release hold.

This ticket changes the behavior of pjsua_call_update() to make it behave uniformly as pjsua_call_reinvite().

Unfortunately this breaks compatibility with existing application. Now if application wants to release call hold with pjsua_call_update(), it must specify PJSUA_CALL_UNHOLD in the options argument.

#1662 Call slot unavailable after some fail calls due to codec mismatch bennylp defect normal release-2.2 pjsua-lib
Description

Scenario to reproduce:

  1. A calls B.
  2. B rejects with 406 (not acceptable here) due to no matching audio codec available.
  3. Repeat the above two steps for about four more times (or as many as max calls setting).
  4. Now the B will reject with 486 (busy here), instead of 406.
  5. Any future making/incoming call will fail due to unavailable call slot until the stack is restarted.

After investigation, when PJSUA terminates a call due to media channel init error, the pointer to dialog (for async media transport creation), i.e: pjsua_call.async_call.dlg, is not nullified, while the call slot allocation will inspect this pointer (along with the INVITE session pointer) to check the call slot availability.

Note: See TracQuery for help on using queries.