Newbie help me please

OK here’s the setup…

Running Fedora Core 7 on a Dell Precision 420 Workstation, Asterisk build 1.2.23 loaded with all the proper requisites (libpri, zaptel, mpg)

We have a commercial carrier (Verizon) which we’ll be bringing in 4 phone lines into the server via 4 FXO cards (X100P), and we have 1 Linksys SIP1001 box to connect our in-house phone to. So incoming calls come in on the commercial lines, are processing on the server, and either routed to a) the in-house technician b) the on-site technicians cell phone or c) voicemail

Now…here’s our dilemma…We can get Asterisk to pick up an incoming call, utilizing the demo setup…however we haven’t figured out how to initiate a new call.

zaptel.conf reads as follows (without all the comments)

loadzone=us defaultzone=us fxsks=1,2,3,4

zapata.conf reads as follows (without all the comments)

[code][trunkgroups]

[channels]
context=demo
switchtype=national
signalling=fxs_ks
rxwink=300
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
mailbox=1101
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
immediate=no
callerid=6182032222
channel => 1,2,3,4[/code]

sip.conf (without all the comments)

[code][general]
context=default
bindport=5060
bindaddr=0.0.0.0
dtmfmode = rfc2833

[authentication]

[1101]
context=local
type=friend
username=1101
secret=woot
host=192.168.0.224
canreinvite=yes
qualify=yes
mailbox=1101
[/code]

and here, is our extensions.conf file…in its entirety…WHAT do we have to do to be able to dial out ?

[code];
[general]
static=yes

writeprotect=no

autofallthrough=yes

clearglobalvars=no

priorityjumping=no

[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=Zap/g2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)

[dundi-e164-canonical]

[dundi-e164-customers]

[dundi-e164-via-pstn]

[dundi-e164-local]

include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn

[dundi-e164-switch]

switch => DUNDi/e164

[dundi-e164-lookup]

include => dundi-e164-local
include => dundi-e164-switch

[macro-dundi-e164]

exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup

[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)

[iaxprovider]

[trunkint]

exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})

[trunkld]

exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})

[trunklocal]

exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})

[trunktollfree]

exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})

[international]

ignorepat => 9
include => longdistance
include => trunkint

[longdistance]

ignorepat => 9
include => local
include => trunkld

[local]

ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider

[macro-stdexten];

exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start

exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start

exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain

[macro-stdPrivacyexten];

exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start

exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start

exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite “Don’t call again” script.

exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script.

exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain

[demo]

exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
exten => s,n,WaitExten ; Wait for an extension to be dialed.

exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
exten => 2,n,Goto(s,instruct)

exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
exten => 3,n,Goto(s,restart) ; Start with the congratulations

exten => 1000,1,Goto(default,s,1)

exten => 1234,1,Playback(transfer,skip) ; “Please hold while…”
; (but skip if channel is not up)
exten => 1234,n,Macro(stdexten,1234,${CONSOLE})

exten => 1235,1,Voicemail(u1234) ; Right to voicemail

exten => 1236,1,Dial(Console/dsp) ; Ring forever
exten => 1236,n,Voicemail(u1234) ; Unless busy

exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
exten => #,n,Hangup ; Hang them up.

exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; “That’s not valid, try again”

exten => 500,1,Playback(demo-abouttotry); Let them know what’s going on
exten => 500,n,Dial(IAX2/guest@misery.digium.com/s@default) ; Call the Asterisk demo
exten => 500,n,Playback(demo-nogo) ; Couldn’t connect to the demo site
exten => 500,n,Goto(s,6) ; Return to the start over message.

exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,n,Echo ; Do the echo test
exten => 600,n,Playback(demo-echodone) ; Let them know it’s over
exten => 600,n,Goto(s,6) ; Start over

exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)
[default]
include => demo

[sip1]
exten => 1,1,Playback(abandon-all-hope)
exten => 1,2,Hangup[/code]

That last entry [sip1] was one we made to try and test to see if we could get a dialtone…so far no luck

We know these files are the heart of the Asterisk setup and we’ve got a basic grasp of what they mean, we just can figure out what’s wrong…

So if anyone has any pointers, or if we’ve missed something completely PLEASE let me know.

Thanks,
Flanders

In your extensions.conf

A) remove what you added
B) add this to the end of the file

[ext-local] exten => 1101,n,Macro(stdexten,1101,1101) exten => 1101,n,Hangup

C) modify (near the end of the file)

[default] include => demo

to

[default] include => ext-local

or

[default] include => demo include => ext-local

I would highly suggest that you either install the 1.4 branch with the Asterisk GUI or get FreePBX as either of these will get you setup MUCH faster. At this point FreePBX is a much better interface but a little harder to get installed. FreePBX will work on either 1.2.x or 1.4.x (1.4 is only supported in the latest release candidate).

OK, I’ve made those changes, but we still can’t get a dialtone.

According to what I’ve read in the extensions.conf file, all I should have to do is dial 9 to get an outside line then dial a local number?

Just for info, we are trying this on the phone connected to our SIP box. We’ve looked at the configuration of the SIP box on its web util and everything looks as we’d expect it to look.

Any ideas as to what we’re still doing wrong?

no dial tone indicates the sip device is not registered with asterisk, double check the ip address, username and passwords are set correctly.

Also, check the wiki to see if there are any specifics on the SPA-1001

OK so far, what we’ve produced apparently should be able to get a dialtone, we’ve looked over our SPA-1001 and ran the configuration wizard, and corrected its dialplan to US standard 7 and 10 digit dialing.

NOW…

Here is our total setup:

ISP is a local DSL provider, the Asterisk Box and SPA-1001 FXS are both hooked up to the router, and both have static IPs. There is a standard telephone plugged into the SPA-1001 FXS. We have our local telephone provider with currently 1 line running into one of the FXO cards on the Asterisk Box.

We have no VoIP or SIP Service providers, our question is do we HAVE to one one or both of these in order to make our Asterisk setup work? All we want to do is have the standard telephone lines ring in to the Asterisk Box be ran through the menus there, and then picked up by the phone on the SPA-1001 FXS if we need to talk to whomever called; and to also be able to initiate calls from the phone that’s on the SPA-1001 FXS…

We’ve currently exhausted ourselves and do not know what to look into next.

Also, we’ve noticed that if we enable IP dialing on the SPA-1001 we can directly dial the Asterisk Box via its IP address…

Help us Asterisk Guru’s you’re our only hope…

No. The phone connected via the sipura should have a dial tone if its configured correctly.

This is what you should have at a minimum:

FXO card installed in asterisk box
phone lines from Verizon plugged into the FXO ports

Asterisk box connected to hub/switch on internal (behind firewall) network
Sipura device plugged into same switch/hub (or at least on same subnet)

Most small dsl/cable modem/router/firewall devices default to using 192.168.1.1 as default gateway so the ip addresses of the Asterisk box and sipura device should be in the range of 192.168.1.X where X is between 2 and 254 (each one with its own number)

not sure what the sipura connection wizard looks like but somewhere it should ask for the address of the “SIP provider” (the ip address of your asterisk box), the username (extension number you defined in sip.conf) and password (defined as secret in sip.conf)

optionally you can have your asterisk server connected to some type of internet connection (but for your purposes its not required)

here is a link to a copy of the configuration of my SPA-1001 SIP box.

http://carbondalecomputerrepair.com/advanced.htm

my asterisk box is 192.168.0.223.
on “Make Call Without Reg” and now I have a dial tone but I cant get this simple dial plan to work…

[demo2] exten => _X.,1,Answer exten => _X.,2,Wait(2) exten => _X.,3,Playback(talking-to-myself)

the sip entry is…

[1101] context=demo2 type=friend username=1101 secret=woot host=192.168.0.224 canreinvite=yes qualify=yes mailbox=1101

please let me know if there is any more information that you need!

I think you need to enter the ip address of your asterisk box in the porxy field on the Line 1 tab

Also make sure you enter “woot” in the password filed on the same tab (thats wat you have set as your secret in sip.conf)

Set Make Call Without Reg: back to no

If all is well you should see that you are registered on the Info tab under “Line 1 Status” as well as seeing an entry in asterisk when issueing a “sip show peers” command.

I entered the IP address in that field (i uploaded a new copy of my sip screen.)

http://carbondalecomputerrepair.com/advanced.htm

I made sure that woot was entered in the SIP but I get this…

here’s what I get when I do sip show peers…

localhost*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1101/1101 (Unspecified) D 0 UNKNOWN 1 sip peers [0 online , 1 offline] localhost*CLI>

I also changed in my sip.conf to host=dynamic

[1101] context=demo2 type=friend username=1101 secret=woot host=dynamic canreinvite=yes qualify=yes mailbox=1101

HOORAY!

I have this now…

by changing my sip.conf to…

[1101] context=demo2 type=friend username=1101 secret=woot host=dynamic canreinvite=yes qualify=yes mailbox=1101 nat=1

this is my test extentions.conf context for the sip

[demo2] exten => _X.,1,Answer exten => _X.,2,Wait(2) exten => _X.,3,Playback(talking-to-myself)

I should be able to hit any key and get a playback yes?

also what is the dial plan in the sip box used for? you can see with I mean in the sip config I posted.

I did some random dialing and go this in the CLI of asterisk

-- Executing Answer("SIP/1101-b7801410", "") in new stack Aug 23 15:46:04 WARNING[8230]: channel.c:780 channel_find_locked: Avoided initial deadlock for '0xb7806f40', 9 retries! == Auto fallthrough, channel 'SIP/1101-b7801410' status is 'UNKNOWN' -- Incoming call: Got SIP response 404 "Not Found" back from 192.168.0.224 -- Executing Answer("SIP/1101-b7801410", "") in new stack Aug 23 15:46:26 WARNING[8230]: channel.c:780 channel_find_locked: Avoided initial deadlock for '0xb7806f40', 9 retries! == Auto fallthrough, channel 'SIP/1101-b7801410' status is 'UNKNOWN' -- Incoming call: Got SIP response 404 "Not Found" back from 192.168.0.224 Aug 23 15:46:30 NOTICE[8239]: chan_sip.c:10843 handle_request_invite: Unable to create/find channel -- Executing Answer("SIP/1101-b7801410", "") in new stack Aug 23 15:46:34 WARNING[8230]: channel.c:780 channel_find_locked: Avoided initial deadlock for '0xb7806f40', 9 retries! == Auto fallthrough, channel 'SIP/1101-b7801410' status is 'UNKNOWN' -- Incoming call: Got SIP response 404 "Not Found" back from 192.168.0.224 -- Executing Answer("SIP/1101-b7801410", "") in new stack Aug 23 15:48:51 WARNING[8230]: channel.c:780 channel_find_locked: Avoided initial deadlock for '0xb7806f40', 9 retries! == Auto fallthrough, channel 'SIP/1101-b7801410' status is 'UNKNOWN' -- Incoming call: Got SIP response 404 "Not Found" back from 192.168.0.224

You still have some registration problems there. Where is the firewall involved in this? Setting nat=1 to make it work tells me there is a firewall between the SIPURA and Asterisk. I havent done much SIP through firewall stuff and forget most of the tricks for it since I did it as a test 18+ months ago.

the firewall on the Asterisk box is turned off. the computer and the sip box are both on the same switch, there is nothing blocking traffic on my network and I can ping both boxes from my computer.

is there anything else that could cause this?

From what I understand you added 4 x100p cards to your system. I don’t think that is such a great idea. For testing and trying it is ok although I doubt if all 4 cards wil ever work all toghether. They all need a dedicated irq otherwise you will have problems.

The x100p card is not an production class piece of hardware and if you want to start using the server for making and receiving business phonecalls my advice is to spend some more money on a proper card (f.i. digium or sangoma) or a channelbank (f.i. xorcom).