Skip to content
Snippets Groups Projects
  • Alexander Traud's avatar
    f3b2b3d1
    chan_sip: Fix autoframing=yes. · f3b2b3d1
    Alexander Traud authored
    With Asterisk 13, the structures ast_format and ast_codec changed. Because of
    that, the paketization timing (framing) of the RTP channel moved away from the
    formats/codecs. In the course of that change, the ptime of the callee was not
    honored anymore, when the optional autoframing was enabled.
    
    ASTERISK-25484 #close
    
    Change-Id: Ic600ccaa125e705922f89c72212c698215d239b4
    f3b2b3d1
    History
    chan_sip: Fix autoframing=yes.
    Alexander Traud authored
    With Asterisk 13, the structures ast_format and ast_codec changed. Because of
    that, the paketization timing (framing) of the RTP channel moved away from the
    formats/codecs. In the course of that change, the ptime of the callee was not
    honored anymore, when the optional autoframing was enabled.
    
    ASTERISK-25484 #close
    
    Change-Id: Ic600ccaa125e705922f89c72212c698215d239b4
chan_sip.c 1.17 MiB
/*
 * Asterisk -- An open source telephony toolkit.
 *
 * Copyright (C) 1999 - 2012, Digium, Inc.
 *
 * Mark Spencer <markster@digium.com>
 *
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2. See the LICENSE file
 * at the top of the source tree.
 */

/*!
 * \file
 * \brief Implementation of Session Initiation Protocol
 *
 * \author Mark Spencer <markster@digium.com>
 *
 * See Also:
 * \arg \ref AstCREDITS
 *
 * Implementation of RFC 3261 - without S/MIME, and experimental TCP and TLS support
 * Configuration file \link Config_sip sip.conf \endlink
 *
 * ********** IMPORTANT *
 * \note TCP/TLS support is EXPERIMENTAL and WILL CHANGE. This applies to configuration
 *	settings, dialplan commands and dialplans apps/functions
 * See \ref sip_tcp_tls
 *
 *
 * ******** General TODO:s
 * \todo Better support of forking
 * \todo VIA branch tag transaction checking
 * \todo Transaction support
 *
 * ******** Wishlist: Improvements
 * - Support of SIP domains for devices, so that we match on username\@domain in the From: header
 * - Connect registrations with a specific device on the incoming call. It's not done
 *   automatically in Asterisk
 *
 * \ingroup channel_drivers
 *
 * \par Overview of the handling of SIP sessions
 * The SIP channel handles several types of SIP sessions, or dialogs,
 * not all of them being "telephone calls".
 * - Incoming calls that will be sent to the PBX core
 * - Outgoing calls, generated by the PBX
 * - SIP subscriptions and notifications of states and voicemail messages
 * - SIP registrations, both inbound and outbound
 * - SIP peer management (peerpoke, OPTIONS)
 * - SIP text messages
 *
 * In the SIP channel, there's a list of active SIP dialogs, which includes
 * all of these when they are active. "sip show channels" in the CLI will
 * show most of these, excluding subscriptions which are shown by
 * "sip show subscriptions"
 *
 * \par incoming packets
 * Incoming packets are received in the monitoring thread, then handled by
 * sipsock_read() for udp only. In tcp, packets are read by the tcp_helper thread.
 * sipsock_read() function parses the packet and matches an existing
 * dialog or starts a new SIP dialog.
 *
 * sipsock_read sends the packet to handle_incoming(), that parses a bit more.