summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2014-03-05Fix res/res_http_websocket.c build failure in 32bit due to incorrect print ↵Moises Silva
format for uint64_t git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05Fix WebRTC over WSS not workingMoises Silva
Several fixes for the WebSockets implementation in res/res_http_websocket.c * Flush the websocket session FILE* as fwrite() may not actually guarantee sending the data to the network. If we do not flush, it seems that buffering on the SSL socket for outbound messages causes issues * Refactored ast_websocket_read to take into account that SSL file descriptors may be ready to read via fread() but poll() will not actually say so because the data was already read from the network buffers and is now in the libc buffers (closes issue ASTERISK-23099) (closes issue ASTERISK-21930) Review: https://reviewboard.asterisk.org/r/3248/ ........ Merged revisions 409681 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409697 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICEJonathan Rose
ICE sessions will now be restarted if sessions are changed to use new sets of remote candidates. (closes issue ASTERISK-22911) Reported by: Vytis Valentinavičius Review: https://reviewboard.asterisk.org/r/3275/ ........ Merged revisions 409565 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409570 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03res_stasis_recording: Fix memory leak of the absolute name.Joshua Colp
........ Merged revisions 409422 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01res_pjsip_session: Set options (100rel, timers) on incoming sessions.Joshua Colp
This change passes options to the UAS creation function. This in turn sets up 100rel and session timer properties on the incoming session. Reported by Julian Russell on asterisk-users mailing list. ........ Merged revisions 409287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27Multiple revisions 409129-409130Jonathan Rose
........ r409129 | jrose | 2014-02-27 13:19:02 -0600 (Thu, 27 Feb 2014) | 15 lines res_rtp_asterisk: Fix checklist creating problems in ICE sessions Prior to this patch, local candidate lists including SRFLX would fail to start properly when building ICE candidate check lists. This patch fixes that problem by making sure that each SRFLX candidate is associated with the proper base address so that the check list can create matches properly. This patch was written by jcolp. The issue will be left open to await testing by the issue participants. (issue ASTERISK-23213) Reported by: Andrea Suisani Review: https://reviewboard.asterisk.org/r/3256/ ........ r409130 | jrose | 2014-02-27 13:38:10 -0600 (Thu, 27 Feb 2014) | 8 lines res_rtp_asterisk: correct build error from r409129 Accidentally placed a declaration below functional code (issue ASTERISK-23213) Reported by: Andrea Suisani Review: https://reviewboard.asterisk.org/r/3256/ ........ Merged revisions 409129-409130 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409131 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27res_pjsip_sdp_rtp: Apply packetization rules on inbound SDP handlingMatthew Jordan
The setting 'use_ptime' is supposed to tell Asterisk to honour the ptime attribute in an offer, preferring it to whatever packetization preferences have been set internally. Currently, however, something rather quirky will happen: (1) The SDP answer will be constructed in create_outgoing_sdp_stream. This will use the preferences from the endpoint, such that the 200 OK response will add the packetization preferences from the endpoint, and not what was offered. (2) When the 200 response is issued, apply_negotiated_sdp_stream is called. This will call apply_packetization, which will use the ptime attribute from the offer internally. We end up telling the offerer to use the internal ptime attribute, but we end up using the offered ptime attribute. Hilarity ensues. This patch modifies the behaviour by calling apply_packetization from negotiate_incoming_sdp_stream, which is called prior to create_outgoing_sdp_stream. This causes the format preferences on the session's media object to be set to the inbound ptime value (if 'use_ptime' is enabled), such that the construction of the answer gets the right value immediately. Review: https://reviewboard.asterisk.org/r/3244/ ........ Merged revisions 408999 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26res_ari: Make some additional error responses consistent with the rest of ↵Joshua Colp
the system. This change makes some error cases use ast_ari_response_error to construct their error responses instead of manually doing it. This ensures they are consistent with the other error responses. Based on the original patch as done by Paul Belanger on the associated review. Review: https://reviewboard.asterisk.org/r/2904/ ........ Merged revisions 408957 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26PJSIP: Prevent crash if channel has gone awayKinsey Moore
It is currently possible for an ast_sip_session to exist without an associated channel as is the case when a new invite is coming in or just after a hangup is issued on a chan_pjsip channel. Part of the attended transfer code assumed the channel would be non-NULL and used it as such causing a crash. This bug was exposed thanks to the attended transfer ARI test in the test suite. (closes issue ASTERISK-23287) Reported by: Matt Jordan ........ Merged revisions 408941 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25res_pjsip_exten_state: Presence for digium phonesKevin Harwell
Added presence support for digium phones. Review: https://reviewboard.asterisk.org/r/3239/ ........ Merged revisions 408882 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25res_pjsip_send_to_voicemail: transferring to voicemail for digium phonesKevin Harwell
Added the ability for transferring directly to voicemail on digium phones. Added a new module that checks for the presence of a custom header and/or diversion header within a sip REFER. If either is found and they specify a sending to voicemail action then variables are added to the channel allowing the user access to them in the dialplan. Dialplan can then be written that branches based upon these values allowing, for instace, for a single number to be used for dialing and/or accessing voicemail directly. Also fixed a problem where the PJSIP_HEADER function was allowing non pjsip channels through (checked to make sure it has the correct channel type before proceeding). Review: https://reviewboard.asterisk.org/r/3245/ ........ Merged revisions 408880 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22Remove extra defines of AST_PBX_MAX_STACK.Corey Farrell
* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h. * Fix incorrect function parameters in utils/extconf.c. (closes issue ASTERISK-23141) Reported by: Maxim Review: https://reviewboard.asterisk.org/r/3241/ ........ Merged revisions 408785 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 408786 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 408787 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21json: Fix off-nominal json ref counting issues.Richard Mudgett
* Fixed off-nominal json ref counting issue with using the following API calls: ast_json_object_set() and ast_json_array_append(). * Fixed off-nominal error reporting in ast_ari_endpoints_list(). * Fixed some miscellaneous off-nominal json ref counting issues in report_receive_fax_status() and dial_to_json(). ........ Merged revisions 408713 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20pjsip_cli: Add pjsip commands 'show registrations' and 'show contacts'.George Joseph
Added 'show registrations' and 'show contacts' to pjsip cli to make things a little more consistent. The output is exactly the same as the list command. Just needed to add entries to their respective ast_cli_entry structures. (closes issue ASTERISK-23275) Review: http://reviewboard.asterisk.org/r/3210/ ........ Merged revisions 408522 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20pjsip_cli: Fix memory leak in ast_sip_cli_print_sorcery_objectset.George Joseph
Fixed memory leaks in ast_sip_cli_print_sorcery_objectset and ast_variable_list_sort. (closes issue ASTERISK-23266) Review: http://reviewboard.asterisk.org/r/3200/ ........ Merged revisions 408520 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20sorcery: Create sorcery instance registry.George Joseph
In order to retrieve an arbitrary sorcery instance from a dialplan function (or any place else) there needs to be a registry of sorcery instances. ast_sorcery_init now creates a hashtab as a registry. ast_sorcery_open now checks the hashtab for an existing sorcery instance matching the caller's module name. If it finds one, it bumps the refcount and returns it. If not, it creates a new sorcery instance, adds it to the hashtab, then returns it. ast_sorcery_retrieve_by_module_name is a new function that does a hashtab lookup by module name. It can be called by the future dialplan function. res_pjsip/config_system needed a small change to share the main res_pjsip sorcery instance. tests/test_sorcery was updated to include a test for the registry. (closes issue ASTERISK-22537) Review: http://reviewboard.asterisk.org/r/3184/ ........ Merged revisions 408518 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20res_pjsip: Update documentation for 'use_avpf' optionMatthew Jordan
When 'use_avpf' is set to True, inbound offers must use the AVPF/SAVPF RTP profile. However, when 'use_avpf' is set to False, Asterisk will accept both AVP/SAVP or AVPF/SAVPF RTP profiles in inbound offers. The documentation previously implied that Asterisk would reject AVPF/SAVPF if 'use_avpf' was set to False and a UA offered said profile in an INVITE request. ........ Merged revisions 408502 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19res_sorcery_astdb.c: Fix regex handling and keep simple prefix matching ↵Richard Mudgett
performance. The sorcery astDB wizzard does not handle regex correctly if the pattern begins with an anchor character. This patch attempts to convert the anchored regex pattern to a prefix pattern supported by astDB for performance reasons. If it is not able to convert the pattern it falls back to getting all astDB members of the family and doing a normal regex pattern matching on the retrieved records. Review: https://reviewboard.asterisk.org/r/3161/ ........ Merged revisions 408385 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-17Store SIP User-Agent information in contacts.Mark Michelson
When an endpoint sends a REGISTER request to Asterisk, we now will associate the User-Agent header with all contacts that were bound in that REGISTER request. ........ Merged revisions 408270 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13Remove all PJSIP MWI-specific use from our MWI code.Mark Michelson
PJSIP has built-in MWI code that could be useful to some degree, but our utilization of the API actually made our code a bit more cluttered since we had to have special cases peppered throughout. With this change, we move to using the pjsip_evsub API instead, which streamlines the code by removing special cases. Review: https://reviewboard.asterisk.org/r/3205 ........ Merged revisions 408005 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13Fix crash in AMI PJSIPShowEndpoint action.Mark Michelson
If an AOR has no permanent contacts, then the permanent_contacts container is never allocated. This makes the code safe in the face of NULLs. I also changed the variable that counts contacts from "num" to "total_contacts" since there are now two variables that are indicate numbers of things. ........ Merged revisions 407988 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-11ari/resource_channels: Add channel variables earlier in the creation processMatthew Jordan
This patch tweaks the behaviour of POST /channels with channel variables such that the variables are passed into the pbx.c routines that perform the origination. This allows the variables to be assigned to the newly created channels immediately upon their construction, as opposed to be assigned after the originate has completed. The upshot of this is that the variables are available on the channels if they execute in the dialplan, as opposed to only being available once the channels are answered. Review: https://reviewboard.asterisk.org/r/3183/ ........ Merged revisions 407937 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10res_config_pgsql: Fix ast_update2_realtime calls.Walter Doekes
Fix so multiple updates from a single call works (add missing ','). Remove bogus ast_free's that weren't supposed to be there. Moved a few spaces for readability. Review: https://reviewboard.asterisk.org/r/3194/ ........ Merged revisions 407873 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 407874 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 407875 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07timing: Improve performance for most timing implementations.Joshua Colp
This change allows timing implementation data to be stored directly on the timer itself thus removing the requirement for many implementations to do a container lookup for the same information. This means that API calls into timing implementations can directly access the information they need instead of having to find it. Review: https://reviewboard.asterisk.org/r/3175/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06res_pjsip: Updates and adds more PJSIP CLI commands.Richard Mudgett
* Adds identify, transport, and registration support to the PJSIP CLI. * Creates three additional callbacks, one for an iterator, one for a comparator, and one for a container. This eliminates the link dependency from higher level modules to lower level ones. * Eliminates duplicate sorting in PJSIP CLI commands. * Cleans up PJSIP CLI output formatting. * Pushes CLI command registration down to the implementing source file. * Adds several ast_sip_destroy_sorcery functions to complement existing ast_sip_sorcery_initialize functions. The destroy functions unregister PJSIP CLI commands and PJSIP CLI formatters. Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3104/ ........ Merged revisions 407568 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05res_pjsip: When no global type the debug option defaults to "yes"Kevin Harwell
If the global section was not specified in pjsip.conf then the configuration object does not exist in sorcery so when retrieving "debug" option it would return NULL. Then the NULL result was passed to ast_false utils function which would return false because it wasn't set to some representation of false, thus enabling sip debug logging. Made it so if the global config object does not exist then it will return a default of "no" for sip debugging. (issue ASTERISK-23038) Reported by: Rusty Newton ........ Merged revisions 407442 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04res_pjsip: Fix assertion for pjsip.conf authorization list options.Richard Mudgett
(closes issue ASTERISK-23168) Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3143/ ........ Merged revisions 407324 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04res_clialiases: Fix crash when reloading and re-aliasing an alias that is in ↵Joshua Colp
use. The code assumed that unregistering the alias would always succeed while in practice this is not actually true. A common case is the "reload" command itself. If the cli_aliases.conf configuration file was changed and reload executed the command would fail to unregister and ultimately point to freed memory. The reload process now checks whether unregistering succeeded or not and if not the old CLI alias is retained. (closes issue ASTERISK-19773) Reported by: Joel Vandal (closes issue ASTERISK-22757) Reported by: Gareth Blades ........ Merged revisions 407205 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 407210 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 407213 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01res_stasis: Enable transfers and provide events when they occur.Joshua Colp
This change enables transfers within ARI created bridges and adds events for when they occur. Unlike other events these will be received if *any* subscribed object is involved in the transfer. (closes issue ASTERISK-22984) Reported by: David M. Lee Review: https://reviewboard.asterisk.org/r/3120/ ........ Merged revisions 407153 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip: Config option to enable PJSIP logger at load time.Kevin Harwell
Added a "debug" configuration option for res_pjsip that when set to "yes" enables SIP messages to be logged. It is specified under the "system" type. Also added an alembic script to add the option to realtime. (closes issue ASTERISK-23038) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/3148/ ........ Merged revisions 407036 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip_exten_state: Exporting global symbols caused load order issuesKevin Harwell
Removed the exportation of global symbols from the module as it is no longer needed and it could potentially cause load problems as on some systems it would try to load before res_pjsip_pubsub ........ Merged revisions 407034 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31Decouple subscription handling from NOTIFY/PUBLISH body generation.Mark Michelson
When the PJSIP pubsub framework was created, subscription handlers were required to state what event they handled along with what body types they knew how to generate. While this serves well when implementing a base RFC, it has problems when trying to extend the body to support non-standard or proprietary body elements. The code also was NOTIFY-specific, meaning that when the time comes that we start writing code to send out PUBLISH requests with MWI or presence bodies, we would likely find ourselves duplicating code that had previously been written. This changeset introduces the concept of body generators and body supplements. A body generator is responsible for allocating a native structure for a given body type, providing the primary body content, converting the native structure to a string, and deallocating resources. A body supplement takes the primary body content (the native structure, not a string) generated by the body generator and adds nonstandard elements to the body. With these elements living in their own module, it becomes easy to extend our support for body types and to re-use resources when sending a PUBLISH request. Body generators and body supplements register themselves with the pubsub core, similar to how subscription and publish handlers had done. Now, subscription handlers do not need to know what type of body content they generate, but they still need to inform the pubsub core about what the default body type for a given event package is. The pubsub core keeps track of what body generators and body supplements have been registered. When a SUBSCRIBE arrives, the pubsub core will check that there is a subscription handler for the event in the SUBSCRIBE, then it will check that there is a body generator that can provide the content specified in the Accept header(s). Because of the nature of body generators and supplements, it means res_pjsip_exten_state and res_pjsip_mwi have been completely gutted. They no longer worry about body types, instead calling ast_sip_pubsub_generate_body_content() when they need to generate a NOTIFY body. Review: https://reviewboard.asterisk.org/r/3150 ........ Merged revisions 407016 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip_mwi: Subscribe fails when missing aor nameKevin Harwell
When subscribing to MWI (res_pjsip_mwi) and the sip uri did not contain a name (ex: sip:<ip address>) then the subscription would fail since it would be unable to locate an associated aor. This patch makes it so that when a subscribe comes with no aor name then it will subscribe to all aors on the located endpoint. (closes issue ASTERISK-23072) Reported by: Bob M Review: https://reviewboard.asterisk.org/r/3164/ ........ Merged revisions 407014 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31PJSIP: Fix address for ACK in NAT situationsKinsey Moore
In NAT scenarios where a call is placed to a Grandstream phone, res_pjsip will sometimes send the ACK to a 200 OK to the private address of the device behind the NAT instead of the address of the NAT device. This corrects that behavior by rewriting the address in the Contact header in the incoming 200 OK and the dialog's target address if necessary (since it has already been rewritten to the incorrect private address). (closes issue ASTERISK-23106) Review: https://reviewboard.asterisk.org/r/3168/ Reported by: Matt Jordan ........ Merged revisions 407000 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictionsCorey Farrell
ast_bind to a port reserved for another program by SELinux causes errno == EACCES. This caused random failures when binding rtp or udptl sockets. Treat EACCES as a non-fatal error, try next port. (closes issue ASTERISK-23134) Reported by: Corey Farrell ........ Merged revisions 406933 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406934 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406935 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28res_pjsip_pubsub: potential crash on timeoutKevin Harwell
What seems to be happening is if a subscription has been terminated and the subscription timeout/expires is less than the time it takes for all pending transactions (currently on the subscription) to end then the subscription timer will not have been canceled yet and sub will be null. Since the subscription has already been canceled nothing needs to be done so a null check in the asterisk code is sufficient in working around this problem. (closes issue ASTERISK-23129) Reported by: Dan Jenkins ........ Merged revisions 406847 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28res_pjsip,compat: INFINITY and NAN undefinedKevin Harwell
On some systems the values for INFINITY and NAN are not defined thus causing a build error on those systems. Added definitions for those if they had not previously been defined. (closes issue ASTERISK-23056) Reported by: capouch Patches: inf-nan-patch.txt uploaded by capouch (license 6564) ........ Merged revisions 406788 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28ARI: Make double subscribe respond with successKinsey Moore
Currently, attempting to subscribe an application to a device state that it has already subscribed to will generate a 500 error response. This will now be treated as a subscription refresh even though ARI subscriptions don't currently support lifetimes and will respond with the normal response for a successful subscription (200 OK). (closes issue ASTERISK-23143) Reported by: Matt Jordan ........ Merged revisions 406775 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26res_pjsip_session: Be less strict with core requested outgoing capabilities.Joshua Colp
The core may (depending on circumstances) request a single codec on outgoing calls. Many channel drivers ignore or treat this as a suggestion while still including configured codecs. The res_pjsip_session logic treated this as an explicit request, leaving out other configured codecs. This change makes res_pjsip_session behave like other channel driver and simply adds the requested codec to the list. (closes issue ASTERISK-23082) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3140/ ........ Merged revisions 406489 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practicalJonathan Rose
Review: https://reviewboard.asterisk.org/r/3141/ ........ Merged revisions 406360 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406361 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406389 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23Multiple revisions 406294-406295Mark Michelson
........ r406294 | mmichelson | 2014-01-23 15:00:24 -0600 (Thu, 23 Jan 2014) | 11 lines Fix presence body errors found during testing: * PIDF bodies were reporting an "open" state in many cases where it should have been reporting "closed" * XPIDF bodies had XML nodes placed incorrectly within the hierarchy. * SIP URIs in XPIDF bodies did not go through XML sanitization * XML sanitization had some errors: * Right angle bracket was being replaced with "&rt;" instead of "&gt;" * Double quote, apostrophe, and ampersand were not being escaped. ........ r406295 | mmichelson | 2014-01-23 15:09:35 -0600 (Thu, 23 Jan 2014) | 11 lines Fix presence body errors found during testing: * PIDF bodies were reporting an "open" state in many cases where it should have been reporting "closed" * XPIDF bodies had XML nodes placed incorrectly within the hierarchy. * SIP URIs in XPIDF bodies did not go through XML sanitization * XML sanitization had some errors: * Right angle bracket was being replaced with "&rt;" instead of "&gt;" * Double quote, apostrophe, and ampersand were not being escaped. ........ Merged revisions 406294-406295 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22res_stasis_playback: Correct error argument orderKinsey Moore
Several of the playback error messages for invalid media input in res_stasis_playback.c had the media name and channel name reversed. They now correctly identify the channel name and media name. Reported by: skrusty ........ Merged revisions 406152 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21res_pjsip: Documentation improvement for Endpoint and AOR mailbox options.Rusty Newton
Making the help text for both more explicit regarding the format of mailbox identifiers. i.e. clarifying the format for app_voicemail mailboxes vs mailboxes from external MWI sources through modules such as res_external_mwi. ........ Merged revisions 406133 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21PJSIP: Handle headers in a list appropriatelyKinsey Moore
The PJSIP header parsing function (pjsip_parse_hdr) can generate more than one header instance from a single header field. These header instances exist as a list attached to the returned header and must be handled appropriately when they are added to a message or else only the first header instance will be used. This changes the linked list functions used in outbound proxy code to merge the lists properly. ........ Merged revisions 406020 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21ARI: Support channel variables in originateKinsey Moore
This adds back in support for specifying channel variables during an originate without compromising the ability to specify query parameters in the JSON body. This was accomplished by generating the body-parsing code in a separate function instead of being integrated with the URI query parameter parsing code such that it could be called by paths with body parameters. This is transparent to the user of the API and prevents manual duplication of code or data structures. (closes issue ASTERISK-23051) Review: https://reviewboard.asterisk.org/r/3122/ Reported by: Matt Jordan ........ Merged revisions 406003 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17pjsip: fix support for allow=allScott Griepentrog
This change adds improvements to support for allow=all in pjsip.conf so that it functions as intended. Previously, the allow/disallow socery configuration would set & clear codecs from the media.codecs and media.prefs list, but if all was specified the prefs list was not updated. Then a call would fail when create_outgoing_sdp_stream() created an SDP with no audio codecs. A new function ast_codec_pref_append_all() is provided to add all codecs to the prefs list - only those not already on the list. This enables the configuration to specify a codec preference, but still add all codecs, and even then remove some codecs, as shown in this example: allow = ulaw, alaw, all, !g729, !g723 Also, the display order of allow in cli output is updated to match the configuration by using prefs instead of caps when generating a human readable string. Finally, a change to create_outgoing_sdp_stream() skips a codec when it does not have a payload code instead of the call failing. (closes issue ASTERISK-23018) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3131/ ........ Merged revisions 405875 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17Fixing some XML syntax issues with my previous commit at r405777 for ↵Rusty Newton
ASTERISK-23071 ........ Merged revisions 405843 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17res_pjsip: enhance documentation for mailboxes options, for both endpoints ↵Rusty Newton
and aors Made documentation more explicit as to the use of the both options. (issue ASTERISK-23071) (closes issue ASTERISK-23071) Reported by: Matt Jordan ........ Merged revisions 405777 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17Enable wide band audio in musiconhold streams.Walter Doekes
Review: https://reviewboard.asterisk.org/r/3112/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16res_pjsip: AOR option qualify_frequency not respected on startupKevin Harwell
If an endpoint had previously dynamically registered a contact and the contact information was successfully stored in astdb then upon restart the qualify notifications would not be sent out if the qualify_frequency was set. This was due to the fact that only permanent contacts were being checked and scheduled for qualifies on startup. Modified the code to check and schedule all registered contacts at startup. (closes issue ASTERISK-23062) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/3124/ ........ Merged revisions 405748 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405749 65c4cc65-6c06-0410-ace0-fbb531ad65f3