[HELP] How do I connect to a SIP trunk that requires ext

Hi,

*1.4 and *-GUI are great…

I am confused about what goes where in 1.4 with the GUI. I have to somehow get sip.conf entries registered with the gui.

I have to register with my VSP as:

register => 123456:password@registrar.voip.co.uk/123456

to get an incoming DID of 123456

Looking at sip.conf, I have to pass in an extension.

So… in users.conf, I guessed that hasexten=123456 would do the trick.

But it doesn’t seem to.

How do I get the GUI to do a register => user:pass@registrar/user?

If I put register => line into sip.conf, Iget 2 registrations. Should I add all the trunk parameters into sip.conf? Or should I do something else?

I cannot seem to get the GUI to continue working if I modify sip.conf by hand.

Is this a bug or do I just not understand the GUI yet?

Thanks,

  • David

I have 2 incoming phone numbers and accounts with the same VSP

number1 --> account1
number2 --> account2

I have to register (under 1.2) as:
username1:pass1@registrar.voip.co.uk/username1
and
username2:passs2@registrar.voip.co.uk/username2

username1 and username2 come through to Asterisk 1.2 as DIDs

I can then set up:
DID1 --> Ext1
DID2 --> Ext2

If I register in the GUI, my VSP reports s@:5060 on both accounts so makes it impossible to route incoming calls - everything goes to the same extension (not sure why the GUI actually chose ext2).

Is there a new way to do it on 1.4?

Has this basically changed from 1.2?

The new syntax for

in sip.conf

register => 123456:password@registrar.voip.co.uk/654321

is

in users.conf

[mytrunkname]
secret = password
md5secret =
provider =
trunkstyle = customvoip
username = 123456
trunkname = my DID trunk
callerid =
hasexten = no
hassip = yes
hasiax = no
registeriax =
registersip = yes
host = registrar.voip.co.uk
dialformat = ${EXTEN:1}
context = from-outside
group =
insecure = invite
contact = 654321
fromuser = 123456
fromdomain = registrar.voip.co.uk

The old syntax may be represented as
register => username:secret@registrar.voip.co.uk/contact

This is not true. If you will not use contact parameter in the example above all your calls will come to magic s extension. Then you will be able to do the necessary analisys in your dialplan (extensions.conf) and route the calls to the right direction.

Hi Andrew,

Thanks for that nugget… I am registering properly at my VSP now, after 12 hours of fiddling and installing from scratch again cos I messed all sorts up :smiley:

Is there a guide somewhere of how users.conf converts its info to the other conf files?

Incoming call rules still only called ext2 (I have no idea why, all the contexts looked good), so I am deleting all service providers, incoming calls and dial plans to see if it will come to life that way… If not, I guess rebuild from scratch again.

(If I hand code in extensions.conf, the GUI breaks again, doesn’t it?)

  • David

In fact all the users/peers definitions may be moved to users.conf, but this is not a strong requirement. Personally I decided to keep the permanent part of my system’s configuration in sip.conf and variable part of it in users.conf

The sample users.conf may be found at {your Asterisk source directory}/configs/users.conf.sample

Yes, it’s not well documented, but you can find a lot of useful information on voip-info.org and of course here.

I’ve tried the GUI a few times but finally decided to use plain text configuration.

If you have problems with 2 DIDs from the same provider please see discussion here forums.digium.com/viewtopic.php?t=15791

Hi,

I am still not getting calls routed properly.

I want:
479015 --> DID_trunk_1 --> Ext 6001 (Zap/1)
858643 --> DID_trunk_2 --> Ext 6003 (Zap/3)

But both inbound SIPs call ext 6003. The console shows calls coming in on two different SIPs, but both going to DID_trunk_2. What else do I need to tell 1.4?

This should be really easy…

Any ideas? If I miss the obvious, sorry, but I have been sat here for 14 hours now trying to get Ext1 to ring on phone number 1 and Ext2 to ring on phone number 2… No lunch, no coffee, no dinner :cry:

Reinstall again?

The AsteriskGUI has done these entries.

In [color=red]users.conf[/color], I have:

[trunk_1]
disallow =
allow = all
callerid =
contact = 479015
context = DID_trunk_1
dialformat = ${EXTEN:1}
fromdomain = proxy.voip.co.uk
fromuser = 479015
group =
hasexten = no
hasiax = no
hassip = yes
host = proxy.voip.co.uk
insecure = very
port = 5060
provider =
registeriax = no
registersip = yes
secret = ******
trunkname = Custom - Personal
trunkstyle = customvoip
username = 479015

[trunk_2]
disallow =
allow = all
callerid =
contact = 858643
context = DID_trunk_2
dialformat = ${EXTEN:1}
fromdomain = proxy.voip.co.uk
fromuser = 858643
group =
hasexten = no
hasiax = no
hassip = yes
host = proxy.voip.co.uk
insecure = very
port = 5060
provider =
registeriax = no
registersip = yes
secret = ******
trunkname = Custom - Business
trunkstyle = customvoip
username = 858643

In [color=red]extensions.conf[/color]
trunk_1 = SIP/trunk_1
trunk_2 = SIP/trunk_2


[DID_trunk_1]
include = default
exten = _X.,1,Goto(default|6001|1)
exten = s,1,Goto(default|6001|1)

[DID_trunk_2]
include = default
exten = _X.,1,Goto(default|6003|1)
exten = s,1,Goto(default|6003|1)

Console output
Call 1 on DID_trunk_2

– Executing [858643@DID_trunk_2:1] Goto(“SIP/858643-081f03e8”, “default|6003|1”) in new stack
– Goto (default,6003,1)
– Executing [6003@default:1] Macro(“SIP/858643-081f03e8”, “stdexten|6003|SIP/6003&IAX2/6003&Zap/3”) in new stack
– Executing [s@macro-stdexten:1] Dial(“SIP/858643-081f03e8”, “SIP/6003&IAX2/6003&Zap/3|20”) in new stack
[Jun 6 21:15:54] WARNING[5579]: app_dial.c:1106 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
[Jun 6 21:15:54] WARNING[5579]: app_dial.c:1106 dial_exec_full: Unable to create channel of type ‘IAX2’ (cause 3 - No route to destination)
– Called 3
– Zap/3-1 is ringing
– Zap/3-1 is ringing
– Zap/3-1 is ringing
– Hungup ‘Zap/3-1’
== Spawn extension (macro-stdexten, s, 1) exited non-zero on ‘SIP/858643-081f03e8’ in macro ‘stdexten’
== Spawn extension (macro-stdexten, s, 1) exited non-zero on ‘SIP/858643-081f03e8’

Call 2 really on DID_trunk_1, Asterisk is picking it up on trunk_2
– Executing [479015@DID_trunk_2:1] Goto(“SIP/858643-081f03e8”, “default|6003|1”) in new stack
– Goto (default,6003,1)
– Executing [6003@default:1] Macro(“SIP/858643-081f03e8”, “stdexten|6003|SIP/6003&IAX2/6003&Zap/3”) in new stack
– Executing [s@macro-stdexten:1] Dial(“SIP/858643-081f03e8”, “SIP/6003&IAX2/6003&Zap/3|20”) in new stack
[Jun 6 21:16:15] WARNING[5586]: app_dial.c:1106 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
[Jun 6 21:16:15] WARNING[5586]: app_dial.c:1106 dial_exec_full: Unable to create channel of type ‘IAX2’ (cause 3 - No route to destination)
– Called 3
– Zap/3-1 is ringing
– Zap/3-1 is ringing
– Hungup ‘Zap/3-1’
== Spawn extension (macro-stdexten, s, 1) exited non-zero on ‘SIP/858643-081f03e8’ in macro ‘stdexten’
== Spawn extension (macro-stdexten, s, 1) exited non-zero on ‘SIP/858643-081f03e8’

contact = should be extension number you want the call to route to, i.e. 6001 & 6003 respectively. Please check my 1st example - username and contact are shown different.

Or, as I initially sad, just remove the contact= statement and do some analysys in extensions.conf on calls coming to s extension.

That doesn’t work…

My VSP is now trying to send calls to sip:6001@:5060… All I now get is a number unobtainable tone.

Please bear with me… I have only upgraded to 1.4 24 hours ago. God knows how many calls I have missed today…

Initial testing is:

479015@voip.co.uk --> Ext 6001
858643@voip.co.uk --> Ext 6003

If I even can’t do that, then I am going to have real problems with all the IVRs and stuff I have to do. (Only reason I upgraded to 1.4 was to get the Zaptel drivers working (nearly) properly).

  • David

if you have something like this

contact = 6001
context = DID_trunk_1

then make sure that that extension is reachable from DID_trunk_1 context.
Or we may simplify that for you. Just keep the username in users.conf as you did before: contact=479015 and contact=858643 and put all the trunks to the same context context = DID_trunk

then edit your extensions.conf:

[DID_trunk]

exten = 479015,1,Goto(default|6001|1)
exten = 858643,1,Goto(default|6003|1)

This was working without a problem on 1.2, just finding the DID and pushing it off to the right destination.

I realised the hard way today that 1.4 really is a 2.0 and I have to re-learn everything.

This is a really simple thing that I need to prove to start with and after 14 hours, I would really have expected a full system up, running and live!

I have a customer that needs this and is fed up with Zaptel issues on TrixBox 2.2 with Zaptel 1.2 (no incoming callerid, apalling startup errors). Can I somehow get Zaptel 1.4 working on Asterisk 1.2?

If I don’t use the GUI, can I program all the confs as in 1.2 and wait for freePBX to catch up?

The GUI isn’t great as I only have 1 browser (Camino on Mac OSX) out of 7 browsers, the others are Firefox - on Mac, Linux and Windoze - IE & Safari , on 3 OSs that will even work with it… Client side javascript processing went out with the ark, didn’t it?

  • David

Hi Andrew,

The stuff in users.conf was done by the GUI, not by me.

I am so confused…

479015 --> Ext1
858643 --> Ext2

It really should be so easy. Doesn’t everyone need this basic functionality?

I know I’m not stupid, I have been working with Asterisk for a few months, linux, web technology and VoIP for well over a decade now, following 15 years working with 3GLs and OOP. This really is beyond me.

  • David

It is easy.
Create 2 registrations as described earlier.
You will see this on VSP side:
479015@:5060
858643@:5060

then configure the simple call routing:
exten = 479015,1,Goto(default|6001|1)
exten = 858643,1,Goto(default|6003|1)

that should be easy from the GUI

Ok…

But that is not possible in the GUI. It ONLY does what I posted earlier. Add ‘incoming calls’ does not have any parameters you can tweak, even on the svn I downloaded today.

It seems like the GUI cannot handle 2 inbound SIPs if they require an extension (DID processing in 1.2).

If I need to stay with 1.4 because of the apalling Zaptel drivers in 1.2, I lose web front end. Is that right? That’s going to be a hard sell tomorrow morning! My client really like freePBX and the power it gave them without having to call me in.

In 1.4 does sip.conf and extensions.conf have the same purpose as 1.2? What role does users.conf have if there is no GUI… can I just delete it?

BTW, what does the GUI do with configurations you enter. I cannot find them anywhere (except users.conf)

  • David

It’s now 11pm, I have been at this without a break since 8am.

Asterisk 1.4 doesn’t seem to cut the mustard. No docs, no examples, no support.

I will recommend to my client to go back to BT and get a proper PBX (£87,000, btw - that’s $174,000) or try to stick with trixbox 2.2/Asterisk 1.2 for a few more months until 1.4 matures. (God help anyone that goes for 1.6).

I know *NOW is still in beta, but if Digium are serious about VoIP they need to get their drivers right in 1.2 before anything else. 1.4 obviously isn’t ready for production with or without the GUI. I have yet to see a Digium card that has ever been ready for production - I will never buy another.

I am going back to ATAs for my quite simple 2 line phone VoIP system here… my customers? Stick with BT for all your 100 line call centre requirements. Digium are not ready for you…

A terrible endictment on what Linus Torvalds started. Digium seem to have hijacked it.

Over and out.

There is no solution…