Ring Daemon
Loading...
Searching...
No Matches
jami::SIPVoIPLink Class Reference

#include <sipvoiplink.h>

Collaboration diagram for jami::SIPVoIPLink:
Collaboration graph

Public Types

typedef std::function< void(std::vector< dhtnet::IpAddr >)> SrvResolveCallback
 

Public Member Functions

void cancelKeepAliveTimer (pj_timer_entry &timer)
 Abort currently registered timer.
 
void createDefaultSipUdpTransport ()
 Create the default UDP transport according ot Ip2Ip profile settings.
 
bool findLocalAddressFromSTUN (pjsip_transport *transport, pj_str_t *stunServerName, int stunPort, std::string &address, pj_uint16_t &port) const
 
void findLocalAddressFromTransport (pjsip_transport *transport, pjsip_transport_type_e transportType, const std::string &host, std::string &address, pj_uint16_t &port) const
 Get the correct address to use (ie advertised) from a uri.
 
pj_caching_poolgetCachingPool () noexcept
 
pjsip_endpointgetEndpoint ()
 
pj_caching_poolgetMemoryPoolFactory ()
 Get the memory pool factory since each calls has its own memory pool.
 
pjsip_modulegetMod ()
 
int getModId ()
 
pj_pool_tgetPool () noexcept
 
std::shared_ptr< SIPAccountBaseguessAccount (std::string_view userName, std::string_view server, std::string_view fromUri) const
 Guess the account related to an incoming SIP call.
 
void handleEvents ()
 Event listener.
 
void registerKeepAliveTimer (pj_timer_entry &timer, pj_time_val &delay)
 Register a new keepalive registration timer to this endpoint.
 
void resolveSrvName (const std::string &name, pjsip_transport_type_e type, SrvResolveCallback &&cb)
 
void shutdown ()
 Destroy structures.
 
 SIPVoIPLink ()
 
 ~SIPVoIPLink ()
 

Static Public Member Functions

static void createSDPOffer (pjsip_inv_session *inv)
 
static pjsip_tpselector getTransportSelector (pjsip_transport *transport)
 Initialize the transport selector.
 

Public Attributes

std::unique_ptr< SipTransportBrokersipTransportBroker
 Instance that maintain and manage transport (UDP, TLS)
 

Friends

class SIPTest
 

Detailed Description

Definition at line 52 of file sipvoiplink.h.

Member Typedef Documentation

◆ SrvResolveCallback

typedef std::function<void(std::vector<dhtnet::IpAddr>)> jami::SIPVoIPLink::SrvResolveCallback

Definition at line 96 of file sipvoiplink.h.

Constructor & Destructor Documentation

◆ SIPVoIPLink()

◆ ~SIPVoIPLink()

jami::SIPVoIPLink::~SIPVoIPLink ( )

Definition at line 688 of file sipvoiplink.cpp.

Member Function Documentation

◆ cancelKeepAliveTimer()

void jami::SIPVoIPLink::cancelKeepAliveTimer ( pj_timer_entry timer)

Abort currently registered timer.

Definition at line 778 of file sipvoiplink.cpp.

References jami::emitSignal(), and jami::endpt_.

Here is the call graph for this function:

◆ createDefaultSipUdpTransport()

void jami::SIPVoIPLink::createDefaultSipUdpTransport ( )

Create the default UDP transport according ot Ip2Ip profile settings.

◆ createSDPOffer()

void jami::SIPVoIPLink::createSDPOffer ( pjsip_inv_session inv)
static

Definition at line 1368 of file sipvoiplink.cpp.

References jami::emitSignal(), and jami::sdp_create_offer_cb().

Here is the call graph for this function:

◆ findLocalAddressFromSTUN()

bool jami::SIPVoIPLink::findLocalAddressFromSTUN ( pjsip_transport transport,
pj_str_t stunServerName,
int  stunPort,
std::string &  address,
pj_uint16_t port 
) const

◆ findLocalAddressFromTransport()

void jami::SIPVoIPLink::findLocalAddressFromTransport ( pjsip_transport transport,
pjsip_transport_type_e  transportType,
const std::string &  host,
std::string &  address,
pj_uint16_t port 
) const

Get the correct address to use (ie advertised) from a uri.

The corresponding transport that should be used with that uri will be discovered.

Parameters
uriThe uri from which we want to discover the address to use
transportThe transport to use to discover the address

Definition at line 1490 of file sipvoiplink.cpp.

References jami::sip_utils::as_view(), jami::emitSignal(), jami::endpt_, getTransportSelector(), JAMI_WARN, and RETURN_IF_NULL.

Here is the call graph for this function:

◆ getCachingPool()

pj_caching_pool * jami::SIPVoIPLink::getCachingPool ( )
noexcept

Definition at line 566 of file sipvoiplink.cpp.

◆ getEndpoint()

pjsip_endpoint * jami::SIPVoIPLink::getEndpoint ( )

Definition at line 548 of file sipvoiplink.cpp.

References jami::endpt_.

◆ getMemoryPoolFactory()

pj_caching_pool * jami::SIPVoIPLink::getMemoryPoolFactory ( )

Get the memory pool factory since each calls has its own memory pool.

◆ getMod()

pjsip_module * jami::SIPVoIPLink::getMod ( )

Definition at line 554 of file sipvoiplink.cpp.

References jami::mod_ua_.

◆ getModId()

int jami::SIPVoIPLink::getModId ( )

Definition at line 1362 of file sipvoiplink.cpp.

References jami::mod_ua_.

Referenced by jami::SIPPresence::getModId().

◆ getPool()

pj_pool_t * jami::SIPVoIPLink::getPool ( )
noexcept

Definition at line 560 of file sipvoiplink.cpp.

◆ getTransportSelector()

static pjsip_tpselector jami::SIPVoIPLink::getTransportSelector ( pjsip_transport transport)
inlinestatic

Initialize the transport selector.

Parameters
transportA transport associated with an account
Returns
A transport selector structure

Definition at line 138 of file sipvoiplink.h.

References jami::emitSignal().

Referenced by findLocalAddressFromTransport(), and jami::transaction_request_cb().

Here is the call graph for this function:

◆ guessAccount()

std::shared_ptr< SIPAccountBase > jami::SIPVoIPLink::guessAccount ( std::string_view  userName,
std::string_view  server,
std::string_view  fromUri 
) const

Guess the account related to an incoming SIP call.

Definition at line 714 of file sipvoiplink.cpp.

References jami::emitSignal(), jami::FULL, jami::Manager::getAllAccounts(), jami::Manager::instance(), JAMI_LOG, and jami::NONE.

Referenced by jami::transaction_request_cb().

Here is the call graph for this function:

◆ handleEvents()

void jami::SIPVoIPLink::handleEvents ( )

Event listener.

Each event send by the call manager is received and handled from here

Definition at line 744 of file sipvoiplink.cpp.

References jami::emitSignal(), jami::endpt_, JAMI_ERR, and jami::sip_utils::sip_strerror().

Referenced by SIPVoIPLink().

Here is the call graph for this function:

◆ registerKeepAliveTimer()

void jami::SIPVoIPLink::registerKeepAliveTimer ( pj_timer_entry timer,
pj_time_val delay 
)

Register a new keepalive registration timer to this endpoint.

Definition at line 752 of file sipvoiplink.cpp.

References jami::emitSignal(), jami::endpt_, JAMI_DEBUG, JAMI_ERR, and JAMI_WARN.

Here is the call graph for this function:

◆ resolveSrvName()

void jami::SIPVoIPLink::resolveSrvName ( const std::string &  name,
pjsip_transport_type_e  type,
SrvResolveCallback &&  cb 
)

◆ shutdown()

void jami::SIPVoIPLink::shutdown ( )

Destroy structures.

Definition at line 691 of file sipvoiplink.cpp.

References jami::emitSignal(), jami::endpt_, jami::Manager::instance(), JAMI_DBG, JAMI_ERR, jami::Call::SIP, and sipTransportBroker.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ SIPTest

friend class SIPTest
friend

Definition at line 154 of file sipvoiplink.h.

Member Data Documentation

◆ sipTransportBroker

std::unique_ptr<SipTransportBroker> jami::SIPVoIPLink::sipTransportBroker

Instance that maintain and manage transport (UDP, TLS)

Definition at line 94 of file sipvoiplink.h.

Referenced by jami::SIPAccount::newOutgoingCall(), shutdown(), SIPVoIPLink(), and jami::transaction_request_cb().


The documentation for this class was generated from the following files: