problem with initial SIP trunk config

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

problem with initial SIP trunk config

Postby nicmac » Sat Jan 24, 2009 10:27 am

Hello,

I searched the forums and wiki and I think my issue is so newb and general that it cannot be found easily.

I have just installed the most current vicidialnow build. Everything installed fine and I ran a yum update, etc.

I have used asterisk 1.4 and Elastix 1.4, but I have never used asterisk 1.2.x so I am not familiar with how to configure my SIP trunk settings and/or inbound/outbound routes through the conf files directly. I followed directions in the astGUIclient scratch install walkthrough for setting up a SIP trunk and phone. I'm using x-lite, which connects fine to the extension I tested, but I can't make outgoing calls.

Here is what I put in my sip.conf with user and pass edited out:

[general]
port = 5060
bindaddr = 0.0.0.0
context = default
; register SIP account on remote machine if using SIP trunks
register => user:pass<at>packet8<dot>net
;
; setup account for SIP trunking:
[packet8]
host=packet<dot>net
insecure=very
username=user
secret=pass
type=peer
dtmfmode=rfc2833
allow=ulaw
allow=g729

====

These are the trunk settings that were provided to me, and I used them fine in Elastix. Is the "register =>" imperative? I'm not really sure what would go here specifi to my provider, packet8. Is this something they could possibly clarify? I get a registration error in the CLI:


Connected to Asterisk 1.2.27 currently running on vici (pid = 4200)
Verbosity is at least 5
-- Remote UNIX connection
Jan 24 10:01:15 NOTICE[4300]: chan_sip.c:5534 sip_reg_timeout: -- Registration for '*****@<at>packet8<dot>net' timed out, trying again (Attempt #78)

====
I don't get any other CLI errors when I try to dial, for instance.


Here are my extensions.conf settings:

[globals]
packet8=SIP/user:pass<at>packet8<dot>net ;

[packet 8]

exten => user,1,Dial(SIP/extension)
exten => _0[1-9].,1,Dial(SIP/packet8/${EXTEN})
exten => _00[1-9].,1,Dial(SIP/packet8/${EXTEN})

=======

I have no idea what I'm doing here really. I followed some examples I found in other places.

What am I missing here? Is there a place that inbound/outbound routes need to be configured? Is there any other documentation that I can look at regarding a SIP setup?

Thanks!
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby mflorell » Sat Jan 24, 2009 7:50 pm

As stated in the REQUIREMENTS doc you need the 'o' flag on your Dial string.
mflorell
Site Admin
 
Posts: 18406
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby nicmac » Sun Jan 25, 2009 8:54 am

Thank you for the reply.

This is what I played around with in my extensions.conf

[globals]
packet8=SIP/user:pass<at>packet8<dot>net ;


[packet 8]

;exten => 0854000177,1,Dial(SIP/extension)
;exten => _0[1-9].,1,Dial(SIP/packet8/${EXTEN},o)
;exten => _00[1-9].,1,Dial(SIP/packet8/${EXTEN},o)

; dial a long distance outbound number through a SIP provider
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,2,Dial(sip/${EXTEN:1}@packet8,55,o)
exten => _91NXXNXXXXXX,3,Hangup

=====

Neither one of those configurations seemed to work, including the one that I commented to try the other. I'm still getting the registration error in the CLI as well...

Jan 25 08:46:16 NOTICE[13466]: chan_sip.c:5534 sip_reg_timeout: -- Registration for '***@packet8<dot>net' timed out, trying again )

====
Again, my sip.conf looks like...

[general]
port = 5060
bindaddr = 0.0.0.0
context = default
; register SIP account on remote machine if using SIP trunks
register => user:pass<at>packet8<dot>net
;
; setup account for SIP trunking:
[packet8]
host=packet<dot>net
insecure=very
username=user
secret=pass
type=peer
dtmfmode=rfc2833
allow=ulaw
allow=g729

====


Thanks.
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby mflorell » Sun Jan 25, 2009 11:12 am

Does packet8 allow you to register?
mflorell
Site Admin
 
Posts: 18406
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby nicmac » Sun Jan 25, 2009 11:19 am

I'm not sure about that. Is being able to register imperative to get outbound calling to work?

My Elastix install is working fine, which uses asterisk 1.4.x and a web GUI for configuration. The sip.conf has all these includes in it. I checked all the includes referenced but none seem to contain anything regarding registering. I can find one that shows the trunk login info and the extension user accounts, but that's about it.

The Elastix extensions.conf file doesn't look anything like the vicidialnow one either. It's got a lot of extension information but I can't see where a sip trunk is defined or extensions that appear to be for outbound.
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby gardo » Sun Jan 25, 2009 4:26 pm

Try dialing a phone number (91NXXNXXXXXX) and see the output on the Asterisk CLI. If you don't have the registration string on your Elastix web gui, then it's most probably not required by your carrier.

Try checking sip_custom.conf or sip_additional.conf for the SIP info on your Elastix box.
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004

Postby nicmac » Sun Jan 25, 2009 6:14 pm

Ok, I got this when I dialed a 10 digit number starting with "91" from my softphone. Does asterisk/freePBX require a 9 to be dialed? I've never seen that before. When I take the 9 out of extensions.conf and the dialed number nothing logs in the CLI when it fails. Also, I must mention that I'm testing this using WMWare and the most current vicidialnow build, if that matters.

==========

Connected to Asterisk 1.2.27 currently running on vici (pid = 13414)
Verbosity is at least 5
-- Remote UNIX connection
-- Executing AGI("SIP/cc100-0a1699c0", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing Dial("SIP/cc100-0a1699c0", "Zap/g2/14072121474||To") in new stack
Jan 25 18:03:54 NOTICE[20906]: app_dial.c:1076 dial_exec_full: Unable to create channel of type 'Zap' (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("SIP/cc100-0a1699c0", "") in new stack
== Spawn extension (default, 914072121474, 3) exited non-zero on 'SIP/cc100-0a1699c0'
-- Executing DeadAGI("SIP/cc100-0a1699c0", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----CHANUNAVAIL----------") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0
Jan 25 18:04:02 NOTICE[13466]: chan_sip.c:5534 sip_reg_timeout: -- Registration for 'edited out' timed out, trying again (Attempt #187)
vici*CLI>
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby williamconley » Mon Jan 26, 2009 12:00 am

If you have FreePBX installed and you dial out directly from your softphone, the call will not likely go through "default" which is where your vicidial dial plan is. It will go through the freepbx dial plan instead, which is normally set to go outbound through 'Zap'. Thus:

Unable to create channel of type 'Zap'

which does not belong anywhere in your dialplan unless you are dialing out through a digium board.

"Zap/g2/14072121474||To

Is where your problem originated. Since you have indicated you are trying to dial out through an SIP account, go into "outbound routes" in freepbx and change the outbound route to the sip trunk you have created in freepbx and that will send the call through the sip trunk instead of the zap trunk.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20444
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

Postby nicmac » Mon Jan 26, 2009 12:43 am

Ok, sorry, I actually don't have freePBX involved here. I didn't understand the separation of it and Asterisk until now.

Do I need to install freePBX to resolve this issue, or is there another way to fix the outbound route? I had a feeling this was the issue, as it is the only step that I use in Elastix that I did not see a parallel to.
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby nicmac » Mon Jan 26, 2009 4:10 pm

I played around with my settings some and I'm now getting...

-- Executing AGI("SIP/cc100-082d6128", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing Dial("SIP/cc100-082d6128", "/14072121474||To") in new stack
Jan 26 16:03:22 WARNING[22608]: channel.c:2621 ast_request: No channel type registered for ''
Jan 26 16:03:22 NOTICE[22608]: app_dial.c:1076 dial_exec_full: Unable to create channel of type '' (cause 66 - Channel not implemented)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("SIP/cc100-082d6128", "") in new stack
== Spawn extension (default, 914072121474, 3) exited non-zero on 'SIP/cc100-082d6128'
-- Executing DeadAGI("SIP/cc100-082d6128", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----66-----CHANUNAVAIL----------") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0


Clearly my trunk is not being referenced somewhere. Can someone please show me a sample of extensions.conf [globals] and their SIP outbound extension strings? I'm sure my sip.conf is setup right now, there is no registration needed, I just need to know how to setup extensions.conf correctly.

What are the exact settings for a SIP trunk under [globals] and how is that referenced in the exten => for normal outbound calling?

Thanks!
nicmac
 
Posts: 6
Joined: Fri Jan 23, 2009 10:54 am

Postby williamconley » Mon Feb 09, 2009 12:02 am

the best sample is in the scratch install and vicidialnow install. if you still have those files.

do not make your own. use what is there and just replace your credentials in the files. if you've alread made modifications, put back the old files. it will be much easier.

but:
CONSOLE=Console/dsp ; Console interface for demo
TRUNKX=IAX2/VPStr


; dial 9 service
; dial a long distance outbound number
; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls,
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,tTo)
exten => _91NXXNXXXXXX,3,Hangup



iax.conf sample
[VPStr]
username=xxxx
type=peer
secret=xxxx
qualify=500
host=xxxx
disallow=all
context=default
auth=xxx
allow=xxxx



the only actual changes you should be making are the IAX2/VPStr should be replaced by your actual trunk (which may be SIP instead of IAX2) and the contents of the iax.conf or sip.conf which will likely be supplied by your provider. They may have requirements (setting callerid, etc), but be careful NOT to change the dial plan entries without making sure that you don't hammer the callerid:name and keep everything else that is already there.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20444
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 76 guests