PJSUA-lib module for python
Classes |
| |
- __builtin__.object
-
- Acc_Config
- Acc_Info
- Buddy_Config
- Buddy_Info
- Call_Info
- Callback
- Codec_Info
- Conf_Port_Info
- Config
- Logging_Config
- Media_Config
- Msg_Data
- PJMedia_Codec_Param
- PJMedia_Codec_Param_Info
- PJMedia_Codec_Param_Setting
- PJMedia_Port
- PJMedia_Snd_Dev_Info
- PJ_Time_Val
- Pj_Pool
- Pj_Pool_Factory
- Pjmedia_Endpt
- Pjsip_Cred_Info
- Pjsip_Endpoint
- Pjsip_Event
- Pjsip_Rx_Data
- Transport_Config
- Transport_Info
class Acc_Config(__builtin__.object) |
|
Acc Config objects |
|
Data descriptors defined here:
- allow_contact_rewrite
- Re-REGISTER if behind symmetric NAT.
- auth_initial_algorithm
- Specify algorithm in empty initial authorization header.
- auth_initial_send
- Send empty initial authorization header.
- cred_info
- Array of credentials. If registration is desired, normally there should be at least one credential specified, to successfully authenticate against the service provider. More credentials can be specified, for example when the requests are expected to be challenged by the proxies in the route set.
- force_contact
- Optional URI to be put as Contact for this account. It is recommended that this field is left empty, so that the value will be calculated automatically based on the transport address.
- id
- The full SIP URL for the account. The value can take name address or URL format, and will look something like 'sip:account@serviceprovider'. This field is mandatory.
- ka_data
- Keep-alive data.
- ka_interval
- Keep-alive interval.
- pidf_tuple_id
- PIDF tuple id.
- priority
- Account priority, which is used to control the order of matching incoming/outgoing requests. The higher the number means the higher the priority is, and the account will be matched first.
- proxy
- Optional URI of the proxies to be visited for all outgoing requests that are using this account (REGISTER, INVITE, etc). Application need to specify these proxies if the service provider requires that requests destined towards its network should go through certain proxies first (for example, border controllers).
- publish_enabled
- Publish presence?
- reg_timeout
- Optional interval for registration, in seconds. If the value is zero, default interval will be used (PJSUA_REG_INTERVAL, 55 seconds).
- reg_uri
- This is the URL to be put in the request URI for the registration, and will look something like 'sip:serviceprovider'. This field should be specified if registration is desired. If the value is empty, no account registration will be performed.
- require_100rel
- Require reliable provisional response.
- srtp_secure_signaling
- Specify if SRTP requires secure signaling to be used.
- transport_id
- Optionally bind this account to specific transport. This normally is not a good idea, as account should be able to send requests using any available transports according to the destination. But some application may want to have explicit control over the transport to use, so in that case it can set this field.
- use_srtp
- Specify SRTP usage.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e340>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Acc_Info(__builtin__.object) |
|
Acc Info objects |
|
Data descriptors defined here:
- acc_uri
- Account URI
- expires
- An up to date expiration interval for account registration session.
- has_registration
- Flag to tell whether this account has registration setting (reg_uri is not empty).
- id
- The account ID.
- is_default
- Flag to indicate whether this is the default account.
- online_status
- Presence online status for this account.
- online_status_text
- Presence online status text.
- status
- Last registration status code. If status code is zero, the account is currently not registered. Any other value indicates the SIP status code of the registration.
- status_text
- String describing the registration status.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e400>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Buddy_Config(__builtin__.object) |
|
Buddy Config objects |
|
Data descriptors defined here:
- subscribe
- Specify whether presence subscription should start immediately.
- uri
- TBuddy URL or name address.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e4c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Buddy_Info(__builtin__.object) |
|
Buddy Info objects |
|
Data descriptors defined here:
- activity
- Activity type.
- contact
- Buddy's Contact, only available when presence subscription has been established to the buddy.
- id
- The buddy ID.
- monitor_pres
- Flag to indicate that we should monitor the presence information for this buddy (normally yes, unless explicitly disabled).
- status
- Buddy's online status.
- status_text
- Text to describe buddy's online status.
- uri
- The full URI of the buddy, as specified in the configuration.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e580>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Call_Info(__builtin__.object) |
|
Call Info objects |
|
Data descriptors defined here:
- acc_id
- The account ID where this call belongs.
- call_id
- Dialog Call-ID string
- conf_slot
- The conference port number for the call
- connect_duration
- Up-to-date call connected duration(zero when call is not established)
- id
- Call identification
- last_status
- Last status code heard, which can be used as cause code
- last_status_text
- The reason phrase describing the status.
- local_contact
- Local Contact
- local_info
- Local URI
- media_dir
- Media direction
- media_status
- Call media status.
- remote_contact
- Remote Contact
- remote_info
- Remote URI
- role
- Initial call role (UAC == caller)
- state
- Call state
- state_text
- Text describing the state
- total_duration
- Total call duration, including set-up time
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2ec40>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Callback(__builtin__.object) |
|
This structure describes application callback to receive various event notifications from PJSUA-API |
|
Data descriptors defined here:
- on_buddy_state
- Notify application when the buddy state has changed. Application may then query the buddy into to get the details.
- on_call_media_state
- Notify application when media state in the call has changed. Normal application would need to implement this callback, e.g. to connect the call's media to sound device.
- on_call_replace_request
- Notify application about incoming INVITE with Replaces header. Application may reject the request by setting non-2xx code.
- on_call_replaced
- Notify application that an existing call has been replaced with a new call. This happens when PJSUA-API receives incoming INVITE request with Replaces header. After this callback is called, normally PJSUA-API will disconnect old_call_id and establish new_call_id.
- on_call_state
- Notify application when invite state has changed. Application may then query the call info to get the detail call states.
- on_call_transfer_request
- Notify application on call being transfered. Application can decide to accept/reject transfer request by setting the code (default is 200). When this callback is not defined, the default behavior is to accept the transfer.
- on_call_transfer_status
- Notify application of the status of previously sent call transfer request. Application can monitor the status of the call transfer request, for example to decide whether to terminate existing call.
- on_dtmf_digit
- Notify application upon receiving incoming DTMF digit.
- on_incoming_call
- Notify application on incoming call.
- on_pager
- Notify application on incoming pager (i.e. MESSAGE request). Argument call_id will be -1 if MESSAGE request is not related to an existing call.
- on_pager_status
- Notify application about the delivery status of outgoing pager request.
- on_reg_state
- Notify application when registration status has changed. Application may then query the account info to get the registration details.
- on_typing
- Notify application about typing indication.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2d8c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Codec_Info(__builtin__.object) |
|
Codec Info objects |
|
Data descriptors defined here:
- codec_id
- Codec unique identification.
- priority
- Codec priority (integer 0-255).
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e640>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Conf_Port_Info(__builtin__.object) |
|
Conf Port Info objects |
|
Data descriptors defined here:
- bits_per_sample
- Bits per sample
- channel_count
- Number of channels.
- clock_rate
- Clock rate
- listeners
- Array of listeners (in other words, ports where this port is transmitting to
- name
- Port name
- samples_per_frame
- Samples per frame
- slot_id
- Conference port number.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e700>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Config(__builtin__.object) |
|
Config object |
|
Data descriptors defined here:
- cb
- Application callback.
- max_calls
- Maximum calls to support (default: 4)
- nameserver
- IP address of the nameserver.
- outbound_proxy
- SIP URL of the outbound proxy (optional)
- stun_domain
- Domain of the STUN server (optional). STUN server will be resolved using DNS SRV resolution only when nameserver is configured. Alternatively, if DNS SRV resolution for STUN is not desired, application can specify the STUN server hostname or IP address in stun_host attribute.
- stun_host
- Hostname or IP address of the STUN server (optional).
- thread_cnt
- Number of worker threads. Normally application will want to have at least one worker thread, unless when it wants to poll the library periodically, which in this case the worker thread can be set to zero.
- user_agent
- User agent string (default empty)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2d980>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Logging_Config(__builtin__.object) |
|
Logging Config objects |
|
Data descriptors defined here:
- cb
- Optional callback function to be called to write log to application specific device. This function will be called forlog messages on input verbosity level.
- console_level
- Verbosity level for console. Value 4 is reasonable.
- decor
- Log decoration
- level
- Input verbosity level. Value 5 is reasonable.
- log_filename
- Optional log filename
- msg_logging
- Log incoming and outgoing SIP message? Yes!
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2da40>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Media_Config(__builtin__.object) |
|
Media Config objects |
|
Data descriptors defined here:
- audio_frame_ptime
- Audio frame length in milliseconds.
- channel_count
- Specify channel count (default 1).
- clock_rate
- Clock rate to be applied to the conference bridge. If value is zero, default clock rate will be used (16KHz).
- ec_options
- Echo canceller options (see pjmedia_echo_create())
- ec_tail_len
- Echo canceller tail length, in miliseconds.
- enable_ice
- Enable ICE.
- enable_turn
- Enable TURN.
- has_ioqueue
- Specify whether the media manager should manage its own ioqueue for the RTP/RTCP sockets. If yes, ioqueue will be created and at least one worker thread will be created too. If no, the RTP/RTCP sockets will share the same ioqueue as SIP sockets, and no worker thread is needed.
- ilbc_mode
- iLBC mode (20 or 30).
- jb_max
- Jitter buffer maximum size in milliseconds.
- jb_min
- Jitter buffer minimum size in milliseconds.
- max_media_ports
- Specify maximum number of media ports to be created in the conference bridge. Since all media terminate in the bridge (calls, file player, file recorder, etc), the value must be large enough to support all of them. However, the larger the value, the more computations are performed.
- no_vad
- Disable VAD?
- ptime
- Specify default ptime.
- quality
- The media quality also sets speex codec quality/complexity to the number.
- rx_drop_pct
- Percentage of RTP packet to drop in RX direction (to simulate packet lost).
- snd_auto_close_time
- Sound idle time before it's closed.
- snd_clock_rate
- Specify different clock rate of sound device, otherwise 0.
- thread_cnt
- Specify the number of worker threads to handle incoming RTP packets. A value of one is recommended for most applications.
- turn_conn_type
- Specify TURN connection type.
- turn_passw
- Specify the TURN password.
- turn_passwd_type
- Specify TURN password type.
- turn_realm
- Specify the TURN realm.
- turn_server
- Specify the TURN server.
- turn_username
- Specify the TURN username.
- tx_drop_pct
- Percentage of RTP packet to drop in TX direction (to simulate packet lost).
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2dbc0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Msg_Data(__builtin__.object) |
|
msg_data objects |
|
Data descriptors defined here:
- content_type
- MIME type of optional message body.
- hdr_list
- Additional message headers as linked list of strings.
- msg_body
- Optional message body.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2db00>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PJMedia_Codec_Param(__builtin__.object) |
|
PJMedia Codec Param objects |
|
Data descriptors defined here:
- info
- The 'info' part of codec param describes the capability of the codec, and the value should NOT be changed by application.
- setting
- The 'setting' part of codec param describes various settings to be applied to the codec. When the codec param is retrieved from the codec or codec factory, the values of these will be filled by the capability of the codec. Any features that are supported by the codec (e.g. vad or plc) will be turned on, so that application can query which capabilities are supported by the codec. Application may change the settings here before instantiating the codec/stream.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2eac0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PJMedia_Codec_Param_Info(__builtin__.object) |
|
PJMedia Codec Param Info objects |
|
Data descriptors defined here:
- avg_bps
- Average bandwidth in bits/sec
- channel_cnt
- Channel count
- clock_rate
- Sampling rate in Hz
- frm_ptime
- Base frame ptime in msec.
- pcm_bits_per_sample
- Bits/sample in the PCM side
- pt
- Payload type
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e940>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PJMedia_Codec_Param_Setting(__builtin__.object) |
|
PJMedia Codec Param Setting objects |
|
Data descriptors defined here:
- cng
- Comfort Noise Generator
- dec_fmtp_mode
- Mode param in fmtp (def:0)
- enc_fmtp_mode
- Mode param in fmtp (def:0)
- frm_per_pkt
- Number of frames per packet
- penh
- Perceptual Enhancement
- plc
- Packet loss concealment
- reserved
- Reserved, must be zero
- vad
- Voice Activity Detector
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2ea00>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PJMedia_Snd_Dev_Info(__builtin__.object) |
|
PJMedia Snd Dev Info objects |
|
Data descriptors defined here:
- default_samples_per_sec
- Default sampling rate.
- input_count
- Max number of input channels
- name
- Device name
- output_count
- Max number of output channels
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e880>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PJ_Time_Val(__builtin__.object) |
|
PJ Time Val objects |
|
Data descriptors defined here:
- msec
- The milliseconds fraction of the time
- sec
- The seconds part of the time
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2eb80>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Pjsip_Cred_Info(__builtin__.object) |
|
PJSIP credential information |
|
Data descriptors defined here:
- data
- The data, which can be a plaintext password or a hashed digest, depending on the value of data_type
- data_type
- Type of data
- realm
- Realm
- scheme
- Scheme
- username
- User name
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e100>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Transport_Config(__builtin__.object) |
|
Transport setting |
|
Data descriptors defined here:
- bound_addr
- Optional address where the socket should be bound to. This option SHOULD only be used to selectively bind the socket to particular interface (instead of 0.0.0.0), and SHOULD NOT be used to set the published address of a transport (the public_addr field should be used for that purpose).
- port
- UDP port number to bind locally. This setting MUST be specified even when default port is desired. If the value is zero, the transport will be bound to any available port, and application can query the port by querying the transport info.
- public_addr
- Optional address to advertise as the address of this transport. Application can specify any address or hostname for this field, for example it can point to one of the interface address in the system, or it can point to the public address of a NAT router where port mappings have been configured for the application.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e1c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Transport_Info(__builtin__.object) |
|
Transport Info objects |
|
Data descriptors defined here:
- addr
- Published address (or transport address name).
- flag
- Transport flag (see ##pjsip_transport_flags_e).
- id
- PJSUA transport identification.
- info
- Transport string info/description.
- port
- Published port number.
- type
- Transport type.
- type_name
- Transport type name.
- usage_count
- Current number of objects currently referencing this transport.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0xb7c2e280>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |
Functions |
| |
- acc_add(...)
- int, int _pjsua.acc_add (_pjsua.Acc_Config cfg, int is_default) Add a new account to pjsua. PJSUA must have been initialized (with pjsua_init()) before calling this function.
- acc_add_local(...)
- int,int _pjsua.acc_add_local (int tid, int is_default) Add a local account. A local account is used to identify local endpoint instead of a specific user, and for this reason, a transport ID is needed to obtain the local address information.
- acc_config_default(...)
- _pjsua.Acc_Config _pjsua.acc_config_default () Call this function to initialize account config with default values.
- acc_create_uac_contact(...)
- string _pjsua.acc_create_uac_contact (PyObj_pj_pool pool, int acc_id, string uri) Create a suitable URI to be put as Contact based on the specified target URI for the specified account.
- acc_create_uas_contact(...)
- string _pjsua.acc_create_uas_contact (PyObj_pj_pool pool, int acc_id, PyObj_pjsip_rx_data rdata) Create a suitable URI to be put as Contact based on the information in the incoming request.
- acc_del(...)
- int _pjsua.acc_del (int acc_id) Delete account.
- acc_enum_info(...)
- _pjsua.Acc_Info[] _pjsua.acc_enum_info () Enum accounts info.
- acc_find_for_incoming(...)
- int _pjsua.acc_find_for_incoming (PyObj_pjsip_rx_data rdata) This is an internal function to find the most appropriate account to be used to handle incoming calls.
- acc_find_for_outgoing(...)
- int _pjsua.acc_find_for_outgoing (string url) This is an internal function to find the most appropriate account to used to reach to the specified URL.
- acc_get_count(...)
- int _pjsua.acc_get_count () Get number of current accounts.
- acc_get_default(...)
- int _pjsua.acc_get_default () Get default account.
- acc_get_info(...)
- _pjsua.Acc_Info _pjsua.acc_get_info (int acc_id) Get account information.
- acc_is_valid(...)
- int _pjsua.acc_is_valid (int acc_id) Check if the specified account ID is valid.
- acc_modify(...)
- int _pjsua.acc_modify (int acc_id, _pjsua.Acc_Config cfg) Modify account information.
- acc_set_default(...)
- int _pjsua.acc_set_default (int acc_id) Set default account to be used when incoming and outgoing requests doesn't match any accounts.
- acc_set_online_status(...)
- int _pjsua.acc_set_online_status2(int acc_id, int is_online) Modify account's presence status to be advertised to remote/presence subscribers.
- acc_set_online_status2(...)
- int _pjsua.acc_set_online_status (int acc_id, int is_online, int activity_id, string activity_text) Modify account's presence status to be advertised to remote/presence subscribers.
- acc_set_registration(...)
- int _pjsua.acc_set_registration (int acc_id, int renew) Update registration or perform unregistration.
- acc_set_transport(...)
- Lock transport to use the specified transport
- buddy_add(...)
- int,int _pjsua.buddy_add (_pjsua.Buddy_Config cfg) Add new buddy.
- buddy_config_default(...)
- _pjsua.Buddy_Config _pjsua.buddy_config_default () Set default values to the buddy config.
- buddy_del(...)
- int _pjsua.buddy_del (int buddy_id) Delete buddy.
- buddy_get_info(...)
- _pjsua.Buddy_Info _pjsua.buddy_get_info (int buddy_id) Get detailed buddy info.
- buddy_is_valid(...)
- int _pjsua.buddy_is_valid (int buddy_id) Check if buddy ID is valid.
- buddy_subscribe_pres(...)
- int _pjsua.buddy_subscribe_pres (int buddy_id, int subscribe) Enable/disable buddy's presence monitoring.
- call_answer(...)
- int _pjsua.call_answer (int call_id, int code, string reason, _pjsua.Msg_Data msg_data) Send response to incoming INVITE request.
- call_dial_dtmf(...)
- int _pjsua.call_dial_dtmf (int call_id, string digits) Send DTMF digits to remote using RFC 2833 payload formats.
- call_dump(...)
- int _pjsua.call_dump (int call_id, int with_media, int maxlen, string indent) Dump call and media statistics to string.
- call_get_conf_port(...)
- int _pjsua.call_get_conf_port (int call_id) Get the conference port identification associated with the call.
- call_get_count(...)
- int _pjsua.call_get_count () Get number of currently active calls.
- call_get_info(...)
- _pjsua.Call_Info _pjsua.call_get_info (int call_id) Obtain detail information about the specified call.
- call_get_max_count(...)
- int _pjsua.call_get_max_count () Get maximum number of calls configured in pjsua.
- call_get_user_data(...)
- int _pjsua.call_get_user_data (int call_id) Get user data attached to the call.
- call_hangup(...)
- int _pjsua.call_hangup (int call_id, int code, string reason, _pjsua.Msg_Data msg_data) Hangup call by using method that is appropriate according to the call state.
- call_hangup_all(...)
- void _pjsua.call_hangup_all () Terminate all calls.
- call_has_media(...)
- int _pjsua.call_has_media (int call_id) Check if call has an active media session.
- call_is_active(...)
- int _pjsua.call_is_active (int call_id) Check if the specified call has active INVITE session and the INVITE session has not been disconnected.
- call_make_call(...)
- int,int _pjsua.call_make_call (int acc_id, string dst_uri, int options,int user_data, _pjsua.Msg_Data msg_data) Make outgoing call to the specified URI using the specified account.
- call_reinvite(...)
- int _pjsua.call_reinvite (int call_id, int unhold, _pjsua.Msg_Data msg_data) Send re-INVITE (to release hold).
- call_send_im(...)
- int _pjsua.call_send_im (int call_id, string mime_type, string content,_pjsua.Msg_Data msg_data, int user_data) Send instant messaging inside INVITE session.
- call_send_request(...)
- Send arbitrary request
- call_send_typing_ind(...)
- int _pjsua.call_send_typing_ind (int call_id, int is_typing, _pjsua.Msg_Data msg_data) Send IM typing indication inside INVITE session.
- call_set_hold(...)
- int _pjsua.call_set_hold (int call_id, _pjsua.Msg_Data msg_data) Put the specified call on hold.
- call_set_user_data(...)
- int _pjsua.call_set_user_data (int call_id, int user_data) Attach application specific data to the call.
- call_update(...)
- Send UPDATE
- call_xfer(...)
- int _pjsua.call_xfer (int call_id, string dest, _pjsua.Msg_Data msg_data) Initiate call transfer to the specified address. This function will send REFER request to instruct remote call party to initiate a new INVITE session to the specified destination/target.
- call_xfer_replaces(...)
- int _pjsua.call_xfer_replaces (int call_id, int dest_call_id, int options, _pjsua.Msg_Data msg_data) Initiate attended call transfer. This function will send REFER request to instruct remote call party to initiate new INVITE session to the URL of dest_call_id. The party at dest_call_id then should 'replace' the callwith us with the new call from the REFER recipient.
- codec_get_param(...)
- _pjsua.PJMedia_Codec_Param _pjsua.codec_get_param (string id) Get codec parameters
- codec_set_param(...)
- int _pjsua.codec_set_param (string id, _pjsua.PJMedia_Codec_Param param) Set codec parameters.
- codec_set_priority(...)
- int _pjsua.codec_set_priority (string id, int priority) Change codec priority.
- conf_add_port(...)
- int, int _pjsua.conf_add_port (_pjsua.Pj_Pool pool, _pjsua.PJMedia_Port port) Add arbitrary media port to PJSUA's conference bridge. Application can use this function to add the media port that it creates. For media ports that are created by PJSUA-LIB (such as calls, file player, or file recorder), PJSUA-LIB will automatically add the port to the bridge.
- conf_connect(...)
- int _pjsua.conf_connect (int source, int sink) Establish unidirectional media flow from souce to sink. One source may transmit to multiple destinations/sink. And if multiple sources are transmitting to the same sink, the media will be mixed together. Source and sink may refer to the same ID, effectively looping the media. If bidirectional media flow is desired, application needs to call this function twice, with the second one having the arguments reversed.
- conf_disconnect(...)
- int _pjsua.conf_disconnect (int source, int sink) Disconnect media flow from the source to destination port.
- conf_get_active_ports(...)
- int _pjsua.conf_get_active_ports () Get current number of active ports in the bridge.
- conf_get_max_ports(...)
- int _pjsua.conf_get_max_ports () Get maxinum number of conference ports.
- conf_get_port_info(...)
- _pjsua.Conf_Port_Info _pjsua.conf_get_port_info (int id) Get information about the specified conference port
- conf_remove_port(...)
- int _pjsua.conf_remove_port (int id) Remove arbitrary slot from the conference bridge. Application should only call this function if it registered the port manually.
- config_default(...)
- _pjsua.Config _pjsua.config_default (). Use this function to initialize pjsua config.
- create(...)
- int _pjsua.create (void) Instantiate pjsua application. Application must call this function before calling any other functions, to make sure that the underlying libraries are properly initialized. Once this function has returned success, application must call pjsua_destroy() before quitting.
- destroy(...)
- int _pjsua.destroy (void) Destroy pjsua This function must be called once PJSUA is created. To make it easier for application, application may call this function several times with no danger.
- dump(...)
- Dump application state
- enum_accs(...)
- int[] _pjsua.enum_accs () Enum accounts all account ids.
- enum_buddies(...)
- int[] _pjsua.enum_buddies () Enum buddy IDs.
- enum_calls(...)
- int[] _pjsua.enum_calls () Get maximum number of calls configured in pjsua.
- enum_codecs(...)
- _pjsua.Codec_Info[] _pjsua.enum_codecs () Enum all supported codecs in the system.
- enum_conf_ports(...)
- int[] _pjsua.enum_conf_ports () Enumerate all conference ports.
- enum_snd_devs(...)
- _pjsua.PJMedia_Snd_Dev_Info[] _pjsua.enum_snd_devs (int count) Enum sound devices.
- get_buddy_count(...)
- int _pjsua.get_buddy_count () Get total number of buddies.
- get_ec_tail(...)
- int _pjsua.get_ec_tail () Get current echo canceller tail length.
- get_pjmedia_endpt(...)
- _pjsua.Pjmedia_Endpt _pjsua.get_pjmedia_endpt (void) Internal function to get media endpoint instance. Only valid after pjsua_init() is called.
- get_pjsip_endpt(...)
- _pjsua.Pjsip_Endpoint _pjsua.get_pjsip_endpt (void) Internal function to get SIP endpoint instance of pjsua, which is needed for example to register module, create transports, etc. Probably is only valid after pjsua_init() is called.
- get_pool_factory(...)
- _pjsua.Pj_Pool_Factory _pjsua.get_pool_factory (void) Internal function to get PJSUA pool factory. Only valid after pjsua_init() is called.
- get_snd_dev(...)
- int, int _pjsua.get_snd_dev () Get currently active sound devices. If sound devices has not been created (for example when pjsua_start() is not called), it is possible that the function returns PJ_SUCCESS with -1 as device IDs.
- handle_events(...)
- int _pjsua.handle_events (int msec_timeout) Poll pjsua for events, and if necessary block the caller thread for the specified maximum interval (in miliseconds) Parameters: msec_timeout: Maximum 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 (err = -return_value).
- im_send(...)
- int _pjsua.im_send (int acc_id, string to, string mime_type, string content, _pjsua.Msg_Data msg_data, int user_data) Send instant messaging outside dialog, using the specified account for route set and authentication.
- im_typing(...)
- int _pjsua.im_typing (int acc_id, string to, int is_typing, _pjsua.Msg_Data msg_data) Send typing indication outside dialog.
- init(...)
- int _pjsua.init (_pjsua.Config obj_ua_cfg, _pjsua.Logging_Config log_cfg, _pjsua.Media_Config media_cfg) Initialize pjsua with the specified settings. All the settings are optional, and the default values will be used when the config is not specified. Parameters: obj_ua_cfg : User agent configuration; log_cfg : Optional logging configuration; media_cfg : Optional media configuration.
- logging_config_default(...)
- _pjsua.Logging_Config _pjsua.logging_config_default () Use this function to initialize logging config.
- media_config_default(...)
- _pjsua.Media_Config _pjsua.media_config_default (). Use this function to initialize media config.
- msg_data_init(...)
- _pjsua.Msg_Data void _pjsua.msg_data_init () Initialize message data
- parse_simple_uri(...)
- Parse URI
- perror(...)
- void _pjsua.perror (string sender, string title, int status) Display error message for the specified error code. Parameters: sender: The log sender field; title: Message title for the error; status: Status code.
- player_create(...)
- int, int _pjsua.player_create (string filename, int options) Create a file player, and automatically connect this player to the conference bridge.
- player_destroy(...)
- int _pjsua.player_destroy (int id) Close the file, remove the player from the bridge, and free resources associated with the file player.
- player_get_conf_port(...)
- int _pjsua.player_get_conf_port (int) Get conference port ID associated with player.
- player_set_pos(...)
- int _pjsua.player_set_pos (int id, int samples) Set playback position.
- pool_create(...)
- _pjsua.Pj_Pool _pjsua.pool_create (string name, int init_size, int increment) Create memory pool Parameters: name: Optional pool name; init_size: Initial size of the pool; increment: Increment size.
- pres_dump(...)
- void _pjsua.pres_dump (int verbose) Dump presence subscriptions to log file.
- reconfigure_logging(...)
- int _pjsua.reconfigure_logging (_pjsua.Logging_Config c) Application can call this function at any time (after pjsua_create(), of course) to change logging settings. Parameters: c: Logging configuration.
- recorder_create(...)
- int, int _pjsua.recorder_create (string filename, int enc_type, int enc_param, int max_size, int options) Create a file recorder, and automatically connect this recorder to the conference bridge. The recorder currently supports recording WAV file, and on Windows, MP3 file. The type of the recorder to use is determined by the extension of the file (e.g. '.wav' or '.mp3').
- recorder_destroy(...)
- int _pjsua.recorder_destroy (int id) Destroy recorder (this will complete recording).
- recorder_get_conf_port(...)
- int _pjsua.recorder_get_conf_port (int id) Get conference port associated with recorder.
- set_ec(...)
- int _pjsua.set_ec (int tail_ms, int options) Configure the echo canceller tail length of the sound port.
- set_no_snd_dev(...)
- _pjsua.PJMedia_Port _pjsua.set_no_snd_dev () Disconnect the main conference bridge from any sound devices, and let application connect the bridge to it's own sound device/master port.
- set_null_snd_dev(...)
- int _pjsua.set_null_snd_dev () Set pjsua to use null sound device. The null sound device only provides the timing needed by the conference bridge, and will not interract with any hardware.
- set_snd_dev(...)
- int _pjsua.set_snd_dev (int capture_dev, int playback_dev) Select or change sound device. Application may call this function at any time to replace current sound device.
- start(...)
- int _pjsua.start (void) Application is recommended to call this function after all initialization is done, so that the library can do additional checking set up additional
- strerror(...)
- Get error message
- thread_register(...)
- int _pjsua.thread_register(string name, int[] desc)
- transport_close(...)
- void _pjsua.transport_close (_pjsua.Transport_ID id, int force) Close the transport. If transport is forcefully closed, it will be immediately closed, and any pending transactions that are using the transport may not terminate properly. Otherwise, the system will wait until all transactions are closed while preventing new users from using the transport, and will close the transport when it is safe to do so.
- transport_config_default(...)
- _pjsua.Transport_Config _pjsua.transport_config_default () Call this function to initialize UDP config with default values.
- transport_create(...)
- int, int _pjsua.transport_create (int type, _pjsua.Transport_Config cfg) Create SIP transport.
- transport_enum_transports(...)
- int[] _pjsua.enum_transports () Enumerate all transports currently created in the system.
- transport_get_info(...)
- void _pjsua.transport_get_info (_pjsua.Transport_ID id, _pjsua.Transport_Info info) Get information about transports.
- transport_set_enable(...)
- void _pjsua.transport_set_enable (_pjsua.Transport_ID id, int enabled) Disable a transport or re-enable it. By default transport is always enabled after it is created. Disabling a transport does not necessarily close the socket, it will only discard incoming messages and prevent the transport from being used to send outgoing messages.
- verify_sip_url(...)
- int _pjsua.verify_sip_url (string c_url) Verify that valid SIP url is given Parameters: c_url: The URL, as NULL terminated string.
|
Data |
| |
PJSIP_INV_STATE_CALLING = 1
PJSIP_INV_STATE_CONFIRMED = 5
PJSIP_INV_STATE_CONNECTING = 4
PJSIP_INV_STATE_DISCONNECTED = 6
PJSIP_INV_STATE_EARLY = 3
PJSIP_INV_STATE_INCOMING = 2
PJSIP_INV_STATE_NULL = 0
PJSIP_TRANSPORT_LOOP = 5
PJSIP_TRANSPORT_LOOP_DGRAM = 6
PJSIP_TRANSPORT_SCTP = 4
PJSIP_TRANSPORT_TCP = 2
PJSIP_TRANSPORT_TLS = 3
PJSIP_TRANSPORT_UDP = 1
PJSIP_TRANSPORT_UNSPECIFIED = 0
PJSUA_ACC_MAX_PROXIES = 8
PJSUA_BUDDY_STATUS_OFFLINE = 2
PJSUA_BUDDY_STATUS_ONLINE = 1
PJSUA_BUDDY_STATUS_UNKNOWN = 0
PJSUA_CALL_MEDIA_ACTIVE = 1
PJSUA_CALL_MEDIA_LOCAL_HOLD = 2
PJSUA_CALL_MEDIA_NONE = 0
PJSUA_CALL_MEDIA_REMOTE_HOLD = 3
PJSUA_DEFAULT_ACC_PRIORITY = 0
PJSUA_DEFAULT_CLOCK_RATE = 16000
PJSUA_DEFAULT_CODEC_QUALITY = 8
PJSUA_DEFAULT_EC_TAIL_LEN = 200
PJSUA_DEFAULT_ILBC_MODE = 30
PJSUA_INVALID_ID = -1
PJSUA_MAX_ACC = 8
PJSUA_MAX_BUDDIES = 256
PJSUA_MAX_CALLS = 32
PJSUA_MAX_CONF_PORTS = 254
PJSUA_PUBLISH_EXPIRATION = 600
PJSUA_REG_INTERVAL = 300
PJSUA_XFER_NO_REQUIRE_REPLACES = 1 |
|