Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: mednet on September 08, 2008, 02:23:55 AM

Title: Asterisk (how to configure for SIP)
Post by: mednet on September 08, 2008, 02:23:55 AM
All,

I am a novice regarding Asterisk (just in case you don't gather that from this message) <grin>.

I have a server set up to accept communication via HTTP. I can communicate with Asterisk from a remote browser via the AJAM (Asynchronous Javascript / Asterisk Manager) approach (of course, I can also communicate from the CLI), but am desiring to demonstrate basic SIP signaling with Asterisk from a client application. AJAM appears to require Javascript for messaging, and I wish to establish communication from a Desktop application, not a browser, where I will need messaging (call / response) capabilities and where Javascript will not be an option.

I can establish a bound TCP/IP socket connection with Asterisk on Port 8088 (which is currently happily listening for my HTTP calls), but I am guessing I need to be doing this on UDP Port 5060. Is that correct? I cannot currently authenticate via that port, so I imagine I need to alter something, somewhere.

What changes would need to be made to the Asterisk environment in order to accept a SIP message from a client application (sent from within a local network)? My eventual goal would be to actually initiate and manage a call, but I am happy to crawl before I walk.

Does the SIP.conf file need to edited for this? I assume I need to "permit" the calling IP address to authenticate via this port. Is that done in the SIP.conf file (it is a rather daunting file)?

Do other configuration files need to be edited for SIP purposes?

Let's assume, for now, that I am only needing to access the DEMO extension, so I don't need to configure extensions.conf.

I have poured over the documentation I can find, but am not locating the answers to the questions I pose here.

I certainly appreciate any guidance you can offer.

Title: Re: Asterisk (how to configure for SIP)
Post by: arne on September 08, 2008, 03:09:34 AM
In general: There is two ways of dealing with Asterisk, one way is to edit the configuration files manually. The other way is to have some automated tools to do it for you. The "standard sme way" is to use an utomated tool to do it. Personally I do it manually by hand, using and old Asterisk for sme server rpm that was released for some time ago.

When doing a manually confiruration you will have the freedom of using the sip port(s) you like to use, but if you will like to connect to anyone else than your own clients, you will need to use the standard port UDP 5060 for setting up the connection and then som other port(s) for the sound. (While the IAX2 protocol uses only one UDP port.)

There is a free book about Asterisk that is quite good. See some more infor about "general Asterisk problems" in this tread:
http://forums.contribs.org/index.php?topic=41939.0

It might be actually slightly off topic related to the SME solution, that is a automated and user friendly solution that "does it all". (But I don't know it to well because I do my own configurations by hand. I tested the automated solution for some time ago, and I thought it was quite good. Manually configurations takes a lot more time to learn, but it gives even more freedom.)

Doing it the proper SME server way, you do not edit any configuration files at all.

Hopefully you will also get an answer from someone who knows more about "the proper auomated sme way" than I do.
Title: Re: Asterisk (how to configure for SIP)
Post by: mednet on September 08, 2008, 04:08:14 AM
arne,

Thank you for your reply (and the hint about configuring for the sound - I hadn't thought about that).

Having things "just work" automatically is always tempting, especially when I have spent hours making no progress, but I am very interested in learning how to configure Asterisk manually.

It is starting to make some sense to me.

I have downloaded the excellent resource you suggested and will be reading through it (and rebooting my server many, many times as I make configuration changes). <grin>

Thank you, again.
Title: Re: Asterisk (how to configure for SIP)
Post by: arne on September 14, 2008, 11:06:45 PM
I forgot some important info if one like to do the Asterisk "by hand".

Asterisk can also be runned from a asterisk CLI.

It is started like this, as an example: asterisk -vvvr

When you are inside the CLI you can see everything realtime what happen. If a call does not come trough, you can often se realtime why it does not come trough, trough the messages that you can read.

It is also possible to reload all configuration files and to restart the Asterisk server only.

the command "help" will show most of the available commands.

Important commands are as an example "sip show registry" that show the registration of inbound traffic on external server and "sip show peers" that show external sip connections and your own sip clients.

When using the command line, Asterisk is much more easy to use and configure "the old fashioned way" because you can see the practical effect from all configurations at the CLI panel, and this info can also tell you what goes wrong and how to reconfigure.

I think the Asterisk book has some info about this theme.

Title: Re: Asterisk (how to configure for SIP)
Post by: arne on October 07, 2008, 12:55:20 PM
Incorrect posting. Deleted.