SpacePhone Configuration

Any ENUM-capable PBX can make use of the SpacePhone telephone network, examples are provided below.

Asterisk

Add this to your (internal) context(s):

exten => _X.,1,NoOp("Space phone call to ${EXTEN}")
exten => _X.,2,Set(sipcount=${ENUMLOOKUP(${EXTEN},sip,c,,e164.spacephone.org)})
exten => _X.,3,Set(counter=0)
exten => _X.,4,GotoIf($["${counter}"<"${sipcount}"]?5:7)
exten => _X.,5,Dial(SIP/${ENUMLOOKUP(${EXTEN},sip,,${counter},e164.spacephone.org)})
exten => _X.,6,GotoIf($["${counter}"<"${sipcount}"]?5:7)
exten => _X.,7,NoOp("No valid entries in e164.spacephone.org for ${EXTEN}")

Asterisk, using Asterisk Extension Language (AEL)

Add this to your (internal) context(s):

_X. => {
    NoOp("Space phone call to ${EXTEN}");
    sipcount=${ENUMLOOKUP(${EXTEN},sip,c,,e164.spacephone.org)};
    counter=0;
    if (${counter} < ${sipcount}) {
        while (${counter} < ${sipcount}) {
            Dial(SIP/${ENUMLOOKUP(${EXTEN},sip,,${counter},e164.spacephone.org)});
            counter=${counter}+1;
        }
    } else {
        NoOp("No valid entries in e164.spacephone.org for ${EXTEN}");
        Dial(DAHDI/g1/${EXTEN});
    }
};

FreeSWITCH

Add this to your default dialplan:

<extension name="SpacePhone ENUM">
    <condition field="destination_number" expression="^(\+31|0031|0)(9799\d\d)(\d*)$">
        <action application="set" data="continue_on_fail=true"/>
        <action application="enum" data="sip:+31$2 e164.spacephone.org"/>
        <action application="bridge" data="${enum_auto_route}"/>
        <action application="playback" data="tone_stream://%(330,15,950);%(330,15,1400);%(330,1000,1800);loops=2"/>
        <action application="playback" data="ivr/ivr-unallocated_number.wav"/>
        <action application="playback" data="tone_stream://%(330,15,950);%(330,15,1400);%(330,1000,1800);loops=2"/>
    </condition>
</extension>

Yate

Note: untested.

in yate.conf, enable ENUM

[modules]
enumroute.yate=yes

enumroute.conf:

[general]
priority=20
domains=e164.spacephone.org,e164.arpa
redirect=false
[protocols]
sip=yes
pstn=yes
tel=yes