Asterisk VOIP Homeserver configuration

This document describes the configuration information of Asterisk VOIP server set up in late 2000’s using Linux .

Dynamic DNS configuration

  1. Create an account and register a hostname for your asterisk server in

dyndns.org for your server. prabuanand.dyndns.org. username = prabuanand password = axxxxxxx

  1. download ddclient from dyndns.org itself or from any other site.

  2. Follow the instructions given in the README.

  3. The sample config file /etc/ddclient/ddclient.conf

daemon=600                  # check every 600 seconds

syslog=yes                  # log update msgs to syslog

cache=/tmp/ddclient/cache

mail-failure=kprabuanand@gmail.com # Mail failed updates to user

pid=/var/run/ddclient.pid   # record PID in file.

use=web, web=checkip.dyndns.com/, web-skip=‘IP Address’

login=prabuanand

password=xxxxxxxxxx

protocol=dyndns2

server=members.dyndns.org

wildcard=YES

prabuanand.dyndns.org

Sipura 3102

http://spa3000.0moola.com/ ↗ - a sample working configuration for India

Sipura dial plan

A general Sipura dial plan looks like (assume the numbers are subscripts)

(<a1:b1>c1<:@gwX1>|<a2:b2>c2<:@gwX2>|…)

<a:b> is basically a substitution syntax for stuff dialed at the beginning of the dial plan. OPTIONAL

Some examples include:

<8:1415> Replace a dialed “8” with “1415” (e.g. if user dials 84286511, we send 14154286511).

<:1415> Insert a “1415” into the number dialed

<9,:> When a 9 is dialed, present a second dialtone. The “9” is not sent.

<9:> If an initial 9 is dialed, don’t send it.

c is a string of characters that restricts what digits can be dialed. THIS IS REQUIRED

These characters can be:

means the star (asterisk) key

x means a single digit (0 through 9)

[x-y] means any digits x through y.

[xy] means the digits x and y (can put any number of digits here)

. means repeat the previously listed digit type zero or more times. For example x. means “zero or more digits,” xx. means “one or more digits.”

S0 is usually used at the end of a dial plan string that says “immediately dial when matched.” Used for things like 911.

! is used at the end of the dial plan and it means “immediately reject the number dialed.” Used to block, say, 900 numbers.

A few examples:

[2-9]xxxxxx matches typical 7-digit dialing in the US.

011xx. matches North American style International dialing (011 followed by one or more digits)

[49]11S0 matches either 411 or 911 and immediately dials (doesn’t wait for digit timeout)

<:@gwX> is specific to the SPA3000 and means “dial out this gateway.” OPTIONAL

This is specific to the SPA3000 and is optional. Basically it means “if you match the dial plan listed, dial out this gateway.” If nothing is specified in this part of the SPA-3000 dial plan on line 1, dial out via the VoIP provider defined on Line 1. The gateways are defined in the Gateway Accounts section of the Line 1 tab. gw0 is special and means “dial out the PSTN port.”

gwX can also be replaced by a list of parameters that represent what’s listed in the Gateway Accounts section. See the SPA Users Guide for more details.

Examples

Now for an example from the SPA3000 configuration Wizard, which uses most of these items

([2-79]11<:@gw0>|xx.|*xx.|**xx.|<#1,:>xx.<:@gw1>|<#9,:>xx .<:@gw0>|<#9,:>*xx<:@gw0>)

This breaks down as follows:

211, 311, 411, 511, 611, 711, and 911 are routed out the PSTN Line

(gw0).

An arbitrary number of digits, which will be routed out the Line 1

VoIP Provider configuration;

dial * then dial one or more digits (routed out Line 1 VoIP Provider);

dial ** then dial one or more digits (routed out Line 1 VoIP

Provider);

dial #1 then dial one or more digits (routed out Gateway 1 Provider

(gw1));

dial #9 then dial one or more digits (routed out PSTN Line);

Dial #9* then two digits (routed out PSTN Line, i.e. for star codes).

Hopefully that’s clear enough, but let me know if I’m missing something.

The dialplan configuration is a combination of possible number dialing, separated by “|”. Here are some examples:

    * [2-9]xx xxxx 7-digit local number (cannot start with 0 or 1)

      1 xxx xxx xxxx US long distance, 1 + area code + local number

      011 xxxxxx x. US international + 6 or more digits

      <:1408> [2-9]xx xxxx adds “1408” to the 7 digit number that you dial

      <111:1002@10.10.10.2:5060> pressing 111, will dial the following IP address.

(*xx|611S0|<00:>1[2-9]xx[2-9]xxxxxxS0|<00:>[2-9]xxxxxx.)  for India

Remote Management

india settings

  1. FXO Port Impedence - 220+820||120nF

  2. Tip/Ring Voltage Adust - 3.1V

  3. On hook speed - 26 ms (Australia)

  4. Line in Use voltage - 48

  5. Disconnect Tone - 425@-30,425@-30;1(.75/.75/1+2) - MTNL

India BSNL: 400@-30,400@-30;10(.8/.8/1+2)

I use 8080, it works great for port forward. Many ISPs in India don’t let port 5060 through.Try changing the port to 5080 - it at least works with Asterisk!It may work with fwd.

Acceptance tone : 400@-19;10(1./4./1)

Busy tone : 400@-19;10(0.75/0.75/1)

Conjestion tone : 400@-19;10(0.25/0.25/1)

Dial tone : 400@-19,25@-19;10(*/0/1+2)

Special dial tone : 400@-19;10(2.8/0.2/1)

Holding tone : 400@-19;10(0.25/0.25/1,/0.25/3.25/1)

Intrusion tone : 400@-19;10(0.15/4.85/1)

Refusal tone : 400@-19;10(0.25/0.25/1)

Ringing tone-I (local calls) : 400@-19,25@-19;10(0.4/0.2/1+2,0.4/2.0/1+2)

Ringing tone-II (NSD/ISD calls) : 400@-19,25@-19;20(1.0/2.0/1+2)

Route tone : 400@-19;10(0.1/0.9/1)

Call waiting tone : 400@-19;10(0.2/0.1/1,0.2/7.5/1)

The correct tones for MTNL India are -

Dial tone : 400@-10,375@-10;10(*/0/1+2)

Busy tone : 400@-19,400@-10;10(.75/.75/1+2)

Reorder Tone : 400@-10,400@-10;10(.75/.75/1+2)

Disconnect tone : 400@-10,400@-10;10(.75/.75/1+2)

Ringback tone : 400@-10,375@-10;*(.5/.25/1+2,0/2/0,.5/.25/1+2)

PSTN-VOIP selective call forwarding without ringing FXS port

I was able to achieve selective forwarding from PSTN line to VOIP line without ringing the FXS port and let other calls ring analog phone attached to FXS port. Depending on the requirement of yours, you may tweak the settings.

Here are the settings….

PSTN-To-VoIP Gateway Enable: YES

PSTN Ring Thru Line 1: YES (This should not matter, but if and when the caller ID detection fails, then the call will be router to FXS port)

PSTN Caller Auth Method: none

PSTN CID For VoIP CID: no (I have set it ’no’, bcos I am using Broadvoice service, which does not support CALLER ID spoofing. If your network does support CALLER ID spoofing, then you may set to yes and add some prefix if your want!)

PSTN CID Number Prefix: (BLANK)

PSTN Caller Default DP: 1

PSTN Caller ID Pattern: (BLANK)

PSTN Access List: (BLANK)

VoIP Answer Delay: 0

PSTN Answer Delay: 0 (everybody says that it should set to atleast 4 secs to decode the caller ID, for me it is decoding with 0. You may want to change if it doesn’t work for you)

UNDER Dial Plans

Dial Plan 1: (S0<:12345678@127.0.0.1:5060>) or S0<:127.0.0.1:5060>

{assuming 12345678 is the ‘User ID’ under ‘Line 1’ tab}

UNDER PSTN User

Cfwd Sel1 Caller: <PSTN caller ID> Cfwd Sel1 Dest: <VOIP number or some gateway, gw1, gw2,…>

same for other selective call forwardings.

To give a short explanation of whats happening. All PSTN calls are given access to VOIP, does not ring the FXS port at all, bcos “PSTN Answer Delay: 0”. At this point certain PSTN callers listed under the PSTN User tab for selective call forwarding are filtered and forwarded to certain VOIP numbers. Rest of them are uses Dial Plan 1, which is (S0<:12345678@127.0.0.1:5060>). This makes to calls to ring back the FXS port. The limitation is only 8 PSTN numbers can be forwarded to VOIP.

So now, you can forward certain PSTN calls to VOIP without ring the phone attached to SPA and rest of them to phone attached to SPA.

Off Hook While Calling VoIP: Yes   [if the SPA is not the first device in your house at the main phone socket]

Good luck,

Partha

http://forum.voxilla.com/linksys-sipura-voip-support-forum/pstn-voip-selective-call-forwarding-without-ringing-fxs-port-20155.html#post97281 ↗

spa3000 & PSTN to SPA gain / SPA to PSTN gain question?

Assumptions:

I am using the phone connected to the SPA3000 FXS port.

A CO POTS line is connected to the FXO PSTN port.

Setting I:

Regional: Miscellaneous: FXS Port Input Gain: -3

Adjusts levels going in to the network.

My “Mouth” Level

How loud I sound to them

Q1. Does this affect just Line 1, or PSTN too?

Setting II:

Regional: Miscellaneous: FXS Port Output Gain: -3

Adjusts levels coming from the network.

My “Ear” Level

How loud they sound to me

Q2. Does this affect just Line 1, or PSTN too?

Setting III:

PSTN Line: International Control: SPA To PSTN Gain: -3

Adjusts levels going out from the SPA to the PSTN

FXO to FXS gain.

How loud I sound to them when the call is on the PSTN line.

Setting IV:

PSTN Line: International Control: PSTN To SPA Gain: 5

Adjusts levels coming in from the PSTN to the SPA

FXO to FXS gain.

How loud they sound to me when the call is on the PSTN line.

I would like to reinforce the order in which you make your adjustments. First, you should make all adjustments to Line 1 while making calls to (and/or from) your Line 1 service provider. This is because Line 1’s settings are used for both Line 1 calls and Line 1-to-PSTN Line (@gw0) calls.

Once you have Line 1 sounding the way you want, then you can begin making and taking @gw0 calls to adjust the PSTN Line (FXO) gain settings. Don’t make more adjustments to Line 1, as this will unbalance what you just did above.

Linux wireless router

http://www.ralinktech.com/ralink/Home/Support/Linux.html ↗ - Driver for DWL-122

/ http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html ↗ - General Information /

http://oob.freeshell.org/nzwireless/LWAP-HOWTO.html ↗ - How To

[[ http://oob.freeshell.org/nzwireless/LWAP-HOWTO.html ↗ ][]]

http://www.dijitanix.com/index.php?option=com_content&view=article&id=2&Itemid=2 ↗

Cafeclub  - Internet cafe software

X-Lite Advanced Settings menu

***7469

To fix one-directional audio issues, bring up the advanced settings window, Filter for honor

Double click on the honor entry and change the value to 1

Linux: How to clear the cache from memory

To free pagecache, dentries and inodes:

sync; echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation, and dirty objects are not freeable, the user should run “sync” first in order to make sure all cached objects are freed.


© Prabu Anand K 2020-2026