Configurar conta VIP SIP no Elastix (Asterisk)

1 – Configurar ips e rotas estáticas, conforme fornecimento embratel

vi /etc/sysconfig/network-scripts/ifcfg-[interface]

vi /etc/sysconfig/network-scripts/route-[interface]

 

2 – Configurar Trunk SIP no Elastix

Trunk Name: [Descrição do tronco]

Outbound Caller ID: <[DDD+numero_tronco_chave]>

Outgoing Settings:

Trunk Name: EMBT-[DDD+numero_tronco_chave]

PEER Details:

type=peer
context=from-pstn
host=[Servidor de registro]
qualify=5000
disallow=all
allow=g729&alaw&ulaw
canreinvite=no
dtmfmode=rfc2833
insecure=port,invite
fromuser=[4 ultimos digitos do tronco chave]
fromdomain=[IP da interface externa]

3 – Confirmar se o tronco está ok

asterisk -vgcr

sip show peers

Deve aparecer OK ao final a linha com o tronco configurado.

Obs:

Não esquecer de configurar rotas de entrada e saída.

 

 

 

Asterisk Speech

http://zaf.github.io/asterisk-mstts/

 

http://msdn.microsoft.com/library/azure/gg193416.aspx

 

http://forums.asterisk.org/viewtopic.php?f=14&t=78176

HowTo: Elastix DAHDI Trunk Routing with DID

HowTo: Elastix DAHDI Trunk Routing with DID

If you have multiple FXO (PSTN) lines into your PBX, it is always nice to be able to route these in-bound calls based on the physical line they arrive upon.  Getting this working with DAHDI in Elastix has been driving me up the wall!

 

This issue has been bugging me for over a week now and I have finally got it to work.  I have two trunks connected via FXO modules on a TDM400 card, but I could not get the DID working with them (CLI with BT sorted).  But once Asterisk had the call, I could not make Asterisk make a decision with call based on which number/line the caller called.  Not the number the caller is calling from, this is CLI or CID, but the number they dialled to make your line ‘ring’.

Asterisk was either saying there was no route and answering the call to say the number you have called is not in service, or just handling the 2 lines in the same way – i.e. it could not tell them apart.  Here I detail my findings so you can process lines automatically.

I had most of the configuration right, but I had to hand edit another configuration file to actually to get the changes made via the web interface actually working.  Trying to find this last little bit of information on the forums has been maddening to say the least.

Changing the route

First you need to correct the router handler, by changing a setting in a configuration file.  There is no graphical interface for this I’m afraid and it is the only file you need to manually edit by a suitable means.

The default setting in this configuration file is ‘from-pstn’ and this needs to be changed to ‘from-zaptel’.  You need to edit:

/etc/asterisk/dahdi-channels.conf

You need to find the correct section for your line connection.  For me this was lines 3 & 4.  Below is the example original settings for my channel 3:

;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default

And you need to edit this for each channel to become like this:

;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 3
callerid=
group=
context=default

Then save the file back and restart Asterisk.

Marking the Channel DID

The next stage is to assign DID numbers to these channels so a decision can be made on how to process the call based on line ID.

Elastix does not have an interface to the required facility, so you need to un-embed the FreePBX console, details are here.

Once in the FreePBX console, you need to choose ‘ZAP Channel DIDs’ from the menu on the left.  You should get a screen similar to:

ZAP DIDs

ZAP DIDs

It is quite simple to complete, needing only 3 bits of information:

  • Channel – The DAHDI channel you are assigning the DID to.
  • Description – Your description for this allocation.  I would suggest an name and a summary of the DID you will be allocating.
  • DID: The DID number need to call to make this channel ‘ring’.

An example UK configuration might look like this for channel 3, used to be routed (Inbound Routes) to the sales department for the number: 01234-123456:

ZAP DID Sample

ZAP DID Sample

Once completed, you can click ‘Submit Changes’.  You need to repeat this for each FXO port you have for inbound calls.

You can then save the changes back and configure the ‘Inbound Routes’ to actually ‘route’ the calls where you want them.

You can actually use almost any number in the DID, but I suggest you use the full number, including the STD, in case you have any ‘out of area’ number.  And it generally reduces confusion in the future.