summaryrefslogtreecommitdiffstats
path: root/voip
Commit message (Collapse)AuthorAgeFilesLines
* am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into ↵Eric Laurent2011-04-041-0/+9
|\ | | | | | | | | | | | | gingerbread * commit 'a482d83ccf35ccd6cc29a9e1ace3d77b5f28d013': Issue 4157048: mic gain for VoIP/SIP calls.
| * Issue 4157048: mic gain for VoIP/SIP calls.Eric Laurent2011-03-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Herring board exhibits a strong echo even in non speakerphone modes. To compensate the lack of AEC or AES when not in speakerphone, the mic gain had been reduced in the ADC. But this has an adverse effect on other VoIP applications that have their own AEC and are penalized by the weak mic gain. This workaround enables an acceptable mic gain for other VoIP apps while offering a SIP call experience which is not worse than it was with the residual echo that was present even with mic gain reduction. Change-Id: I33fd37858758e94e42ef5b545d3f0dc233220bf1
* | Making it possible to call SIP calls with special allowed chars.Magnus Strandberg2011-03-221-2/+6
|/ | | | | | | | | Since String.replaceFirst uses regex and since SIP user names are allowed to include regex charaters such as '+', the code must fist convert the string to a literal pattern String before using replaceFirst method. Change-Id: I25eac852bd620724ca1c5b2befc023af9dae3c1a
* do not merge bug 3370834 Cherrypick from masterJean-Michel Trivi2011-01-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherripick from master CL 79833, 79417, 78864, 80332, 87500 Add new audio mode and recording source for audio communications other than telelphony. The audio mode MODE_IN_CALL signals the system the device a phone call is currently underway. There was no way for audio video chat or VoIP applications to signal a call is underway, but not using the telephony resources. This change introduces a new mode to address this. Changes in other parts of the system (java and native) are required to take this new mode into account. The generic AudioPolicyManager is updated to not use its phone state variable directly, but to use two new convenience methods, isInCall() and isStateInCall(int) instead. Add a recording source used to designate a recording stream for voice communications such as VoIP. Update the platform-independent audio policy manager to pass the nature of the audio recording source to the audio policy client interface through the AudioPolicyClientInterface::setParameters() method. SIP calls should set the audio mode to MODE_IN_COMMUNICATION, Audio mode MODE_IN_CALL is reserved for telephony. SIP: Enable built-in echo canceler if available. 1. Always initialize AudioRecord with VOICE_COMMUNICATION. 2. If echo canceler is available, disable our echo suppressor. Note that this CL is intentionally not correcting the getAudioSourceMax() return value in MediaRecorder.java as the new source is hidden here. Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
* Merge changes Ib70e0cf2,I0691cd70 into gingerbreadHung-ying Tyan2011-01-241-8/+27
|\ | | | | | | | | | | * changes: SipService: registers broadcast receivers on demand. SipService: release wake lock for cancelled tasks.
| * SipService: registers broadcast receivers on demand.Hung-ying Tyan2011-01-071-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation registers receivers when SipService starts up. If the user doesn't use SIP at all, SipService will still process connecivity and wifi state change events, which involves holding wake lock and thus consumes power unnecessarily. With this CL, SipService is completely idle if the user doesn't use SIP at all. It registers receivers only when at least one account is opened. Bug: 3326998 Change-Id: Ib70e0cf2c808e0ebab4c3c43dcab5532d24e5eeb
| * SipService: release wake lock for cancelled tasks.Hung-ying Tyan2011-01-061-1/+5
| | | | | | | | | | Bug: 3327004 Change-Id: I0691cd70edf61f815ecb0613aca85babd89f6cc4
* | Add auth. username in SipProfile.Chung-yih Wang2011-01-072-1/+29
|/ | | | | bug:3326867 Change-Id: I2a62c75fb3f5e9c6ec2e00b29396e93b0c183d9b
* RTP: Send silence packets on idle streams for every second.Chia-chi Yeh2011-01-041-32/+48
| | | | | | | | | | | | | Originally a stream does not send packets when it is receive-only or there is nothing to mix. However, this causes some problems with certain firewalls and proxies. A firewall might remove a port mapping when there is no outgoing packet for a preiod of time, and a proxy might wait for incoming packets from both sides before start forwarding. To solve these problems, we send out a silence packet on the stream for every second. It should be good enough to keep the stream alive with relatively low resources. Bug: 3119690 Change-Id: Ib9c55e5dddfba28928bd9b376832b68bda24c0e4
* Check if VoIP API is supported in SipManager.Hung-ying Tyan2010-12-212-5/+31
| | | | | | | | | | This is to make SipManager.isVoipSupported() effective. Also add NPE check now that we may return null SipAudioCall when VOIP is not supported. Bug: 3251016 Change-Id: Icd551123499f55eef190743b90980922893c4a13
* Remove SIP realm/domain checkHung-ying Tyan2010-12-171-6/+8
| | | | | | | as the realm may be different from the domain. Bug: 3283834 Change-Id: I64c9f0d6d626afdb397c5d378d30afa9d6a64ca9
* Check port in create peer's SIP profile.Hung-ying Tyan2010-12-162-5/+7
| | | | | | | | SipURI returns port -1 when port is not present in the URI. Don't call SipProfile.Builder.setPort() when that happens. Bug: 3291248 Change-Id: I8e608cbc56ea82862df55fdba885f6a864db83ab
* Fix SIP bug of different transport/port used for requests.Chung-yih Wang2010-12-072-14/+41
| | | | | bug: http://b/3156148 Change-Id: I4fa5b274d2e90ebde12d9e99822dc193a65bad32
* Merge "Set AudioGroup mode according to audio settings" into gingerbreadHung-ying Tyan2010-12-021-18/+31
|\
| * Set AudioGroup mode according to audio settingsHung-ying Tyan2010-11-301-18/+31
| | | | | | | | | | | | | | Set AudioGroup mode according to holding, mute and speaker phone settings. Bug: 3119690 Change-Id: I02803ae105409b7f8482e6c2ef3e67623bd54e03
* | Fix race between ending and answering a SIP call.Hung-ying Tyan2010-12-011-13/+13
| | | | | | | | | | | | | | | | | | + Also fix race between ending and changing (holding/unholding) a SIP call. + Remove an unused method. Bug : 3128233 Change-Id: Ie18d8333a88f0d9906d54988243d909b58e07e4b
* | Do not suppress error feedback during a SIP call.Hung-ying Tyan2010-11-301-11/+1
|/ | | | | Bug: 3124788 Change-Id: Ia0a06f72336d1795515428eba0c9f875c32d13d1
* Merge "Correct SipService.isOpened() implementation." into gingerbreadHung-ying Tyan2010-11-301-12/+12
|\
| * Correct SipService.isOpened() implementation.Hung-ying Tyan2010-11-021-12/+12
| | | | | | | | | | | | | | | | Make it return true for all existing accounts. Rename mOpened to mOpenedToReceiveCalls to make it less confusing. Bug: 3155849 Change-Id: I327f411bf76afd73434ad1fa2ffef3db1e35d778
* | Merge "Notify SipSessions before closing SIP stack." into gingerbreadHung-ying Tyan2010-11-301-0/+1
|\ \
| * | Notify SipSessions before closing SIP stack.Hung-ying Tyan2010-10-251-0/+1
| | | | | | | | | | | | | | | Bug: 3116480 Change-Id: I748d63382ade250aed27ccb09ea68c76a433fd27
* | | Merge "Throw proper exceptions in SipManager" into gingerbreadHung-ying Tyan2010-11-301-7/+11
|\ \ \
| * | | Throw proper exceptions in SipManagerHung-ying Tyan2010-11-031-7/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of silently returning null and causing NPE in applications as returning null is not documented in the javadoc. Add connection to the connection list in SipCall after dial() succeeds so that we don't need to clean up if it fails. The original code will cause the failed connection to continue to live in the SipCall and in next dial() attempt, a new connection is created and the in-call screen sees two connections in the call and thus shows conference call UI. Bug: 3157234, 3157387 Change-Id: Iabc3235f781c4f1e09384a67ad56b09ad2c12e5e
* | | Merge "RTP: Pause echo suppressor when far-end volume is low." into gingerbreadChia-chi Yeh2010-11-291-8/+13
|\ \ \ | |/ / |/| |
| * | RTP: Pause echo suppressor when far-end volume is low.Chia-chi Yeh2010-10-271-8/+13
| |/ | | | | | | | | Bug: 3136725 Change-Id: Ieeedd2836d3028045aacac963f44285491708cc3
* | docs: revise javadocs for sipScott Main2010-10-288-69/+118
|/ | | | | | add a package description, revise class descriptions and edit some method docs Change-Id: Ice969a99c830349674c65d99e4b7a6f1d2f24a7e
* Clean up pending sessions on incoming call in SipServiceHung-ying Tyan2010-10-221-2/+13
| | | | | Bug: 3122186 Change-Id: I25c9aa19d138f6940a29025d54e7bc2ffb7daa29
* Merge "RTP: Fix non-zero DC in EchoSuppressor caused while aggregating ↵Chia-chi Yeh2010-10-213-104/+128
|\ | | | | | | samples." into gingerbread
| * RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples.Chia-chi Yeh2010-10-223-104/+128
| | | | | | | | | | | | | | | | Rewrite using integer arithmetic to get full 32-bit precision instead of 23-bit in single precision floating-points. Bug: 3029745 Change-Id: If67dcc403923755f403d08bbafb41ebce26e4e8b
* | Add permission requirements to SipAudioCall and SipManager javadoc.Hung-ying Tyan2010-10-212-1/+22
| | | | | | | | | | | | Bug: 3116259 Change-Id: I00a033794e9d3e1c2d2ccfe4e612cd50003ec2ee
* | Remove ringtone API from SipAudioCall.Hung-ying Tyan2010-10-202-99/+1
|/ | | | | | | | (watch out auto-merge conflict for SipAudioCall). Bug: 3113033, related CL: https://android-git/g/#change,75185 Change-Id: Ib48d3b990e229e0b341e47e10e76934e1a50d10f
* Periodically scan wifi when wifi is not connected and wifi lock isChung-yih Wang2010-10-191-0/+48
| | | | | | | grabbed in SipService. bug: http://b/3077454 Change-Id: I153974325c29e0f927c8eb7fdbc4725aaf10087d
* Handle dialing a SIP call to self.Hung-ying Tyan2010-10-193-1/+40
| | | | | | | | | Reply BUSY HERE response so server may redirect the call to the voice mailbox. http://b/issue?id=3103072 http://b/issue?id=3109479 Change-Id: I81f5dd59ad87298dd9dda87084538ee460eabba8
* Reduce logging.Joe Onorato2010-10-191-9/+9
| | | | | | | | | | Remember, the system and main logs are - Shared resources - Primarily for recording problems - To be used only for large grained events during normal operation Bug: 3104855 Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
* Fix the incorrect environment variable name for the thread pool size.Chung-yih Wang2010-10-191-1/+2
| | | | | bug: http://b/3099715 Change-Id: I531048414f22c8edcd9c4f815c12a0bdd6347640
* Merge "Uncomment SIP/VOIP feature check in SipManager." into gingerbreadJohn Huang2010-10-181-6/+0
|\
| * Uncomment SIP/VOIP feature check in SipManager.Hung-ying Tyan2010-10-181-6/+0
| | | | | | | | | | | | http://b/issue?id=2971947 Change-Id: I3afa8eb03c4e347b382213dd388354365f766b2f
* | Set the thread pool size of NIST sip stack to one.Chung-yih Wang2010-10-181-0/+6
|/ | | | | | | | Set the thread pool size to one to fix the out-of-order packets seen in sip service when the device is waken up from sleep. bug:http://b/3099715 Change-Id: Ia169e3fde77488068c369e3345ecf6a6d8ddf792
* SipService: add wake lock for incoming INVITE packets.Hung-ying Tyan2010-10-153-46/+92
| | | | | | | | | | | | | + Keep the wake lock for 500ms. (Some measurements on N1 indicate 160~180ms needed to bring up InCallScreen but since INVITE doesn't come in frequently we can be more generous just to be safe.) + Move MyWakeupLock out of SipService so SipSessionGroup can use it without awkward inter-dependency with SipService. + Add acquire(int timeout) to be used to create the "timed" wake lock. http://b/issue?id=3081828 Change-Id: Iffd1d78d1a5cae9f795252ada75310917095204d
* SipService: add wake lock for multiple components.Hung-ying Tyan2010-10-142-68/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Add MyWakeLock to maintain a global wake lock for multiple components. + Use a Set to store components that want to hold the lock. + When the first component enters the set, we grab the global wake lock. + When the set becomes empty, we release the global lock. + In places like no account being opened to receive calls, we reset the wake lock just to be safe from possible leakage. + Make MyExecutor aware of the wake lock. It will grab the wake lock on behalf of the task so that tasks don't need to worry about the lock. + Connectivity receiver is modified to be executed in MyExecutor. + WakeupTimer handler is already protected by AlarmManager's wake lock but all the timeout handlers that register themselves to the WakeupTimer are to be executed in MyExecutor to be protected by the wake lock. + Remove unnecessary code in the Keepalive and registration processes. Since both processes are executed in MyExecutor submitted by the WakeupTimer (as they are timeout handlers registered to the WakeupTimer), they don't need to add themselves to MyExecutor explicitly in their run() callbacks. + Make the keepalive process wait for at most 3 seconds instead of forever for server response. It could cause the wake lock to be held longer than necessary and is a potential cause for ANR. http://b/issue?id=3081828 Related bug: http://b/issue?id=3087153 Change-Id: Idee0ddb837e67daa0d5092c012bb242bd7c18431
* Make SipService listen to WIFI state change events.Hung-ying Tyan2010-10-131-27/+23
| | | | | | | | | | | + Grab a WIFI lock if any account is opened to receive calls and WIFI is enabled + Release the WIFI lock if no account is opened to receive calls or WIFI is disabled + Remove screen on/off event receiver http://b/issue?id=3077454 Change-Id: Ifdf60a850bcf4106c75ec1e7563b26d8b33d7e92
* Merge "SipService: mScreenOn is flipped to wrong value." into gingerbreadHung-ying Tyan2010-10-121-2/+2
|\
| * SipService: mScreenOn is flipped to wrong value.Hung-ying Tyan2010-10-131-2/+2
| | | | | | | | | | | | http://b/issue?id=3077454 Change-Id: I23b6f70730074689b939e449c2c202ce8ffb586f
* | Fix SipSessionGroup from throwing ConcurrentModificationExceptionHung-ying Tyan2010-10-121-1/+7
|/ | | | | | http://b/issue?id=3087256 Change-Id: I67df64105db7c1295649f1f3ce77f99025ce3d44
* SipService: fix a missing switch-case break.Hung-ying Tyan2010-10-121-0/+1
| | | | Change-Id: I638eecd8000293d4cb37b3595c02ca33df4924eb
* SipHelper: add debug log for challenge responses.Hung-ying Tyan2010-10-111-0/+2
| | | | Change-Id: If0143a0f076ef30b1b8998e477df933923bfa7b1
* Do not release the wifi lock if the screen is off.Chung-yih Wang2010-10-091-1/+21
| | | | | | | We need to be able to receive calls if the device is able to reassociate with any AP later on. Change-Id: Ib7aafb98386bf250ed9b5ec0a5b519594efa1649
* SipService: add permission check for using APIHung-ying Tyan2010-10-081-4/+21
| | | | Change-Id: Ifd85ba07f1b913011cb3e80e5027c67bfe3db280
* Unhide SIP API.Hung-ying Tyan2010-10-087-144/+208
| | | | Change-Id: I09468e3149a242a3b1e085ad220eb74f84ac6c68
* Suppress harder for echo without affecting the volume of real voice.Chung-yih Wang2010-10-081-1/+2
| | | | Change-Id: Ia3ce98eedd487a9e879ff0a4907b8c15b5707429