# Use LIPHONE
###### tags: `Tag(CallerID Project)`
## Get software
* [Download](https://new.linphone.org/technical-corner/linphone?qt-technical_corner=2#qt-technical_corner)
## Connect to our VoIP server
* We have two accounts: 9001@51.195.255.98, pwd: 9001 and 9002@51.195.255.98 pwd: 9002 (Follow the link provided [here](https://hackmd.io/fHz-dUudR3irmX44PhLHRA) for creating the accounts on Asterisk)
* The default port for SIP signalling is 5060
## Peer-to-peer mode
- No server address is required.
- The format of sip uri in the p2p mode is like sip:<unique name>. No "@" follows the unique name.
- Sip client will create a default account based on the inputted username and the IP address of the device. This account will not be registered to any server.
- Try to call the other party with his sip uri.
- SW -- The mobile version of the Linphone will not display the default sip uri on the interface. It can not receive the call under p2p mode, but still can inital the call to reach the other peer. It turns out that Linphone listens to a random port for the incoming call (This is the same as in PjSIPGO). The random port is reported to the server during registeration phase so the server-client mode could receive the incoming call. But P2P mode doesn't have account registeration. One sulotion is that we explictly set the listening port in the Linphone code (for example upd: 5060, tcp:5062). Another solution is to instal a system monitor App to find out which port has been open for the incoming call, and attaching that port to your sip uri.
* FH -- Tried P2P on two laptops. Works. Video works as well. However, couldn't get the app on iPhone to work in P2P.
## Build Linphone
* Follow [Building the app](https://gitlab.linphone.org/BC/public/linphone-iphone) (However, 'sudo gem install cocoapods' doesn't wok for me. Instead, I installed cocoapds using 'brew install cocoapods')
* Install xcode
* Open linphone.xcworkspace with xcode (couldn't run initially, but the following [solution](https://stackoverflow.com/questions/55558984/xcode-pods-projectname-debug-xcconfig-unable-to-open-file-wrong-directory) works )
* Close Xcode,
* run on terminal "pod install"
* open xcode
* clean build folder and run again
* Able to launch simulator!