aboutsummaryrefslogtreecommitdiffstats
path: root/channels
AgeCommit message (Collapse)AuthorFilesLines
2011-02-11Reentrancy problem if outgoing call gets different B channel than requested.rmudgett1-5/+90
The chan_dahdi pri_fixup_principle() routine needs to protect the Asterisk channel with the channel lock when it changes the technology private pointer to a new private structure. * Added lock protection while pri_fixup_principle() moves a call from one private structure to another. * Made some pri_fixup_principle() messages more meaningful. Partial backport from v1.8 -r300714. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@307623 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-08Fix comparison for REFER Replaces tags with pedantic=yestwilson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@306972 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-07Don't allow a REFER w/replaces to replace its own dialogtwilson1-1/+9
Asterisk currently accepts a REFER with a Refer-To with an embedded Replaces header that matches the dialog of the REFER. This would be a situation like A calls B, A calls C, A transfers B to A, which is just silly. This patch makes the transfer fail instead of making Asterisk freak out and forget to hang other channels up. Review: https://reviewboard.asterisk.org/r/1093/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@306617 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03Set hangup cause in local_hanguptwilson1-0/+1
When a call involves a local channel (like SIP -> Local -> SIP), the hangup cause was not being set. This resulted in SIP channels sometimes getting a 503 error instead of a 486 when the far side sent a busy. In Asterisk 1.8+ this also can cause issues with CCSS that involve a local channel. This patch sets the hangupcause for one side of the local channel to the other in local_hangup for outbound calls. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@306119 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03Minor AST_FRAME_TEXT related issues.rmudgett1-1/+1
* Include the null terminator in the buffer length. When the frame is queued it is copied. If the null terminator is not part of the frame buffer length, the receiver could see garbage appended onto it. * Add channel lock protection with ast_sendtext(). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@305888 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-31Obtain the pri lock for PRI queue counters.rmudgett1-0/+2
Need to obtain the pri lock when calling pri_dump_info_str() to avoid a reentrancy problem when calculating the Q.921 Q count statistic. JIRA AST-484 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@305341 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-31Prevent a crash when dialing a technology with no destination (ex: Dial(SIP/))qwell1-0/+6
chan_iax2 and other channel drivers already had code to prevent this. The attempt that app_dial was making to prevent it was not correct, so I fixed that. (closes issue #18371) Reported by: gbour Patches: 18371.patch uploaded by gbour (license 1162) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@305252 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-26Convert from network to host byte ordering before checking if an IP is a ↵mnicholson1-1/+1
multicast address. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@304247 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-26This patch modifies chan_sip to route responses to the address the request ↵mnicholson1-0/+194
came from. It also modifies chan_sip to respect the maddr parameter in the Via header. ABE-2664 Review: https://reviewboard.asterisk.org/r/1059/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@304241 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-25Guard against retransmitting BYEs indefinitelytwilson1-0/+1
In the case of an attended transfer (A calls B, A atxfers to C) where A becomes unreachable before replying to Asterisk's BYE, Asterisk can sometimes retransmit the BYE indefinitely. This is because __sip_autodestruct tests p->refer && !ast_test_flag(&p->flags[0], SIP_ALREADYGONE and will then transmit a BYE. When this BYE times out, it will not ever be marked as ALREADYGONE, so when __sip_autodestruct is called again, we end up starting the cycle over. This patch adds a call to sip_alreadygone(pkt->owner) in retrans_pkt in the case of a BYE that has timed out. This should prevent Asterisk from trying to transmit new BYE messages in the future. Review: https://reviewboard.asterisk.org/r/1077/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@303906 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-25Sending out unnecessary PROCEEDING messages breaks overlap dialing.rmudgett1-115/+253
Issue #16789 was a good idea. Unfortunately, it breaks overlap dialing through Asterisk. There is not enough information available at this point to know if dialing is complete. The ast_exists_extension(), ast_matchmore_extension(), and ast_canmatch_extension() calls are not adequate to detect a dial through extension pattern of "_9!". Workaround is to use the dialplan Proceeding() application early in non-dial through extensions. * Effectively revert issue #16789. * Allow outgoing overlap dialing to hear dialtone and other early media. A PROGRESS "inband-information is now available" message is now sent after the SETUP_ACKNOWLEDGE message for non-digital calls. An AST_CONTROL_PROGRESS is now generated for incoming SETUP_ACKNOWLEDGE messages for non-digital calls. * Handling of the AST_CONTROL_CONGESTION in chan_dahdi/sig_pri was inconsistent with the cause codes. * Added better protection from sending out of sequence messages by combining several flags into a single enum value representing call progress level. * Added diagnostic messages for deferred overlap digits handling corner cases. (closes issue #17085) Reported by: shawkris (closes issue #18509) Reported by: wimpy Patches: issue18509_early_media_v1.8_v3.patch uploaded by rmudgett (license 664) Expanded upon issue18509_early_media_v1.8_v3.patch to include analog and SS7 because of backporting requirements. Tested by: wimpy, rmudgett git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@303765 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-21Reset configuration before parsing users.conf.qwell1-0/+3
Some values configured in chan_dahdi.conf were able to leak in to users.conf configuration. This was surprising users, and potentially setting non-sane "defaults". ASTNOW-125 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@303284 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-18URI encode the user part of the contact header.mnicholson1-2/+7
ABE-2705 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@302311 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-17Merged revisions 293493 via svnmerge from twilson1-2/+10
https://origsvn.digium.com/svn/asterisk/branches/1.8 [^] ........ r293493 | twilson | 2010-11-01 09:58:00 -0500 (Mon, 01 Nov 2010) | 14 lines Only offer codecs both sides support for directmedia 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 0017403) Reported by: one47 Patches: sip_codecs_simplified4 uploaded by one47 (license 23) Tested by: one47, falves11 Review: https://reviewboard.asterisk.org/r/967/ [^] ........ Back port a fix that should have been included git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@302087 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-04Don't authenticate SUBSCRIBE re-transmissionstwilson1-21/+26
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.4@300216 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-25Move check for extension existence below variable inheritance, due to the ↵tilghman1-6/+6
possible use of an eswitch. (closes issue #16228) Reported by: jlaguilar git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299624 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Use ast_free() instead of free()mnicholson1-4/+4
ABE-2656 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299220 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Remove changes to via processing that were not supposed to go into the last ↵mnicholson1-71/+0
commit. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299198 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Respond as soon as possible with a 202 Accepted to refer requests.mnicholson1-26/+101
This change also plugs a few memory leaks that can occur when parking sip calls. ABE-2656 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299194 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-20Typos: recieved => receivedtzafrir1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299002 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-13Outgoing PRI/BRI calls cannot do DTMF triggered transfers.rmudgett1-1/+8
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.4@298193 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-09Ignore spurious REGISTER requeststwilson1-0/+7
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.4@297959 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-06Improve handling of REGISTER requests with multiple contact headers.jpeeler1-6/+30
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.4@297603 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-02If we get a NOTIFY from a non-existing subscription we should answer with ↵oej1-1/+1
481, not bad event. If we answer 481 the subscription that we don't want will be cancelled. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@297185 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-01Fix not stopping MOH when transfered local channel queue member is answered.jpeeler1-0/+3
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.4@297072 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-01Get rid of the annoying startup and shutdown errors on OS X.tilghman1-1/+13
This mainly deals with the problem of constructors on platforms where an explicit constructor order cannot be specified (any system with gcc 4.2 or less). However, this is only a problem on those systems where we need to initialize mutexes with a constructor, because we have other code that also relies upon constructors, and we cannot specify that mutexes are initialized first (and destroyed last). There are two approaches to dealing with this issue, related to whether the code exists in the core Asterisk binary or in a separate code module. In the core case, constructors are run immediately upon load, and the file_versions list mutex needs to be already initialized, as it is referenced in the first constructor within each core source file. In this case, we use pthread_once to ensure that the mutex is initialized immediately before it is used for the first time. The only caveat is that the mutex is not ever destroyed, but because this is the core, it makes no real difference; the only time when destruction is safe would be just prior to process destruction, which takes care of that anyway. And due to using pthread_once, the mutex will never be reinitialized, which means only one structure has leaked at the end of the process. Hence, it is not a problematic leak. The second approach is to use the load_module and unload_module routines, which, for obvious reasons, exist only in loadable modules. In this second case, we don't have a problem with the constructors, but only with destructor order, because mutexes can be destroyed before their final usage is employed. However, we need the mutexes to still be destroyed, in certain scenarios: if the module is unloaded prior to the process ending, it should be clean, with no allocations by the module hanging around after that point in time. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@296867 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-29Make sure nothing else is needed before destroying the scheduler.pabelanger1-2/+2
(closes issue #18398) Reported by: pabelanger git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@296670 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-24Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip.rmudgett1-108/+202
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.4@296165 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-19Discard responses with more than one Viatwilson1-3/+19
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.4@295628 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-12Asterisk is getting a "No D-channels available!" warning message every 4 ↵rmudgett1-2/+11
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.4@294821 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-11Fix problem with qualify option packets for realtime peers never stopping.jpeeler1-1/+24
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) 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.4@294688 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-08Modify our handling of 491 responses to drop any pending reinvite retry ↵mnicholson1-0/+8
scheduler entries if we get a new 491. This prevents a scheduler entry from leaking if we receive a 491 response when one is pending. If a scheduler entry leaks, the pvt it is associated my get destroyed before the scheduler entry fires, and then memory corruption and crashes can occur when the scheduled reinvite attempts to access and modify the memory of the destroyed pvt. ABE-2543 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@294163 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-03Party A in an analog 3-way call would continue to hear ringback after party ↵rmudgett1-12/+16
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.4@293805 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-02Add enabled/disabled information for rtautoclear sip show settings output.jpeeler1-1/+1
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.4@293722 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-02Make warning message have more useful information in it.rmudgett1-2/+5
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.4@293639 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-30Remove some more code that serves no purpose.rmudgett1-11/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@293416 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-30Remove some code that serves no purpose.rmudgett1-11/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@293339 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-25This patch turns chan_local pvts into astobj2 objects.dvossel1-139/+167
chan_local does some dangerous things involving deadlock avoidance. tech_pvt functions like hangup and queue_frame are provided with a locked channel upon entry. Those functions are completely safe as long as you don't attempt to give up that channel lock, but that is impossible to guarantee due to the required deadlock avoidance necessary to lock both the tech_pvt and both channels involved. In the past, we have tried to account for this by doing things like setting a "glare" flag that indicates what function should destroy the pvt. This was used in local_hangup and local_queue_frame to decided who should destroy the pvt if they collided in separate threads. I have removed the need to do this by converting all chan_local tech_pvts to astobj2. This means we can ref a pvt before deadlock avoidance and not have to worry about that pvt possibly getting destroyed under us. It also cleans up where we destroy the tech_pvt. The only unlink from the tech_pvt container occurs in local_hangup now, which is where it should occur. Since there still may be thread collisions on some functions like local_hangup after deadlock avoidance, I have added some checks to detect those collisions and exit appropriately. I think this patch is going to solve quite a bit of weirdness we have had with local channels in the past. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@292866 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-15Don't access o->next after freeing o on unloadtwilson1-3/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@291862 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-13Deadlock between dahdi_exception() and dahdi_indicate().rmudgett1-80/+222
There is a deadlock between dahdi_exception() and dahdi_indicate() for analog ports. The call-waiting and three-way-calling feature can experience deadlock if these features are trying to do something and an event from the bridged channel happens at the same time. Deadlock avoidance code added to obtain necessary channel locks before attemting an operation with call-waiting and three-way-calling. (closes issue #16847) Reported by: shin-shoryuken Patches: issue_16847_v1.4.patch uploaded by rmudgett (license 664) issue_16847_v1.6.2.patch uploaded by rmudgett (license 664) issue_16847_v1.8_v2.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett Review: https://reviewboard.asterisk.org/r/971/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@291643 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-13Lock pvt so pvt->owner can't disappear when queueing up a frame.russell1-1/+16
This fixes a crash due to a hangup race condition. ABE-2601 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@291392 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-11Add missing unlock to an exception condition in reload_config().rmudgett1-3/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@291109 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-01Change RFC2833 DTMF event duration on end to report actual elapsed time.jpeeler1-1/+1
The scenario here is with a non P2P early media session. The reported time length of DTMF presses are coming up short when sending to the remote side. Currently the event duration is a running total that is incremented when sending continuation packets. These continuation packets are only triggered upon incoming media from the remote side, which means that the running total probably is not going to end up matching the actual length of time Asterisk received DTMF. This patch changes the end event duration to be lengthened if it is detected that the end event is going to come up short. Review: https://reviewboard.asterisk.org/r/957/ ABE-2476 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@289797 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-01Ensure user portion of SIP URI matches dialplan when using encoded characters.jpeeler1-3/+8
This commit takes a simliar approach to 288112 and checks the dialplan to determine the proper action for an incoming contact header as to whether or not it should be decoded or not. sip_new was blindly always decoding the extension, which also caused the outgoing contact header to be incorrect as well as failing to match the encoded extension in the dialplan. (closes issue #17892) Reported by: wdoekes Patches: bug17892-1.patch uploaded by jpeeler (license 325) Tested by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@289699 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-01don't iterate through all dialogs to find and delete old subscribesschmitds1-26/+6
On every incoming subscribe there is a iteration through all dialogs to find old subscribes and delete them. This is slow and not RFC conform. This was only needed in 1.2 cause a subscribe was not deleted when a dialog was destroyed, after 1.4 a subscribe get removed when its dialog is destroyed. (closes issue #17950) Reported by: schmidts Tested by: schmidts Review: https://reviewboard.asterisk.org/r/901/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@289622 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-24Don't fail a masquerade if it is already being hung uptwilson1-1/+1
This avoids noise on some Local channel situations where we don't use /n. Thanks to Alec Davis for the suggestion. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288746 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22Don't let a Local channel get bridged to itselftwilson1-0/+9
If a local channel gets bridged to itself, it becomes orphaned with no devices left to actually tell it to hang up. This patch modifies local_fixup() to detect this case and deny it. Review: https://reviewboard.asterisk.org/r/934 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288499 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22RFC3261 section 12.2 explicitly says out of order requests are responded ↵dvossel1-1/+1
with a 500 Server Internal Error response. ABE-2458 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288416 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22Handle media specific T.38 SDP informationmnicholson1-2/+10
(closes issue #16647) Reported by: kwemheuer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288412 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22During check_pendings, if the dialog is terminated with a CANCEL, change the ↵dvossel1-2/+3
invitestate to INV_CANCEL like in sip_hangup. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288343 f38db490-d61c-443f-a65b-d21fe96a405b