Teliax configs

Hey all, I recently signed up for teliax service. I think I have everything configured right, but when I dial the number I get this:

[quote][Feb 27 15:43:53] NOTICE[30148]: chan_iax2.c:7332 socket_process: Rejected connect attempt from 63.211.239.14, who was trying to reach ‘1234567890@’
[/quote]Which I assume means it’s trying to deliver the call to an unknown context, or it’s not even trying to find the context.

My iax.conf looks like this:[quote][general]
allow=all
register=>:@den.teliax.net

[teliax]
context=default
allow=all
canreinvite=no
host=den.teliax.net
nat=yes
qualify=yes
secret=
type=friend
username=
auth=md5[/quote]

My extensions.conf looks like this: [quote][general]

[globals]

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()
exten => 1234567890,1,NoOp( “Hi there” )
exten => 1234567890,n,Answer()
exten => 1234567890,n,Hangup()[/quote]

( obviously the numbers have been changed to protect the innocent ).

I’ve been tearing my hair out for a couple days fighting with this, and having no luck. Any help would be greatly apprecaited.

From first looks, your general section has no context.

Ian

[quote=“ianplain”]From first looks, your general section has no context.

Ian[/quote]I’m not quite sure I understand what you mean. As I understand it, the [general] stanza should not have any contexts.

K, figured it out. The trick to getting this was to switch to SIP and see the error messages. In short, the stanza in iax.conf needs to be your account name, NOT teliax as the documentation indicates. Below is a guide I wrote for teliax, hopefully they’ll put it up.


How to configure your teliax account with Asterisk using IAX2

For this we will assume you have already signed up with teliax and have your account and password. For the purposes of this document, we will assume the following settings ( as available from the dashboard ):

Account name: Saitek
Password: Eclipse2
Proxy: den.teliax.net
Phone number: 1234567890

  1. Setup the register string in iax.conf.

  2. Next, we setup the stanza in iax.conf.

[Saitek] disallow=all allow=ulaw context=default ; could be anything, for the purposes of this exercise it's this type=friend auth=md5 host=den.teliax.net canreinvite=no qualify=yes ; I like to have this on for debugging purposes secret=Eclipse2 username=Saitek

  1. Finally, we setup the context in extensions.conf.

[default] exten => 1234567890,1,NoOp("Hi There") exten => 1234567890,n,Answer() exten => 1234567890,n,Hangup()

With this done, reload your asterisk server. You should be receiving phone calls without a problem now. To make phone calls, simply use the following in extensions.conf

exten => _XXXXXXX,1,NoOp() exten => _XXXXXXX,n,Dial(IAX2/Saitek:Eclipse2@den.teliax.net/${AREACODE}${EXTEN})
( Please note the above example is only to highlight the syntax used in the dialing plan for the IAX2 account information, and not to be used as a guide for your overall dialing plan. That subject is outside the scope of this document. For further reference, please see: voip-info.org/tiki-index.php … sions.conf )

This document was written 02/27/2008 and should not be considered authoritive on this subject, as future changes to asterisk or teliax could render the document’s information irrelevant.

Hi

Glad you sorted it, But by adding a context to the general section it secures the system also you should add a guest account and lock that to a “dead” context, as to the peer name I had assumed that was a change you had made as the peer is normally the account name as that’s what it will match on.

As it stands I can fire a iax call at your server and call anything in the default context and this is not good. Its good practice to have something like context=iax_in here and allow that do do very limited things and use Gotos to send calls to their destinations.

Excellent point; I usually do sort everyone into their own context, then give permissions as the need arises.

I must admit, I’m still not clear by what you mean by adding a context to the general section. Mind providing a config example?

Good point on the guest account as well.

[general]
disallow=all
disallow=all
allow=alaw
allow=ulaw
register=>:@den.teliax.net
context=inbound-iax

[guest]
type=user
context=dead
callerid=“Guest IAX User”

[Saitek]
context=inbound-iax
disallow=all
allow=alaw
allow=ulaw
canreinvite=no
host=den.teliax.net
qualify=yes
secret=
type=friend
username=
auth=md5

ah, gotcha. In iax.conf, not extensions.conf.

Thanks for the info!