← Volver al índice de módulos

msrp

This module provides a MSRP routing engine, a.k.a. MSRP relay.
🛠️ Utilidades y Varios Kamailio 6.1 14 parámetros 20 funciones

Descripción general

This module provides a MSRP routing engine, a.k.a. MSRP relay. MSRP (Message Session Relay Protocol) is defined by RFC4975, and the extensions for an MSRP relay are covered in RFC4976. A typical use of MSRP is instant messaging sessions initiated via SIP. Unlike page-mode instant messaging, which is done via the SIP MESSAGE request, MSRP uses a different communication channel which is negotiated via INVITE-200 OK-ACK. However, MSRP is still a text-based protocol. It uses several routing mechanisms similar to what exists in SIP. Furthermore, MSRP requires TCP, and recommends TLS for confidentiality and security. In light of the scalability and performance of Kamailio in handling TCP/TLS, this module reuses Kamailio's core framework to offer MSRP routing capabilities. Along with embedded Presence and XCAP servers, Kamailio now offers a complete solution for SIP beyond VoIP. One of the main benefits of this module is the ability to reuse all the other extensions that exist in the SIP server, including accounting, authentication, authorization to database connectors, security and DoS attack protections. Kamailio can handle SIP and MSRP traffic received on the same port; the appropriate configuration file block being executed based on the type of message. Therefore, you can use Kamailio as a stand-alone MSRP relay or you can have an instance handling both SIP and MSRP. Another option is to configure Kamailio to listen on multiple ports, some of them for SIP and others for MSRP.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/msrp.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/msrp

Parámetros de configuración

ParámetroTipoDescripción
sipmsg int 3.2. cmap_size (int) 3.3. timer_interval (int) 3.4. auth_min_expires (int) 3.5. auth_max_expires (int) 3.6. use_path_addr (str) 3.7. event_callback (str)
cmap_size int 3.3. timer_interval (int) 3.4. auth_min_expires (int) 3.5. auth_max_expires (int) 3.6. use_path_addr (str) 3.7. event_callback (str)
timer_interval int 3.4. auth_min_expires (int) 3.5. auth_max_expires (int) 3.6. use_path_addr (str) 3.7. event_callback (str)
auth_min_expires int 3.5. auth_max_expires (int) 3.6. use_path_addr (str) 3.7. event_callback (str)
auth_max_expires int 3.6. use_path_addr (str) 3.7. event_callback (str)
use_path_addr str 3.7. event_callback (str)
event_callback str 3.1. sipmsg (int)
sipmsg int If set to 1, the module will build a SIP message from MSRP frame headers, providing it to “event_route[msrp:frame-in]”. All the config file functions (apart from SIP request relay) that can be used in
cmap_size int The size of connection map table, to be computed as power of 2 (e.g., if the value is 4, then the number of slots in map table is 2^4 = 16).
timer_interval int The timer interval in seconds to run the procedure for cleaning expired connections.
auth_min_expires int The minimum value accepted for the “Expires” header in AUTH requests.
auth_max_expires int The maximum value accepted for “Expires” header in AUTH requests.
use_path_addr str The hostname:port to be used when building the Path header.
event_callback str The name of the function in the kemi configuration file (embedded scripting language such as Lua, Python, ...) to be executed instead of event_route[...] blocks.

Funciones exportadas

msrp_forward([tpath [, fpath]])

4.2. msrp_relay() 4.3. msrp_reply(code, text [, hdrs]) 4.4. msrp_is_request() 4.5. msrp_is_reply() 4.6. msrp_set_dst(addr, sock) 4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_relay()

4.3. msrp_reply(code, text [, hdrs]) 4.4. msrp_is_request() 4.5. msrp_is_reply() 4.6. msrp_set_dst(addr, sock) 4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_reply(code, text [, hdrs])

4.4. msrp_is_request() 4.5. msrp_is_reply() 4.6. msrp_set_dst(addr, sock) 4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_is_request()

4.5. msrp_is_reply() 4.6. msrp_set_dst(addr, sock) 4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_is_reply()

4.6. msrp_set_dst(addr, sock) 4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_set_dst(addr, sock)

4.7. msrp_relay_flags(flags) 4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_relay_flags(flags)

4.8. msrp_reply_flags(flags) 4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_reply_flags(flags)

4.9. msrp_cmap_save() 4.10. msrp_cmap_lookup()

msrp_cmap_save()

4.10. msrp_cmap_lookup()

msrp_cmap_lookup()

4.1. msrp_forward([tpath [, fpath]])

msrp_forward([tpath [, fpath]])

Forward MSRP frame to target destination. If tpath is provided then the original To-Path is replaced by it and the From-Path is replaced by fpath or the original To-Path. If the target destination is not set then tpath will be used to set it.

msrp_relay()

Relay MSRP frame according to the To-Path. This function has to be executed for each MSRP request or reply that has to be forwarded. Note that due to nature of the MSRP transport layer, which is reliable (TCP/TLS), there is no retransmission of MSRP

msrp_reply(code, text [, hdrs])

Send a reply for the current MSRP request, adding optional headers.

msrp_is_request()

Return true if the MSRP frame is a request.

msrp_is_reply()

Return true if the MSRP frame is a reply.

msrp_set_dst(addr, sock)

Set destination attributes: addr - target address as MSRP URI; sock - local socket to be used (format 'proto:ip:port').

msrp_relay_flags(flags)

Set transport layer sending flags for forwarding current MSRP frame; flags - a bitmask of flags - 1 (don't create a new connection), 2 (close connection after send).

msrp_reply_flags(flags)

Set transport layer sending flags for replies to the current MSRP frame; flags - a bitmask of flags - 1 (don't create a new connection), 2 (close connection after send).

msrp_cmap_save()

Save details of a MSRP connection upon AUTH request inside the internal map table, indexed by session id.

msrp_cmap_lookup()

Lookup MSRP connection details for current session id.

Autores y contribuidores

Daniel-Constantin Mierla <miconda@gmail.com>Alex Balashov <abalashov@evaristesys.com>

Copyright © 2012 asipto.com

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj