Call other sip networks from asterisk and other way

What do I need to setup in asterisk to be able to call other sip networks (for instance sip:+61262223590@aarnet.edu.au) and what to setup to be able to receive incoming calls from other networks?

Thx

Vlada

To dial out, you don’t really need anything. You can use a sip phone (like x-lite). Just put in the full address. 61262223590@aarnet.edu.au.

You do need to make sure that the domain you are calling, in this case aarnet.edu.au, has at least one DNS SIP SRV record setup. Otherwise your sip phone will not know where to send the message.

If you don’t have a sip srv record setup you’ll need to put the direct ip address of the sip phone you want to connect to, or the ip address of a sip server / pbx / proxy that knows where to find the phone you are trying to connect to.

To receive calls from outside, you can do a few things. Minimally you can setup your x-lite phone and have someone dial directly to your public ip address. Probably not the best solution.

So you can setup an asterisk pbx machine, connect your x-lite phone or other sip phone to the asterisk pbx machine. Then either give people the ip address of the asterisk machine or setup a dns srv record for your domain that tells people where your asterisk pbx machine is located.

As far as your extensions.conf file, you just need to setup you phone numbers / names, and have the dial command connect to the local sip phone. Example.

exten => 5555555785,1,Dial(SIP/xlite1)

As far as your sip.conf file, you just need to configure your local phone. To be consistent with the above example, call it xlite1 Example

[xlite1]
;Turn off silence suppression in X-Lite (“Transmit Silence”=YES)!
;Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
type=friend
username=xlite1
callerid=“Jane Smith” <5678>
host=dynamic
nat=yes ; X-Lite is behind a NAT router
canreinvite=no ; Typically set to NO if behind NAT
disallow=all
allow=gsm ; GSM consumes far less bandwidth than G711-u (ulaw)
allow=ulaw
allow=alaw

Anyway, that’s an overview on what you’d need to do. For specifics on each step check the www.voip-info.org site. It’s got a ton of information.

Dan

That’s what I taught things should work, but:

I have xlite registered with my asterisk server and when I put a full phone number to dial (eg. 55555@fwd.pulver.com) i get CALL FAILED. Also, cannot call for instance 101@my_ip_adress (CALL FAILED). (101 is defined extension in extensions.conf).
In sip.conf srvlookup=yes in [general]

Tried dialing only my_ip_adress doesn’w word (Have DISA() application on s )

What is wrong?

Somebody, please, answer, it would be very nice…

Post the relevant parts of your sip.conf & extensions.conf files.

extensions.conf

exten => 101,1,Dial(SIP/vlada,10,m[default])
;m[default] - instead of ringing plays music from class defined in moh.conf
exten => 101,2,VoiceMail(101@default,u)
exten => 101,102,VoiceMail(101@default,b)

[incoming]
exten => s,1,Answer
exten => s,2,Background(vm-intro)
exten => 000,1,DISA(no-password|internal)

sip.conf
[general]
context=default
srvlookup=yes
domain=my domain

[vlada]
type=friend
username=vlada
secret=vlada
qualify=yes
nat=yes
host=dynamic
canreinvite=no
allow = all
context=internal
mailbox=101@default
callerid=<101>

Thx in advance!!!

The next step you’ll need to do is to connect your Asterisk box to a remote network. This is done by configuring another peer in your sip.conf file. This will be very similar to your sip phone configuration except you will be using Asterisk as the client. That way when your call comes in asterisk will turn around and dial to the remote network on your behalf.

I suggest you look at the example sip.conf and extensions.conf files provided with Asterisk, I believe that they have some examples of this in them. Also check out the Asterisk book, voip-info.org/wiki-Asterisk+config+sip.conf, it has some very good information on it too. I would recommend the section, “Asterisk as a Sip Client”.

Dan