Asterisk to Asterisk connection via sip details - asterisk

I'm using Asterisk server as sip server.
When I use sip details on softphone or any sip client it work properly.
But when i try to connect other asterisk server to this sip server it failed to connect.

There is no any info about exact issue in your qeustion.
Check this article
http://www.voip-info.org/wiki/view/Asterisk+Connect+2+servers

Make sure the iptables are disabled on another side. You may try to use IAX2 as it requires very less configuration on firewall.

It is a question of how did you set up trunk to connect to another asterisk.
If you use same behaviour as your softphones - add register line to slave asterisk.
Or set up friend trunk to act without registration

Maybe a little late but I had to do something similar a few weeks ago.
sip.conf (Group1)
register=>group01:12345#10.0.2.2/group02
You are group 1 and the IP Address of the Asterisk Server of the remote site is 10.0.2.2
In you extensions.conf (Group1)
[group02]
exten => _2xxx,1,Answer()
exten => _2xxx,2,Dial(SIP/${EXTEN}#group02,60,r)
exten => _2xxx,3,Hangup()
Group 2 has to do the same thing vice versa
sip.conf (Group2)
register=>group02:12345#10.0.1.2/group01
extensions.conf (Group2)
[group01]
exten=>_1xxx,1,Answer()
exten=>_1xxx,2,Dial(SIP/${EXTEN}#group01,60,r)
exten=>_1xxx,3,Hangup()
Hope this helps

Related

Route Call in Asterisk Server

I have a scenario in which I want to route calls to sip a server from Asterisk but I want to do some thing like this
the sip server is running on : 192.168.1.10 and
Asterisk server is running on : 192.168.1.4
client Diales---->sip:111#192.168.1.4---->To Asterisk and then Asterisk route the calls------->sip:111#192.168.1.10 --------> sip server
Can someone tell me how can I do this in Asterisk configuration routing file .
As os11k said, you need SIP trunk to do this. I'll add some detail information about issues we encountered when we setup SIP trunk between two cities.
Add a SIP trunk in sip.conf
Make sure you put sendrpid=yes in the SIP trunk configuration, or, 192.168.1.10 will not get the caller id.
Optionally, you may want to set context of the SIP trunk to a different context rather than default, say context=sip-server-192-168-1-10.
Optionally, you may disallow or allow some codecs if 192.168.1.10 only works with specific codecs.
SIP trunk sample
[general]
register => SIP_ACCOUNT:SIP_PASSWORD#TheOtherSipServer
[TheOtherSipServer]
type=peer
context=sip-server-192-168-1-10
host=192.168.1.10
defaultuser=THE_ACCOUNT_HERE
fromuser=THE_ACCOUNT_HERE
remotesecret=THE_PASSWORD_OF_ACCOUNT_HERE
; if you want to send the remote caller id to 192.168.1.10, then set sendrpid=yes .
; you also need to trust the remote caller id in 192.168.1.10 .
sendrpid=yes
; if 192.168.1.10 can dial out from here, you need to set trustrpid=yes so you can get the caller id
;trustrpid=yes
; if 192.168.1.10 is picky on codecs
;disallow=all
;allow=THE_CODEC_NAME_ALLOWED_BY_THE_OTHER_SIP_SERVER
Setup dial plan in extensions.conf
Dial is all you needed unless you need special requirement.
Dialplan sample
[globals]
SIPTrunk=SIP/TheOtherSipServer
[sip-server-192-168-1-10]
;exten=>111,1,Dial(SIP/TheOtherSipServer/111)
exten=>111,1,Dial(${SIPTrunk}/${EXTEN})
You need to set-up sip trunk on your Asterisk server.
Check this page for more info:
https://www.beardy.se/how-to-set-up-a-sip-trunk-in-the-asterisk-pbx
http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf

Asterisk sip.conf Configuartion for outbound calls

I'm sending outbound calls from asterisk server using sip account. I want to use separate IPs for voice an signaling for these outbound calls. Please guide if any idea regarding this, how should I configure it in sip.conf.
You can set the RTP / media address IP in the [general] section of your sip.conf:
[general]
; media address
media_address=10.10.5.2
; depending on your nat & situation you might need for signalling:
externaddr=10.10.5.1
localnet=192.168.1.0/255.255.255.0
Then you can confirm this by running:
ast*CLI> sip set debug on
And look for the media address in the SDP payload under c=.
Word to the wise: make sure you check your routing on your box too, e.g. route -n and make sure things are headed where you expect them to.

asterisk sip extension to receive sip call from anyone having my sip address

I need a sip extension to receive sip call from anyone who have my sip address.
e.g. if anyone calls 101#xyz.com then sip call should drop on 101 extension configured in a soft phone, where xyz.com can be considered as my asterisk server IP address.
Help me. I am new to asterisk server.
Please provide me a step wise step guide to achieve the goal.
I got success in setting up sip extension that work in local network now I want to set sip extension which capable to receive incoming sip call from anywhere.
Thanks in advance.
You have set in sip.conf in general section
allowguest=yes
context=strangers
After that you can define in extensions.conf context strangers which have determine where to calls.

can't get my sip client to connect to asterisk

Good day people, I am new to asterisk, I run it on Ubuntu 11 and I am using Asterisk 1.8.3.2. I have configured my sip and extensions configrations, but I cant get my sip client from my android phone to work on it, I keep getting no matching peers error.
Below are my configuration
sip.conf
[general]
context=unauthenticated
allowguest=no
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no
[office-phone](!)
type=friend
context=LocalSets
host=dynamic
nat=yes
secret=s3CuR#p#s5
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
[0000FFFF0001](office-phone)
[0000FFFF0002](office-phone)
extensions.conf
[LocalSets]
exten => 5010,1,Dial(SIP/5010)
exten => 5020,1,Dial(SIP/5020)
What am I missing?
I have reloaded both files and restarted my asterisk server.
Thank you.
try removing the '#' from your password, can be a parsing glitch ...
set nat=no , because you have to change configurations if Asterisk is running behind a NAT.
sources:
http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions
http://forums.asterisk.org/viewtopic.php?f=1&t=76981
It may be an issue in your softphone' settings, not in Asterisk.
Make sure you have specified the right account settings and the right server settings on your phone device. And make sure the port is unblocked in linux.

Configuring softphone for asterisk - PBX

I've been trying to configure my softphone (twinkle) to work with asterisk for many days now and to no avail. I'm running both asterisk and the softphone in linux on a virtual machine.
My sip.conf file looks like this:
[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
[1000]
type=friend
context=phones
host=dynamic
username=1000
In the twinkle account settings, I have username:1000, domain: localhost
This gives me the error 403 forbidden. Can you please please help me figure out how to fix this? I'm running the softphone on a different sip port from asterisk.
My answer is probably super weak but it will something for you to try before someone will help you with a good advice.
First of all: anytime I create a VM with Asterisk to make some tests or new IVRs I always have issues with a firewall. Check if your firewall is on or off on your linux box since it can be an issue. You have to turn it off or make a proper setup for it.
Secondly:
I look at my sip configurations and they look just like yours but I always specify secret=some_password and host=dynamic. You might also want to try to add a port setting for your user if you say that softphone is on a different sip port from asterisk. but 5060 is a regular port for sip. More info on sip.conf INFO sip.conf
Also check what SIP Phone you are using. Some non-popular ones could have some issues during setting. I would advise you to try eyeBeam for Windows or Ekiga for Linux should work fine.
Try sip.conf:
[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
[1000]
type=friend
context=phones
host=dynamic
username=1000
secret=1000
And client try:
username: 1000
pass: 1000
domain: ip_of_asterisk_server
That happened to me before. All I did was change Twinkle's configuration to use port 5061. Check out this tutorial http://bit.ly/15eACoY
I agree that you need to change the Asterisk PBX port or Twinkle port. It is because both are listing on the same port. Make sure you are giving the secret in the configuration and also putting the same secret in Twinkle. Open the asterisk CLI using asterisk and make sure the registration request is reaching to the asterisk.
[1000]
type=friend
context=phones
host=dynamic
username=1000
secret=1000

Resources