Koozali.org: home of the SME Server

Multiple DID numbers on an IAX trunk

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Multiple DID numbers on an IAX trunk
« on: February 05, 2008, 03:27:55 AM »
Hi there,

This question is mainly aimed at selintra, but anyone else please feel free to help out.

Yesterday I took the punt and installed a new SME 7.3 box with SAIL 2.2.1-589. I have been running an Asterisk box on SME v6 for a number of years now. However it was time to upgrade the SME box to 7 and I thought I would have a look at SAIL.

I am having troubles with a VSP I use here in Australia. The VSP is Simtex (www.simtex.com.au) who provide a very good service with good prices and excellent technical support. However they don't know about SAIL.

I added them as a carrier like so:

Carrier Name: Simtex
Technology: IAX2
Type: VOIP
Description: AUS carrier Simtex
Host URL: sip.simtex.net.au
Registration Template (Optional): username:password@sip.simtex.net.au

The USER and PEER templates are normal.

BTW please add them to the list of carriers. If you are in Australia or looking for an Australian DID I would recommend them.

Now Simtex assign you an account number and password which you can use to log in to administer your account. They suggest the following configuration for IAX.conf:

Code: [Select]
[76320610]
type=friend
host=dynamic
secret=XXXX
context=76320610

And the following change to EXTENSIONS.conf:

Code: [Select]
[76320610]
exten => 61864248280,1,Wait(1)()
exten => 61864248280,2,NoOp()
exten => 61864248280,3,Dial(SIP/76320610,45)
exten => 61864248280,4,Hangup()

exten => 61864248281,1,Wait(1)()
exten => 61864248281,2,NoOp()
exten => 61864248281,3,Dial(SIP/76320610,45)
exten => 61864248281,4,Hangup()
exten => _X.,1,Dial(IAX2/76320610:XXXX@sip.simtex.net.au/BYEXTENSION)

This example has my actual account number and DID numbers. Though to tell the truth I have not used their system in my old Asterisk box.

My question is how do I best set up SAIL to accept multiple DID numbers from one VSP account/trunk? It is possible of course that I have got the whole thing confused and should be setting it up another way entirely and if thats the case I'm sure I'm about to be told I'm a dunce!

Thanks!

adam
...

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Multiple DID numbers on an IAX trunk
« Reply #1 on: February 05, 2008, 06:34:37 AM »
Quote
...if thats the case I'm sure I'm about to be told I'm a dunce!

The only dunces 'round here are the ones who don't ask questions.  :-)

Code: [Select]
exten => 61864248281,3,Dial(SIP/76320610,45)
exten => 61864248281,4,Hangup()
exten => _X.,1,Dial(IAX2/76320610:XXXX@sip.simtex.net.au/BYEXTENSION)

We didn't understand this because it seems to mix SIP and IAX2 references and we don't know why.  For example why does an IAX dial reference a sip. uri?  Not important really, just puzzled.  Anyway... to your question.   

The Selintra database is keyed on the telephone number (DiD), not the acount number.  So...  you can create multiple trunk instances (with different DiDs) each using the same account.  We do this at Selintra for IAX2 with the UK carrier Telappliant (voiptalk)... 

Code: [Select]
DID Number or IP Name:  01924918076
Peer Stanza Label:  Telappliant1
Hostname or IP Address:  iax2.voiptalk.org
Username :  fred
Password :  fredspasswd


Code: [Select]
DID Number or IP Name:  01924442873
Peer Stanza Label:  Telappliant2
Hostname or IP Address:  iax2.voiptalk.org
Username :  fred
Password :  fredspasswd


...the only things that change are the DiD and the Stanza name.  Also, you won't need to register from the second and subsequent trunks ('cos the first one will already have done that for you). 

Finally, you can ignore the exensions.conf stuff.  The SAIL HSE will synthesise that for you "on the fly" in real time (the only place you'll ever see it is on the console log when the dial is actually issued to Asterisk).

:-)

Hope this helps

Kind Regards

Selintra

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Multiple DID numbers on an IAX trunk
« Reply #2 on: February 05, 2008, 07:38:00 AM »
We didn't understand this because it seems to mix SIP and IAX2 references and we don't know why.  For example why does an IAX dial reference a sip. uri?  Not important really, just puzzled.  Anyway... to your question.   

Good point, it is a bit mixed up. Not a good example - just copied it straight from the support page on my account.

The Selintra database is keyed on the telephone number (DiD), not the acount number.  So...  you can create multiple trunk instances (with different DiDs) each using the same account.  We do this at Selintra for IAX2 with the UK carrier Telappliant (voiptalk)... 

Thank you for your help. This does answer my question.

BUT (you knew that was coming), I'm still having troubles. I used your above examples (not quoted) which allow me to make outbound calls  after I have set up a route but I cannot get incoming calls.

I get the following error message in the Asterisk console:

   Rejected connect attempt from 203.30.19.164, who is trying to reach '64248214@'

On top of this when I click back on the Trunklines panel 4 out of 5 trunklines I just added have the red cross icon but when I click on them it all seems to be fine???

All up though I must say I am enjoying using SAIL. Perhaps not as pretty as Asterisk Now or other GUI based interfaces for Asterisk but it has more flexibility - it is a good balance between a standard command-based UI and a graphical UI. Other than this issue it has been very easy to set up and port my old settings across.

I haven't yet delved into porting my macro's or menus over but that should be no problem.

Adam
...

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Multiple DID numbers on an IAX trunk
« Reply #3 on: February 05, 2008, 08:41:18 AM »

Code: [Select]
Rejected connect attempt from 203.30.19.164, who is trying to reach '64248214@'

They are delivering against 64248214.  From your initial example, you have coded your DiD as 61864248214.  I would delete the trunk and redefine it as 64248214.

The red cross is a bug and it can be ignored.  It is fixed in -589.

Quote
...Perhaps not as pretty as Asterisk Now or other GUI based interfaces

We agree, SAIL is definitely at the "dirty fingernail" end of the gui spectrum.  Unfortunately, we can only stretch the SME server-manager look and feel so far without making it look disjointed.  We'd like to build a nice ajax interface but it would look a bit odd against the rest of the server-manager.  As an exercise in PBX Telephony tho', its usually a lot easier to deploy than it's "pretty GUI" competitors.

Kind Regards

Selintra

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Multiple DID numbers on an IAX trunk
« Reply #4 on: February 05, 2008, 08:50:42 AM »
Code: [Select]
Rejected connect attempt from 203.30.19.164, who is trying to reach '64248214@'

They are delivering against 64248214.  From your initial example, you have coded your DiD as 61864248214.  I would delete the trunk and redefine it as 64248214.

OK fixed, but I am still getting the same error. Simtex should be sending the full telephone number with country and area code but for some reason they are not.

The red cross is a bug and it can be ignored.  It is fixed in -589.

I have -589!!! (Don't you hate that as a developer!)

We agree, SAIL is definitely at the "dirty fingernail" end of the gui spectrum.  Unfortunately, we can only stretch the SME server-manager look and feel so far without making it look disjointed.  We'd like to build a nice ajax interface but it would look a bit odd against the rest of the server-manager.  As an exercise in PBX Telephony tho', its usually a lot easier to deploy than it's "pretty GUI" competitors.

Yeah that would be great but yeah the SME Server Manager interface is limited. I was just thinking yesterday it would be great if you could just have sub-menus to group all the items together in a smarter way up under SAIL PBX but you can't even do that.

BTW I saw one of your earlier posts about extension numbers. Traditionally all my extensions are 1xx, 2xx, 3xx or 4xx with groups being 5xx. So I just prefixed them all with 5 and created aliases. However is there any clashes in that range?

Cheers,

adam
...

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Multiple DID numbers on an IAX trunk
« Reply #5 on: February 05, 2008, 08:58:43 PM »
you sure you have -589?  It works fine here.

what does "iax2 show peers" give you?

No clashes that we know about on your 5 prefix.  Did you use autoalias to build the aliases?

Best

S


Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Multiple DID numbers on an IAX trunk
« Reply #6 on: February 06, 2008, 02:23:25 AM »
you sure you have -589?  It works fine here.

Yup:
Version: sail-2.2.1-589

Sorry bout that - I know the frustration - "but it works fine here!!!!"

BTW the system is 7.3.1 fully yummed - just made sure of that.

what does "iax2 show peers" give you?


Name/Username    Host                 Mask             Port          Status
USin/xxx         74.133.188.89   (S)  255.255.255.255  4569          OK (305 ms)
TravelIQ/763206  203.30.19.164   (S)  255.255.255.255  4569          OK (14 ms)
MediaIQ/7632061  203.30.19.164   (S)  255.255.255.255  4569          OK (17 ms)
Direct/76247228  203.30.19.164   (S)  255.255.255.255  4569          OK (18 ms)
Home_Private/90  203.30.19.164   (S)  255.255.255.255  4569          OK (18 ms)
Home_Public/704  203.30.19.164   (S)  255.255.255.255  4569          OK (19 ms)
6 iax2 peers [6 online, 0 offline, 0 unmonitored]


No clashes that we know about on your 5 prefix.  Did you use autoalias to build the aliases?

Sorry, I meant is there clashes in the alias ranges 100-499?

Cheers,

Adam


« Last Edit: February 06, 2008, 02:25:34 AM by madadam »
...

Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Multiple DID numbers on an IAX trunk
« Reply #7 on: February 06, 2008, 05:18:42 AM »
No clashes that we know about on your 5 prefix.  Did you use autoalias to build the aliases?

In the features.conf I found the following:

parkpos=>101-104

This obviously clashes with my aliases 5101->101. How can I change the parking numbers?

Adam
...

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Multiple DID numbers on an IAX trunk
« Reply #8 on: February 06, 2008, 09:35:41 AM »
parkpos=> something else?

(you might want to check conferences as well).

:-)


Offline madadam

  • *
  • 149
  • +0/-0
    • http://www.extremetourist.com
Re: Multiple DID numbers on an IAX trunk
« Reply #9 on: February 06, 2008, 10:22:24 AM »
parkpos=> something else?

(you might want to check conferences as well).

:-)

If I use the General Edit panel I cannot save it. Looking at the template it is drawn from the database in an iteration so I am not sure if I should make a custom template which will then mean two values for the same key.

BTW besides the bug in the trunklines icons I am still not able to receive calls. Can make outbound calls OK but they're not coming in. This is a big problem. I am now also starting to have problems with macros (just can't do them easily or apply them to events using SAIL). I am also coming across other shortcomings in the menu system but perhaps I don't understand it.

Cheers,

Adam
...

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Multiple DID numbers on an IAX trunk
« Reply #10 on: February 06, 2008, 10:48:28 AM »
Update parking lots in headers=>features.conf
Update conferences in headers=>meetme.conf

admin guide at http://selintra.com/docs

Bug is display only (and we still can't replicate).  It has nothing to do with how the IAX trunk is working (or not).  If you can send calls then the basic trunk is working correctly.  If you aren't receiving calls then you have specified something incorrectly.  From the error messages you provided before there was a number mismatch between what you were expecting and what your carrier was delivering.  For a complete analysis, send the file /home/e-smith/db/selintra to admin@selintra.com.

What macros do you want/need to run?  SAIL is quite different architecturally to freePBX et al in that it doesn't generate masses of extensions.conf code.  It doesn't use Macros at all, instead it uses raw C helper tasks to do what Macros usually do in Asterisk.    This is quite deliberate and the reason why SAIL is an order of magnitude faster and more efficient than it's peers.   You can run your own code fragments in custom apps but the chances are that SAIL already has the functionality you seek. If you can describe your macros then maybe we can help. 

You mention other shortcomings.  If you let us know what they are then, again, maybe we can help address them for you.

Kind Regards

S