aboutsummaryrefslogtreecommitdiffstats
path: root/channels
AgeCommit message (Collapse)AuthorFilesLines
2010-03-25Improve handling of T.38 re-INVITEs that arrive before a T.38-capablekpfleming2-56/+132
application is executing on a channel. This patch addresses an issue found during working with end-users using res_fax. If an incoming call is answered in the dialplan, or jumps to the 'fax' extension due to reception of a CNG tone (with faxdetect enabled), and then the remote endpoint sends a T.38 re-INVITE, it is possible for the channel's T.38 state to be 'T38_STATE_NEGOTIATING' when the application starts up. Unfortunately, even if the application wants to use T.38, it can't respond to the peer's negotiation request, because the AST_CONTROL_T38_PARAMETERS control frame that chan_sip sent originally has been lost, and the application needs the content of that frame to be able to formulate a reply. This patch adds a new 'request' type to AST_CONTROL_T38_PARAMETERS, AST_T38_REQUEST_PARMS. If the application sends this request, chan_sip will re-send the original control frame (with AST_T38_REQUEST_NEGOTIATE as the request type), and the application can respond as normal. If this occurs within the five second timeout in chan_sip, the automatic cancellation of the peer reinvite will be stopped, and the application will 'own' the negotiation process from that point onwards. This also improves the code path in chan_sip to allow sip_indicate(), when called for AST_CONTROL_T38_PARAMETERS, to be able to return a non-zero response, which should have been in place before since the control frame *can* fail to be processed properly. It also modifies ast_indicate() to return whatever result the channel driver returned for this control frame, rather than converting all non-zero results into '-1'. Finally, the new request type intentionally returns a positive value, so that an application that sends AST_T38_REQUEST_PARMS can know for certain whether the channel driver accepted it and will be replying with a control frame of its own, or whether it was ignored (if the sip_indicate()/ast_indicate() path had properly supported failure responses before, this would not be necessary). This patch also modifies res_fax to take advantage of the new request. In addition, this patch makes sip_t38_abort() actually lock the private structure before doing its work... bad programmer, no donut. This patch also enhances chan_sip's 'faxdetect' support to allow triggering on T.38 re-INVITEs received as well as CNG tone detection. Review: https://reviewboard.asterisk.org/r/556/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254450 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-25remove unneeded explicit channel in dahdi ioctlstzafrir1-17/+13
This patch removes some cases where the channel number for an ioctl was passed as a member in a struct rather then through the file descriptor. The gain setting functions passed around a channel which is always 0, and thus this parameter is simply dropped. Review: https://reviewboard.asterisk.org/r/584/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254406 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-23Change per-file debug and verbose levels to be per-module, the waykpfleming1-0/+5
users expect them to work. 'core set debug' and 'core set verbose' can optionally change the level for a specific filename; however, this is actually for a specific source file name, not the module that source file is included in. With examples like chan_sip, chan_iax2, chan_misdn and others consisting of multiple source files, this will not lead to the behavior that users expect. If they want to set the debug level for chan_sip, they want it set for all of chan_sip, and not to have to also set it for reqresp_parser and other files that comprise the chan_sip module. This patch changes this functionality to be module-name based instead of file-name based. To make this work, some Makefile modifications were required to ensure that the AST_MODULE definition is present in each object file produced for each module as well. Review: https://reviewboard.asterisk.org/r/574/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253917 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-20Use SHRT_MAX instead of MAXSHORT.russell1-3/+2
These changes fix build issues I had with this module on FreeBSD. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253536 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-15Tell the RTP engine API about the initial read and write format.russell1-0/+5
Peer reviewed out-of-band by file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252627 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-15THIS IS NOT PYTHON. Indentation doesn't matter, only braces do.tilghman1-6/+21
(closes issue #17025) Reported by: smurfix Patches: sip.patch uploaded by smurfix (license 547) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252442 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12Only change the RTP ssrc when we see that it has changedtwilson5-21/+22
This change basically reverts the change reviewed in https://reviewboard.asterisk.org/r/374/ and instead limits the updating of the RTP synchronization source to only those times when we detect that the other side of the conversation has changed the ssrc. The problem is that SRCUPDATE control frames are sent many times where we don't want a new ssrc, including whenever Asterisk has to send DTMF in a normal bridge. This is also not the first time that this mistake has been made. The initial implementation of the ast_rtp_new_source function also changed the ssrc--and then it was removed because of this same issue. Then, we put it back in again to fix a different issue. This patch attempts to only change the ssrc when we see that the other side of the conversation has changed the ssrc. It also renames some functions to make their purpose more clear. Review: https://reviewboard.asterisk.org/r/540/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252089 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12add missing mfcr2_skip_category settingmoy1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252088 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12Doxegen this chan_dahdi lock.rmudgett1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251946 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-11Minor tweaks and comment updates to chan_dahdi.rmudgett2-3/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251821 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10Simplified dahdi_request() channel selection failed reason/cause code.rmudgett5-31/+21
Also avoid potential crash because cause could be NULL. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251585 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10Reduce the amount of database access for HAVE_PRI_SERVICE_MESSAGES.rmudgett3-125/+113
Rework HAVE_PRI_SERVICE_MESSAGES to not use the active values directly from the database. Database access is likely expensive. Database access now only happens on initialization, destruction, and when the B channel is taken in or out of service. This change is not related to call waiting but it would cause the search for a call waiting interface to be very expensive and slow down D channel message servicing. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251538 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-07Clean transmit_* for start/stop media transmission mvanbaak1-42/+33
Small patch changing skinny_set_rtp_peer to use transmit_stopmediatransmission and to use new transmit_startmediatransmission. Basic testing on 30VIP's by wedhorn Basic testing on 7960 by me (closes issue #16956) Reported by: wedhorn Patches: skinny-clean05b.diff uploaded by wedhorn (license 30) Tested by: wedhorn,mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251222 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-07Cleanup transmit_callstate handling mvanbaak1-117/+132
Broke the various functions included in transmit_callstate to their own functions. Transmit_callstate now just transmits callstate. Generally left the functionality as it was, which highlight some minor code issues (eg multiple transmit_callstate's). I did however revise the hint code usage of the old transmit_callstate as it it not appropriate to put a device on hook based on the change of a hinted device. (closes issue #16939) Reported by: wedhorn Patches: skinny-clean04.diff uploaded by wedhorn (license 30) Tested by: mvanbaak,wedhorn git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251221 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-06Fix a crash in SIP blind transfer handling found by an automated external test.russell1-0/+9
The first real test added to the external test suite found a pretty nasty crash that occurred in Asterisk trunk. The crash was due to a race condition between the REFER handling and channel destruction in the channel thread. After the transfer has been completed, we go back to the transferrer channel and try to lock it so we can fire off a CEL event. However, there was no guarantee that the channel was still around at that point since it's racing against the channel thread. Since ast_channel is a reference counted object, the fix is simple. The code unlocks the transferrer channel before finally completing the transfer with an async goto. At this point the channel thread is going to start call tear down and the channel will eventually be destroyed. To ensure that the channel is valid when we want to fire off the CEL event, increase the channel's reference count. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251137 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-05Fix up some of chan_sip's usage of the RTP engine API.russell1-3/+43
The get_local_address() function for an RTP instance was used when building an SDP, but the results were not honored. The RTP engine activate() function was not being used once we have determined that media will now flow. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250917 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Removed cdrflags from ast_channel structure.rmudgett2-4/+0
Only chan_dahdi set a value in cdrflags. Everyone else just copied it around the system. Noone cared about any value it may have contained. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250565 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Merged revisions 250480 via svnmerge from jpeeler2-1/+22
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r250480 | jpeeler | 2010-03-03 13:04:11 -0600 (Wed, 03 Mar 2010) | 15 lines Make sure to clear red alarm after polarity reversal. From the issue: The automatic overnight line tests (or manual ones) used on UK (BT) lines causes a red alarm on a dahdi / TDM400P connected channel. This is because the line uses voltage tests (battery loss) and polarity reversal. The polarity reversal causes chan_dahdi to initiate v23 CallerID processing but during this the event DAHDI_EVENT_NOALARM is ignored so that the alarm is never cleared. (closes issue #14163) Reported by: jedi98 Patches: chan_dahdi-1.4-inalarm.diff uploaded by jedi98 (license 653) Tested by: mattbrown, Chainsaw, mikeeccleston ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250481 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Merged revisions 250394 via svnmerge from dvossel1-3/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r250394 | dvossel | 2010-03-03 12:02:27 -0600 (Wed, 03 Mar 2010) | 16 lines fixes problem with duplicate TXREQ packets When Asterisk receives an IAX2 TXREQ packet, try_transfer() will call store_by_transfercallno() to link the chan_iax2_pvt struct into iax_transfercallno_pvts. If a duplicate TXREQ packet is received for the same call, the pvt struct will be linked into iax_transfercallno_pvts multiple times. This patch fixes this. Thanks rain for debugging this and providing a patch! (closes issue #16904) Reported by: rain Patches: iax2-double-txreq-fix.diff uploaded by rain (license 327) Tested by: rain, dvossel ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250395 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Add new config option to control AMI alarm event reporting in chan_dahdi.jpeeler1-17/+80
New config parameter "reportalarms" added in chan_dahdi.conf which supports the following possible values: "channels": report each channel alarms (current behavior, default for backward compatibility) "spans": report an "SpanAlarm" event when the span of any configured channel is alarmed "all": report channel and span alarms (aggregated behavior) "none": do not report any alarms (closes issue #16709) Reported by: nahuelgreco Patches: chan_dahdi.c.reportalarms.patch uploaded by nahuelgreco (license 162) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250392 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03fixes signed to unsigned int comparision issue for FaxMaxDatagram value.dvossel1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250246 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02fixes adaptive jitterbuffer configurationdvossel14-11/+25
When configuring the adaptive jitterbuffer, the target_extra value not only could not be set from the configuration, but was not even being set to its proper default. This value is required in order for the adaptive jitterbuffer to work correctly. To resolve this a config option has been added to expose this value to the conf files, and a default value is provided when no config specific value is present. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249893 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02fix asterisk setting of pritimers from chan_dahdi.confalecdavis1-4/+5
regression since sig_pri split. (issue #16909) Reported by: alecdavis Patches: pritimer.asterisk.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249759 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-01Cleanup display_*message functions.mvanbaak1-70/+64
This patch splits transmit_displaymessage into transmit_clear_display_message and transmit_display_message which better aligns with the skinny protocol. The new transmit_display_message is not used in the current code, but will be and so it is commented. Moved handle_datetime from this function to onhook and offhook functions (display now properly cleared at the end of a call on 30VIP). Removed skinny debug messages from inline code as there's an ast_verb in transmit_clear_display_message. Also, removed commentary that it was a clear display as it is now apparent from the function name. Split transmit_displaypromptmessage into display and clear. (closes issue #16878) Reported by: wedhorn Patches: skinny-clean02.diff uploaded by wedhorn (license 30) skinny-clean03.diff uploaded by wedhorn (license 30) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249670 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-01fix endianes issues in chan_skinnymvanbaak1-22/+24
(closes issue #16826) Reported by: PipoCanaja Patches: chan_skinny.c_bigendianPatch_20100218.diff uploaded by PipoCanaja (license 994) Tested by: wedhorn git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249669 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-01Merged revisions 249536 via svnmerge from jpeeler1-38/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r249536 | jpeeler | 2010-03-01 11:02:03 -0600 (Mon, 01 Mar 2010) | 11 lines Modify queued frames from local channels to not set the other side to up In this case, attended transfers were broken due to ast_feature_request_and_dial detecting the channel being set to up before the answer frame could be read and therefore failing to mark the channel as ready. This fix is a regression fix for 244785, which should continue to work properly as well. (closes issue #16816) Reported by: jamhed Tested by: jamhed, corruptor ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249538 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-27overlap receiving: automatically send CALL PROCEEDING when dialplan startsalecdavis1-0/+12
Following Q.931 5.2.4 When the user has determined that sufficient call information has been received the user shall stop T302 and send CALL PROCEEDING to the network. Previously timeouts were possible if the dialplan took a long time to issue any response back to the network. Verified that our local TELCO also does the same. (issue #16789) Reported by: alecdavis Patches: overlap_receiving_trunk.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249320 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-27Merged revisions 249234 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r249234 | kpfleming | 2010-02-27 09:07:59 -0500 (Sat, 27 Feb 2010) | 1 line add a reference to the now-published IAX2 RFC ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249235 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-26Merged revisions 249100 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r249100 | mmichelson | 2010-02-26 11:04:29 -0600 (Fri, 26 Feb 2010) | 8 lines For T.38 reINVITEs treat a 606 the same as a 488. (closes issue #16792) Reported by: vrban Patches: t38_606.patch uploaded by vrban (license 756) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249101 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-24Also kill the .i files, or else the build process will not recreate them, ↵tilghman1-1/+1
when we change flags. Fixes a weird symbol problem mmichelson was having in a group branch, but also applies to trunk. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248667 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-23Merged revisions 248396 via svnmerge from dvossel1-19/+53
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r248396 | dvossel | 2010-02-23 10:26:05 -0600 (Tue, 23 Feb 2010) | 9 lines fixes invite with replaces deadlock (closes issue #16862) Reported by: pwalker Patches: replaces_deadlock_1.4 uploaded by dvossel (license 671) Tested by: pwalker, dvossel ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248397 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-22Move the REF_DEBUG comment higher in the include list.mmichelson1-13/+12
Uncommenting the REF_DEBUG definition where it was in the source resulted in only a small part of the astobj2 references being logged to a file. Moving this up higher in the include list causes all references to be logged as they should be. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-21Cleanup transmit_* functions, part 1mvanbaak1-56/+47
Break transmit_tone into transmit_start_tone and transmit_stop_tone as per the skinny protocol. (closes issue #16874) Reported by: wedhorn Patches: skinny-clean01.diff uploaded by wedhorn (license 30) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248184 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-19mfcr2 issue 0016844 - Fix portability bit fields and make ↵moy1-10/+10
mfcr2_immediate_accept work again, reported and patched by korihor git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248003 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-19handle_request_invite revise comment, fix coding guideline issuesdvossel1-21/+19
I'm working with this code right now trying to analyze a deadlock. This change is just to clean up a few things before I make a more complex patch. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247915 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-19Merged revisions 247910 via svnmerge from rmudgett1-31/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r247910 | rmudgett | 2010-02-19 11:18:49 -0600 (Fri, 19 Feb 2010) | 55 lines Merged revision 247904 from https://origsvn.digium.com/svn/asterisk/be/branches/C.2-... .......... r247904 | rmudgett | 2010-02-19 10:49:44 -0600 (Fri, 19 Feb 2010) | 49 lines Make chan_misdn DTMF processing consistent with other channel technologies. The processing of DTMF tones on the receiving side of an ISDN channel is inconsistent with the way it is handled in other channels, especially DAHDI analog. This causes DTMF tones sent from an ISDN phone to be doubled at the connected party. We are using the following 2 options of misdn.conf 1) astdtmf=yes 2) senddtmf=yes Option one is necessary because the asterisk DSP DTMF detection is better than mISDN's internal DSP. Not as many false positives. Option two is necessary to transmit DTMF tones end to end when mISDN channels are connected to SIP channels with out of band DTMF for example. The symptom is that DTMF tones sent by an ISDN phone are doubled on the way through asterisk when two mISDN channels are connected with a Local channel in between or if it is bridged to an analog channel. The doubling of DTMF tones is because DTMF is passed inband to asterisk by the mISDN channel and passed out of band once again after the release of the DTMF tone. Passing it inband is wrong. Neither an analog channel nor SIP channel passes DTMF inband if configured to inband DTMF. Analog and SIP channels filter out the DTMF tones because they use the voice frames returned by ast_dsp_process. But chan_misdn passes the unfiltered input voice frames instead. To overcome one aspect of the problem, the doubling of DTMF tones when two mISDN channels are directly bridged, someone made an 'optimization', where in that case the DTMF tone passed out-of-band to the peer channel is not translated to an inband tone at the transmit side. This optimization is bad because it does not work in general. For example, analog channels or mISDN channels when bridged through an intermediary local channel will generate DTMF tones from out-of-band information. Also, of course, it must not be done when there is no inband DTMF available. This patch fixes the issue. Now chan_misdn will filter the received inband DTMF signal the same as other channel types. Another change included: No need to build an extra translation path because ast_process_dsp does it if required. Patches: misdn-dtmf.patch JIRA ABE-2080 ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247914 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-18If the peer record is from realtime, it could be set to 0, due to MySQL not ↵tilghman1-1/+6
representing NULL well in integer columns. NULL means the value is not specified for the column, which normally means the driver uses whatever is the default value. However, on MySQL, placing a NULL in either a float or integer column results in a retrieval of the 0 value. Hence, users get an errant error on load. This patch suppresses that error and makes the value as if it was not there. Note that this cannot be done in the realtime driver, because the lack of difference between NULL and 0 can only be intepreted correctly by the driver itself. If we did it in the realtime driver, then it would be effectively impossible to set any realtime field to 0, because it would act as if the field were unspecified and possibly take on a different value. (closes issue #16683) Reported by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247787 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-17Make all of the various rtpqos parameters in this branch available from the ↵tilghman8-184/+603
CHANNEL function. Also includes a test for retrieving rtpqos parameters, including a NULL RTP driver. Additionally, some further separation of the SIP internal API into headers was necessary. (closes issue #16652) Reported by: kkm Patches: 20100204__issue16652.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/501/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247124 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-16Change the blanket rules to delete .lastclean on all CFLAGS menuselect ↵tilghman1-3/+3
targets to be more particular. This change builds upon the recent change to menuselect to add 'touch_on_change' as an attribute of both categories and members. This should allow only the most invasive defines to cause a complete rebuild, while defines which only affect a subset of modules will only cause a rebuild of that smaller set. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246789 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-16Allow Timer B to be set on the peer, and ensure SIP rules are followed (or ↵tilghman1-17/+51
warn) in comparison to Timer T1. (closes issue #16643) Reported by: nahuelgreco Patches: 20100204__issue16643.diff.txt uploaded by tilghman (license 14) Tested by: oej git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246724 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-15Restore triedtopribridge flag code removed in -r211197.rmudgett1-1/+3
Ooops. Failed to note that we were inside a for loop and pri_channel_bridge() needs to be executed only once. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246669 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-15chan_sip parse code refactoring plus two new unit testsdvossel4-100/+294
Code Refactoring Changes - read_to_parts() moved to reqresp_parser.c and has been renamed as get_name_and_number() - get_in_brackets() moved to reqresp_parser.c - find_closing_quotes() added to sip_utils.h Logic Changes - get_name_and_number() now uses parse_uri() and get_calleridname() for parsing. Before this change only names within quotes were found, when names not within quotes are possible. New Unit Tests -sip_get_name_and_number_test -sip_get_in_brackets_test (closes issue #16707) Reported by: Nick_Lewis Patches: issue16706.diff uploaded by dvossel (license 671) Review: https://reviewboard.asterisk.org/r/499/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246627 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-12fixes areas where port should be removed from domain during parsingdvossel1-4/+4
A patch was committed recently that converted duplicate uri parsing code to use the parse_uri function. There were two instances where this conversion did not mimic previous behavior exactly because the port was not being parsed off the end of the domain. In order to do this, a dummy pointer argument needs to be passed into parse_uri so it will know it must parse out the port from the domain. If a port output paramenter is not present, the domain is returned with the port still attached. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246420 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-11fixes some test description formatting inconsistencies so log file looks nicedvossel2-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246338 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10additional parse_uri test and documentationdvossel2-1/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246249 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Change channel state on local channels for busy,answer,ring.jpeeler1-0/+39
Previously local channels channel state never changed. This became problematic when the state of the other side of the local channel was lost, for example during a masquerade. Changing the state of the local channel allows for the scenario to be detected when the channel state is set to ringing, but the peer isn't ringing. The specific problem scenario is described in 164201. Although this was noted on one of the issues, here is the tested dialplan verified to work: exten => 9700,1,Dial(Local/*9700@default&Local/0009700@default) exten => *9700,1,Set(GLOBAL(TESTCHAN)=${CHANNEL:0:${MATH(${LEN(${CHANNEL})}-1):0:2}}1) exten => *9700,n,wait(3) ;3 works, 1 did not exten => *9700,n,Dial(SIP/5001) exten => 0009700,1,Wait(1) ;1 works, 3 did not exten => 0009700,n,ChannelRedirect(${TESTCHAN},parkedcalls,701,1) (closes issue #14992) Reported by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246070 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09Various updates to the unit test API.russell2-87/+73
1) It occurred to me that the difference in usage between the error ast_str and the ast_test_update_status() usage has turned out to be a bit ambiguous in practice. In a lot of cases, the same message was being sent to both. In other cases, it was only sent to one or the other. My opinion now is that in every case, I think it makes sense to do both; we should output it to the CLI as well as save it off for logging purposes. This change results in most of the changes in this diff, since it required changes to all existing unit tests. It also allowed for some simplifications of unit test API implementation code. 2) Update ast_test_status_update() to include the file, function, and line number for the code providing the update. 3) There are some formatting tweaks here and there. Hopefully they aren't too distracting for code review purposes. Reviewboard's diff viewer seems to do a pretty good job of pointing out when something is a whitespace change. 4) I moved the md5_test and sha1_test into the test_utils module. It seemed like a better approach since these tests are so tiny. 5) I changed the number of nodes used in heap_test_2 from 1 million to 100 thousand. The only reason for this was to reduce the time it took for this test to run. 6) Remove an unused function prototype that was at the bottom of utils.h. 7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro. The one minor difference in behavior is that it no longer checks for a test registered with the same name. 8) Expand the code in test_alloc() to provide specific error messages for each failure case, to clearly inform developers if they forget to set the name, summary, description, etc. 9) Tweak the output of the "test show registered" CLI command. I swapped the name and category to have the category first. It seemed more natural since that is the sort key. 10) Don't output the status ast_str in the "test show results" CLI command. This is going to tend to be pretty verbose, so just leave that for the detailed test logs (test generate results). Review: https://reviewboard.asterisk.org/r/493/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245864 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09fixes a merging error for the iaxs and iaxsl off by one fixdvossel1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245804 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09Merged revisions 245792 via svnmerge from dvossel1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines Fixes iaxs and iaxsl size off by one issue. 2^15 = 32768 which is the maximum allowed iax2 callnumber. Creating the iaxs and iaxsl array of size 32768 means the maximum callnumber is actually out of bounds. This causes a nasty crash. (closes issue #15997) Reported by: exarv Patches: iax_fix.diff uploaded by dvossel (license 671) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245793 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09This commit removes an extra newline in T.38 generated SDP packets. This bug ↵mnicholson1-2/+0
was caused by the fix introduced in r243860. (closes issue #16766) Reported by: raivisr Patches: t38-sdp-newline-fix1.diff uploaded by mnicholson (license 96) Tested by: raivisr git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245727 f38db490-d61c-443f-a65b-d21fe96a405b