Commit Graph

125 Commits

Author SHA1 Message Date
Joshua Colp
8b71bbd6ed Merged revisions 69992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69992 | file | 2007-06-19 13:00:58 -0400 (Tue, 19 Jun 2007) | 2 lines

Handle the CC field in the RTP header. (issue #9384 reported by DoodleHu)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@70003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 17:07:40 +00:00
Joshua Colp
8c01036a9f Merged revisions 68921 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r68921 | file | 2007-06-12 10:18:57 -0400 (Tue, 12 Jun 2007) | 2 lines

Bring RTP back to Asterisk at the end of a native bridge no matter what.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@68922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 14:23:11 +00:00
Joshua Colp
1f6872a45e Merged revisions 67649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r67649 | file | 2007-06-06 09:28:34 -0400 (Wed, 06 Jun 2007) | 2 lines

Reinvite the RTP back to the Asterisk machine when the timeout happens. (issue #9888 reported by gasparz)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 13:30:25 +00:00
Russell Bryant
9074935852 Add a missing \n. (pointed out by jcmoore on IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 21:47:36 +00:00
Joshua Colp
13afc81f91 Handle cases where a frame may have no data. (issue #9519 reported by dmb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 16:44:34 +00:00
Russell Bryant
a2a73cde51 Make 1.4 build on my machine, too..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 22:06:13 +00:00
Kevin P. Fleming
521b241738 don't use uninitialized variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 18:24:55 +00:00
Joshua Colp
9f88eccda6 I like it when the RTP stack compiles myself...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 15:08:17 +00:00
Russell Bryant
f32662deb4 Fix the calculation of the RTT for RTCP. The previous code would result in
oscillating and incorrect data.  Additionally, the RTT would sometimes report
negative values due to incorrect calculations.
(issue #9601, patch from davetroy)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 14:49:05 +00:00
Jason Parker
9378347264 Avoid invalid seqno cycling detection.
Per comment from Dave Troy:
 This adds back in some simple typecasting I had in an earlier version
 which I realize now may be breaking things.

Issue #9554.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 21:35:27 +00:00
Russell Bryant
477ff09bdf Remove a stray debug message introduced by a recent commit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 20:42:02 +00:00
Olle Johansson
521e1698e1 Clean upp formatting, add some doxygen stuff while we're in cleaning mode... Thanks Kevin!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-18 20:46:23 +00:00
Olle Johansson
0ef4dad39c Issue #9554 - Improve RTCP (Dave Troy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-18 20:28:53 +00:00
Russell Bryant
6cdc236f09 Merged revisions 59357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r59357 | russell | 2007-03-29 12:14:33 -0500 (Thu, 29 Mar 2007) | 5 lines

If an error occurs when reading from an RTP socket, and the error code does not
indicate that we should try again, then return NULL instead of a "null frame".
This will prevent Asterisk from trying over and over again, and eventually
causing the system to crash.  (issue #8285, john)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:17:41 +00:00
Russell Bryant
fa97f6c381 The AUDIORTPQOS and VIDEORTPQOS variables are not fully functional in some
because they get set in sip_hangup.  So, there are common situations where
the variables will not be available in the dialplan at all.  So, this patch
provides an alternate method for getting to this information by introducing
AUDIORTPQOS and VIDEORTPQOS dialplan functions.
(issue #9370, patch by Corydon76, with some testing by blitzrage)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 17:45:55 +00:00
Joshua Colp
dd1a0aa1dd Allow RFC2833 compensation to compensate for even stupider implementations by queueing up the end frame at the start, not the actual end. (issue #8963 reported by AndrewZ)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-12 01:21:12 +00:00
Joshua Colp
2b3c0dc1e4 Make early SDP seeding even smarter! We have to check codecs in the make_compatible function too. (issue #9221 reported by marcelbarbulescu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-08 18:01:00 +00:00
Joshua Colp
240355d78b Ensure we have (or should have) at least one matching codec before attempting early bridge SDP seeding. (issue #9221 reported by marcelbarbulescu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 17:52:58 +00:00
Joshua Colp
44dd29ff61 Preserve marker bit when P2P bridging. (issue #9198 reported by edgreenberg)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@57768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 03:22:17 +00:00
Joshua Colp
204b58a23c We can not reliably do P2P bridging with DTMF passing back with compensation if we need to listen for DTMF frames. (issue #8962 reported by caio1982)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-07 17:53:03 +00:00
Russell Bryant
2b5990387c When parsing the NTP timestamp in a sender report message, you are supposed to
take the low 16 bits of the integer part, and the high 16 bits of the
fractional part.  However, the code here was erroneously taking the low 16 bits
of the fractional part.  It then shifted the result 16 bits down, so the result
was always zero.  This fix makes it grab the appropriate high 16 bits, instead.
(issue #8991, pointed out by andre_abrantes)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-07 17:39:31 +00:00
Joshua Colp
f0329105f3 Correct a copy/pasted error message line for RTCP.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-02 17:15:22 +00:00
Joshua Colp
28dacda047 When going on hold have the side that was put on hold reinvite back to Asterisk. When going off hold have the side that was taken off hold reinvited back to the other party.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 00:24:20 +00:00
Joshua Colp
7229c2ba48 Add more frame types to forward in the RTP bridge loops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 00:19:48 +00:00
Russell Bryant
0bc7ef3b06 Merged revisions 53039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53039 | russell | 2007-01-31 11:41:51 -0600 (Wed, 31 Jan 2007) | 3 lines

Use the proper format string to print unsigned values in the rtp debug output.
(issue #8954, wmis)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 17:45:05 +00:00
Russell Bryant
06a3110ed8 Fix a problem with packet-to-packet bridging and DTMF mode translation. P2P
bridging can only be used when the DTMF modes don't match if the core is
monitoring DTMF in both directions.  Then, the core will handle the translation.
Otherwise, this bridging method can not be used.
(issue #8936)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@52645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29 21:26:27 +00:00
Russell Bryant
33235b40d6 Merge the changes from the /team/group/vldtmf_fixup branch.
The main bug being addressed here is a problem introduced when two SIP
channels using SIP INFO dtmf have their media directly bridged.  So, when a
DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk
would try to emulate a digit of some length by first sending a DTMF BEGIN
frame and sending a DTMF END later timed off of incoming audio.  However,
since there was no audio coming in, the DTMF_END was never generated.  This
caused DTMF based features to no longer work.

To fix this, the core now knows when a channel doesn't care about DTMF BEGIN
frames (such as a SIP channel sending INFO dtmf).  If this is the case, then
Asterisk will not emulate a digit of some length, and will instead just pass
through the single DTMF END event.

Channel drivers also now get passed the length of the digit to their digit_end
callback.  This improves SIP INFO support even further by enabling us to put
the real digit duration in the INFO message instead of a hard coded 250ms.
Also, for an incoming INFO message, the duration is read from the frame and
passed into the core instead of just getting ignored.

(issue #8597, maybe others...)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19 17:49:38 +00:00
Joshua Colp
9461aa0027 Pass data as well for hold/unhold/vidupdate frames. (issue #8840 reported by mdu113)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 00:18:44 +00:00
Joshua Colp
9f0ad6093e Return the correct result when directly writing out a packet so that the core doesn't then decide to handle it the regular way again. (issue #8833 reported by rcourtna)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 06:36:41 +00:00
Jason Parker
1825fc3ee2 Fix issue with dtmf continuation packets when the dtmf digit is 0...
Issue 8831


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 00:20:56 +00:00
Joshua Colp
240ca25bea Add support to see whether NAT was detected (yay symmetric RTP) and also add a check in chan_sip so that if NAT has been detected and the reinvite behind nat option has been turned off, then just do partial bridge. (issue #8655 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@50466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 05:19:39 +00:00
Joshua Colp
46700b62af Disable the more intense packet2packet bridging until the bugs can be worked out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@50032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 18:21:31 +00:00
Joshua Colp
156a6cf5db If the Packet2Packet bridge is being broken because of a masquerade then attempt to read a frame in so the masquerade actually happens. Otherwise weirdness will occur. (issue #8696 reported by kjotte)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-30 05:46:57 +00:00
Kevin P. Fleming
a299485952 since these variables all have static duration, none of them need initializers (they default to zero anyway)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27 22:06:56 +00:00
Joshua Colp
9cc04e026d Add an API call that initializes an RTP structure. We need this because chan_sip is cheeky and uses a temporary RTP structure for codec purposes, and the API calls that are used rely on the lock. (Pointed out on asterisk-dev by Andy Wang)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-26 04:31:58 +00:00
Joshua Colp
8df2c7228f Turn payload_lock into bridge_lock and make it encompass all RTP structure contents that may relate to bridge information, including who we are bridged to.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 19:55:28 +00:00
Joshua Colp
0995fb8aeb Payload values on the RTP structure can change AFTER a bridge has started. This comes from the packet handling of the SIP response when indication that it was answered has been sent. Therefore we need to protect this data with a lock when we read/write. (issue #8232 reported by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 17:36:12 +00:00
Joshua Colp
87a03da072 Remove direct RTCP bridging. I've come to the conclusion that we should handle this through the core and not just forward it on. Should solve a few bugs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 03:33:30 +00:00
Joshua Colp
c866263f50 Merge in my latest RTP changes. Break out RTP and RTCP callback functions so they no longer share a common one.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 05:36:45 +00:00
Olle Johansson
f89143bd13 - Disable RTP hold timers while T.38 fax transmission happens
- Encapsulate RTP timers in the rtp structure so we have one for video and one for audio
   The video one is not used in 1.4, really. Will be used for RTP keepalives when we can send
   something that video phones support in the RTP stream.
   I now this is a big architectual change at this stage for 1.4, but decided it was needed
   to avoid future bug reports.
- Document the RTP NAT keepalive option in sip.conf.sample

Issue 7679 in the bug tracker. Please test.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-02 11:32:51 +00:00
Joshua Colp
b2b70adede Do not do a partial bridge for Google Talk since we need to handle STUN. (issue #8448 reported by phsultan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 21:18:24 +00:00
Joshua Colp
558639ff6a Merged revisions 48106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48106 | file | 2006-11-29 11:47:10 -0500 (Wed, 29 Nov 2006) | 2 lines

If the frame was duplicated before writing out then we need to free it. (issue #8429 reported by edguy3)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 16:50:33 +00:00
Joshua Colp
090c412c27 Video will never reach Packet2Packet bridging and can do more harm then good.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22 21:47:43 +00:00
Joshua Colp
8c0f4c8711 If we have the non standard G726-32 setting turned on we want to return G726-32 to the SDP, not our AAL2 string. (issue #8330 reported by voipgate)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-21 17:32:27 +00:00
Joshua Colp
b42279c142 Only remove/destroy the RTCP I/O item if it exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 15:58:50 +00:00
Joshua Colp
bc6cff37bc If NAT detection is turned on or already detected then say NAT is active when setting the remote RTP peer when doing early bridging. (issue #8365 reported by marcelbarbulescu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 04:45:24 +00:00
Joshua Colp
708b84da2f Turn notice about unknown RTCP packet type into a debug message instead.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 00:14:07 +00:00
Tilghman Lesher
56a1e60c54 More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:49:13 +00:00
Olle Johansson
e93e64a005 Bind RTCP to the same IP as RTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 16:09:05 +00:00
Kevin P. Fleming
6c17f1e07e add passthrough and file format support for G.722 16KHz audio (issue #5084, original patch by andrew, updated by mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 00:26:17 +00:00