Beginner Configuration Problems....

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Support, Moderator

Beginner Configuration Problems....

Postby AlexGrim » Mon Jul 20, 2009 3:34 am

Ok, i've spent about 8 hours now googling and reading and trying different examples on the internet and reading the official book (the first 200 pages) and i still cannot get even a simple setup. I'd post my configurations, but they're junk.

All i'm trying to start out with, is to connect to my local asterisk server with Ekiga (a nice Linux SIP client).

I've tried every example i've seen on the net, and restarted asterisk every time, and the Ekiga client. I've tried connecting by setting to domain to 127.0.0.1 and 127.0.0.1:5061, with and without passwords, etc. I'm stuck, and aggravated as h***.

Can someone post a 'sure thing'-'simple local sip client' example sip.conf and extensions.conf so that i can start with something that is KNOWN to work, and i'll go from there, or at least tell me where to properly start?

Thanx


======EDIT======
Apparently, the LAST thing i suspected was for the Client itself to be misbehaving (but it was fine the other day?). I installed another Linux SIP client called twinkle, and got the "hello world" to work :D (and after only 8 hours; sheeshe!)

Thanx
AlexGrim
Oldsterisk
 
Posts: 68
Joined: Sun Jul 19, 2009 11:58 pm

Postby david55 » Mon Jul 20, 2009 3:44 am

Most serious users would not run a SIP phone on the same machine and would find it easier to debug your configuration files than provide a working example.

Also useful is the output from sip set debug (or tcpdump, etc.) and verbose CLI output.
david55
Moves Like Spencer
 
Posts: 9718
Joined: Fri Sep 26, 2008 5:03 am

Postby AlexGrim » Mon Jul 20, 2009 4:09 am

Well, i am not yet serious, i literally just learned about it tonight (while i was supposed to be building a website....). Like i said, i did get a test working, so i'm playing with it now, but here is what i have so far (still not sure which parts are making it work, and which parts i don't need, but i will probably get that figured out as i go).

extentions.conf:
Code: Select all
[globals]


[general]


[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()
include => office


[office]
exten => 1000,1,Dial('SIP/1000',20)
exten => 1000,n,Playback(hello-world)
exten => 1000,n,Voicemail(1000)
exten => 1000,n,Hangup

exten => 213,1,Dial('SIP/213',20)
exten => 213,n,Playback(a)
exten => 213,n,Voicemail(213)
exten => 213,n,Hangup

exten => 212,1,Dial('SIP/212',20)
exten => 212,n,Playback(hello-world)
exten => 212,n,Voicemail(212)
exten => 212,n,Hangup

exten => 211,1,Dial('SIP/211',20)
exten => 211,n,Playback(hello-world)
exten => 211,n,Voicemail(211)
exten => 211,n,Hangup

exten => 210,1,Dial('SIP/210',20)
exten => 210,n,Playback(hello-world)
exten => 210,n,Voicemail(210)
exten => 210,n,Hangup




sip.conf:
Code: Select all
[general]
context=office
srvlookup=yes
musicclass=default

[1000]
type=friend
username=1000
host=dynamic
nat=yes
qualify=yes

[213]
type=friend
mailbox=213@office
auth=md5
username=213
secret=xxx
callerid=("Bob" <213>)
host=dynamic
disallow=all
allow=gsm
allow=ulaw
allow=alaw


[212]
type=friend
mailbox=212@office
auth=md5
username=212
secret=xxx
callerid=("Joe" <212>)
host=dynamic
disallow=all
allow=gsm
allow=ulaw
allow=alaw



[211]
type=friend
username=211
callerid="john jones" <5678>
host=dynamic
nat=yes
canreinvite=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw

[210]
type=friend
username=210
callerid="john jones" <5678>
host=dynamic
nat=yes
canreinvite=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw


I'm just randomly trying things for the moment, but i really should give up for the night and get back to work....

Thanx
AlexGrim
Oldsterisk
 
Posts: 68
Joined: Sun Jul 19, 2009 11:58 pm

Postby david55 » Mon Jul 20, 2009 4:19 am

There shouldn't be '' around the addresses in the Dial commands, although I can't be certain whether they are simply ignored.

There is no password on 1000, but you don't allow unauthenticated access.

You may need to tell Asterisk that the local client is on port 5061.

Your use of default is strange. Normally default would be the default, not office, and default is generally the context with the least privilege.
david55
Moves Like Spencer
 
Posts: 9718
Joined: Fri Sep 26, 2008 5:03 am

Postby AlexGrim » Mon Jul 20, 2009 4:22 am

That '' may be why i was getting this error:

Code: Select all
  == Using SIP RTP CoS mark 5
    -- Executing [1000@office:1] Dial("SIP/213-0235e740", "'SIP/1000',20") in new stack
[Jul 20 05:43:50] WARNING[16450]: channel.c:3477 ast_request: No channel type registered for ''SIP'
[Jul 20 05:43:50] WARNING[16450]: app_dial.c:1502 dial_exec_full: Unable to create channel of type ''SIP' (cause 66 - Channel not implemented)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [1000@office:2] Playback("SIP/213-0235e740", "hello-world") in new stack
    -- <SIP/213-0235e740> Playing 'hello-world.gsm' (language 'en')
[Jul 20 05:43:52] WARNING[16450]: pbx.c:3082 pbx_extension_helper: No application 'Voicemail' for extension (office, 1000, 3)
  == Spawn extension (office, 1000, 3) exited non-zero on 'SIP/213-0235e740'
[Jul 20 05:45:11] WARNING[16365]: db.c:57 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied
    -- Unregistered SIP '213'


Also, as far as the code being sloppy: like i said, i was trying so many things after the book didn't work (well, it probably did, for all i know, but i was unaware at the time due to a faulty client) that i lost track of what was what :D

thanx
AlexGrim
Oldsterisk
 
Posts: 68
Joined: Sun Jul 19, 2009 11:58 pm


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 47 guests