Elastix Asterisk 笔记

公司使用Asterisk系统2年, 其中有一些配置, 这里做个笔记.

Untitled picture

IAX2 Trunk (two PBX connects each other)

PBX1(ningbo)

Trunk Name: beijing

Peer Details:

type=friend
trunk=yes
secret=***secret***
host=[beijing office IP]
context=from-internal
qualify=yes

UserContext: ningbo

type=user
secret=***secret***
context=from-internal
qualify=yes

PBX2(beijing)

Trunk Name: ningbo

Peer Details:

type=friend
trunk=yes
secret=***secret***
host=[ningbo office IP]
context=from-internal
qualify=yes

UserContext: beijing

type=user
secret=***secret***
context=from-internal
qualify=yes

Don’t forget also set the outbound routes.

Connect with XunShi VOIP gateway

SIP Trunk(outgoing)

Trunk Name same as Outgoing settings Trunk name,

canreinvite=no
content=from-pstn
host=[XunShi IP PBX IP Address]
insecure=no
port=5060
type=friend
disallow=all
allow=g729&alaw&ulaw

SIP Trunk Incoming

Trunk Name same as Outgoing settings Trunk name,

context=from-pstn
host=dynamic
qualify=yes
secret=***secret***
type=peer
username=[username on XunShi IP PBX]

This incoming settings should have multi-incomings.

 

CID Lookup Source

Set url in CallerID Loogup Sources section.

e.g. Query should be something like clickedNumber=[NUMBER]&source=Ningbo&Type=PBX

And return the caller name only with text.

Then set the source name in Inbound Routers, CID Lookup Source section.

Asterisk Debugging:

Type Asterisk –vvvvvvvvr to see the real time debugging messages.

In Asterisk CLI, type iax2 show peers to see the trunk status of each PBX.

Reset Elastix Web Interface Password:

/usr/bin/sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password = ‘`echo -n superman|md5sum|cut -d ‘ ‘ -f 1`’ WHERE name = ‘admin’"