can't get my sip client to connect to asterisk - 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.

Related

How to configure nat for a conference using confBridge in Asterisk?

I am trying to host a conference meeting using Asterisk's ConfBridge.
How to handle nat for a confBridge application like it is handled in sip.conf by specifying
nat=yes
Is there a way to configure something similar for confBridge. I went through confBridge.conf comments. But couldnt find any help.
The issue I am facing is that I am receving only one directional audio when I try to join 2 participants. What could be the possible reason?
EDIT:
Configuaration of the sip peers from sip.conf
I have the sip peers configured correctly I guess. Here is my sip peers configuration.
[5001]
type=friend
username=aki
secret=password
callerid=aki<5001>
host=dynamic
context=t***e
nat=yes
[5002]
type=friend
username=apu
secret=password
callerid=apu<5002>
host=dynamic
context=t***e
nat=yes
This might help to get a better perspective.
I am writing my own sip client using jain-sip. The same configuration works well(bi-directional audio) when my sipclient and a 3rd party sip softphone are communicating directly through Asterisk. It is only when I use ConfBridge that the audio from a 3rd party sip softphone to my sipclient is not audible. I have tried different sip softphones and still the result is the same.
You not need deal with nat in conference.
Conference works with upper level channels(sip/iax). So you need configure correctly sip or iax peers

How to setup RestComm with VoIP Gateways?

I have a background of asterisk where I can setup GoIP1 VoIP Gateway as one of SIP account for outgoing calls.
Asterisk setup sip.conf
[gsm1]
canreinvite=no
context=goip
dtmfmode=rfc2833
fromuser=gsm1
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=g729
insecure=port,invite
secret=gsm1
type=friend
defaultname=gsm1
How can I do the same in RestComm? I 've RestComm-Core setup on my local and I don't want to go with DID Provision Providers
If you are using the Restcomm binary. You need look into the file
restcomm.conf
.
Configure the outbound proxy as shown below
# Address for outbound calls
OUTBOUND_PROXY='' #Provide port if different than 5060
OUTBOUND_PROXY_USERNAME=''
OUTBOUND_PROXY_PASSWORD=''
Regards
TechKid

Asterisk to Asterisk connection via sip details

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

Localphone PBX Trunk, One way audio only

At the moment I can call landline numbers okay on Localphone using my FreePBX trunk,
but when I call mobiles, they can hear me, but I can't hear them. any suggestions?
PEER Details:
type=friend
insecure=very
nat=yes
canreinvite=no
authuser=xxxxxx
username=xxxxxx
fromuser=xxxxxx
fromdomain=localphone.com
secret=xxxxxxxx
host=localphone.com
dtmfmode=rfc2833
USER Details
disallow=all
allow=GSM&ULAW&PCMA&PCMU
You have check your asterisk know external ip and nat/firewall setup correctly
sip nat

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