[asterisk-commits] qwell: branch qwell/pimp_my_sip-butnotwithpjproject r382145 - in /team/qwell/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 26 14:31:00 CST 2013
Author: qwell
Date: Tue Feb 26 14:30:54 2013
New Revision: 382145
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382145
Log:
Multiple revisions 381598,381610,381618,381631,381639-381640,381646,381659,381672,381707,381720,381731,381751,381795,381871,381884,381897,381920,381952,381979,382010,382025,382057,382072,382112,382114,382117
........
r381598 | root | 2013-02-15 18:18:02 -0600 (Fri, 15 Feb 2013) | 22 lines
Merged revisions 381595 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381595 | mjordan | 2013-02-15 17:29:28 -0600 (Fri, 15 Feb 2013) | 15 lines
Fix crash in PresenceState AMI action when specifying an invalid provider
This patch fixes a crash in Asterisk that could be caused by using the
PresenceState AMI action while providing an invalid provider. This patch
also adds some additional warnings when a user attempts to provide the
PresenceState action with invalid data, and removes some NOTICE statements
that were still lurking in the code from testing.
(closes issue AST-1084)
Reported by: John Bigelow
Tested by: John Bigelow
........
Merged revisions 381594 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381610 | file | 2013-02-16 10:15:22 -0600 (Sat, 16 Feb 2013) | 11 lines
Improve media handling and add some additional functionality.
1. The act of negotiating a media stream and applying the negotiated stream are now separate operations.
2. Hold/unhold is now implemented.
3. RTP over IPv6 is now implemented.
4. Use of the ptime attribute works.
5. Local Packet2Packet bridging works.
6. Symmetric RTP can now be enabled on a per-endpoint basis.
Review: https://reviewboard.asterisk.org/r/2318/
........
r381618 | root | 2013-02-16 11:17:59 -0600 (Sat, 16 Feb 2013) | 28 lines
Merged revisions 381614-381615 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381614 | file | 2013-02-16 10:24:21 -0600 (Sat, 16 Feb 2013) | 4 lines
Add support for retrieving multiple objects from sorcery using a regex on their id.
Review: https://reviewboard.asterisk.org/r/2329/
................
r381615 | mjordan | 2013-02-16 10:28:43 -0600 (Sat, 16 Feb 2013) | 15 lines
Don't send presencestate information if the state is invalid
Previously, presencestate information was sent whenever the state was not
NOT_SET. When r381594 actually returned INVALID presence state in all the
places it was supposed to, it caused chan_sip to start adding presence
state information to NOTIFY requests that it previously would not have
added. chan_sip shouldn't be adding presence state information when the
provider is in an invalid state; users can't set the state to invalid and
an invalid state always implies that the provider is in an error condition.
(issue AST-1084)
........
Merged revisions 381613 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381631 | root | 2013-02-16 15:17:55 -0600 (Sat, 16 Feb 2013) | 9 lines
Merged revisions 381628 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r381628 | rmudgett | 2013-02-16 14:44:44 -0600 (Sat, 16 Feb 2013) | 2 lines
confbridge: Rename i iterator variables to iter.
........
........
r381639 | file | 2013-02-16 15:36:24 -0600 (Sat, 16 Feb 2013) | 2 lines
Tweak where answer SDP is set as the dialog can't be locked from two different threads at once.
........
r381640 | file | 2013-02-16 17:50:13 -0600 (Sat, 16 Feb 2013) | 2 lines
Nothing to see here, move along.
........
r381646 | root | 2013-02-18 13:18:03 -0600 (Mon, 18 Feb 2013) | 25 lines
Merged revisions 381644 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r381644 | rmudgett | 2013-02-18 13:12:11 -0600 (Mon, 18 Feb 2013) | 18 lines
confbridge: Add flags column to CLI "confbridge list <conference>"
* Added the following flags to the CLI "confbridge list <conference>" output:
A - The user is an admin
M - The user is a marked user
W - The user must wait for a marked user to join
E - The user will be kicked after the last marked user leaves the conference
w - The user is waiting for a marked user to join
* Added the following header to the AMI ConfbridgeList events:
WaitMarked, EndMarked, and Waiting.
(closes issue AST-1101)
Reported by: John Bigelow
Patches:
confbridge-show-admin3.txt (license #5091) patch uploaded by John Bigelow
Modified
........
........
r381659 | root | 2013-02-18 14:17:55 -0600 (Mon, 18 Feb 2013) | 17 lines
Merged revisions 381656 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381656 | jrose | 2013-02-18 13:48:47 -0600 (Mon, 18 Feb 2013) | 10 lines
PRESENCE_STATE: Provide better documentation for the 'e' option.
Notes that the 'e' option actually decodes data when used as a write function
such as with the SET application while it encodes data when used to read.
Review: https://reviewboard.asterisk.org/r/2335/
........
Merged revisions 381655 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381672 | root | 2013-02-18 15:17:51 -0600 (Mon, 18 Feb 2013) | 19 lines
Merged revisions 381670 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381670 | wdoekes | 2013-02-18 14:31:56 -0600 (Mon, 18 Feb 2013) | 12 lines
Remove "registertrying" and add "rtp_engine" from/to sip.conf.sample
The "registertrying" option was removed in r343220. The "rtp_engine"
option was added in r186078 but erroneously named "engine" in the sample.
Note that there is no global sip setting for a different engine.
........
Merged revisions 381668 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381669 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381707 | root | 2013-02-18 17:17:55 -0600 (Mon, 18 Feb 2013) | 30 lines
Merged revisions 381703 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381703 | kharwell | 2013-02-18 16:23:52 -0600 (Mon, 18 Feb 2013) | 23 lines
Fixed Confbridge file recording deadlock and appending.
A deadlock occurred after starting/stopping and then restarting a confbridge
recording. Upon starting a recording a record thread is created that holds a
lock until just before exiting. Stopping the recording does not stop/exit the
thread or release the lock. The thread waits until recording begins again.
Starting a stopped recording signals the thread to continue and start recording
again. However restarting the recording also created another record thread
resulting in a deadlock. The fix was to make sure the record thread was only
created once.
Also it was noted that filenames for the recordings were being concatenated for
each start/stop. This was fixed by creating a new file for each conference
session and appending the actual recorded data within the file (e.g. passing
the 'a' option to MixMonitor).
(issue AST-1088)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/374/
........
Merged revisions 381702 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381720 | root | 2013-02-19 01:17:58 -0600 (Tue, 19 Feb 2013) | 33 lines
Merged revisions 381717-381718 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r381717 | wedhorn | 2013-02-19 00:50:57 -0600 (Tue, 19 Feb 2013) | 13 lines
Fixup skinny CLI completion.
Auto complete for skinny debug allows multiple options and negation, also add
debug all option. Usage example: 'skinny debug all -packets' (each can be
autocompleted including -packet).
Change show device to use device name. Remove the duplicate ast_strdup's from
place calling device complete return immediately from complete devicename and
complete linename so that multiple options are displayed on the CLI if more
than one option available.
Review: https://reviewboard.asterisk.org/r/2333/
........
r381718 | wedhorn | 2013-02-19 00:54:23 -0600 (Tue, 19 Feb 2013) | 11 lines
Add serviceURL stuff to skinny.
Patch adds all the packet and structure stuff to skinny to enable setting
service URLs in skinny, such as corporate directories.
This stuff is only relevant during load/unload as when activated. Also
some minor changes removing duplicated counting of addons and speedials in
handle_skinny_show_devices.
Review: https://reviewboard.asterisk.org/r/2321/
........
........
r381731 | root | 2013-02-19 10:18:27 -0600 (Tue, 19 Feb 2013) | 19 lines
Merged revisions 381729 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r381729 | kharwell | 2013-02-19 09:41:37 -0600 (Tue, 19 Feb 2013) | 12 lines
Added Confbridge record_file_append option.
Currently, if one starts, stops, and then starts a recording again for a
conference the recorded data is appended to the file originally created
on the first record start. An option record_file_append has been added
that defaults to "yes", but when set to "no" will force creation of a new
file between every record start/stop.
(issue AST-1088)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/374/
........
........
r381751 | root | 2013-02-19 11:18:01 -0600 (Tue, 19 Feb 2013) | 44 lines
Merged revisions 381741,381749 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381741 | kharwell | 2013-02-19 10:23:29 -0600 (Tue, 19 Feb 2013) | 20 lines
Confbridge channels staying active when all participants leave.
If you started/stopped recording of a conference multiple times channels
would remain active even when all participants left the conference. This
was due to the fact that a reference to the confbridge was being added
every time a start record command was issued, but when the recording was
stopped there was no matching de-reference thus keeping the conference alive.
Made sure only a single reference is added for the record thread no matter how
many times recording is started/stopped. A de-reference is issued upon thread
ending.
Note, this issue is being fixed under AST-1088 since it relates to it and
should have been corrected along with those modifications.
(issue AST-1088)
Reported by: John Bigelow
........
Merged revisions 381737 from http://svn.asterisk.org/svn/asterisk/branches/11
................
r381749 | elguero | 2013-02-19 11:17:10 -0600 (Tue, 19 Feb 2013) | 15 lines
Add The Status Of A Module To The Output Of "CLI> module show"
When a module's configuration is not loadable, we still load the module but it
is not in a running state. When trying to troubleshoot, let's say, why
chan_motif is ignoring inbound XMPP traffic, there is no way to indicate that a
loaded module is not currently running.
(closes issue ASTERISK-21108)
Reported by: Rusty Newton
Tested by: Michael L. Young
Patches:
asterisk-21108_add_status-v2.diff Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2331/
................
........
r381795 | root | 2013-02-19 14:17:58 -0600 (Tue, 19 Feb 2013) | 24 lines
Merged revisions 381792 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381792 | kharwell | 2013-02-19 13:47:42 -0600 (Tue, 19 Feb 2013) | 17 lines
Write the correct callid to the data1 field in queue_log for transfer events.
The incorrect callid was being written to the "data1" field in queue_log table
for transfer events. The callid of the queue was being written instead of the
transfer target's callid. This now gets the correct "transfer to" number and
places that in the "data1" field of the queue_log table when a transfer event
is triggered.
(closes issue ASTERISK-19960)
Reported by: vladimir shmagin
........
Merged revisions 381770 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381791 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381871 | root | 2013-02-21 20:18:02 -0600 (Thu, 21 Feb 2013) | 23 lines
Merged revisions 381869 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381869 | mjordan | 2013-02-21 19:52:14 -0600 (Thu, 21 Feb 2013) | 16 lines
Properly detect launchd
Asterisk was a little too pro-active in claiming that it found launchd. On
systems without launchd - such as FreeBSD - this resulted in certain items
in Asterisk that conflict with launchd to not be selectable, such as
res_timing_kqueue.
(closes issue ASTERISK-20749)
Reported by: Oleg Baranov
........
Merged revisions 381847 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381848 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381884 | root | 2013-02-22 10:17:59 -0600 (Fri, 22 Feb 2013) | 20 lines
Merged revisions 381881 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381881 | jrose | 2013-02-22 09:51:20 -0600 (Fri, 22 Feb 2013) | 13 lines
app_dial: Honor the 'c' flag when the calling party hangs up
Apparently this feature became broken in 11, probably as a result
of the Hangup Cause project.
(closes issue ASTERISK-21113)
Reprted by: Heiko Wundram
Patches:
app_dial.patch uploaded by Heiko Wundram (license 5822)
........
Merged revisions 381880 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381897 | root | 2013-02-22 14:17:57 -0600 (Fri, 22 Feb 2013) | 40 lines
Merged revisions 381894 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381894 | elguero | 2013-02-22 13:40:02 -0600 (Fri, 22 Feb 2013) | 33 lines
Fix FastAGI To Properly Check For A Connection
When IPv6 support was added to FastAGI, the intent was to have the ability to
check all addresses resolved for a host since we might receive an IPv4 address
and an IPv6 address. The problem with the current code, is that, since we are
doing O_NONBLOCK, we get EINPROGRESS when calling ast_connect() but are ignoring
this instead of handling it. We break out of the loop and continue on. When we
later call ast_poll(), it succeeds but we never check if we have a connection or
not on the socket level. We then attempt to send data to the host address that
we think is setup and it fails. We then check the errno and see that we have
"connection refused" and then return with agi failed.
This patch does the following:
* Handles EINPROGRESS by creating the function handle_connection()
- ast_poll() was moved into this function
- This function checks the results of the connection on the socket level after
calling ast_poll()
* Continues to the next address if the above fails to create a connection
* Once all addresses resolved are tried and we still are unable to establish a
connection, then we return that the FastAGI call failed
(closes issue ASTERISK-21065)
Reported by: Jeremy Kister
Tested by: Jeremy Kister, Michael L. Young
Patches:
asterisk-21065_poll_correctly_v4.diff Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2330/
........
Merged revisions 381893 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381920 | root | 2013-02-24 10:18:38 -0600 (Sun, 24 Feb 2013) | 34 lines
Merged revisions 381918 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381918 | mjordan | 2013-02-24 09:45:29 -0600 (Sun, 24 Feb 2013) | 27 lines
Make ParkAndAnnounce return to priority + 1 when return context is not defined
The ParkAndAnnounce application documentation for the optional return_context
parameter states the following:
return_context
The goto-style label to jump the call back into after timeout. Default
'priority+1'.
Unfortunately, the application was sending the channel back into the dialplan
at 'priority', which is the ParkAndAnnounce application call. This causes an
infinite loop of the channel constantly being parked, announced, timed out,
parked, announced, timed out... while fun, especially for those callers you
wish to drive to the end of madness, this was not the intent of the
application.
(closes issue ASTERISK-20113)
Reported by: serginuez
patches:
app_parkandannounce.diff uploaded by serginuez (License 6405)
........
Merged revisions 381916 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381917 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381952 | root | 2013-02-24 11:17:53 -0600 (Sun, 24 Feb 2013) | 35 lines
Merged revisions 381949 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381949 | mjordan | 2013-02-24 10:27:47 -0600 (Sun, 24 Feb 2013) | 28 lines
Don't display the AMI ALL class authorization for users if they don't have it
When converting AMI class authorizations to a string representation, the
method always appends the ALL class authorization. This is especially
important for events, as they should always communicate that class
authorization - even if the event itself does not specify ALL as a class
authorization for itself. (Events have always assumed that the ALL class
authorization is implied when they are raised)
Unfortunately, this did mean that specifying a user with restricted class
authorizations would show up in the 'manager show user' CLI command as
having the ALL class authorization.
Rather then modifying the existing string manipulation function, this patch
adds a function that will only return a string if the field being compared
explicitly matches class authorization field it is being compared against.
This prevents ALL from being returned unless it is actually specified for
the user.
(closes issue ASTERISK-20397)
Reported by: Johan Wilfer
........
Merged revisions 381939 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381943 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r381979 | root | 2013-02-24 17:17:56 -0600 (Sun, 24 Feb 2013) | 29 lines
Merged revisions 381977 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r381977 | mjordan | 2013-02-24 17:01:17 -0600 (Sun, 24 Feb 2013) | 22 lines
Set the sin_family on the bind address socket during initialization
Somehow, chan_jingle has managed to operate for years without setting the
sin_family on its bindaddr socket. This patch properly sets the field during
initial module load to AF_INET.
Note that the patch on the issue was modified slightly to change the
initialization of the socket from allocation of a chan_jingle private to the
module initialization, as the bindaddr object (which is static) only needs to
have the address set once.
(closes issue ASTERISK-19341)
Reported by: andre valentin
patches:
0105-chan_jingle.patch uploaded by avalentin (License 6064)
........
Merged revisions 381975 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381976 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r382010 | root | 2013-02-25 01:17:53 -0600 (Mon, 25 Feb 2013) | 36 lines
Merged revisions 382007-382008 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r382007 | wedhorn | 2013-02-25 00:46:00 -0600 (Mon, 25 Feb 2013) | 13 lines
Add prinotify messages to skinny.
Adds both fixed and variable prinotify messages and clearprinotify messages to skinny.
Also adds cli function for pushing messages to devices. i
Initial code by snuffy, expanded by myself to include fixed messages.
(closes issue ASTERISK-21091)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-prinotify02.diff uploaded by wedhorn (license 5019)
........
r382008 | wedhorn | 2013-02-25 01:09:37 -0600 (Mon, 25 Feb 2013) | 14 lines
More called details fixup for skinny.
Basically sets the callerid and callername to the first device talked to for the
purposes of putting the the calls made log on the device. Does not affect the device
displaying who the device is currently talking to.
Also some minor changes to use sub->exten in lieu of l->lastnumberdialed.
(closes issue ASTERISK-21095)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
skinny-calllogsoutbound03.diff uploaded by wedhorn (license 5019)
........
........
r382025 | root | 2013-02-25 07:18:34 -0600 (Mon, 25 Feb 2013) | 27 lines
Merged revisions 382023 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r382023 | mjordan | 2013-02-25 06:51:24 -0600 (Mon, 25 Feb 2013) | 20 lines
Clean up use of va_end/va_args in res_config_mysql
There were several problems using variadic argument macros in res_config_mysql.
* Improper use of va_end. Multiple calls to va_end were possible resulting in
an unbalanced matching of va_start/va_end.
* Calls to va_arg after a possible encounter of a SENTINEL value.
This patch corrects those errors.
(closes issue ASTERISK-19451)
Reported by: wdoekes
patches:
ASTERISK-19451-1.8--2.diff uploaded by wdoekes (License 5674)
........
Merged revisions 382021 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 382022 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r382057 | file | 2013-02-25 13:55:35 -0600 (Mon, 25 Feb 2013) | 2 lines
Remove assumption that the INVITE session will exist when the session is ended.
........
r382072 | root | 2013-02-26 10:18:37 -0600 (Tue, 26 Feb 2013) | 59 lines
Merged revisions 382067,382070 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r382067 | mjordan | 2013-02-26 09:26:16 -0600 (Tue, 26 Feb 2013) | 20 lines
Ensure that the default bridge/user profiles are always available
ConfBridge and Page require that there always be a default bridge and user
profile available. While properties of the default profiles can be overriden
in the configuration file, removing them can create situations where neither
application can function properly.
This patch ensures that if an administrator removes the profiles from the
confbridge.conf configuration file, the profiles are added upon load.
Documentation clarifying this has been added to the confbridge.conf.sample file.
Review: https://reviewboard.asterisk.org/r/2356/
(closes issue AST-1115)
Reported by: John Bigelow
Tested by: John Bigelow
........
Merged revisions 382066 from http://svn.asterisk.org/svn/asterisk/branches/11
................
r382070 | mjordan | 2013-02-26 09:52:02 -0600 (Tue, 26 Feb 2013) | 30 lines
Clean up ConfBridge commands to account for wait_marked users
When ConfBridge was refactored to better handle the concept of marked,
wait_marked, and normal users co-existing in a conference (thereby implementing
a state machine for the conference), the wait_marked users were put into their
own list of conference participants, separate from the active users. This list
is used for wait_marked users when they are waiting in a conference but no
marked user has joined; normal users may have joined at this point however.
There are several AMI/CLI commands that affect conference users that were not
checking the wait_marked users list:
* CLI/AMI commands that mute/unmute a participant. In this case, wait_marked
users have to remain in their particular state and should not be affected -
however, the commands would return "Channel not found" as opposed to the
appropriate error condition.
* CLI/AMI commands that kick a participant. An admin should always be able to
kick a participant out of the conference.
This patch fixes both sets of commands, and cleans up the CLI commands slightly
by allowing them to complete a participant name (this was supposed to have been
added, but the function call was commented out and wasn't implemented).
Review: https://reviewboard.asterisk.org/r/2346/
(closes issue AST-1114)
Reported by: John Bigelow
Tested by: John Bigelow
........
Merged revisions 382068 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
r382112 | mmichelson | 2013-02-26 13:55:31 -0600 (Tue, 26 Feb 2013) | 60 lines
Merge pool_shark2 branch.
Copied from the reviewboard description:
* The ast_sip_work structure and some of its methods have been removed in
favor of the generic task serializer.
* A PJSIP module, the message distributor, has been added. This module has a
high priority and gets called into after the PJSIP transport layer but before
the PJSIP transaction layer. The distributor is used as a means of moving an
incoming message from a PJSIP thread into a SIP servant thread. Then from the
SIP servant thread, the message bubbles up through the PJSIP transaction layer,
PJSIP dialog layer, and any relevant PJSIP modules that Asterisk has registered.
This means that any PJSIP module that registers itself at the transaction layer
or higher will have all of its incoming SIP messages already in a SIP servant
thread when called back. Unless they need to serialize operations, they do not
need to do any special processing to ensure the incoming message is handled in a
specific thread. A good example of this is what the SIP OPTIONS handler does in
this set of changes.
* Two new PJSIP modules have been added above the dialog layer. The endpoint
module and the authenticator module are responsible for doing endpoint lookups
and authentication for incoming requests. The placement of these modules means
that they are only ever called into for out-of-dialog requests. This means that
on an initial INVITE, or on a REGISTER, or on an OPTIONS request, or any other
out-of-dialog request, the application-layer modules do not need to worry about
endpoint lookup or authentication since that is done already for them. If they
need the endpoint, they can call ast_pjsip_rdata_get_endpoint(). For dialog-
forming application modules, they will want to save off the endpoint that the
endpoint module finds since the endpoint will not be looked up again on in-
dialog requests, meaning they will not be able to call
ast_pjsip_rdata_get_endpoint().
* Modules that were passing incoming messages off to servants no longer need to
do this, so they have been changed not to. So the session module and options
module now handle incoming requests in-line rather than pushing them to a
servant thread.
* Since it no longer makes sense to pre-allocate a serializer before an
ast_sip_session, the functions for allocating SIP sessions has been changed not
to take a serializer any more. Instead, the allocation routine creates its own.
In addition, the behavior of endpoint references has changed from how it
previously was. Now allocating a session results in the endpoint reference count
increasing by one rather than having the session inherit the reference passed
into it. This makes endpoint reference handling much cleaner, especially in the
session module.
* To assist programmers who want to write PJSIP modules in Asterisk, there is a
helper method called ast_sip_thread_is_servant() that has been added. It can be
used to discern if the thread you currently are in is a SIP servant thread. This
means it is not as necessary to dig into the PJSIP internals to know what type
of thread you are in when called back. Instead, you can be safe and use this
function. This function is currently unused though, since there hasn't been a
need for it yet. This is because all uses of SIP servants where it may be
questionable what type of thread we are in need to serialize the task anyway.
* Documentation of the SIP threadpool has been updated.
Review: https://reviewboard.asterisk.org/r/2355
........
r382114 | mmichelson | 2013-02-26 14:09:59 -0600 (Tue, 26 Feb 2013) | 3 lines
Invert logic so that things actually start up properly.
........
r382117 | root | 2013-02-26 14:18:07 -0600 (Tue, 26 Feb 2013) | 49 lines
Merged revisions 382106,382109,382113 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r382106 | tzafrir | 2013-02-26 13:29:14 -0600 (Tue, 26 Feb 2013) | 11 lines
Remove unneeded linux-gnueabi*
As of r380522 the configure scripts converts the value of linux-gnueabi*
of OSARCH to "linux-gnu". So no point in testing for those values.
........
Merged revisions 382087 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 382096 from http://svn.asterisk.org/svn/asterisk/branches/11
................
r382109 | wdoekes | 2013-02-26 13:36:30 -0600 (Tue, 26 Feb 2013) | 13 lines
Correct RPID parsing for unquoted display-name.
Parsing Remote-Party-ID will now succeed if display-name is of the
*(token LWS) kind and not just the quoted-string kind.
Review: https://reviewboard.asterisk.org/r/2341/
........
Merged revisions 382107 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 382108 from http://svn.asterisk.org/svn/asterisk/branches/11
................
r382113 | tzafrir | 2013-02-26 14:05:02 -0600 (Tue, 26 Feb 2013) | 14 lines
Consider linux-gnuspe as linux-gnu
* The powerpcspe Linux port uses linux-gnuspe as the OS string.
* Our build system shouldn't really care for that, so just call it linux-gnu.
* Original report: Roland Stigge , http://bugs.debian.org/701505
Review: https://reviewboard.asterisk.org/r/2357/
........
Merged revisions 382110 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 382111 from http://svn.asterisk.org/svn/asterisk/branches/11
................
........
Merged revisions 381598,381610,381618,381631,381639-381640,381646,381659,381672,381707,381720,381731,381751,381795,381871,381884,381897,381920,381952,381979,382010,382025,382057,382072,382112,382114,382117 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip
Added:
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip/sip_distributor.c
- copied unchanged from r382117, team/group/pimp_my_sip/res/res_sip/sip_distributor.c
Modified:
team/qwell/pimp_my_sip-butnotwithpjproject/ (props changed)
team/qwell/pimp_my_sip-butnotwithpjproject/channels/chan_gulp.c
team/qwell/pimp_my_sip-butnotwithpjproject/configs/res_sip.conf.sample
team/qwell/pimp_my_sip-butnotwithpjproject/configure
team/qwell/pimp_my_sip-butnotwithpjproject/include/asterisk/autoconfig.h.in
team/qwell/pimp_my_sip-butnotwithpjproject/include/asterisk/res_sip.h
team/qwell/pimp_my_sip-butnotwithpjproject/include/asterisk/res_sip_session.h
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip.exports.in
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip/config_transport.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip/sip_configuration.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip/sip_options.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip_endpoint_identifier_ip.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip_sdp_audio.c
team/qwell/pimp_my_sip-butnotwithpjproject/res/res_sip_session.c
Propchange: team/qwell/pimp_my_sip-butnotwithpjproject/
('automerge' removed)
Propchange: team/qwell/pimp_my_sip-butnotwithpjproject/
------------------------------------------------------------------------------
--- branchmerge (original)
+++ branchmerge Tue Feb 26 14:30:54 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-381583 /team/qwell/pjsip-shared-libs:1-381358,381360,381362-381393,381395-381417,381419-381439,381441-381460,381462-381500,381502-381538,381540-381554,381556-381561,381563-381573,381575-381583,381765-381766
+/team/group/pimp_my_sip:1-382144 /team/qwell/pjsip-shared-libs:1-381358,381360,381362-381393,381395-381417,381419-381439,381441-381460,381462-381500,381502-381538,381540-381554,381556-381561,381563-381573,381575-381583,381765-381766
Modified: team/qwell/pimp_my_sip-butnotwithpjproject/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pimp_my_sip-butnotwithpjproject/channels/chan_gulp.c?view=diff&rev=382145&r1=382144&r2=382145
==============================================================================
--- team/qwell/pimp_my_sip-butnotwithpjproject/channels/chan_gulp.c (original)
+++ team/qwell/pimp_my_sip-butnotwithpjproject/channels/chan_gulp.c Tue Feb 26 14:30:54 2013
@@ -55,6 +55,7 @@
#include "asterisk/app.h"
#include "asterisk/musiconhold.h"
#include "asterisk/causes.h"
+#include "asterisk/taskprocessor.h"
#include "asterisk/res_sip.h"
#include "asterisk/res_sip_session.h"
@@ -109,10 +110,19 @@
.incoming_response = gulp_incoming_response,
};
-/*! \brief Function called by RTP engine to get local RTP peer */
+/*! \brief Function called by RTP engine to get local audio RTP peer */
static enum ast_rtp_glue_result gulp_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **instance)
{
- return AST_RTP_GLUE_RESULT_FORBID;
+ struct ast_sip_session *session = ast_channel_tech_pvt(chan);
+
+ if (!session || !session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+ return AST_RTP_GLUE_RESULT_FORBID;
+ }
+
+ ao2_ref(session->media[AST_SIP_MEDIA_AUDIO].rtp, +1);
+ *instance = session->media[AST_SIP_MEDIA_AUDIO].rtp;
+
+ return AST_RTP_GLUE_RESULT_LOCAL;
}
/*! \brief Function called by RTP engine to get peer capabilities */
@@ -158,11 +168,6 @@
ast_format_copy(ast_channel_readformat(chan), &fmt);
ast_format_copy(ast_channel_rawreadformat(chan), &fmt);
- if (session->media.audio) {
- ast_channel_set_fd(chan, 0, ast_rtp_instance_fd(session->media.audio, 0));
- ast_channel_set_fd(chan, 1, ast_rtp_instance_fd(session->media.audio, 1));
- }
-
if (state == AST_STATE_RING) {
ast_channel_rings_set(chan, 1);
}
@@ -202,7 +207,7 @@
ast_setstate(ast, AST_STATE_UP);
ao2_ref(session, +1);
- if (ast_sip_push_task(session->work, answer, session)) {
+ if (ast_sip_push_task(session->serializer, answer, session)) {
ast_log(LOG_WARNING, "Unable to push answer task to the threadpool. Cannot answer call\n");
ao2_cleanup(session);
return -1;
@@ -218,16 +223,16 @@
switch (ast_channel_fdno(ast)) {
case 0:
- f = ast_rtp_instance_read(session->media.audio, 0);
+ f = ast_rtp_instance_read(session->media[AST_SIP_MEDIA_AUDIO].rtp, 0);
break;
case 1:
- f = ast_rtp_instance_read(session->media.audio, 1);
+ f = ast_rtp_instance_read(session->media[AST_SIP_MEDIA_AUDIO].rtp, 1);
break;
default:
f = &ast_null_frame;
}
- if (f->frametype == AST_FRAME_VOICE) {
+ if (f && f->frametype == AST_FRAME_VOICE) {
if (!(ast_format_cap_iscompatible(ast_channel_nativeformats(ast), &f->subclass.format))) {
ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(&f->subclass.format));
ast_format_cap_set(ast_channel_nativeformats(ast), &f->subclass.format);
@@ -258,8 +263,8 @@
ast_getformatname(ast_channel_writeformat(ast)));
return 0;
}
- if (session->media.audio) {
- res = ast_rtp_instance_write(session->media.audio, frame);
+ if (session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+ res = ast_rtp_instance_write(session->media[AST_SIP_MEDIA_AUDIO].rtp, frame);
}
break;
default:
@@ -294,7 +299,7 @@
return -1;
}
- if (ast_sip_push_task_synchronous(session->work, fixup, &fix_data)) {
+ if (ast_sip_push_task_synchronous(session->serializer, fixup, &fix_data)) {
ast_log(LOG_WARNING, "Unable to perform channel fixup\n");
return -1;
}
@@ -429,7 +434,7 @@
if (!res && response_code) {
struct indicate_data *ind_data = indicate_data_alloc(session, condition, response_code, data, datalen);
if (ind_data) {
- res = ast_sip_push_task(session->work, indicate, ind_data);
+ res = ast_sip_push_task(session->serializer, indicate, ind_data);
if (res) {
ast_log(LOG_NOTICE, "Cannot send response code %d to endpoint %s. Could queue task properly\n",
response_code, ast_sorcery_object_get_id(session->endpoint));
@@ -451,7 +456,9 @@
switch (session->endpoint->dtmf) {
case AST_SIP_DTMF_RFC_4733:
- ast_rtp_instance_dtmf_begin(session->media.audio, digit);
+ if (session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+ ast_rtp_instance_dtmf_begin(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit);
+ }
case AST_SIP_DTMF_NONE:
break;
case AST_SIP_DTMF_INBAND:
@@ -475,7 +482,9 @@
/* TODO: Send INFO dtmf here */
break;
case AST_SIP_DTMF_RFC_4733:
- ast_rtp_instance_dtmf_end_with_duration(session->media.audio, digit, duration);
+ if (session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+ ast_rtp_instance_dtmf_end_with_duration(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit, duration);
+ }
case AST_SIP_DTMF_NONE:
break;
case AST_SIP_DTMF_INBAND:
@@ -507,7 +516,7 @@
struct ast_sip_session *session = ast_channel_tech_pvt(ast);
ao2_ref(session, +1);
- if (ast_sip_push_task_synchronous(session->work, call, session)) {
+ if (ast_sip_push_task_synchronous(session->serializer, call, session)) {
ast_log(LOG_WARNING, "Error attempting to place outbound call to call '%s'\n", dest);
ao2_cleanup(session);
return -1;
@@ -620,7 +629,7 @@
goto failure;
}
- if (ast_sip_push_task(session->work, hangup, h_data)) {
+ if (ast_sip_push_task(session->serializer, hangup, h_data)) {
ast_log(LOG_WARNING, "Unable to push hangup task to the threadpool. Expect bad things\n");
goto failure;
}
@@ -640,14 +649,13 @@
struct request_data {
struct ast_sip_session *session;
- struct ast_sip_work *work;
const char *dest;
};
static int request(void *obj)
{
struct request_data *req_data = obj;
- struct ast_sip_endpoint *endpoint = ast_sip_endpoint_alloc("constant");
+ RAII_VAR(struct ast_sip_endpoint *, endpoint, ast_sip_endpoint_alloc("constant"), ao2_cleanup);
[... 1953 lines stripped ...]
More information about the asterisk-commits
mailing list