Skip to main content

Modify dialplan

Posted by diffen on Wed, 08/18/2010

Hello

Erik will probably kill me with this question but i have two extensions that i have registered on a second asterisk that are only connected to our Thirdlane MTE.

The problem is that if i have two register => account information@thirlaneip/local extension, i can only call the first registered number. If i call the second number i get a mismatch that looks like this:

[Aug 16 00:09:29] WARNING[27233]: chan_sip.c:12673 check_auth: username mismatch, have <1000>, digest has <1001>

I have done some reading and discussed this issue with other people and they say that i should only have one register => info line in the sip.conf of the second asterisk and then in the thirdlane box do a Dial(SIP/peername/1000).

My problem is that i dont know where to put that information. I have looked in the extension.include and so on but i cant find a good spot to do the changes.

Anyone have any good ideas?


Submitted by eeman on Wed, 08/18/2010 Permalink

lets rewind for a second...

what are you ultimately trying to accomplish.. are you trying to deliver service to another asterisk server?

Submitted by diffen on Wed, 08/18/2010 Permalink

We basically just want to redirect traffic from a couple of extensions to another asterisk server that we have only connected to our thirdlane server.

it will just be incoming calls that will be redirected and the second asterisk server will not be able to dial out at all.

PSTN -> Thirdlane -> Asterisk

So on the second asterisk i created a extension that i registered on the thirdlane server. Works great and the calls flows like hell :)

The problems occurs when we want to setup a second extension on the second asterisk. Then i get the [Aug 16 00:09:29] WARNING[27233]: chan_sip.c:12673 check_auth: username mismatch, have <1000>, digest has <1001> warnings.

Submitted by eeman on Wed, 08/18/2010 Permalink

thats not how I would have done it. The reason you're having a problem btw is because multiple registrations are coming in for the same ip/port combination. If you are wanting to connect the two PBX's where some extension patterns are on the other PBX, dont think in terms of user extensions, think in terms of connecting a trunk.

on TL create a trunk thats only usable by the one tenant and set its context to from-inside-tenantname instead of from-outside. Then go into your outbound routes and set up a pattern or specific extension, ex.

_12[34] would send extensions 123 and 124 (i tend to separate them by placeholder, 100s at this pbx, 200s at this pbx etc so my patterns are more like _2XX)

use the script tl-dialout-1-trunk-passthrough

on the other machine set up a trunk back to your MTE box using the credentials of the trunk you created on MTE. then you can create dialing patterns on that machine to specify what patterns use that trunk such as _1XX or in this example

_1[0-1]X
_12[0-2]
_12[5-9]
_1[3-9]X

as you can see why its simply easier to use placeholders as your divider maybe just the _19X block gets sent to the new box and _1[0-8]X stays on MTE.

Submitted by diffen on Thu, 08/19/2010 Permalink

Hello Erik,

I have done the trunk and the second asterisk connects to it and it shows OK in the PBX information page of TL.

I have also setup two extensions on the TL and I have done the outbound route ( I did the 1901 extension number there just to be safe for now).

My question is: should the extension on the second asterisk register on the TL extensions? If so, how will that be done?

Submitted by eeman on Thu, 08/19/2010 Permalink

no, its just a remote TN, regardless of length.. so dont think of it as an extension for a handset, because it isnt until it reaches the remote PBX. Until then its just a dialplan destination number just like any other number.