summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2013-02-25Add prinotify messages to skinny.Damien Wedhorn
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) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24Set the sin_family on the bind address socket during initializationMatthew Jordan
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Add The Status Of A Module To The Output Of "CLI> module show"Michael L. Young
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Add serviceURL stuff to skinny.Damien Wedhorn
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Fixup skinny CLI completion.Damien Wedhorn
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16Don't send presencestate information if the state is invalidMatthew Jordan
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Fix a crash that occurred when a BYE was received on a replaced dialog.Mark Michelson
Reference counting for the channel and its tech_pvt got messed up at some point between 1.8 and 11. The result was that if a BYE for a dialog that had been replaced (via an INVITE with Replaces) was received, Asterisk would crash due to trying to access data on a channel that was no longer there. The fix I introduced is to remove code that both unrefs the sip_pvt and sets the channel's tech_pvt to NULL when an INVITE with Replaces is handled. This way when a BYE is received, the tech_pvt will be non-NULL and so the BYE can be processed and not cause a crash. (closes issue ASTERISK-20929) reported by Kristopher Lalletti patches: ASTERISK-20929.patch uploaded by Mark Michelson (License #5049) ........ Merged revisions 381566 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15chan_sip: Use video and text crypto attributes to append RTP profiles to SDPJonathan Rose
Some bad copy/pasting resulted in using the audio crypto attribute for both text and video RTP. Also the audio crypto isn't set until after these, so it was really just bad all around. (closes ASTERISK-20905) Reported by: Kristopher Lalletti patches: rtp_crypto_video_text.diff uploaded by Jonathan Rose (license 6182) ........ Merged revisions 381553 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Remove extraneous stuff from r381470.Damien Wedhorn
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Add back sending dialnumber to skinny.Damien Wedhorn
Don't know why it seemed to work during testing, but it really is needed for protocol v17 (and probably above). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Respect callerid presentation in skinny.Damien Wedhorn
Fix chan_skinny so that it respects callerID presentation of inbound calls to device and a couple of other minor fixes: 145 packet (add OCTAL_FROM amd callerid), and dont send dialednumber message if protocol >= 17. (closes issue ASTERISK-21066) Reported by: snuffy Tested by: snuffy, myself Patches: skinny-respect-clid-restrictions-v2.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Use a shuffling algorithm to find unused IAX2 call numbers.Sean Bright
While adding red-black tree containers to astobj2 in r376575, Richard pointed out the way chan_iax2 finds unused call numbers will prevent ao2_container integrity checks at runtime. This patch removes the ao2_container and instead uses fixed sized arrays and a modified Fisher-Yates-Durstenfeld shuffle to maintain the call number list. While the locking semantics are similar to the ao2_container implementation, this implementation should be faster and more memory efficient. Review: https://reviewboard.asterisk.org/r/2288/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12Fix some more REF_DEBUG-related build errorsKinsey Moore
When sip_ref_peer and sip_unref_peer were exported to be usable in channels/sip/security_events.c, modifications to those functions when building under REF_DEBUG were not taken into account. This change moves the necessary defines into sip.h to make them accessible to other parts of chan_sip that need them. ........ Merged revisions 381282 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Fix some issues with skinny callid.Damien Wedhorn
Add extra string to transmit_callinfo_var, Only set string2 to tonum for outgoing calls and changes to send_callinfo and push_callinfo to not set callid name to last number. (closes issue ASTERISK-21063) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-callinfoupdate03.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-09Make ast_do_masquerade() a void function.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06Fixed failing test from r380696.David M. Lee
When I added my extensive suite of session timer unit tests, apparently one of them was failing and I never noticed. If neither Min-SE nor Session-Expires is set in the header, it was responding with a Session-Expires of the global maxmimum instead of the configured max for the endpoint. (issue ASTERISK-20787) ........ Merged revisions 380973 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380974 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06Fix reload skinny with active devices.Damien Wedhorn
Patch ensures that d->activeline and l->activesub are moved over to the new device and line so that on callend the appropriate subs can be found to complete hangup before device resets. (closes issue ASTERISK-16610) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-reloadactive01.diff uploaded by wedhorn (license 5019) ........ Merged revisions 380942 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06Reset skinny vmexten and immeddial char on reload.Damien Wedhorn
Make skinny reset vmexten and immeddial to '\0' on reload to ensure that it is set to '\0' if the appropriate item is removed/commented in skinny.conf. Also small fix re immeddial char in skinny.conf and add immedial setting to skinny show settings. (closes issue ASTERISK-21037) Reported by: snuffy Tested by: snuffy, myself Patches: immed_dial_fix.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-02Add variable length displayprompt packet to skinny and use octals.Damien Wedhorn
Add new variable length displayprompt packet (0x0145) to skinny. Uses the new packet if the device is reporting protocol versions >= 17. Add the use of octal codes for sending prompts to both the new and old displayprompt messages (also cleaned up soft_key_template_default to use the defined octal codes). Review: https://reviewboard.asterisk.org/r/2294/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-01chan_iax2: Fix compile error if MALLOC_DEBUG enabled.Richard Mudgett
NEVER INCLUDE astmm.h DIRECTLY!! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-01Adds variable length callinfo packets to skinny.Damien Wedhorn
Add packet 0x014A (variable length call info messages) to skinny for newer firmware. Plenty of unknown information but includes the equivalent functionality as the fixed size callinfo packet already included. Only send this packet if protocol reported is >= 17. Review: https://reviewboard.asterisk.org/r/2290/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Process session timers, even if Session-Expires header is missingDavid M. Lee
Previously, Asterisk only processed session timer information if both the 'Supported: timer' and 'Session-Expires' headers were present. However, the Session-Expires header is optional. If we were to receive a request with a Min-SE greater than our configured session-expires, we would respond with a 'Session-Expires' header that was too small. This patch cleans the situation up a bit, always processing timer information if the 'Supported: timer' header is present. (closes issue ASTERISK-20787) Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/2299/ ........ Merged revisions 380696 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380698 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Move IAX firmware related functionality into separate files.Sean Bright
This patch is mostly a reorganization of existing code with a few exceptions: * Added doxygen comments to all of the extracted functions. * Split reload_firmware(int unload) into iax_firmware_reload() and iax_firmware_unload() for readability. * Create iax_firmware_traverse() to support the 'iax2 show firmware' CLI command. * Renamed iax_check_version() to iax_firmware_get_version() and change its arguments and return value so that it returns a success/failure value and sets the selected version into an out parameter to avoid confusion with failure and version 0. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30chan_dahdi: Fix "dahdi show channels group" for groups greater than 31.Richard Mudgett
The variable type used was not large enough to hold a group bit field. ........ Merged revisions 380572 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380575 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30Unregister SIP provider API if module load is declinedMatthew Jordan
A user in #asterisk ran into a problem where a configuration error prevented the chan_sip module from being loaded. Upon fixing their configuratione error, they could no longer load the chan_sip module. This was because the configuration checking happened after the SIP provider was registered with the Asterisk core, and subsequent attempts to load the SIP module failed as the provider was already registered. Since we want to detect any failure in registering chan_sip as early as possible (as that could be emblematic of a deeper mismatch between module and Asterisk core), this patch does not change the registration location, but does ensure that if a module load is declined, we unregister the module as the SIP api provider. ........ Merged revisions 380480 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30Perform case insensitive comparisons for T.38 attributesMatthew Jordan
RFC5347 section 2.5.2 states the following: ... The attribute "T38MaxBitRate" was once incorrectly registered with IANA as "T38maxBitRate" (lower-case "m"). In accordance with T.38 examples and common implementation practice, the form "T38MaxBitRate" SHOULD be generated by implementations conforming to this package. In general, it is RECOMMENDED that implementations of this package accept lowercase, uppercase, and mixed upper/lowercase encodings of all the T.38 attributes. ... Asterisk currently does not perform case insensitive matching on the T.38 attributes. This causes the T38MaxBitRate attribute to be negotiated at 2400 baud instead of 14400 (or whatever value you actually wanted). This patch makes it so that when we compare T.38 attributes, we do so in a case insensitive fashion. Note that while the issue reporter did not directly write the patch, they contributed to it (and would have provided one themselves if the license had gone through a tad faster), and hence get attribution for it. Review: https://reviewboard.asterisk.org/r/2298/ (closes issue ASTERISK-20897) Reported by: Eric Hill Tested by: Eric Hill patches: -- uploaded by Eric Hill ........ Merged revisions 380458 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380465 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29Move the ancillary iax2 source files into a separate sub-directory.Sean Bright
This patch just moves the IAX2 source and header files into a separate iax2 sub-directory in the channels directory, similar to how the sip source files are structured. The only thing that was added was an #ifndef to protect provision.h from multiple inclusion. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29chan_agent: Prevent multiple channels from logging in as the same agent.Richard Mudgett
Multiple channels logging in as the same agent can result in dead channels waiting for a condition signal that will never come because another channel thread stole it. A symptom is chan_sip repeatedly generating warning messages about rescheduling autodestruction of dialogs with an agent channel owner. * Made only login_exec() (the app AgentLogin) clear the agent_pvt->chan pointer to prevent multiple channels from logging in as the same agent. agent_read(), agent_call(), and agent_set_base_channel() no longer disconnect the agent channel from the agent_pvt. This also eliminates the need to keep checking for agent_pvt->chan being NULL. * Made agent_hangup() not wake up the AgentLogin agent thread until it is done. * Made agent_request() not able to get the agent until he has logged in and any wrapup time has expired. * Made agent_request() use ast_hangup() instead of agent_hangup() to correctly dispose of a channel. * Removed agent_set_base_channel(). Nobody calls it and it is a bad thing in general. * Made only agent_devicestate() determine the current device state of an agent. Note: Agent group device states have never been supported. Review: https://reviewboard.asterisk.org/r/2260/ ........ Merged revisions 380364 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380384 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29Corrected crypto tag in SDP ANSWER for SRTP. (again)David M. Lee
The original fix (r380043) for getting Asterisk to respond with the correct tag overlooked some corner cases, and the fact that the same code is in 1.8. This patch moves the building of the crypto line out of sdp_crypto_process(). Instead, it merely copies the accepted tag. The call to sdp_crypto_offer() will build the crypto line in all cases now, using a tag of "1" in the case of sending offers. (closes issue ASTERISK-20849) Reported by: José Luis Millán Review: https://reviewboard.asterisk.org/r/2295/ ........ Merged revisions 380347 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380350 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29Ensure that a declined media stream is terminated with a '\r\n'Matthew Jordan
In r369028, chan_sip's processing of media streams in an SDP was modified to better handle multiple offered media streams. Part of that change modified how streams were declined. Previously, declined media streams were not handled in an RFC compliant manner; now, we set the port number to 0 in the media stream definition and proceed on with the next media stream. Unfortunately, the formatting of the declined media stream forgot to append a '\r\n' to the end of the media stream. This is normally added to the accepted media streams later on in the processing of the SDP. Since the declined media stream uses a different buffer than the accepted media streams (and is a malloc'd buffer as opposed to a struct ast_str), it's easier to just slap the '\r\n' on the declined media stream buffer rather than attempt to append it later on. So, that's what we do. And now some devices (and probably some providers) will be a bit happier (but probably not terribly happy, since we just rejected something they offered). Review: https://reviewboard.asterisk.org/r/2297/ (closes issue ASTERISK-20908) Reported by: Dennis DeDonatis Tested by: Dennis DeDonatis ........ Merged revisions 380331 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28Correct the number of available call numbers in IAX2.Sean Bright
There is currently an edge case where call number 32768 might be allocated for a call, even though the IAX2 protocol requires call numbers be only 15 bits. This resulted in some unpredictable behavior when call number 32678 is chosen. This patch was mostly written by Richard Mudgett via ReviewBoard. I'm just committing it. Review: https://reviewboard.asterisk.org/r/2293/ ........ Merged revisions 380254 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380255 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Add force dial keys to skinny.Damien Wedhorn
Adds a dial softkey when the device is in DAFD. The softkey is greyed (unusable) until a possible dialplan match is entered. Code includes updating transmit_selectsoftkeys to allow the use of a button mask. Also add option to use # or * as a dial now button. Original patch by snuffy cleaned up by myself. Review: https://reviewboard.asterisk.org/r/2277/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-24Corrected crypto tag in SDP ANSWER for SRTP.David M. Lee
When Asterisk responds with an SDP ANSWER for SRTP, it had the code to correctly fill in the crypto data, which was overwritten by a call to sdp_crypto_offer. Corrected the situation by changing sdp_crypto_offer to not replacing crypto data if it already exists. (closes issue ASTERISK-20849) Reported by: José Luis Millán Tested by: Iñaki Baz Castillo Patches: fix_sdp_crypto_tags.diff uploaded by Pedro Kiefer (license 6407) ........ Merged revisions 380043 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22Remove a large block of commented out code from chan_iax2.Sean Bright
During the conversion to the newer CLI command structure the old definitions were commented out. I think it's safe to remove them completely now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22confbridge: Minor fixes playing user counts to the conference.Richard Mudgett
* Generate a warning message if sound files do not exist when trying to play the user count to the conference. Use the new helper routine sound_file_exists() for consistency. * Put the new user into autoservice when playing user counts to the conference. * Check the return value of ast_bridge_impart(). ........ Merged revisions 379808 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Fix device call logging issues in skinnyDamien Wedhorn
Skinny device call logging (ie missed, place and received calls) has issues because the incorrect sequence of callstates is/can be sent to the device. This patch removes some extra callstate updates driven by forces external to skinny and ensures the needed intermediary callstate messages are sent. (closes issue ASTERISK-20964) Reported by: wedhorn Tested by: snuffy, myself Patches: ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019) ........ Merged revisions 379677 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-20Fix issues with skinny sessionsDamien Wedhorn
Fixes a couple of issues with the way skinny handles sessions by ensuring sessions aren't used after being freed. Some other minor changes. Review: https://reviewboard.asterisk.org/r/2272/ ........ Merged revisions 379582 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18Fix Record-Route parsing for large headers.David M. Lee
Record-Route parsing copied the header into a char[256] array, which can be a problem if the header is longer than that. This patch parses the header in place, without the copy, avoiding the issue. In addition to the original patch, I added a unit test for the new get_in_brackets_const function. (closes issue ASTERISK-20837) Reported by: Corey Farrell Patches: chan_sip-build_route-optimized-rev1.patch uploaded by Corey Farrell (license 5909) (with minor changes by dlee) ........ Merged revisions 379392 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379393 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16chan_misdn: Fix compile error.Richard Mudgett
(issue ASTERISK-15456) ........ Merged revisions 379226 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379230 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16Set the INVALID_EXTEN channel variable when chan_misdn forces the 'i' extensionMatthew Jordan
The chan_misdn channel driver will send a channel with an invalid destination to the 'i' extension itself if said extension can be reached. It forgot, however, to set the INVALID_EXTEN channel variable when it bounces the channel to this extension. Dialplan writers everywhere moaned at yet another inconsistency. This is yet another example of why duplicating logic in multiple places results in bugs that stick around in Jira for just under three years. Yes: ASTERISK-15456 was created on January 18th, 2010. Patch committed on January 15th, 2013. Ouch. (closes issue ASTERISK-15456) Reported by: Thomas Omerzu patches: chan_misdn_invalid.patch2 uploaded by Thomas Omerzu (license 5927) ........ Merged revisions 379145 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379146 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-14Fix XML encoding of 'identity display' in NOTIFY messages, continued.David M. Lee
When r378933 was merged into 1.8, it should have also escaped remote_display, since it will have the same XML encoding problem when the caller/callee roles are reversed. (closes issue ABE-2902) Reported by: Guenther Kelleter ........ Merged revisions 379001 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379020 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-12Fix XML encoding of 'identity display' in NOTIFY messages.David M. Lee
XML encoding in chan_sip is accomplished by naively building the XML directly from strings. While this usually works, it fails to take into account escaping the reserved characters in XML. This patch adds an 'ast_xml_escape' function, which works similarly to 'ast_uri_encode'. This is used to properly escape the local_display attribute in XML formatted NOTIFY messages. Several things to note: * The Right Thing(TM) to do would probably be to replace the ast_build_string stuff with building an ast_xml_doc. That's a much bigger change, and out of scope for the original ticket, so I refrained myself. * It is with great sadness that I wrote my own ast_xml_escape function. There's one in libxml2, but it's knee-deep in libxml2-ness, and not easily used to one-off escape a string. * I only escaped the string we know is causing problems (local_display). At least some of the other strings are URI-encoded, which should be XML safe. Rather than figuring out what's safe and escaping what's not, it would be much cleaner to simply build an ast_xml_doc for the messages and let the XML library do the XML escaping. Like I said, that's out of scope. (closes issue ABE-2902) Reported by: Guenther Kelleter Tested by: Guenther Kelleter Review: http://reviewboard.digium.internal/r/365/ ........ Merged revision 378919 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 378933 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378934 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06Skinny blob cleanupDamien Wedhorn
Cleanup of red blobs in chan_skinny and possible other small formatting issues. Review: https://reviewboard.asterisk.org/r/2262/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06Add group and namedgroup pickup to skinnyDamien Wedhorn
Above says it all. Code by snuff, cleaned up by me. Review: https://reviewboard.asterisk.org/r/2246/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06Rewrite skinny dialing to remove threaded simpleswitchDamien Wedhorn
This rewrite changes skinny dialing from the threaded simpleswitch to a scheduled timeout approach. There were some underlying issues with the threaded simple switch with occasional corruption and possible segfaults. Review: https://reviewboard.asterisk.org/r/2240/ ........ Merged revisions 378622 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04Fix SIP Notify Messages To Have The Proper IP Address In The FROM FieldMichael L. Young
On a multihomed server when sending a NOTIFY message, we were not figuring out which network should be used to contact the peer. This patch fixes the problem by calling ast_sip_ouraddrfor() and then build_via() so that our NOTIFY message contains the correct IP address. Also, a debug message is being added to help follow the call-id changes that occur. This was helpful for confirming that the IP address was set properly since the call-id contains the IP address. It also will be helpful for troubleshooting purposes when following a call in the debug logs. (closes issue ASTERISK-20805) Reported by: Bryan Hunt Tested by: Bryan Hunt, Michael L. Young Patches: asterisk-20805-notify-ip-v2.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2255/ ........ Merged revisions 378554 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378559 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03chan_agent: Fix wrapup time wait response.Richard Mudgett
* Made agent_cont_sleep() and agent_ack_sleep() stop waiting if the wrapup time expires. agent_cont_sleep() had tried but returned the wrong value to stop waiting. * Made agent_ack_sleep() take a struct agent_pvt pointer instead of a void pointer for better type safety. ........ Merged revisions 378486 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378487 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03chan_agent: Misc code cleanup.Richard Mudgett
* Fix off-nominal path resource cleanup in agent_request(). * Create agent_pvt_destroy() to eliminate inlined versions in many places. * Pull invariant code out of loop in add_agent(). * Remove redundant module user references in login_exec(). * Remove unused struct agent_pvt logincallerid[] member. ........ Merged revisions 378456 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378457 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03chan_agent: Fix agent_indicate() locking.Richard Mudgett
Avoid deadlock potential with local channels and simplify the locking. ........ Merged revisions 378427 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378428 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378429 65c4cc65-6c06-0410-ace0-fbb531ad65f3