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
Related
Long time Asterisk user but fairly new to OpenSIPs. I have a SIP phone working with audio both directions when registering to and receiving calls directly from Asterisk. The same phone works with 2 way audio if I register to OpenSIPs and receive a call from OpenSIPs but only IF the call originated from somewhere OTHER than our Asterisk server.
Example that works:
Call from PSTN > OpenSIPs > SIP Phone (registered to OpenSIPs)
Call from PSTN > Asterisk > SIP Phone (registered to Asterisk)
Example that does NOT work, one way audio issues:
Call from PSTN > Asterisk > OpenSIPs > SIP Phone (registered to OpenSIPs)
I am trying to offload all our registrations from Asterisk to OpenSIPs but when we pass the call from Asterisk to OpenSIPs the call goes to the phone registered to OpenSIPs but has one way audio.
Don't believe it to be a firewall issue because we have tested while firewalls on both Asterisk and OpenSIPs are off.
Have tested many theories but, I'm at a loss at this point, out of ideas. I thought I would ask the smart folks here.
Thanks in advance for any help.
I fixed this by setting nat=yes in the sip.conf on Asterisk server under the configuration for the OpenSIPs server.
I noticed that when I tested on a newer version of Asterisk I got better errors in the Asterisk console. I noticed Asterisk was trying to send the RTP to the private LAN IP of the endpoint (my sip phone) instead of the public IP of my internet connection where the phone is located. Not sure why it was trying to do that. I am wondering if OpenSIPs needs to be modified. Was puzzles me is that I have NEVER had to set nat=yes on Asterisk when sending calls to servers with static public IP. In this case I am sending calls to an extension like 456#xxx.xxx.xxx.xxx where xxx is the public static IP of my OpenSIPs server so, no NAT involved there. The NAT comes into play when the call is sent to the endpoint which is behind a NAT. Makes no sense to me why I should have to set nat=yes to make this work but, this was an immediate fix. Will research more later, might need a change on the OpenSIPs side instead of nat=yes on the Asterisk side.
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.
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
My asterisk is running in a LAN having local IP 192.168.1.8,broadcast address 192.168.1.255 and subnet mask 255.255.255.0.The external ip shown is 117.200.236.236 and port 59282 (using IPMANGO). Its dynamic.
I want to connect my mobile to asterisk.For that I use CSipSimple(android) as softphone and 3g service (BSNL,India)
NOTE:If instead of running asterisk in LAN if I use a data card (direct access, no LAN) I am successfully able to register my softphone.
I followed this tutorial but it does not help.
sip.conf
[1000abc]
type=peer
externip=117.200.236.236
localnet=192.168.1.8/255.255.255.0
nat=yes,true,y,t,1,on
qualify=no
allow=all
udpbindaddr=0.0.0.0
bindaddr=0.0.0.0
secret=mysecret
host=dynamic
context=incoming-call
CSipSimple Basic Account
Account name:myAccount
Username:1000abc
Server:117.200.236.236
Password:mysecret
I have not made any change in rtp.conf.
Firstly, network access:
Set your firewall / router to forward your external IP to 192.168.1.8 on Ports 5060 (SIP) and 10000-20000 (for RTP), both with UDP packets
Use a packet capture like wireshark or tcpdump to ensure network connectivity.
Secondly, nat setting:
You've got nat=yes,true,y,t,1,on, where you really need just:
nat=yes
That's proper for asterisk 1.8. Asterisk 11 will require different options, see the sip.conf file as generated by make samples -- which I highly recommend if you're new to asterisk, the sample configurations contain the best documentation about the settings.
Lastly, in cSipSimple:
In Settings -> Network tick the box for use 3G (and better) in order to send data over 3G, otherwise it typically defaults to just use Wifi.
Make sure that your network public ip it is also configure in your SoftPhone. Also make sure that your external ip matches your public ip in your network.
sip.conf
[1000abc]
type=peer
externip=XXX.XXX.XXX.XXXX
You can use this site to find your external IP.
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