- Jul 08, 2020
-
-
George Joseph authored
Prior to making any modifications to the pjsip infrastructure for ACN, I've added the tracing functions to the existing code. This should make the final commit easier to review, but we can also now run a "before and after" trace. No functional changes were made with this commit. Change-Id: Ia83a1a2687ccb96f2bc8a2a3928a5214c4be775c
-
- Jul 06, 2020
-
-
Kevin Harwell authored
When using the PSJIP_MEDIA_OFFER dialplan function it was not overriding an endpoint's configured codecs on refresh unless they had a shared codec between the two. This patch makes it so whatever is set using PJSIP_MEDIA_OFFER is used when creating the SDP for a refresh no matter what. ASTERISK-28878 #close Change-Id: I0f7dc86fd0fb607c308e6f98ede303c54d1eacb6
-
- Jul 01, 2020
-
-
George Joseph authored
The Streams API becomes the home for the core ACN capabilities. These include... * Parsing and formatting of codec negotation preferences. * Resolving pending streams and topologies with those configured using configured preferences. * Utility functions for creating string representations of streams, topologies, and negotiation preferences. For codec negotiation preferences: * Added ast_stream_codec_prefs_parse() which takes a string representation of codec negotiation preferences, which may come from a pjsip endpoint for example, and populates a ast_stream_codec_negotiation_prefs structure. * Added ast_stream_codec_prefs_to_str() which does the reverse. * Added many functions to parse individual parameter name and value strings to their respectrive enum values, and the reverse. For streams: * Added ast_stream_create_resolved() which takes a "live" stream and resolves it with a configured stream and the negotiation preferences to create a new stream. * Added ast_stream_to_str() which create a string representation of a stream suitable for debug or display purposes. For topology: * Added ast_stream_topology_create_resolved() which takes a "live" topology and resolves it, stream by stream, with a configured topology stream and the negotiation preferences to create a new topology. * Added ast_stream_topology_to_str() which create a string representation of a topology suitable for debug or display purposes. * Renamed ast_format_caps_from_topology() to ast_stream_topology_get_formats() to be more consistent with the existing ast_stream_get_formats(). Additional changes: * A new function ast_format_cap_append_names() appends the results to the ast_str buffer instead of replacing buffer contents. Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
-
- Jun 25, 2020
-
-
Frederic LE FOLL authored
chan_sip handle_response() function, for a 400 response to an INVITE, calls handle_response_invite() and does not generate ACK. handle_response_invite() does not recognize 400 response and has no default response processing for unexpected responses, thus it does not generate ACK either. The ACK on response repetition comes from handle_response() mechanism "We must re-send ACKs to re-transmitted final responses". According to code history, 400 response specific processing was introduced with commit "channels/chan_sip: Add improved support for 4xx error codes" This commit added support for : - 400/414/493 in handle_response_subscribe() handle_response_register() and handle_response(). - 414/493 only in handle_response_invite(). This fix adds 400 response support in handle_response_invite(). ASTERISK-28957 Change-Id: Ic71a087e5398dfc7273946b9ec6f9a36960218ad
-
- Jun 22, 2020
-
-
Kevin Harwell authored
A patch made a reference to the PJSIP_SC_NULL enumeration value, which was added to pjproject 2.8 and above thus making it so Asterisk would fail to compile with prior versions of pjproject. This patch removes the reference, and instead initializes the value to '0'. ASTERISK-28886 #close Change-Id: I68491c80da1a0154b2286c9458440141c98db9d7
-
- Jun 19, 2020
-
-
Guido Falsi authored
The change to how setvar works for various channels performed in ASTERISK~23756 missed some required change in the dahdi channel, where the variables are actually set while reading configuration. This change should fix the issue. ASTERISK-28955 Change-Id: Ibfeb7f8cbdd735346dc4028de6a265f24f9df274
-
- Jun 10, 2020
-
-
George Joseph authored
When fax_gateway_framehook is called and a gateway hasn't already been started, the framehook gets the t38 state for both the current channel and the peer. That call trickles down to the channel driver which determines the state. If either channel is hung up (or in the process of being hung up), the channel driver's tech_pvt is going to be NULL which, in the case of chan_pjsip, will cause a segfault. * Added a hangup check for both the channel and peer channel before starting a fax gateway. * Added a check for NULL tech_pvt to chan_pjsip_queryoption so we don't attempt to reference a tech_pvt that's already gone. ASTERISK-28923 Reported by: Yury Kirsanov Change-Id: I4e10e63b667bbb68c1c8623f977488f5d807897c
-
- Apr 23, 2020
-
-
Joshua C. Colp authored
Some places in Asterisk did not treat the formats on a stream as immutable when they are. The ast_stream_get_formats function is now const to enforce this and parts of Asterisk have been updated to take this into account. Some violations of this were also fixed along the way. An additional minor tweak is that streams are now allocated with an empty format capabilities structure removing the need in various places to check that one is present on the stream. ASTERISK-28846 Change-Id: I32f29715330db4ff48edd6f1f359090458a9bfbe
-
- Apr 21, 2020
-
-
Alexander Traud authored
ASTERISK-28372 Reported by: Anton Satskiy ASTERISK-24428 Reported by: sstream Change-Id: I2b7432a9bf3b09dc8515297ff955636db7a6224c
-
- Apr 16, 2020
-
-
Alexander Traud authored
ASTERISK-27195 Reported by: Joshua Roys Change-Id: I6e72ecb874200dec7a3865c7babaf5ac0d3101de
-
- Apr 13, 2020
-
-
traud authored
It is possible to configure a TCP/TLS client without having a TCP/TLS server. In that case, no error or warning was printed but the headers Contact and Via in SIP REGISTER were "(null)". ASTERISK-28798 Change-Id: I387ca5cb6a65f1eb675a29c5e41df8ec6c242ab2
-
Kevin Harwell authored
If chan_pjsip is configured for DTMF_RFC_4733, and the core triggers a digit begin before media, or rtp has been setup then it's possible the outgoing channel will hear a constant DTMF tone upon answering. This happens because when there is no media, or rtp chan_pjsip notifies the core to initiate inband DTMF. However, upon digit end if media, and rtp become available then chan_pjsip does not notify the core to stop inband DTMF. Thus the tone continues playing. This patch makes it so chan_pjsip only notifies the core to start inband DTMF in only the required cases. Now if there is no media, or rtp availabe upon digit begin chan_pjsip does nothing, but tells the core it handled it. ASTERISK-28817 #close Change-Id: I0dbea9fff444a2595fb18c64b89653e90d2f6eb5
-
- Apr 08, 2020
-
-
traud authored
ASTERISK-28803 Change-Id: I15449621b68d0ad4d57b7c337c1167adb15135af
-
- Mar 31, 2020
-
-
Joshua C. Colp authored
Change-Id: I0910c79196f2b7c7e5ad6f1db95e83800ac737a2
-
- Mar 20, 2020
-
-
Michael Neuhauser authored
Do not hang up a PJSIP channel on RTP timeout if that channel is in a direct-media bridge. Also reset the time of the last received RTP packet when direct-media ends (wait full rtp_timeout period before checking first time after audio came back to Asterisk). ASTERISK-28774 Reported-by: Michael Neuhauser Change-Id: I8b62012be7685849e8fb2b1c5dd39d35313ca2d1
-
- Mar 13, 2020
-
-
Sean Bright authored
Fixes the following compile error: chan_vpb.cc:2688:26: error: catching polymorphic type ‘class std::exception’ by value Change-Id: Ic87bc357d72427d77626735c83200fd278a7a649
-
- Mar 09, 2020
-
-
Paulo Vicentini authored
If the SSRC of a received RTP packet differed from the previous SSRC an SSRC change control frame would be queued ahead of the media frame. In the case of audio this would result in the format of the audio frame not being checked, and if it differed or was not allowed then it could cause the call to drop due to failure to set up a translation path. The chan_pjsip module will now no longer assume the first frame will be the audio frame and instead goes through the complete list to find it. ASTERISK-28759 Change-Id: I6d854cc523f343e299a615636fc65bdbd5f809ec
-
- Jan 31, 2020
-
-
Walter Doekes authored
If you're for some reason out of RTP ports, chan_sip would previously responde to an INVITE with a 403, which will fail the call. Now, it returns a 503, allowing the device/proxy to retry the call on a different machine. ASTERISK-28718 Change-Id: I968dcf6c1e30ecddcce397dcda36db727c83ca90
-
- Jan 24, 2020
-
-
Walter Doekes authored
Fixes no-audio issues when the media source is changed and strictrtp is enabled (default). If the peer media source changes, the SDP session version also changes. If it is lower than the one we had stored, chan_sip would ignore it. This changeset keeps track of the remote media origin identifier, comparing that as well. If it changes, the session version needn't be higher for us to accept the SDP. Common scenario where this would've caused problems: a separate media gateway that informs the caller about premium rates before handing off the call to the final destination. (An alternative fix would be to set ignoresdpversion=yes on the peer.) ASTERISK-28686 Change-Id: I88fdbc5aeb777b583e7738c084254c482a7776ee
-
- Jan 23, 2020
-
-
Sean Bright authored
If chan_pjsip receives an RTP packet whose payload differs from the channel's native format, and asymmetric_rtp_codec is disabled (the default), Asterisk will switch the channel's native format to match that of the incoming packet without regard to the negotiated payloads. We now check that the received frame is in a format we have negotiated before switching payloads which results in these packets being dropped instead of causing the session to terminate. ASTERISK-28139 #close Reported by: Paul Brooks Change-Id: Icc3b85cee1772026cee5dc1b68459bf9431c14a3
-
- Jan 21, 2020
-
-
Andrew Siplas authored
The no-entry timeout set to 999999 == 16⅔ minutes, change to INT_MAX to match behavior of "no timeout" defined in comment. ASTERISK-28702 #close Change-Id: I4ea015986e061374385dba247b272f7aac60bf11
-
- Jan 16, 2020
-
-
Sean Bright authored
lws2sws() does not stop trying to handle header continuation lines even after all headers have been found. This is problematic if the first character of a SIP message body is a space or tab character, so we update to recognize the end of the message header. ASTERISK-28693 #close Reported by: Frank Matano Change-Id: Idec8fa58545cd3fd898cbe0075d76c223f8d33df
-
- Jan 14, 2020
-
-
Seán C McCord authored
This commit adds support for [AudioSocket]( https://wiki.asterisk.org/wiki/display/AST/AudioSocket), a very simple bidirectional audio streaming protocol. There are both channel and application interfaces. A description of the protocol can be found on the above referenced GitHub page. A short talk about the reasons and implementation can be found on [YouTube](https://www.youtube.com/watch?v=tjduXbZZEgI), from CommCon 2019. ARI support has also been added via the existing "externalMedia" ARI functionality. The UUID is specified using the arbitrary "data" field. ASTERISK-28484 #close Change-Id: Ie866e6c4fa13178ec76f2a6971ad3590a3a588b5
-
- Jan 07, 2020
-
-
George Joseph authored
The change to add setting hangupsource to sig_pri_queue_hangup() made in https://gerrit.asterisk.org/c/asterisk/+/12857 casued deadlocks when a hangup request was received from the core at the same time a hanguprequest was received from the remote end via the D channel. Although the PRI's channel private structure was being unlocked before setting the hangupsource, the PRI's own lock was still being held during the process. If channel actions were also coming from the core, a deadlock on the PRI could result. This deadlock could then escalate to the entire DAHDI subsystem via DAHDI's global interface list lock, especially if someone used the PRI CLI commands. Fix: * We now unlock the PRI as well as the PRI's channel private structure before setting the hangupsource, then relock both afterwards. ASTERISK-28605 Reported by: Dirk Wendland Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9
-
- Dec 07, 2019
-
-
Jaco Kroon authored
chan_sip.c:3782 __sip_xmit: sip_xmit of 0x7f1478069230 (len 600) to 213.150.203.60:1492 returned -2: Interrupted system call returned -2 implies this wasn't actually an OS error, so errno makes no sense either. Internal error was already logged higher up, and -2 generally means that either there isn't a valid connection available, or the pipe notification failed, and that is already correctly logged. ASTERISK-28651 #close Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Dec 04, 2019
-
-
Jean Aunis authored
The SIP transaction state was reset when emitting an UPDATE or a re-INVITE related to a COLP, preventing RTP packets to be emitted. ASTERISK-28647 Change-Id: Ie7a30fa7a97f711e7ba6cc17f221a0993d48bd8b
-
Frederic LE FOLL authored
During capabilities selection (joint capabilities of us and peer, configured capability for this peer, or general configured capabilities), if sip_new() does not keep framing information, then directmedia activation will fail for any framing different from default framing. ASTERISK-28637 Change-Id: I99257502788653c2816fc991cac7946453082466
-
- Nov 21, 2019
-
-
Ben Ford authored
If the name of a peer is known and a SIP request is sent using that peer's name, the address of the peer will change even if the request fails the authentication challenge. This means that an endpoint can be altered and even rendered unusuable, even if it was in a working state previously. This can only occur when the nat option is set to the default, or auto_force_rport. This change checks the result of authentication first to ensure it is successful before setting the address and the nat option. ASTERISK-28589 #close Change-Id: I581c5ed1da60ca89f590bd70872de2b660de02df
-
- Nov 19, 2019
-
-
Frederic LE FOLL authored
Upon a short PRI disconnection, libpri may maintain Q.921 layer 'up' and may thus not send PRI_EVENT_DCHAN_DOWN / PRI_EVENT_DCHAN_UP events. If pri_event_alarm() clears DCHAN_UP status bit upon alarm detection and no Q.921 reconnection sequence occurs, chan_dahdi will keep seeing span status "Down" at the end of alarm. This patch modifies pri_event_alarm() in order to keep DCHAN_UP bit unchanged. libpri will send a PRI_EVENT_DCHAN_DOWN event if it detects a disconnection of Q.921 layer and this will clear DCHAN_UP if required. ASTERISK-28615 Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996
-
- Nov 18, 2019
-
-
Kevin Harwell authored
This patch fixes several issues reported by the lgtm code analysis tool: https://lgtm.com/projects/g/asterisk/asterisk Not all reported issues were addressed in this patch. This patch mostly fixes confirmed reported errors, potential problematic code points, and a few other "low hanging" warnings or recommendations found in core supported modules. These include, but are not limited to the following: * innapropriate stack allocation in loops * buffer overflows * variable declaration "hiding" another variable declaration * comparisons results that are always the same * ambiguously signed bit-field members * missing header guards Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
-
- Nov 08, 2019
-
-
Corey Farrell authored
* Pass caller information to frame allocation functions. * Disable caching as it interfers with MALLOC_DEBUG reporting. * Stop using ast_calloc_cache. Change-Id: Id343cd80a3db941d2daefde2a060750fea8cd260
-
- Oct 18, 2019
-
-
Salah Ahmed authored
During execution "pjsip show channelstats" cli command by an external module asterisk crashed. It seems this is a separate thread running to fetch and print rtp stats. The crash happened on the ao2_lock method, just before it going to read the rtp stats on a rtp instance. According to gdb backtrace log, it seems the session media was already cleaned up at that moment. ASTERISK-28578 Change-Id: I3e05980dd4694577be6d39be2c21a5736bae3c6f
-
- Oct 08, 2019
-
-
lvl authored
ASTERISK-28086 #close Change-Id: Ib3baadc89b9f0477a6f25a63861433812368c5ea
-
- Oct 01, 2019
-
-
Torrey Searle authored
Add a new dialplan function PJSIP_MOH_PASSTHROUGH that allows the on-hold behavior to be controlled on a per-call basis ASTERISK-28542 #close Change-Id: Iebe905b2ad6dbaa87ab330267147180b05a3c3a8
-
- Sep 17, 2019
-
-
Florian Floimair authored
This change adds H.265/HEVC as a known codec and creates a cached "h265" media format for use. Note that RFC 7798 section 7.2 also describes additional SDP parameters. Handling of these is not yet supported. ASTERISK-28512 Change-Id: I26d262cc4110b4f7e99348a3ddc53bad0d2cd1f2
-
Guido Falsi authored
On FreeBSD using the clang/llvm compiler build fails to build due to the switch statement argument being a non integer type expression. Switch to an if/else if/else construct to sidestep the issue. ASTERISK-28536 #close Change-Id: Idf4a82cc1e94580a2d017fe9e351c226f23e20c8
-
- Sep 16, 2019
-
-
Joshua Colp authored
When fax detection occurs on an outbound PJSIP channel the redirect operation will result in a masquerade occurring and the underlying channel on the session changing. The code incorrectly relocked the new channel instead of the old channel when returning. This resulted in the new channel being locked indefinitely. The code now always acts on the expected channel. ASTERISK-28538 Change-Id: I2b2e60d07e74383ae7e90d752c036c4b02d6b3a3
-
- Sep 12, 2019
-
-
Sean Bright authored
When modifying an already defined variable in some channel drivers they add a new variable with the same name to the list, but that value is never used, only the first one found. Introduce ast_variable_list_replace() and use it where appropriate. ASTERISK-23756 #close Patches: setvar-multiplie.patch submitted by Michael Goryainov Change-Id: Ie1897a96c82b8945e752733612ee963686f32839
-
- Sep 10, 2019
-
-
Frederic LE FOLL authored
When the remote ISDN party ends an ISDN call on a PRI link (DISCONNECT), CHANNEL(hangupsource) information is not available. chan_dahdi already contains an ast_set_hangupsource() in __dahdi_exception() function but it seems that ISDN message processing does not use this part of code. Two other channel modules associate ast_queue_hangup() and ast_set_hangupsource() functions calls: - chan_pjsip in chan_pjsip_session_end() function, - chan_sip in sip_queue_hangup_cause() function. chan_iax2 separates them, in iax2_queue_hangup()/iax2_destroy() and set_hangup_source_and_cause(). Thus, I propose to add ast_set_hangupsource() beside ast_queue_hangup() in sig_pri_queue_hangup(), like chan_pjsip and chan_sip already do. ASTERISK-28525 Change-Id: I0f588a4bcf15ccd0648fd69830d1b801c3f21b7c
-
George Joseph authored
The links in the deprecation notice were the shortened variety but it makes better sense to show the unshortened links as they're more descriptive. I.E. wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip rather than wiki.asterisk.org/wiki/x/tAHOAQ Change-Id: If2da5d5243e2d4a6f193b15691d23e7e5a7c57a9
-