TUTORIAL Localphone configuration in PIAF

nlucier

New Member
Joined
Aug 5, 2008
Messages
28
Reaction score
1
EDIT, Working config for Localphone Inbound/Outbound via FreePBX:


First a quick blurb on how Localphone works their accounts.

Inside of your Localphone account you have a SIP ID that is linked to one or multiple DID numbers. That SIP ID is what you use in configuration for anywhere that you would normally put the actual DID number. By default all of your DIDs are linked to that single SIP ID and hence all of those DIDs will be seen by your switch as the same thing, but you can request them to be split off into their own SIP IDs. This is pretty much essential to do if you need DIDs to ring different extensions, with the exception of also tagging on incoming CID...but that's a singular case that I came up with and actually am using.

Here is how to configure a single SIP ID. For multiple SIP IDs just duplicate with different names (I just numbered them localphone1-inbound, localphone2-inbound).


Under Trunks, Add Trunk:
Trunk Description:
Code:
localphone-inbound

Trunk Name:
Code:
localphone-inbound

PEER Details:
Code:
type=friend
insecure=very
nat=no
canreinvite=no
authuser=[SIP ID]
username=[SIP ID]
fromuser=[SIP ID]
fromdomain=localphone.com
secret=[SIP Password]
host=localphone.com
dtmfmode=rfc2833
context=from-trunk
disallow=all
allow=ulaw
allow=alaw

Register String:
Code:
[SIP ID]:[SIP Password]@localphone.com/[SIP ID]


Under Trunks, Add Trunk again:
Trunk Description:
Code:
localphone-outbound

Trunk Name:
Code:
localphone-outbound

Dial Rules: (This is the setting for North America only, other locations edit for local prefix)
Code:
1+NXXNXXXXXX

PEER Details:
Code:
type=friend
insecure=very
nat=no
canreinvite=no
authuser=[SIP ID]
username=[SIP ID]
fromuser=[SIP ID]
fromdomain=localphone.com
secret=[SIP Password]
host=localphone.com
dtmfmode=rfc2833
context=from-trunk
disallow=all
allow=g729&ulaw&alaw


Under Inbound Routes, Add an Incoming Route:
Description:
Code:
Whatever suits your fancy
I made the descriptions:
Localphone [DID Number]

DID Number:

Destination:
Code:
The extension or whatever other destination that you want to receive calls via this DID


Under Outbound Routes, Add Route:
Route Name:
Code:
Whatever suits your fancy

Dial Patterns: (Again, North American patterns, edit for other locations...I happened to use the new feature in FreePBX 2.7 that allows Outbound Routes by Extension without needing to load additional modules)
1NXXNXXXXXX/8000
NXXNXXXXXX/8000

Trunk Sequence:
Code:
SIP/localphone-outbound


Position the new Outbound Route in the sequence that makes the most sense for your configuration. My sequence at this point is now:

Code:
Google Voice using 48+ dialing
Toll Free via ENUM
Toll Free via free toll free outbound
Localphone (only on distinct extensions via FreePBX 2.7 config)
Google Voice






ORIGINAL TEXT OF POST:
I'm going to blame the lateness of the hour, but I am having a heck of a time figuring out how to configure outbound using Localphone.

Using the Asterisk guide on their site at http://www.localphone.com/help/voip/devices/asterisk I was able to successfully set up inbound calling from multiple DID's via multiple SIP IDs (what you actually tag on for inbound routes) into multiple extensions.

What is hanging me up is trying to configure an outbound from one little tiny extension. I've even gone so far as to try to duplicate a working Vitelity outbound trunk using Localphone's info and all I get is a loop back to my PiaF box (or so it appears when looking at the 'CDR' on Localphone's portal).

For some reason I am under the impression that unlike Vitelity's config with both an inbound and outbound trunk, Localphone almost looks like it only uses a single trunk config, and I am not wrapping my head around that.


Anyone with a working Localphone outbound (or heck, just a "Hey stupid, do this") that can give me any hints on what it is that I need to do to get this working based on what is in their guide?
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
When trouble-shooting, it would help a reader by describing exactly what you *did*, as well as referring to a 'guide'.

If I follow the link you provided, it describes setting up your 'Localphone' configuration(s) manually for a pure Asterisk system. If you do have PBX-in-a-Flash, then why not spare yourself the grief and use FreePBX instead, to configure your Trunk and Inbound/Outbound Routes?
 

nlucier

New Member
Joined
Aug 5, 2008
Messages
28
Reaction score
1
When trouble-shooting, it would help a reader by describing exactly what you *did*, as well as referring to a 'guide'.

If I follow the link you provided, it describes setting up your 'Localphone' configuration(s) manually for a pure Asterisk system. If you do have PBX-in-a-Flash, then why not spare yourself the grief and use FreePBX instead, to configure your Trunk and Inbound/Outbound Routes?

I apologize. I thought that me using FreePBX was implied in that it's a PiaF system. I would LOVE to spare myself the grief, but I'm an idiot when it comes to converting pure Asterisk config files to how to enter them into FreePBX.

I did zero hand-editing of config files and used the Trunk & Inbound Routes GUI screens in FreePBX to successfully configure Inbound after a lot of me saying, "Huh?" and managed it thanks to comparing my Vitelity configs to the "guide".

It's in the Outbound that I am failing to get working.

In other words, I have no clue how to enter:

Code:
6. Create the Outgoing Context 
Now Asterisk is able to receive calls, we need to set it up to make outbound calls. To do this you need to create an outgoing context similar to [localphone-out] defined below. 

[localphone-out] 
exten => _9.,1,Dial(SIP/${EXTEN:1}@localphone-out,30,tr) 
exten => _9.,2,Playback(invalid) 
exten => _9.,3,Hangup

into my FreePBX GUI so that outbound calls work. If I just make an Outbound Route pointed at the same trunk I previously created, and that is working fine for inbound, I immediately get dropped with Congestion. I tried to make an outbound trunk using Vitelity as a template and that also failed, but this time it actually got back to localphone according to the call records, but immediately looped back to my PiaF system.

I guess when I get back home I will overload this thread with everything my PiaF box is spitting out.

I was hoping that somewhere in PiaF-land, someone had actually configured a Localphone inbound/outbound setup and could share.
 

Bitnetix

Guru
Joined
May 21, 2009
Messages
323
Reaction score
0
Just to be clear about something, PBS In a Flash is not FreePBX and vice versa. You can install FreePBX on any Asterisk installation, it just comes bundled with PIAF. So the assumption that you're using PIAF comes from the fact that you're posting in a PIAF forum, not that you're using FreePBX. At least, that's my assumption.

Anyway. Your solution is to hand edit /etc/asterisk/extensions_custom.conf and add the things that they told you to add. You can do this with the FreePBX admin interface and somewhere it lets you edit config files. Clumsy, but you don't have to know your way around Unix. If you do know your way around Unix, you can log in to the server and edit the file with vim, nano, or your favorite editor and do the same.

If you have further issues with how to do this, let me know and I can walk you through it.
 

nlucier

New Member
Joined
Aug 5, 2008
Messages
28
Reaction score
1
Just to be clear about something, PBS In a Flash is not FreePBX and vice versa. You can install FreePBX on any Asterisk installation, it just comes bundled with PIAF. So the assumption that you're using PIAF comes from the fact that you're posting in a PIAF forum, not that you're using FreePBX. At least, that's my assumption.

Or it could have been because I specifically said "My PiaF box" in my OP, albiet not in bold font or anything.

Regardless, I'm editing my OP with the finally working settings and will be sending them to Localphone to ask that they include them in the hardware configuration section alongside the vanilla Asterisk one. An email to them got me the answer even though the tech admitted that he hadn't actually seen FreePBX. His reply put me on the right track and outbound is now working.


EDIT: First post of thread now includes the step-by-step to configure Localphone Inbound/Outbound into FreePBX.
 

wpnsmith

New Member
Joined
Aug 23, 2014
Messages
10
Reaction score
0
Thanks so much for this! Even LocalPhone's tech support couldn't figure this out. They also obviously didn't add them to their device help pages, sigh.

FWIW: I add:

qualify=yes
auth=md5

to all my trunks for better security and connectivity status, but those are minor optimizations.

Also, I had to reboot (not just restart/reload Asterisk) in order to get everything to work perfectly, but that's probably just random FreePBX/Asterisk instability.

Many Thanks!
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
You did not mention outbound CID. By default, your localphone outbound calls will have a hidden caller id. But, on the portal you can make the caller id for outbound calls ANY number you have verified with their system -- their DID, or any other phone number you can verify. This is nice because I have DIDs from other providers, and use outbound from localphone, and want the caller id to be by DID from another provider. The USA Subscription feature allows a rate of $0.001/minute (5000 minutes for $5!)
 

wpnsmith

New Member
Joined
Aug 23, 2014
Messages
10
Reaction score
0
I'm able to set the outbound CID in the LocalPhone website, but not by using the CID functions of PIAF, so I can't have different handsets send different CID values, but must have all calls sent thru LocalPhone show the same CID.

Unless I'm missing something?

Thanks!
 

krakastan

Guru
Joined
Feb 20, 2008
Messages
135
Reaction score
22
last time i looked (a while ago!) ....
outbound CID is set by Localphone for each SipID and cannot be overridden by piaf
You can have multiple CID's in the locaphone account (must be 'verified numbers'); but only one active per SipID

To use PIAF to "set" CID either
1) use multiple Localphone accounts with separate piaf trunks/outbound routes
or
2) have multiple sip ids added to one localphone account, with a separate trunk/outbound route for each SipID
(Long time ago now but i think this was an email to localphone asking, then explaining why and how it was not for business use....)
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
That's right... if you want a bunch of outbound CIDs on localphone, you'll have to 1:1 trunk extensions to trunks, because you can't set caller id on localphone from your PIAF.
It's no big deal to have a bunch of outbound trunks to do this. If you want a bunch of internet accounts, just email localphone support. You can then set the caller id to any number
you can verify with LocalPhone.
 

Members online

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top