-
Pjsip Codec Priority카테고리 없음 2020. 2. 26. 09:05
Poll pjsua for events, and if necessary block the caller thread for the specified maximum interval (in miliseconds).Application doesn't normally need to call this function if it has configured worker thread ( threadcnt field) in structure, because polling then will be done by these worker threads instead.If EpConfig::UaConfig::mainThreadOnly is enabled and this function is called from the main thread (by default the main thread is thread that calls ), this function will also scan and run any pending jobs in the list. Parameters msectimeoutMaximum time to wait, in miliseconds.Returns The number of events that have been handled during the poll. Negative value indicates error, and application can retrieve the error as (status = -returnvalue). Destroy pjsua.
Application is recommended to perform graceful shutdown before calling this function (such as unregister the account from the SIP server, terminate presense subscription, and hangup active calls), however, this function will do all of these if it finds there are active sessions that need to be terminated. This function will block for few seconds to wait for replies from remote.Application.may safely call this function more than once if it doesn't keep track of it's state. Parameters prmFlagsCombination of pjsuadestroyflag enumeration.utilStrError. Update the STUN servers list. The must have been called before calling this function. Parameters prmServersArray of STUN servers to try. The endpoint will try to resolve and contact each of the STUN server entry until it finds one that is usable.
Each entry may be a domain name, host name, IP address, and it may contain an optional port number. For example:.
Pjsip Codecs
'pjsip.org' (domain name). 'sip.pjsip.org' (host name). 'pjsip.org:33478' (domain name and a non- standard port number). '10.0.0.1:3478' (IP address and port number)prmWaitSpecify if the function should block until it gets the result. In this case, the function will block while the resolution is being done, and the callback will be called before this function returns.natCheckStunServers.
Auxiliary function to resolve and contact each of the STUN server entries (sequentially) to find which is usable. The must have been called before calling this function. Parameters prmServersArray of STUN servers to try. The endpoint will try to resolve and contact each of the STUN server entry until it finds one that is usable.
Each entry may be a domain name, host name, IP address, and it may contain an optional port number. For example:. 'pjsip.org' (domain name). 'sip.pjsip.org' (host name). 'pjsip.org:33478' (domain name and a non- standard port number).
'10.0.0.1:3478' (IP address and port number)prmWaitSpecify if the function should block until it gets the result. In this case, the function will block while the resolution is being done, and the callback will be called before this function returns.prmUserDataArbitrary user data to be passed back to application in the callback.See also natCancelCheckStunServers. Start graceful shutdown procedure for this transport handle. After graceful shutdown has been initiated, no new reference can be obtained for the transport. However, existing objects that currently uses the transport may still use this transport to send and receive packets. After all objects release their reference to this transport, the transport will be destroyed immediately.Note: application normally uses this API after obtaining the handle from callback. Parameters tpThe transport.hangupAllCalls.
Inform the stack that IP address change event was detected. This callback can be used by application to override the account to be used to handle an incoming message. Initially, the account to be used will be calculated automatically by the library.
This initial account will be used if application does not implement this callback, or application sets an invalid account upon returning from this callback.Note that currently the incoming messages requiring account assignment are INVITE, MESSAGE, SUBSCRIBE, and unsolicited NOTIFY. This callback may be called before the callback of the SIP event itself, i.e: incoming call, pager, subscription, or unsolicited-event. Parameters prmCallback parameters.References.
Notification about media events such as video notifications. This callback will most likely be called from media threads, thus application must not perform heavy processing in this callback. If application needs to perform more complex tasks to handle the event, it should post the task to another thread. Parameters prmCallback parameter.References,. The documentation for this class was generated from the following file:.PJSIP Open Source, high performance, small footprint, and very very portable SIP stackCopyright (C) 2006-2008 Teluu Inc.