Upgrade 3CX to v18 and get it hosted free!

Pilmo

Author image

Using the Pilmo Gold service with Asterisk

In this example setup I’ll describe two things:
– how to connect Asterisk to the Pilmo Gold service
– how to configure Asterisk and iptables to be able to use their locked Voicefinder ATA
I’ve personally combined the two to allow incoming calls from Pilmo, while using cheaper providers for my outgoing calls.

In the examples 192.168.1.3 is the Voicefinder and 192.168.1.2 is the Asterisk server.

sip.conf

[general]
context=default
port=38383
bindaddr=0.0.0.0
srvlookup=no
nat=no

;this registers with pilmo so we can receive calls
register => 31201234567:yourpilmopassord@sip.ritstele.com:38383

;allow incoming calls from pilmo
[212.26.192.155:38383]
type=user
insecure=yes
context=incoming
disallow=all
allow=g729
;allow incoming calls from pilmo2/bbned
[212.26.192.153:38383]
type=user
insecure=yes
context=incoming
disallow=all
allow=g729

;outgoing calls to pilmo
[pilmo]
type=peer
user=phone
usereqphone=yes
username=31201234567
secret=yourpilmopassword
insecure=yes
fromdomain=sip.ritstele.com
host=sip.ritstele.com
fromuser=31201234567
port=38383
disallow=all
allow=g729
dtmfmode=rfc2833

The above will let you use Asterisk with Pilmo. If you don’t have a voip phone to use with Asterisk we’ll have to do some magic to be able to use the Voicefinder.

Adding the section below to your sip.conf will allow the Voicefinder to register with Asterisk:

;let the voicefinder register with asterisk
[31201234567]
type=friend
secret=yourpilmopassword
defaultip=192.168.1.3
host=dynamic
dtmfmode=rfc2833
username=31201234567@sip.ritstele.com
disallow=all
allow=g729
nat=yes
canreinvite=no

The Voicefinder will try to connect to sip.ritstele.com. There are few ways to solve this. You could configure the Voicefinder to use a custom DNS server where you override the sip.ritstele.com hostname (make sure your Asterisk server can still find the real host).
In my setup I redirected the Voicefinder traffic using iptables:

  1. CATCH VOICEFINDER

/sbin/iptables -t nat -A PREROUTING -i eth1 -d 212.26.192.155 -j DNAT –to-destination 192.168.1.2
/sbin/iptables -t nat -A POSTROUTING -o eth1 -d 192.168.1.3 -j SNAT –to-source 212.26.192.155

Finally, the Voicefinder reformats the number you’re dialing into international format. Keep this in mind when creating your dialplan. E.g. if you dial 1234567 the Voicefinder will tell Asterisk you’re dialing 31201234567 (assuming you’re Pilmo account is in areacode 020).


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.
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.