When a sip session is refreshed, the stream topology is looped
through, checking each stream for compatible formats. This would
cause a crash if the stream state was AST_STREAM_STATE_REMOVED,
since the formats would never be set for this stream, causing
a NULL value to be returned from ast_stream_get_formats. This
commit adds a check for streams with removed states.
Also removed a stray semicolon.
Change-Id: Ic86f8b65a4a26a60885b28b8b1a0b22e1b471d42
chan_pjsip_indicate was missing a case for the recently added
AST_CONTROL_STREAM_TOPOLOGY_CHANGED condition and was returning an
error and causing the call to be hung up instead of just ignoring
it.
ASTERISK-27260
Reported by: Daniel Heckl
Change-Id: I4fecbb00a0b8a853da85155065c1a6bddf235e80
When two channels were early bridged in a native_rtp bridge, the RTP description
on one side was not updated when the other side answered.
This patch forbids non-answered channels to enter a native_rtp bridge, and
triggers a bridge reconfiguration when an ANSWER frame is received.
ASTERISK-27257
Change-Id: If1aaee1b4ed9658a1aa91ab715ee0a6413b878df
Previously, sRTP authentication failures were reported on log level WARNING.
When such failures happen, each RT(C)P packet is affected, spamming the log.
Now, those failures are reported at log level VERBOSE 2. Furthermore, the
amount is further reduced (previously all two seconds, now all three seconds).
Additionally, the new log entry informs whether media (RTP) or statistics (RTCP)
are affected.
ASTERISK-16898 #close
Change-Id: I6c98d46b711f56e08655abeb01c951ab8e8d7fa0
pubsub_on_rx_notify_request wasn't checking for a null
Content-Type header before checking that it was
application/simple-message-summary.
ASTERISK-27279
Reported by: Ross Beer
Change-Id: Iec2a6c4d2e74af37ff779ecc9fd35644c5c4ea52
Provide a way to get the contents of the the Request URI from the initial SIP
INVITE in dial plan function call. (In this case "${CHANNEL(ruri)}")
ASTERISK-27278
Reported by: David J. Pryke
Tested by: David J. Pryke
Change-Id: I1dd4d6988eed1b6c98a9701e0e833a15ef0dac3e
This change makes it so that the conference recorder channel
that is created only contains audio formats and an audio stream.
This is because the underlying application used by ConfBridge to
record, MixMonitor, only allows recording audio.
Having additional streams (and in particular a video stream) can
result in clients needlessly renegotiating to add a video stream
that will never receive video.
Change-Id: I89d38aedc9205eca7741d5435e73e73bb9de97a0
ast_variables_destroy is NULL safe, so there is no need to check its
argument before passing it.
ASTERISK-25524 #close
Reported by: Jesper
Change-Id: Ib0f8057642e9d471960f1a79fd42e5a3ce587d3b
Incoming requests with non sip(s) URIs in the Request, To, From
or Contact URIs are now rejected with
PJSIP_SC_UNSUPPORTED_URI_SCHEME (416). This is performed in
pjsip_message_filter (formerly pjsip_message_ip_updater) and is
done at pjproject's "TRANSPORT" layer before a request can even
reach the distributor.
URIs read by res_pjsip_outbound_publish from pjsip.conf are now
also checked for both length and sip(s) scheme. Those URIs read
by outbound registration and aor were already being checked for
scheme but their error messages needed to be updated to include
scheme failure as well as length failure.
Change-Id: Ibb2f9f1d2dc7549da562af4cbd9156c44ffdd460
The Websocket implementation will steal the underlying stream of
TCP/TLS sessions. This results in an error message being output
about a stream not being present when in reality this is actually
fine.
This change moves it to a debug message instead.
Change-Id: I66cc639080b4b4599beadb4faa7d313f2721d094
* The way that we were looking at XML elements for CalDAV was extremely
fragile, so use SAX2 for increased robustness.
* Don't complain about a 'channel' not be specified if autoreminder is
not set. Assume that if 'channel' is not set, we don't want to be
notified.
* Fix some truncated CLI output in 'calendar show calendar' and make the
'Autoreminder' description a bit more clear
ASTERISK-24588 #close
Reported by: Stefan Gofferje
ASTERISK-25523 #close
Reported by: Jesper
Change-Id: I200d11afca6a47e7d97888f286977e2e69874b2c
Multicast/Unicast RTP do not use SDP so we need to use a format that
cleanly maps to one of the static RTP payload types. Without this
change, an Originate to a Multicast or Unicast channel without a format
specified would produce no audio on the receiving device.
ASTERISK-21399 #close
Reported by: Tzafrir Cohen
Change-Id: I97e332b566e85da04b0004b9b0daae746cfca0e3
A new endpoint parameter "incoming_mwi_mailbox" allows Asterisk to
receive unsolicited MWI NOTIFY requests and make them available to
other modules via the stasis message bus.
res_pjsip_pubsub has a new handler "pubsub_on_rx_mwi_notify_request"
that parses a simple-message-summary body and, if
endpoint->incoming_mwi_account is set, calls ast_publish_mwi_state
with the voice-message counts from the message.
Change-Id: I08bae3d16e77af48fcccc2c936acce8fc0ef0f3c
In 45744fc53, I mistakenly broke SDP media address rewriting by
misinterpreting which address was checked in the localnet comparison.
Instead of checking the remote peer address to decide whether we need
media address rewriting, we check our local media address: if it's
local, then we rewrite. This feels awkward, but works and even made
directmedia work properly if you set local_net. (For the record: for
local peers, the SDP media rewrite code is not called, so the
comparison does no harm there.)
ASTERISK-27248 #close
Change-Id: I566be1c33f4d0a689567d451ed46bab9c3861d4f
MS-SQL has no native Enum-type support and therefore
needs to work with constraints.
Since these constraints need unique names the suggested approach
referenced in the following alembic documentation has been applied:
http://bit.ly/2x9r8pb
ASTERISK-27255 #close
Change-Id: I8b579750dae0c549f1103ee50172644afb9b2f95
* WaitForSilence completes successfully if it receives no media in the
specified timeout, but when acting as WaitForNoise that logic needs
to be reversed.
* Use standard argument parsing macros and add some error checking for
invalid values.
* The documentation indicated that the first argument to both
WaitForSilence and WaitForNoise was required when it was not. Update
the documentation to reflect that.
* Wrap up some behavior in structs to avoid boolean checks all over the
place.
ASTERISK-24066 #close
Reported by: M vd S
Change-Id: I01d40adc5b63342bb5018a1bea2081a0aa191ef9
In handle_request_invite, when processing a pickup, a call
is made to get_sip_pvt_from_replaces to locate the pvt for
the subscription. The pvt is assumed to be valid when zero
is returned indicating no error, and is dereferenced which
can cause a crash if it was not found.
This change checks the not found case and returns -1 which
allows the calling code to fail appropriately.
ASTERISK-27217 #close
Reported-by: Bryan Walters
Change-Id: I6bee92b8b8b85fcac3fd66f8c00ab18bc1765612
If an error occurs during a bridge impart it's possible that
the "bridge_after" callback might try to run before
control_swap_channel_in_bridge has been signalled to continue.
Since control_swap_channel_in_bridge is holding the control lock
and the callback needs it, a deadlock will occur.
* control_swap_channel_in_bridge now only holds the control
lock while it's actually modifying the control structure and
releases it while the bridge impart is running.
* bridge_after_cb is now tolerant of impart failures.
Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
If directmedia=yes is configured, when call is answered, Asterisk sends reINVITE
to both parties to set up media path directly between the endpoints.
In this reINVITE msg SDP origin line (o=) contains IP address of endpoint
instead of IP of asterisk. This behavior violates RFC3264, sec 8:
"When issuing an offer that modifies the session,
the "o=" line of the new SDP MUST be identical to that in the
previous SDP, except that the version in the origin field MUST
increment by one from the previous SDP."
This patch assures IP address of Asterisk is always sent in
SDP origin line.
ASTERISK-17540
Reported by: saghul
Change-Id: I533a047490c43dcff32eeca8378b2ba02345b64e