Go to freePBX à Trunks and create a SIP trunk.
Then trunk settings are:
-
General Setting
- Outbound Caller ID: "YOUR NAME" <YOUR NUMBER>. Type exactly with "" and <>
-
Outgoing Dial Rulles
- Dial Rules: I defined a simple rule XXXXXXXXX. In Portugal the common telephone numbers have 9 digits. This is only for a testing environment. In real world this has to be tuned.
-
Outgoing Settings
- Trunk Name: Netcall (or whatever you want)
-
Peer Details:
allow=peex&ulaw&alaw&g726&gsm
auth=YOURNUMBER:YOURPASSWORD@sip.netcall.pt
call-limit=10
canreinvite=no
disallow=all
dtmfmode=rfc2833
fromdomain=sip.netcall.pt
fromuser=YOURNUMBER
host=sip.netcall.pt
insecure=very
nat=never
qualify=no
secret=YOURPASSWORD
type=friend
username=YOURNUMBER
(YOURNUMBER is something like 351305XXXXXX)
-
Incoming Settings
- User Context: YOURNUMBER
-
User Details:
fromuser= YOURNUMBER
insecure=very
secret= YOURPASSWORD
type=user
username= YOURNUMBER
- User Context: YOURNUMBER
-
Registration
- Register String: YOURNUMBER:YOURPASSWORD@sip.netcall.pt
You also need to go to the sip.conf configuration file and change the context from "from-sip-external" to "from-trunk".