Giter Site home page Giter Site logo

64characters / telephone Goto Github PK

View Code? Open in Web Editor NEW
1.1K 51.0 204.0 9.61 MB

SIP softphone for Mac

Home Page: https://www.64characters.com/telephone

License: GNU General Public License v3.0

Objective-C 31.71% Swift 49.56% C 16.75% Rich Text Format 1.97%
sip voip softphone mac-app phone-calls

telephone's Introduction

Telephone is a VoIP program which allows you to make phone calls over the internet. It can be used to call regular phones via any appropriate SIP provider. If your office or home phone works via SIP, you can use that phone number on your Mac anywhere you have decent internet connection.

Building

Opus

Opus codec is optional.

Download:

$ curl -O https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
$ tar xzvf opus-1.3.1.tar.gz
$ cd opus-1.3.1

Build and install:

$ ./configure --prefix=/path/to/Telephone/ThirdParty/Opus --disable-shared CFLAGS='-arch arm64 -arch x86_64 -Os -mmacosx-version-min=10.13'
$ make
$ make install

LibreSSL

Download:

$ curl -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.5.tar.gz
$ curl -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.5.tar.gz.asc
$ gpg --verify libressl-3.1.5.tar.gz.asc
$ tar xzvf libressl-3.1.5.tar.gz
$ cd libressl-3.1.5

Build and install:

$ ./configure --prefix=/path/to/Telephone/ThirdParty/LibreSSL --disable-shared CFLAGS='-arch arm64 -arch x86_64 -Os -mmacosx-version-min=10.13'
$ make
$ make install

PJSIP

Download:

$ curl -o pjproject-2.10.tar.gz https://codeload.github.com/pjsip/pjproject/tar.gz/2.10
$ tar xzvf pjproject-2.10.tar.gz
$ cd pjproject-2.10

Create pjlib/include/pj/config_site.h:

#define PJSIP_DONT_SWITCH_TO_TCP 1
#define PJSUA_MAX_ACC 32
#define PJMEDIA_RTP_PT_TELEPHONE_EVENTS 101
#define PJ_DNS_MAX_IP_IN_A_REC 32
#define PJ_DNS_SRV_MAX_ADDR 32
#define PJSIP_MAX_RESOLVED_ADDRESSES 32
#define PJ_HAS_IPV6 1

Patch:

$ patch -p0 -i /path/to/Telephone/ThirdParty/PJSIP/patches/sock_qos_darwin.patch
$ patch -p0 -i /path/to/Telephone/ThirdParty/PJSIP/patches/os_core_unix.patch
$ patch -p0 -i /path/to/Telephone/ThirdParty/PJSIP/patches/coreaudio_dev.patch

Build and install (remove --with-opus option if you don’t need Opus):

$ ./configure --prefix=/path/to/Telephone/ThirdParty/PJSIP --with-opus=/path/to/Telephone/ThirdParty/Opus --with-ssl=/path/to/Telephone/ThirdParty/LibreSSL --disable-video --disable-libyuv --disable-libwebrtc --host=arm-apple-darwin CFLAGS='-arch arm64 -arch x86_64 -Os -DNDEBUG -mmacosx-version-min=10.13' CXXFLAGS='-arch arm64 -arch x86_64 -Os -DNDEBUG -mmacosx-version-min=10.13'
$ make lib
$ make install

Build Telephone.

Contribution

For the legal reasons, pull requests are not accepted. Please feel free to share your thoughts and ideas by commenting on the issues.

telephone's People

Contributors

eofster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telephone's Issues

Registration being sent to Localhost

Hi, eofster,

Telephone is a great application, love your work!

I'm getting a very strange thing occurring where my registration requests appear to be sent from localhost (127.0.0.1). As a result, my PBX is telling me to go away. After closing and opening Telephone again, it seems to be working okay now. I'm not sure how to replicate the issue, but I do have a wired (Ethernet) and Wireless adapter - it's possible that they may be getting confused? Or possibly if my Mac has woken up from sleep/hibernation and Telephone is running, it may not have an interface up yet? See below for an excerpt from Telephone.log

== BEGIN LOG ==

--end msg--
 10:29:12.799   pjsua_core.c  TX 744 bytes Request msg REGISTER/cseq=55614 (tdta0x1010bc000) to UDP 172.23.4.2:5060:
REGISTER sip:172.23.4.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:55947;rport;branch=z9hG4bKPj.8ZPEgpNgbf8VifaldVQJ53i2EXJkF0c
Max-Forwards: 70
From: "Kane Rogers" <sip:[email protected]>;tag=33DXsxio38k06ynp18D3iYLsuaEp1crJ
To: "Kane Rogers" <sip:[email protected]>
Call-ID: r2Qz4gSwytHJNeckBkqR7.iNBhJX6slV
CSeq: 55614 REGISTER
User-Agent: Telephone 1.0.2
Contact: "Kane Rogers" <sip:[email protected]:55947;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="ext120", realm="voip.bluereef.com.au", nonce="aa37147fb1371db5673b491eaef8536c", uri="sip:172.23.4.2", response="5b0bbcb19fa1bdbd2e0b60a6596857b2", opaque="1314145751"
Content-Length:  0

--end msg--
10:29:12.815 pjsua_core.c RX 476 bytes Response msg 400/REGISTER/cseq=55614 (rdata0x10105de28) from UDP 172.23.4.2:5060:
SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 127.0.0.1:55947;rport=55947;received=172.23.10.46;branch=z9hG4bKPj.8ZPEgpNgbf8VifaldVQJ53i2EXJkF0c
To: "Kane Rogers" sip:[email protected]
From: "Kane Rogers" sip:[email protected];tag=33DXsxio38k06ynp18D3iYLsuaEp1crJ
CSeq: 55614 REGISTER
Call-ID: r2Qz4gSwytHJNeckBkqR7.iNBhJX6slV
Server: Epygi Quadro SIP User Agent/v5.2.47 (QUADROM-IPPBX)
Warning: 399 epygi_quadro_sip_ua "Quadro Internal Rejection"
Content-Length: 0

== END LOG ==

U-Law only

Hello.
Is it possible then how to limit the use of protocols ONLY u-law?
Thank you in advance for your reply.

Support full DTMF tone set

I have some equipment that is controlled by DTMF including A, B, C, and D.

Line 216 of Classes/ActiveCallViewController.m can be simply changed from:

    = [NSCharacterSet characterSetWithCharactersInString:@"0123456789*#"];

to

    = [NSCharacterSet characterSetWithCharactersInString:@"0123456789*#abcd"];

This should allow for sending of all DTMF tones. Thanks!

Problem on hold or transfer : impossible to talk again (loosing caller)

Hi,
Being with a French SIP provider (OVH -> http://www.ovh.com/fr/telephonie/) I encounter a problem of loosing the person that call me on Telephone.app.

Here is what I did :
Make a call to Telephone.app
Pick up on Telephone.app
Use Telephone.app to transfer the call to another number, wait until pick up before validating call transfer.

Called party don't hear the transferee but hear the Music on Hold.
Nothing more.

Is there a solution ?

Config : Mac OS 10.6.7, on Mac Pro 2x3 GHz Quad-Core intel Xeon, using Telephone.app version 1.0.2 (102)

Waiting for bluetooth headset when it's not being used

Application tries to open a bluetooth headset audio device even if the default sound IO is selected. OS shows several "Stop using headset" alerts to the users and the call fails. Some users reported that the whole computer freezes and they have to reboot.

Auto complete only works for whole numbers

would be nice if the auto completion of numbers would also work for parts of the numbers:

in Address Book: Foo Bar< +49 30 12345>

The above number will only appear if I type the number from the beginning eg. '+49' but not when i type "123".

Setting for custom caller ID.

My SIP provider does not (yet) offer a 'default caller ID' option on their service, however SIP should be able to accomodate setting a CID on each call. This should be a global preference, possibly with the awesome added feature of a drop-down of CIDs on the number entry window.

Improve ICE with NAT

ICE enabled in NAT environment = Symmetric NAT detected.
ICE disabled in NAT environment = no Symmetric NAT detected.

ICE enabled + NAT + Voipbuster = Call not estalished -> Timeout
ICE disabled + NAT + Voipbuster = Call established -> ok

Log is sent as e-mail message.

Audio Quality Problem

In many calls I get the other party complaining that the audio is jittered. I can hear them well. Since Telephone has little configuration (which I like) I don't know where to start looking (which I like less). My SIP provider tells me to use uLaw (G711a) for transport, which I can't verify.

Where can I start?

Compiling pjsip

I had some trouble compiling pjsip per the instructions in the README.

After trying about a hundred, there were two things that mattered to make it work:

  1. The repository URL for the pjproject SVN external "portaudio" has moved so when i tried to check out pjproject, it failed to instantiate that repository. I had to manually download it by cd'ing into the third_party directory and then doing
    svn co https://subversion.assembla.com/svn/portaudio/portaudio/trunk/ portaudio
  2. someone in the port audio project moved one of the source code files since the makefiles for pjproject were created so i had to modify the file pjproject/third_party/build/portaudio/src/pa_skeleton.c to the following:
    #include "../../../portaudio/src/hostapi/skeleton/pa_hostapi_skeleton.c"

after those two modifications i was able to compile.

Starting AppleScript/sh with incoming call

When incoming call occurs, let be started the Apple Script (or sh script?), which can be defined in the application settings. This will considerably enlarge the functionality of application during the integrating with the CRM systems.

Transmiting callerID into the script this is a good idea.

Answer process does not complete, so can't hang up

This problem occurs when receiving calls. There are some cases (when connecting from another network over a VPN, at least) where the connection works, the decline/answer box pops up, and the answer button can be clicked to start two way audio, where things don't work quite right.

Clicking the decline button works as expected.

Clicking the accept button does not work as expected. The call starts, and both sides can hear audio. However, the decline/answer button is still there, and the ring tone is still being played. The ring tone during the call is annoying, but the most inconvenient part is that the only way to hang up a call while the app is running is for the remote party to hang up. Pressing decline or closing the window both appear to hang up the call, but the remote party can still hear everything that is being said, with no indication of this on the local side. This is a little dangerous for anyone who has something bad to say about the other party after hanging up. The only way to stop audio is to close the program altogether.

Expected behavior would be for the answer button to switch to the "in call" mode, and allow the local party to hang up the call without the remote party continuing to hear.

Application crashes on startup

Still having the issue of the application crashing on startup (#15).
Using version 1.0.2 (102) with 1&1 Germany and DNS_SRV activated.
Crashing does not always occur, but quite often (I do not know how to reconstruct it)..
Would it help to send the crash report .log?

Apart from this I really enjoy Telephone!
Really great and perfectly minimalistic app, thanks for that!

Remove Address Book plug-ins

Writing to ~/Librady/Address Book Plug-Ins is not allowed in Mac App Store apps. Telephone must not install those plug-ins during start-up.

No Outbound Audio

Whenever I call someone or someone calls me, I can always hear the inbound audio but when I speak, my audio never makes it to the other end. I changed SIP providers just to be sure but that didn't solve the problem. When I tried changing soft-phones however, the problem went away. Tropo is handling the connection from the PSTN to the SIP provider and I've already run through with Tropo support and they say the problem is the handling of "packet size inflation." I'm not entirely sure what that means, but I've nearly exhausted their support staff trying to track down this issue. I thought I would give it a shot here and see if there's any insight into what may be causing this.

Feature Request: Use Global Address Book instead of only Local Address Book

Hi, first I would like to thank you for the awesome piece of software, it helps me every day.
Unfortunately I have all my contacts on an exchange server, so the numbers are not in the local address book. Could you implement either a selection of the phone book or just change it from local to global? Thanks a lot!

Feature Request: Add to Address Book

I get calls from People I don't have in the address book yet. Ideally, I could add those to the Address book somehow. Alternatively I'd like co copy the number out of the call window, so I can paste it somewhere else, including in the address book.

ZRTP Support

It would be great if Telephone had SIP-SSL/TLS and SRTP/ZRTP support. (As far as I know support is already existant in PJSIP)

Thanks :)

Transferring calls (Document / Extend)

Hi,

I found out that pressing the T key when calling allows transferring a call. I guess it would be advisable to add that as a Menu Item and/or as Command-T - Most users would not find it as it stands now.

Again, thanks for a great simple app.

NSMenu assertion after re-enabling account

  1. Several accounts are added, all of them disabled.
  2. Add new acount.
  3. Disable new account.
  4. Enable new account.

An assertion occurs:

24.04.11 22:23:47   Telephone[24350]    *** Assertion failure in -[NSMenu removeItem:], /SourceCache/AppKit/AppKit-1038.35/Menus.subproj/NSMenu.m:664
24.04.11 22:23:47   Telephone[24350]    Item to be removed is not in the menu in the first place

Also, when you try to delete the account, delete confirmation sheet doesn't go away.

Reconnect on Interface Change

Typically the SIP protocol looses contact (at least inbound) when the network changes. I usually restart Telephone when unplugging or after the computer comes out of sleep. But ideally, Telephone could register such events and reconnect.

Echo filtering

When you use telephone say on your iMac with loudspeakers caller hear some echo obviously his own voice which is irratable much.

so i suggest to introduce some filtering of input adiou stream to reduce this echo and probably other noises.

I think this at least echo could be implemented with some dsp filters.

Feature Request: Send Fax

Thanks for an awesome app!
Zoiper is able to send faxes in tiff format. Could telephone do it too?

SIP Registration Issue on Asterisk

Having an issue with Asterisk where the user will go 'offline' after some period of time (calling their extension will result in an unavailable message). Toggling the available / unavailable doesn't help. Quitting and restarting the app fixes the issue.

Config stuck trying bluetooth headset first causing calls to fail

I've been using Telephone for a couple of years successfully, however now there's a bug and I can't figure out how to clear it out.

I have a bluetooth headset that I occasionally use, however when the device isn't available I always get the "Bluetooth audio failed / Stop using headset" prompt several times with about 10-15 seconds delay between prompts.

I have checked all layers of audio config and they're correct:

  1. Within Telephone.app the Sound settings are set to Internal (Microphone|Speaker)
  2. In the System Preferences all settings are configured for Internal (Microphone|Speaker)
  3. All other apps function correctly and the problem is only isolated to Telephone.app

Enabling debugging I get the following in the logs corresponding to the problem:

11:14:02.293    pjsua_acc.c  Keep-alive timer started for acc 1, destination:w.x.y.z:5060, interval:15s
 11:14:23.074  pjsua_media.c  Opening sound device PCM@16000/1/20ms
 11:14:23.075  ec0x116b263f0  AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=20 ms
 11:14:32.483  pjsua_media.c  Opening sound device PCM@44100/1/20ms
 11:14:32.489  ec0x101b29fc0  AEC created, clock_rate=44100, channel=1, samples per frame=882, tail length=200 ms, latency=20 ms
 11:14:41.787  pjsua_media.c  Opening sound device PCM@48000/1/20ms
 11:14:41.789  ec0x116ba3b80  AEC created, clock_rate=48000, channel=1, samples per frame=960, tail length=200 ms, latency=20 ms
 11:14:51.787  pjsua_media.c  Opening sound device PCM@32000/1/20ms
 11:14:51.788  ec0x101aec8f0  AEC created, clock_rate=32000, channel=1, samples per frame=640, tail length=200 ms, latency=20 ms
 11:15:01.311  pjsua_media.c  Opening sound device PCM@16000/1/20ms
 11:15:01.312  ec0x116a05dd0  AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=20 ms
 11:15:11.348  pjsua_media.c  Opening sound device PCM@8000/1/20ms
 11:15:11.348  ec0x101b29fc0  AEC created, clock_rate=8000, channel=1, samples per frame=160, tail length=200 ms, latency=20 ms
 11:15:20.787  pjsua_media.c  Unable to open sound device: Internal PortAudio error [status=469985]
 11:15:20.788   pjsua_core.c  RX 548 bytes Request msg OPTIONS/cseq=102 (rdata0x1008c0628) from UDP 84.243.247.100:5060:

I was trying to find a way to delete all preferences and re-setup my accounts with the hope it may fix the problem but wasn't able to find the Telephone prefs in any path such as ~/Library/Application Support/

UPDATE: I found some config with defaults:
$ defaults read com.tlphn.Telephone
...
RingtoneOutput = "Built-in Output";
SoundInput = "Built-in Input";
SoundOutput = "Built-in Output";
...
}

Feature Request: Callto Links

Awesome little program, I love it (bought it with Appstore). I would love it to handle callto:// links like skype does.

Not responding to RTCP PINGs

When on long calls into my corporate provided SIP PBX, the call hangs up after half an hour. According to the administrator of our SIP servers, they send a RTCP PING every 5 minutes, and after not getting ping response after 6 tries, their gateway shuts the connection down.

So, please make Telephone.app respond to RTCP PINGs.

Thanks!

Additional codec support: Speex & CELT

Speex is a stupidly high-quality audio codec that is designed for compression of human speech and offers much greater sound quality (in both narrow and wide-band modes) than G.711 and the other SIP GSM codecs.

CELT is an ultra-low-delay codec that's so low-delay it allows musicians around the world to jam in real-time.

Both are patent-free, open-source codecs.

Move off deprecated HAL APIs

Telephone sources contain calls to functions that have been deprecated since Mac OS X 10.6. Since the release of Mac App Store version Telephone minimum deployment target is now 10.6, and we have to move to the new APIs.

List of deprecated functions used in Telephone sources:

  • AudioDeviceGetProperty()
  • AudioHardwareAddPropertyListener()
  • AudioHardwareGetPropertyInfo()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.