aboutsummaryrefslogtreecommitdiffstats
path: root/channels
AgeCommit message (Collapse)AuthorFilesLines
2011-01-19Initialize an uninitialized variable.seanbright1-1/+1
(closes issue #18640) Reported by: jcovert Patches: chan_sip.c.patch uploaded by jcovert (license 551) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@302414 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-19Use appropriate type for requested format in chan_local.seanbright1-2/+2
We were passing and storing the requested format as an int instead of format_t resulting in truncation. (closes issue #18238) Reported by: whizemen Patches: 0018238_speex16.patch uploaded by whizemen (license 1143) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@302412 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-18Merged revisions 302313 via svnmerge from mnicholson1-4/+7
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r302313 | mnicholson | 2011-01-18 15:40:03 -0600 (Tue, 18 Jan 2011) | 11 lines Merged revisions 302311 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r302311 | mnicholson | 2011-01-18 15:35:03 -0600 (Tue, 18 Jan 2011) | 4 lines URI encode the user part of the contact header. ABE-2705 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@302314 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-14Deadlock between dahdi_request() and pri_dchannel() processing an incomming ↵rmudgett1-4/+3
call. The sig_pri_new_ast_channel() is called with the channel private lock held when pri_dchannel() calls it and no channel private lock held when dahdi_request() calls it. The use of pri_grab() in sig_pri_new_ast_channel() could leave the channel private lock held when it returns if the lock was not held before calling it. Make sig_pri_new_ast_channel() just lock the PRI span lock instead of using pri_grab(). It is safe to do this because dahdi_request() does not have the channel private lock and the deadlock potential with the PRI span lock is only between pri_dchannel() and other threads. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301946 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-14Changing previous revisions 301845/301847 to use ast_sockaddr_setnull() insteadbbryant1-1/+3
of setting the field manually to avoid uninitialized data. Review: https://reviewboard.asterisk.org/r/1076/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301851 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-14Fix for a consistent MulticastRTP channel driver crash due to use of unitilizedbbryant1-1/+1
data. (closes issue #18290) (closes issue #18602) Reported by: voipgate, wybecom Review: https://reviewboard.asterisk.org/r/1076/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301845 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-14Resolve deadlock involving REFER.jpeeler1-12/+16
Two fixes: 1) One must always have the private unlocked before calling pbx_builtin_setvar_helper to not invalidate locking order since it locks the channel. 2) Unlock the channel before calling pbx_find_extension, which starts and stops autoservice during the lookup. The problem scenario as illustrated by the reporter: Thread: do_monitor ----------------------- handle_request_do handle_incoming handle_request_refer ast_parking_ext_valid pbx_find_extension ast_autoservice_stop while (chan_list_state == as_chan_list_state) { usleep(1000); } Thread: autoservice_run ----------------------- autoservice_run chan = ast_waitfor_n ast_waitfor_nandfds ast_waitfor_nandfds_classic / simple / complex (depending on your system) ast_channel_lock(c[x]); handle_request_do and schedule_process_request_queue locks the owner if it exists. The autoservice thread is waiting for the channel lock, which wasn't ever released since the do_monitor thread was waiting for autoservice operations to complete. Solved by unlocking the channel but keeping a reference to guarantee safety. (closes issue #18403) Reported by: jthurman Patches: 20110103-blind_deadlock.diff uploaded by jthurman (license 614) issue18403.patch uploaded by jpeeler (license 325) Tested by: jthurman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301790 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-12Merged revisions 301682 via svnmerge from twilson1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r301682 | twilson | 2011-01-12 15:05:02 -0600 (Wed, 12 Jan 2011) | 9 lines Don't reject all SUBSCRIBE auth requests When merging another SUBSCRIBE fix from 1.4, some braces were put in the wrong place. This patch fixes that. (closes issue #18597) Reported by: thsgmbh ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301683 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-08The DTMF attended transfer feature cannot callback a chan_dahdi BRI phone.rmudgett1-3/+11
The DAHDI ISDN channel name is not dialable. Make a channel name like DAHDI/i3/400-12 dialable when the sequence number is stripped off of the name. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@301134 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-05Merged revision 300711 fromrmudgett1-3/+55
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r300711 | rmudgett | 2011-01-05 13:43:55 -0600 (Wed, 05 Jan 2011) | 14 lines A call retrieved from hold may wind up with no audio. If the retrieved call is natively bridged then the call may not have any audio path. The following warning message is given: "Failed to add <dfd> to conference <chan>/<chan>: Invalid argument". * Open the media on a B channel when pri_fixup_principle() moves the call from a no_b_channel channel to a real channel. * Added lock protection while pri_fixup_principle() moves a call from one private structure to another. * Made some pri_fixup_principle() messages more meaningful. .......... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@300714 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-04Merged revisions 300520 via svnmerge from lmadsen3-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r300520 | lmadsen | 2011-01-04 15:52:41 -0600 (Tue, 04 Jan 2011) | 9 lines Fix backwards and broken XML documentation. (closes issue #18547) Reported by: jcovert Patches: xmldoc.c.patch uploaded by jcovert (license 551) chan_iax2.c.doc.patch uploaded by jcovert (license 551) chan_sip.c.patch uploaded by jcovert (license 551) chan_agent.c.patch uploaded by jcovert (license 551) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@300521 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-04Merged revisions 300298 via svnmerge from twilson1-14/+20
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r300298 | twilson | 2011-01-04 11:37:26 -0600 (Tue, 04 Jan 2011) | 22 lines Merged revisions 300216 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r300216 | twilson | 2011-01-04 11:11:48 -0600 (Tue, 04 Jan 2011) | 15 lines Don't authenticate SUBSCRIBE re-transmissions This only skips authentication on retransmissions that are already authenticated. A similar method is already used for INVITES. This is the kind of thing we end up having to do when we don't have a transaction layer... (closes issue #18075) Reported by: mdu113 Patches: diff.txt uploaded by twilson (license 396) Tested by: twilson, mdu113 Review: https://reviewboard.asterisk.org/r/1005/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@300301 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-25Merged revisions 299625 via svnmerge from tilghman1-9/+9
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r299625 | tilghman | 2010-12-25 04:05:00 -0600 (Sat, 25 Dec 2010) | 12 lines Merged revisions 299624 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r299624 | tilghman | 2010-12-25 04:04:06 -0600 (Sat, 25 Dec 2010) | 5 lines Move check for extension existence below variable inheritance, due to the possible use of an eswitch. (closes issue #16228) Reported by: jlaguilar ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299626 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-23Merged revisions 299530 via svnmerge from moy1-0/+15
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r299530 | moy | 2010-12-22 21:28:37 -0500 (Wed, 22 Dec 2010) | 7 lines Enqueue AST_CONTROL_PROGRESS after AST_CONTROL_RINGING when MFC-R2 calls are accepted (closes issue #18438) Reported by: mariner7 Tested by: moy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299531 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-22Chan_dahdi sends an empty COLP on the bridged channel.rmudgett1-6/+7
Chan_dahdi always inserts a connected party IE when you call from one dahdi channel to another dahdi channel, even if no such information was received on the 2nd channel. This clears the display of many phones. * Removed leftover artifact from before the valid flag was added. * Updated all of the channel's caller id information with the new connected line information instead of just the string parts. (closes issue #18508) Reported by: wimpy Patches: issue18508_trunk.patch uploaded by rmudgett (license 664) Tested by: wimpy, rmudgett git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299405 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-21Merged revisions 299242 via svnmerge from mnicholson1-25/+26
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r299242 | mnicholson | 2010-12-20 15:25:35 -0600 (Mon, 20 Dec 2010) | 23 lines Merged revisions 299194,299198,299220 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r299194 | mnicholson | 2010-12-20 14:45:38 -0600 (Mon, 20 Dec 2010) | 6 lines Respond as soon as possible with a 202 Accepted to refer requests. This change also plugs a few memory leaks that can occur when parking sip calls. ABE-2656 ........ r299198 | mnicholson | 2010-12-20 15:00:44 -0600 (Mon, 20 Dec 2010) | 2 lines Remove changes to via processing that were not supposed to go into the last commit. ........ r299220 | mnicholson | 2010-12-20 15:21:39 -0600 (Mon, 20 Dec 2010) | 4 lines Use ast_free() instead of free() ABE-2656 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299353 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Fix a couple of CCSS issues.mmichelson1-2/+7
* Make sure to allocate a cc_params structure when creating autopeers. * Use sip_uri_cmp when retrieving SIP CC agents and monitors in case parameters appear in the URI. (closes issue #18504) Reported by: kkm (closes issue #18338) Reported by: GeorgeKonopacki Patches: 18338.diff uploaded by mmichelson (license 60) Tested by: GeorgeKonopacki git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299248 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Typos: recieved => receivedtzafrir2-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@299004 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-17Fix parsing of mwi => lines in sip.confmarquis1-14/+170
Reworking parsing of mwi => lines to resolve a segfault. Also add a set of unit tests for the function that does the parsing. (closes issue #18350) Reported by: gbour Tested by: Marquis, gbour Review: https://reviewboard.asterisk.org/r/1053/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@298773 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-16Ensure the ipaddr field in realtime is large enough to handle IPv6 addresses.tilghman1-3/+3
(closes issue #18464) Reported by: IgorG Patches: realtime_ipv6store.diff uploaded by IgorG (license 20) (plus a few additional lines by tilghman) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@298539 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-13Merged revisions 298194 via svnmerge from rmudgett2-1/+7
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r298194 | rmudgett | 2010-12-13 11:04:41 -0600 (Mon, 13 Dec 2010) | 26 lines Merged revisions 298193 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r298193 | rmudgett | 2010-12-13 10:56:07 -0600 (Mon, 13 Dec 2010) | 19 lines Outgoing PRI/BRI calls cannot do DTMF triggered transfers. Outgoing PRI/BRI calls cannot do DTMF triggered transfers if a PROCEEDING message is not received. The debug output shows that the DTMF begin event is seen, but the DTMF end event is missing. When the DTMF begin happens, the call is muted so we now have one way audio (until a DTMF end event is somehow seen). * Made set the proceeding flag when the PRI_EVENT_ANSWER event is received. * Made absorb the DTMF begin and DTMF end events if we are overlap dialing and have not seen a PROCEEDING message. * Added a debug message when absorbing a DTMF event. JIRA SWP-2690 JIRA ABE-2697 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@298195 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-09Merged revisions 297960 via svnmerge from twilson1-0/+7
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r297960 | twilson | 2010-12-09 16:10:31 -0600 (Thu, 09 Dec 2010) | 21 lines Merged revisions 297959 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r297959 | twilson | 2010-12-09 16:00:30 -0600 (Thu, 09 Dec 2010) | 14 lines Ignore spurious REGISTER requests If a REGISTER request with a Call-ID matching an existing transaction is received it was possible that the REGISTER request would overwrite the initreq of the private structure. This info is used to generate messages for other responses in the transaction. This patch ignores REGISTER requests that match non-REGISTER transactions. (closes issue #18051) Reported by: eeman Tested by: twilson Review: https://reviewboard.asterisk.org/r/1050/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297965 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-09Fixes issue with outbound google voice calls not working.dvossel1-5/+40
Thanks to az1234 and nevermind_quack for their input in helping debug the issue. (closes issue #18412) Reported by: nevermind_quack Patches: fix uploaded by dvossel (license 671) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297957 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-06Merged revisions 297605 via svnmerge from jpeeler1-6/+30
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r297605 | jpeeler | 2010-12-06 16:03:04 -0600 (Mon, 06 Dec 2010) | 18 lines Merged revisions 297603 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r297603 | jpeeler | 2010-12-06 15:57:15 -0600 (Mon, 06 Dec 2010) | 12 lines Improve handling of REGISTER requests with multiple contact headers. The changes here attempt to more strictly follow RFC 3261 section 10.3. Basically the following will now cause a 400 Bad Response to be returned, if: - multiple Contact headers are present with one set to expire all bindings ("*") - wildcard parameter is specified for Contact without Expires header or Expires header is not set to zero. ABE-2442 ABE-2443 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297607 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-03Merged revisions 297534 via svnmerge from seanbright1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r297534 | seanbright | 2010-12-03 12:40:52 -0500 (Fri, 03 Dec 2010) | 3 lines The CLI command should not contain <placeholder>s, these are for descriptions. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297535 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-01Merged revisions 297073 via svnmerge from jpeeler1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r297073 | jpeeler | 2010-12-01 11:52:46 -0600 (Wed, 01 Dec 2010) | 30 lines Merged revisions 297072 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r297072 | jpeeler | 2010-12-01 11:50:09 -0600 (Wed, 01 Dec 2010) | 23 lines Fix not stopping MOH when transfered local channel queue member is answered. The problem here is only present when local channels are used with the MOH passthru option as well as no optimization (/nm). I will describe the slightly bizarre scenario that was used to test, where phones B and C are queue members: Phone A dials into a queue with two members using local channels and the above options. Phone B answers. Phone A blind transfers phone B into the same queue. Phone A hangs up. Phone C answers, but phone B didn't stop playing MOH. In this scenario, the unhold frame that should have gotten to phone B never arrived due to the masquerade from the blind transfer. This is usually fine since app_queue manages the starting and stopping of MOH. However, with the passthrough option enabled when app_queue attempts to stop MOH it tries to do so on the local channel rather than the real channel. The easiest solution was to just make sure to send an unhold frame during the transfer since it wouldn't make sense to have MOH playing after a transfer anyway. This only modifies SIP transfers, but the other transfers did not seem to be a problem. If DTMF based transfers were a problem it might be okay to add ast_moh_stop to finishup, but I didn't want to have to add that unless required. ABE-2624 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297075 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-01Merged revisions 296950 via svnmerge from tilghman1-0/+10
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r296950 | tilghman | 2010-11-30 19:38:19 -0600 (Tue, 30 Nov 2010) | 2 lines Missed initializations caused startup errors on Mac OS X (and possibly others, too). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296951 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-29Merged revisions 296671 via svnmerge from pabelanger1-2/+1
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296671 | pabelanger | 2010-11-29 17:54:14 -0500 (Mon, 29 Nov 2010) | 12 lines Merged revisions 296670 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296670 | pabelanger | 2010-11-29 17:49:39 -0500 (Mon, 29 Nov 2010) | 5 lines Make sure nothing else is needed before destroying the scheduler. (closes issue #18398) Reported by: pabelanger ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296673 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-29Complete some error handling in transmit_publish() in chan_sip.c.russell1-0/+2
This error handling block caught my eye. It was missing a couple of things, but it should be safe now. Thanks to mmichelson for the quick peer review on IRC. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296628 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-29Merged revision 296575 fromrmudgett2-2/+27
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r296575 | rmudgett | 2010-11-29 14:27:37 -0600 (Mon, 29 Nov 2010) | 13 lines Invalid mISDN PTMP redirecting signaling as TE towards NT. The mISDN PTMP redirection signaling (NOTIFY redirecting number and notification code, SETUP redirecting number) is also sent in PTMP/TE mode. It should only apply in PTMP/NT mode. The call setup proceeds but the network (Deutsche Telekom) reacts with ugly ISDN STATUS messages. Also don't send the redirecting number ie when PTP is also sending the DivertingLegInformation2 facility. The redirecting number ie is redundant and the network (Deutsche Telekom) complains about it. Patches: abe_2651_v4.patch uploaded by rmudgett (license 664) JIRA ABE-2651 JIRA SWP-2537 .......... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296582 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-26Fix reloading of peer when a user is requested.marquis1-5/+13
Prevent peer reloading from causing multiple MWI subscriptions to be created when using realtime. This had the effect of sending one NOTIFY for every time a sip peer made a call, in one case eventually overwhelming the phone and causing it to reboot. (closes issue #18342) Reported by: nivek Patches: issue0018342p1.patch uploaded by nivek (license 636) Tested by: nivek Review: https://reviewboard.asterisk.org/r/1029/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296352 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-24Merged revisions 296166 via svnmerge from rmudgett4-214/+349
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@296167 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-20One way audio before answering call waiting call on analog port.rmudgett3-22/+40
* Analog call waiting Caller ID spills could get stuck resulting in one way audio until the waiting call is answered. This only happens on the second (and later) call waiting call if the active call is not the first call. * The CLI/AMI "dahdi show channel" command could report the wrong channel information. Must keep the struct analog_pvt.owner and struct dahdi_pvt.owner pointer in sync. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@295747 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-19Merged revisions 295672 via svnmerge from twilson1-3/+19
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r295672 | twilson | 2010-11-19 13:55:48 -0800 (Fri, 19 Nov 2010) | 15 lines Merged revisions 295628 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r295628 | twilson | 2010-11-19 12:53:36 -0800 (Fri, 19 Nov 2010) | 8 lines Discard responses with more than one Via This is not a perfect solution as headers that are joined via commas are not detected. This is a parsing issue that to fix "correctly" would necessitate a new SIP parser. Review: https://reviewboard.asterisk.org/r/1019/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@295673 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-19Bring sig_analog extraction more into alignment with orig-trunk/v1.6.2 ↵rmudgett3-236/+271
chan_dahdi. * Restore SMDI support. * Fixed initial value of struct analog_pvt.use_callerid. It may get forced on depending upon other config options. * Call analog_dnd() instead of manual inlined code. * Removed unused struct analog_pvt.usedistinctiveringdetection. * Removed the struct analog_pvt.unknown_alarm flag. It was really the struct analog_pvt.inalarm flag. * Use ast_debug() instead of ast_log(LOG_DEBUG). * Rename several function's index variable to idx. * Some formatting tweaks. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@295516 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-12Merged revisions 294822 via svnmerge from rmudgett2-2/+10
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r294822 | rmudgett | 2010-11-11 20:44:12 -0600 (Thu, 11 Nov 2010) | 18 lines Merged revisions 294821 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r294821 | rmudgett | 2010-11-11 20:41:13 -0600 (Thu, 11 Nov 2010) | 11 lines Asterisk is getting a "No D-channels available!" warning message every 4 seconds. Asterisk is just whining too much with this message: "No D-channels available! Using Primary channel XXX as D-channel anyway!". Filtered the message so it only comes out once if there is no D channel available without an intervening D channel available period. (closes issue #17270) Reported by: jmls ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294823 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-11Merged revisions 294733 via svnmerge from jpeeler1-1/+15
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r294733 | jpeeler | 2010-11-11 15:57:22 -0600 (Thu, 11 Nov 2010) | 25 lines Merged revisions 294688 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r294688 | jpeeler | 2010-11-11 15:12:27 -0600 (Thu, 11 Nov 2010) | 18 lines Fix problem with qualify option packets for realtime peers never stopping. The option packets not only never stopped, but if a realtime peer was not in the peer list multiple options dialogs could accumulate over time. This scenario has the potential to progress to the point of saturating a link just from options packets. The fix was to ensure that the poke scheduler checks to see if a peer is in the peer list before continuing to poke. The reason a peer must be in the peer list to be able to properly manage an options dialog is because otherwise the call pointer is lost when the peer is regenerated from the database, which is how existing qualify dialogs are detected. (closes issue #16382) (closes issue #17779) Reported by: lftsy Patches: bug16382-3.patch uploaded by jpeeler (license 325) Tested by: zerohalo ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294734 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-09Analog lines do not transfer CONNECTED LINE or execute the interception macros.rmudgett3-321/+96
Add connected line update for sig_analog transfers and simplify the corresponding sig_pri and chan_misdn transfer code. Note that if you create a three-way call in sig_analog before transferring the call, the distinction of the caller/callee interception macros make little sense. The interception macro writer needs to be prepared for either caller/callee macro to be executed. The current implementation swaps which caller/callee interception macro is executed after a three-way call is created. Review: https://reviewboard.asterisk.org/r/996/ JIRA ABE-2589 JIRA SWP-2372 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294349 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-08Merged revisions 294242 via svnmerge from mnicholson1-31/+40
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294242 | mnicholson | 2010-11-08 14:50:21 -0600 (Mon, 08 Nov 2010) | 8 lines Go off hold when we get an empty reinvite telling us to. (closes issue 0014448) Reported by: frawd (closes issue #17878) Reported by: frawd ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294243 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-08valgrind reported references to freed memory during a mISDN hangup collision.rmudgett1-173/+188
Bad things have been happening in chan_misdn because the chan_misdn channel private struct chan_list is not protected from reentrancy. Hangup collisions have be causing read and write accesses to freed memory. Converted chan_misdn struct chan_list to an ao2 object for its reference counting feature. ********** Removed an impediment to converting chan_list to an ao2 object. The use of the other_ch member in chan_list is shaky at best. It is set if the incoming and outgoing call legs are mISDN. The use of the other_ch member goes against the Asterisk architecture and can even cause problems. 1) It is used to disable echo cancellation. This could be bad if the call is forked and the winning call leg is not mISDN or the winning call leg is not the last mISDN channel called by the fork. The other_ch would become a dangling pointer. 2) It is used when the far end is alerting to hear the far end's inband audio instead of Asterisk's generated ringback tone. This is bad if the call is forked. You would only hear the last forked mISDN channel and it may not be ringing yet. The other_ch would become a dangling pointer if the call is later transferred. ********** JIRA SWP-2423 JIRA ABE-2614 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294125 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-05Fixed deadlock avoidance issues while locking channel when adding thebbryant1-18/+10
Max-Forwards header to a request. (closes issue #17949) (closes issue #18200) Reported by: bwg Review: https://reviewboard.asterisk.org/r/997/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294084 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-04Fixes ringback tone on sip semi-attended transfer.dvossel1-0/+4
ABE-2168 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293924 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-04Do not output port in IPaddress for AMI sippeers.pabelanger1-1/+1
(closes issue #18248) Reported by: orn Patches: ami_sippeers.patch uploaded by pabelanger (license 224) Tested by: orn git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293887 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-03Merged revisions 293806 via svnmerge from rmudgett2-17/+17
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293806 | rmudgett | 2010-11-03 13:31:57 -0500 (Wed, 03 Nov 2010) | 27 lines Merged revisions 293805 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293805 | rmudgett | 2010-11-03 13:23:04 -0500 (Wed, 03 Nov 2010) | 20 lines Party A in an analog 3-way call would continue to hear ringback after party C answers. All parties are analog FXS ports. 1) A calls B. 2) A flash hooks to call C. 3) A flash hooks to bring C into 3-way call before C answers. (A and B hear ringback) 4) C answers 5) A continues to hear ringback during the 3-way call. (All parties can hear each other.) * Fixed use of wrong variable in dahdi_bridge() that stopped ringback on the wrong subchannel. * Made several debug messages have more information. A similar issue happens if B and C are SIP channels. B continues to hear ringback. For some reason this only affects v1.8 and trunk. * Don't start ringback on the real and 3-way subchannels when creating the 3-way conference. Removing this code is benign on v1.6.2 and earlier. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293807 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-03Avoid valgrind warnings for ast_rtp_instance_get_xxx_addresstwilson1-3/+3
The documentation for ast_rtp_instance_get_(local/remote)_address stated that they returned 0 for success and -1 on failure. Instead, they returned 0 if the address structure passed in was already equivalent to the address instance local/remote address or 1 otherwise. 90% of the calls to these functions completely ignored the return address and passed in an uninitialized struct, which would make valgrind complain even though the operation was technically safe. This patch fixes the documentation and converts the get_xxx_address functions to void since all they really do is copy the address and cannot fail. Additionally two new functions (ast_rtp_instance_get_and_cmp_(local/remote)_address) are created for the 3 times where the return value was actually checked. The get_and_cmp_local_address function is currently unused, but exists for the sake of symmetry. The only functional change as a result of this change is that we will not do an ast_sockaddr_cmp() on (mostly uninitialized) addresses before doing the ast_sockaddr_copy() in the get_*_address functions. So, even though it is an API change, it shouldn't have a noticeable change in behavior. Review: https://reviewboard.asterisk.org/r/995/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293803 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-02Merged revisions 293723 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293723 | jpeeler | 2010-11-02 18:07:13 -0500 (Tue, 02 Nov 2010) | 15 lines Merged revisions 293722 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293722 | jpeeler | 2010-11-02 18:02:51 -0500 (Tue, 02 Nov 2010) | 8 lines Add enabled/disabled information for rtautoclear sip show settings output. When setting to zero/"no", the numeric default was shown making it not obvious the disabled setting was respected. (closes issue #18123) Reported by: zerohalo ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293724 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-02Merged revisions 293647 via svnmerge from rmudgett2-4/+10
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293647 | rmudgett | 2010-11-02 16:26:30 -0500 (Tue, 02 Nov 2010) | 13 lines Merged revisions 293639 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293639 | rmudgett | 2010-11-02 16:24:13 -0500 (Tue, 02 Nov 2010) | 6 lines Make warning message have more useful information in it. Change "Unable to get index, and nullok is not asserted" to "Unable to get index for '<channel-name>' on channel <number> (<function>(), line <number>)". ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293648 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-01Analog 3-way call would not connect all parties if one was using sig_pri.rmudgett3-30/+49
Also the "dahdi show channel" would not show the correct 3-way call status. * Synchronized the inthreeway flag between chan_dahdi and sig_analog. * Fixed a my_set_linear_mode() sign error and made take an analog sub channel enum. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293530 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-01Use ast_sockaddr_from_sin function not memcpypabelanger1-3/+6
This resolves some IAX2 registration issue report on the asterisk-users mailing list. (closes issue #18202) Reported by: pabelanger Patches: update_registry.patch.v2 uploaded by pabelanger (license 224) Tested by: pabelanger, Nic Colledge (mailing list) Review: https://reviewboard.asterisk.org/r/993 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293496 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-01Only offer codecs both sides support for directmediatwilson1-7/+17
When using directmedia, Asterisk needs to limit the codecs offered to just the ones that both sides recognize, otherwise they may end up sending audio that the other side doesn't understand. (closes issue #17403) Reported by: one47 Patches: sip_codecs_simplified4 uploaded by one47 (license 23) Tested by: one47, falves11 Review: https://reviewboard.asterisk.org/r/967/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@293493 f38db490-d61c-443f-a65b-d21fe96a405b