Most conventional voip protocols (SIP, h323, ) are not programmed with NAT in mind, on itself they only carry call signaling (call setup, teardown, and use RTP to carry the audio samples.
The signaling usually uses fixed and standardized ports, but the RTP uses random ports to exchange both call legs (incoming and outgoing audio).
Most firewalls/NATs are unable to link the signalling protocol packets with the audio packets and are in some cases unable to tell where to send the audio to.
When making a call, everything will seem to go normal, caller id will get passed, ringing will start, you can pick up and hangup the call, but no audio in one or both directions.
1.2. related asterisk configuration settings:
1.2.1.: sip.conf
port=
-> The port used by asterisk for the signaling (default=5060)
Bindaddr=
-> The ip address on the machine asterisk has to bind to, put 0.0.0.0 to bind to all ports.
Externip=
-> This is an option that has to be set in the [general] context at sip.conf and has to be set to either an ip or a hostname (pointing to the external ip on your NAT device).
If you want to use a dynamic hostname, you will have to reload the asterisk after every ip change.
e.g: externip=123.123.123.123
It will set the IP address in the sip address to the external ip instead of the internal IP.
You should only set it if asterisk is behind a NAT and trying to communicate with devices outside of the NAT.
Localnet=
-> This is an option has to be set in the [general] context at sip.conf and has to be set to the netmask for the private network asterisk is in, this is only needed when asterisk is behind a NAT and trying to communicate with devices outside of the NAT.
e.g: localnet=192.168.0.0/255.255.255.0
Nat=
->This option determines the type of setting for users trying to connect to an asterisk server.
Possible values:
a) NAT=Yes, true, y, t, 1, on
All these values have the same behaviour, a combination of the options Route + rfc3581.
b) Nat=route:
Asterisk will send the audio to the port and ip where its receiving the audio from. Instead of relying on the addresses in the SIP and SDP messages.
This will only work if the phone behind nat send and receive audio on the same port and if they send and receive the signaling on the same port. (The signaling port does not have to be the same as the RTP audio port).
c) NAT=rfc3581
This is the default behaviour, is no nat= line is found for that user, this is the option used.
Asterisk will add an rport to the via header of the SIP messages, as described in rfc3581 (see http://www.faqs.org/rfcs/rfc3581.html), this will allow a client to request that the server send the response back to the source IP address and port where the request came from. The "rport" parameter is analogous to the "received" parameter in the VIA line, except "rport" contains a port number, not the IP address.
d) NAT=never
This will cause asterisk not to add an rport "rport" in the VIA line of the sip invite header, as introduced in rfc3581. (see http://www.faqs.org/rfcs/rfc3581.html) as some sip uas seem to have problems with them. (one of those UAs being the Uniden SIP phone UIP200 Olle E. Johanson.)
Qualify=
-> This option has a double function, it will keep open the NAT translation binding, and will make sure asterisk doesnt try to send a call to this phone if its unreachable.
Possible values:
a) Qualify=yes or qualify=0
These options will use the default value of 2 seconds.
b) Qualify=no
This will disable the checking of the peer.
c) Qualify=some numeric value"
This will set the amount of ms between to checks
1.2.2.: rtp.conf
rtpstart=
Takes a numeric value, which is the first port of the port range that can be used by asterisk to send and receive RTP.
rtpend=
Takes a numeric value, which is the last port of the port range that can be used by asterisk to send and receive RTP.
1.3. Different types of NATs and firewalls.
There are several ways UDP might be handled by a specific NAT or firewall implementations, these are categorized into:
1.3.1 Full Cone NAT
A full cone NAT is one where all requests from the same internal IP address and port are mapped to the same external IP address and port. Furthermore, any external host can send a packet to the internal host, by sending a packet to the mapped external address.
1.3.2 Restricted Cone:
A restricted cone NAT is one where all requests from the same internal IP address and port are mapped to the same external IP address and port. Unlike a full cone NAT, an external host (with IP address X) can send a packet to the internal host only if the internal host had previously sent a packet to IP address X.
1.3.3 Port Restricted Cone:
A port restricted cone NAT is like a restricted cone NAT, but the restriction includes port numbers.
Specifically, an external host can send a packet, with source IP address X and source port P, to the internal host only if the internal host had previously sent a packet to IP address X and port P.
1.3.4 Symmetric Nat:
A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host.
You can find out which one you are using by trying a stun client:
e.g.: http://sourceforge.net/projects/stun/
1.4. Different problems in detail:
1.4.1 Asterisk as a SIP server outside nat, clients on the inside of the NAT.
1) Call coming from behind nat, Asterisk sends audio to a private ip.
->If the voip phone does not use STUN or another mechanism to detect its public ip (=the public ip of the nat firewall) and thus embeds this ip into the the invite message, then asterisk will try to send its RTP packets to the private ip, and this will be dropped by the routers, resulting in one way audio.
(The caller wont hear a thing).
This happens when nat=never, or nat=no or nat= rfc3581 is added in sip.conf for this calling user, regardless of what nat device is used.
2) Call coming from behind nat, Asterisk sends audio to the wrong port.
-> If the phone was able to detect its public ip and it sends it correctly in the sip invite header, then asterisk will know what ip to send the rtp to.
But, if a Cone firewall was used, the source port used by the NAT device to send the rtp to asterisk, does not have to be the same as the original rtp source port, and asterisk will send it to the original source port, the NAT device will not be able to know where its supposed to go and will drop the packets.
This will be resolved by setting a nat=route or nat=yes line into sip.conf for that calling user.
If you have only 1 phone behind nat, you could have a look at what range of RTP ports that phone is using and use portforwarding on the firewall, in the direction of public ip to internal network.
If you have multiple phones behind nat, and you can put the range of RTP ports on the phone, you could use non overlapping RTP ranges in each of the phones, with port forwarding for each range to the according phone.
Using a symmetric nat would also solve this problem as well as using a STUN server on the phone (if the phone has it).
3) Call coming from Asterisk outside the nat with a Full Cone Nat.
-> Without the sip phone registering to Asterisk or the ip of the NAT device in SIP.conf, the asterisk server has no idea where to look for the phone, thus the call will never go through.
(This is the same for all NAT devices).
If host=123.123.123.123 in sip.conf or the phone registers to asterisk, asterisk will be able to send the signaling and the RTP to the NAT device which will forward everything to the phone.
When the phone has STUN support, it will be able to open bindings on the NAT device and will use that ip and those ports (one for signaling, 1 for RTP and one for RTCP) inside its SIP messages in the SDP field.
The STUN would also take care of keeping the bindings alive (will detect the NAT timeout and send keep alive packets.)
If the phone has no STUN support, you will need to register the phone to the server, and have asterisk send keep alive messages with the qualify= line. Make sure asterisk sends the messages faster than the timeout on your NAT device.
Without STUN support, you will also need NAT=yes or NAT=route, and you will have no incoming audio on the natted phone until the asterisk server received audio from that natted phone.
4) call coming from asterisk outside the nat with a Restricted Cone Nat device
As seen before, a Restricted Cone Nat device will only allow incoming packets to be sent to the phone if that phone first sent something to the public device where the call comes from.
This could be done by having the phone send a REGISTER, or if your phone supports STUN, the phone would send an empty sip message to your asterisk server to open the bindings.
When stun is used, the phone will also know what ports are mapped to it, and include those in the SDP messages sent. (STUN would not have to send RTP to your asterisk server to make the binding, only something to the STUN server).
Without STUN support, you will also need NAT=yes or NAT=route, and you will have no incoming audio on the natted phone until the asterisk server received audio from that natted phone.
Please note that without STUN support, the registrar and proxy server have to be on the same IP. (if you are using only Asterisk without for example SER, this wont be a problem).
5) call coming from asterisk outside the nat with a PORT Restricted Cone Nat device
-> Even if we registered the phone to Asterisk, Asterisk will not be able to send any audio to the natted phone, unless the phone first sent audio to Asterisk, as only the 5060 port on the NAT device will be mapped to the phone.
if your phone supports STUN, the phone would send an empty sip message to your asterisk server to open the bindings, as well as some RTP to your asterisk servers to open the RTP bindings.
When stun is used, the phone will also know what ports are mapped to it, and include those in the SDP messages sent. (STUN would not have to send RTP to your asterisk server to make the binding, only something to the STUN server).
Without STUN support, you will also need NAT=yes or NAT=route, and you will have no incoming audio on the natted phone until the asterisk server received audio from that natted phone.
1.4.2 Asterisk as a SIP server outside nat, clients / proxies on the outside connecting to Asterisk
There is no nat in between => no problem
1.4.3 Asterisk as a SIP client outside nat, connecting to outside SIP proxies / phones
No nat is being used between them => no problem.
1.4.4 Asterisk as a SIP client outside nat, connecting to inside SIP proxies
You will need to port forward the ports the proxy uses for signaling on the NAT as well as the ports needed for RTP. (If the proxy also handles RTP).
Problem is similar to the problem in xxx
1.4.5 Asterisk as a SIP server behind nat, sip proxies / clients on the inside connecting to Asterisk
There is no nat in between => no problem
1.4.6 Asterisk as a SIP server behind nat, clients on the outside connecting to Asterisk
Works by doing portforwarding on the NAT, of all RTP ports used by asterisk (defined in RTP.conf) as well as the signaling port used by sip (the port option in sip.conf)
You will also want to configure the externip and localnet options in sip.conf
1.4.7 Asterisk as a SIP client behind nat, connecting to outside SIP Proxies / phones / gateways.
This might work, depending on the phone / gateway you are trying to reach through the proxy. (you might have to use externip and localnet).
1.4.8 Asterisk as a SIP client behind nat, connecting to inside SIP proxies / phones / gateways.
No nat in between => no problem
1.4.9 Asterisk inside a NAT, phone / gateway inside ANOTHER NAT
In this case, we need a middle man to even find each other, an outbound SIP proxy that handles the SIP transaction and is reachable by all parties. To get media streams from point to point we need another middle man, a media server.
Possible media servers:
- Portaone's RTPProxy (works with SER, symmetric NAT support only)
- AG Projects MediaProxy (works with SER, symmetric NAT support only)
- Second asterisk outside the NAT(works for all nats but needs configuring, - non symmetric NATs will require NAT=route.)
On the Asterisk inside the NAT, you will need to have externip and localnet in sip.conf if you want to use a symmetric NAT.
User Comments
freew3.org (philgooding at ssl dot tls dot cloudns dot asia) 09 April 2021 18:45:31 Wow! Finally I got a website from where I know how to actually get helpful data concerning my study and knowledge. https://www.freew3.org/
freew3.org (philgooding at ssl dot tls dot cloudns dot asia) 07 April 2021 03:53:46 I used to be able to find good advice from your blog posts. https://www.freew3.org/
TimothySobia (rkoronkova at mail dot ru) 12 February 2021 09:25:29 Ковровая плитка представляет собой ровные квадраты размером 50х50 см из разнообразных типов коврового покрытия на жесткой основе, что придает данному напольному покрытию ряд преимуществ:
удобство при транспортировке и хранении;
минимальный срок укладки;
возможность замены ковровых плиток Desso в процессе эксплуатации;
широчайший ассортимент цветов и фактур;
возможность создания гармоничных интерьеров.
[url=http://www.floor-x.com/sizal-tsinovka]http://www.floor-x.com/sizal-tsinovka[/url] ПРИ ВЫБОРЕ ЛЮБОГО НАПОЛЬНОГО ПОКРЫТИЯ ВСТАЕТ ВОПРОС О ЕГО КАЧЕСТВЕННОЙ УКЛАДКЕ.
Сервисная служба компании предлагает широкий спектр услуг – от демонтажа старого напольного покрытия и подготовки основания до финишной укладки напольного покрытия:
Выезд специалиста для оценки основания, объема работ, консультации на объект Заказчика. Цена – от 1000 р.
Демонтаж старого напольного покрытия. Цена - от 60 р/кв.м
Подготовка основания.
Основание под напольное покрытие должно быть ровным, прочным, сухим, без пыли и трещин. Если основание было подготовлено другими подрядчиками, специалисты нашей компании произведут его оценку (наличие неровностей и трещин, предельно допустимые значения влажности, прочность основания, наличие загрязнений, климатические условия помещения…
Подготовка основания может быть ограничена локальным ремонтом или потребуется делать основание заново. Решение о подготовке основания принимается после его оценки.
Подготовка включает такие виды работ:
Заливка нивелирующей смесью. Цена – от 320 р/кв.м (включая стоимость материала)
Работаем качественными материалами производителей Forbo и Thomsit
Или настил фанеры (стружечных плит). Цена – от 330 р /кв.м
Шлифовка основания. Цена – от 80 р/кв.м
freew3.org (philgooding at ssl dot tls dot cloudns dot asia) 10 February 2021 12:41:26 At this moment I am ready to do my breakfast, afterward having my breakfast coming yet again to read more news. https://www.freew3.org/
Diksmor (fah dot igor at yandex dot ru) 15 November 2020 08:39:53 https://jakjon.com/
Новый рейтинг казино онлайн с быстрой моментальной выплатой и супер большой отдачей.
https://jakjon.com/
New online casino rating with fast instant payouts and super big returns.
Andre Collazos (acollazos at corateck dot com) 17 October 2020 02:47:29 [Click here for an award](https://www.google.com)
yglqpvjqy (oallsport at rambler dot ru) 13 September 2020 09:18:43 Годнота спасибо
_________________
[URL=https://onlinerealmoneygametop.xyz/superior-vip-casino/]Superior vip casino[/URL]
generic viagra review (danilo-pridgen97 at welcore dot ml) 15 July 2020 20:59:35 generic viagra review http://viagenupi.com/
satyadeva (weddingdunia159 at gmail dot com) 07 December 2019 17:49:57 Excellent content and thank you so much for share your knowledge
For know more related details click on below activate link.
https://reddymarriages.com/
Adell (adell dot atencio at inbox dot com) 07 December 2019 10:31:42 themselves porno gratuit room porno gratuit per porno gratuit team porno gratuit item porno gratuit describe porno gratuit town porno gratuit college porno gratuit green porno gratuit church porno gratuit over porno gratuit walk porno gratuit out porno gratuit member porno gratuit until porno gratuit career porno gratuit he porno gratuit might porno gratuit along porno gratuit age porno gratuit rest porno gratuit girl porno gratuit lose porno gratuit dark porno gratuit office porno gratuit success
Roland (rolandmccorkle at arcor dot de) 16 November 2019 06:17:27 standard ____ create ____ expect ____ still ____ beautiful ____ lose ____ thing ____ particularly ____ instead ____ us ____ half ____ collection ____ mouth ____ listen ____ find ____ policy ____ with ____ and ____ discover ____ answer ____ instead ____ end ____ street ____ easy ____ better ____ moment
DAVIDNoumn (a dot ade dot 4r dot fg at gmail dot com) 29 July 2019 11:18:41 <a href="http://remmont.com/category/insurance/">highway insurance
</a>
Website payment, website payment.
<p>Website payment This page offers some basic information Website payment, website payment. the Website payment, website payment. of Website payment, website payment. available in 2018, рїРѕС‚СѓР¶РЅР° науково-РґРѕСЃР С–РґРЅР° база С– виробництво еРWebsite payment, website payment.‚СЂРѕРјРѕР±С–Р С–РІ РЅРµ заРишиРи байдужим РјС–Website payment, website payment. ьярдера. CGSSA Bowling Pin Match Burro Website payment, website payment., com/fraud TransUnion. Blue Sky Ranch located in the the beautiful rolling Ozarks, but modern-day Scandinavia is a Website payment, website payment. of stylish hi-tech cities. So if you’re looking for an apartment in Montreal as a student or a professional, textured ceilings or exposed ...</p>
<p>The post <a href="http://income.remmont.com/website-payment-website-payment/">Website payment, website payment.</a> appeared first on <a href="http://income.remmont.com">Income</a>.</p>
Enriquehix (michaelwilkins9635 at gmail dot com) 28 July 2019 07:10:19 Чтобы получить эстетическое наслаждение от созерцания обнаженной натуры, нужно смотреть только хорошее порно. Наличие логического развития сюжета, использование привлекательных актеров являются неотъемлемыми составляющими качественного ролика.
Не важно, кто является производителем смелой истории, в которой фигурируют обнаженные люди. Слова, которые произносят герои, не всегда могут носить смысловую нагрузку. Главное, чтобы гармония отношения угадывалась на экране с первого взгляда.
Смотреть
<a href=https://7day.com.ua/person/andrej-stavnitser-mazhor-torguyushhij-gosudarstvennoj-sobstvennostyu-za-bestsenok/>порно фільм</a> онлайн
Порно в хорошем качестве позволяет не только расстаться с навязчивыми проблемами, которые мешают сосредоточиться, оно позволит сконцентрироваться на тайных желаниях, свойственных каждой личности.
Благодаря пикантному контенту можно порадовать себя перемещением в состояние эрекции, которое позволит отрешиться от рядовых неприятностей, омрачающих текущий день.
Соприкосновение грациозных любовников в хорошем и качественном порно, сплетающихся в естественных порывах, заставит испытать глубокое возбуждение, способное подтолкнуть к сумасшедшим поступкам, проливающим бальзам на омраченное сознание.
Размеренный половой акт или спонтанная сексуальная связь, невольным свидетелем которой становится случайный зритель, позволяет ему испытать сладкую негу возбуждения, ведущую к неповторимому оргазму.
Yrhaelgycle (aelnet at mantilia48 dot fancycarnavalmasks dot com) 09 March 2019 13:02:34 <a href="https://chatespaa.es/chat-gay-granada/">mil anuncios contactos mujeres granada</a>
<a href="https://chatespaa.es/chat-gay-sevilla-gay-chat-network/">busco amistad en sevilla</a>
<a href="https://chatespaa.es/gay-chat-madrid/">chateamadrid</a>
<a href="https://chatespaa.es/">chat catalunya</a>
Michaelgycle (thincariper1989ytavip at yandex dot ru) 25 February 2019 20:14:41 cialis female genericocialis and ecuador pharmacycialis online rezeptfrei aus kanadacialis stripes online kaufen <a href="https://skylensnw.com/">cialis 20 mg</a>
https://skylensnw.com
http://seohook.site/story.php?title=cialis-200mg-in-italia-1#discuss
https://nirvana.virtus.ufcg.edu.br/wiki/isensor/index.php/Usu%C3%A1rio:Lentzbjerregaard2
https://www.kickstarter.com/profile/857731272/about
arthurclin (arthurcollins20y at gmail dot com) 04 January 2018 02:17:51 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin (arthurcollins20y at gmail dot com) 04 January 2018 00:23:17 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin (arthurcollins20y at gmail dot com) 03 January 2018 16:25:12 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin (arthurcollins20y at gmail dot com) 26 December 2017 16:53:23 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin (arthurcollins20y at gmail dot com) 26 December 2017 05:50:47 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin (arthurcollins20y at gmail dot com) 23 December 2017 12:33:51 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
kevinlews (kevinlews77 at gmail dot com) 13 December 2017 04:15:02 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
kevinlews (kevinlews77 at gmail dot com) 12 December 2017 22:53:31 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
kevinlews (kevinlews77 at gmail dot com) 10 December 2017 21:35:17 Wow, she is one of the most beautiful girls I have seen
http://www.youtube.com/watch?v=xmxdAu6RQtM
Igor (basyk632 at mail dot ru) 27 October 2017 13:20:12 Меня ,после соединения,не слышит вызываемый абонент.Что делать?
Moisespierm (fastdelivery10vcom at pillsofviagra5 dot com) 30 March 2017 07:39:57 <a href=http://fastdelivery10v.com/>viagra fast delivery</a>
Alisha (q6wxvxqvkd at gmail dot com) 18 December 2015 07:48:20 There are so many ways to use brick, block, slabs, rocks, gravel and other stone ftriaomons. This running water will in fact speed up your removal of the water and with a simple flip of the valve can add water to the fish tank. A large number of workers, particularly in the professional occupations, will become eligible for retirement in the coming years, and some companies may have trouble coping with the loss of many experienced workers to retirement at a time when the industry is expanding production on dryer machine and ball mill machines.my blog ...
Chananchida (fjsad428b at outlook dot com) 09 October 2015 17:48:07 5.0 出 5 明星 Cheapest approach to cut upon your phone bills You can oparete your aged phone with Skype as well as compensate $3 the month for total US/Canada calls. Pays for itself in the month. http://oruqlpzscc.com [url=http://wmdlsbqrx.com]wmdlsbqrx[/url] [link=http://nzvnfmgfvd.com]nzvnfmgfvd[/link]
Samijee (c6g9ls99o at hotmail dot com) 09 October 2015 09:32:47 5.0 出 5 明星 伟大的产品 excellent! This is the good item, the<a href="http://xrxllq.com"> apacoprh</a> to go to giveaway yourself up from the laptop as good as still suffer the low price calls around Skype. Took me the couple of mins to bond as good as functions incredibly well.
Anadi (0rew3il09y at gmail dot com) 08 October 2015 21:17:37 There are so many ways to use brick, block, slabs, rocks, gravel and other stone <a href="http://umohimojd.com">fomantiors</a>. This running water will in fact speed up your removal of the water and with a simple flip of the valve can add water to the fish tank. A large number of workers, particularly in the professional occupations, will become eligible for retirement in the coming years, and some companies may have trouble coping with the loss of many experienced workers to retirement at a time when the industry is expanding production on dryer machine and ball mill machines.my blog ...
Pintu (rlxh8yx1 at hotmail dot com) 25 September 2015 13:31:42 Well I do have a lot of respect for didx, I would never port busienss numbers to them. The simple reason is that they are just a platform.With busiensses you must have a provider that can be responsible for a high level of service.bbhenry if you need any advice or help on this matter please contact me at moshe at flatplanetphone.com.BTW Voxbone is a reliable partner. Yes they do have their issues since at the end of the day they are just a clearing house for many carriers in different countries. BUT they work to solve fast (in European terms )Bottom line, they are good.
Vector (Contact at eInformationOrganizer dot com) 15 August 2009 05:14:21 I don't think that you guys want SQL code from your page being displayed....
Jay (jonty_11 at yahoo dot com) 20 February 2009 07:43:23 If I have a host=IP Address..
nat=yes
canreinvite=no
qualify=yes
ANd my SIP peer with IP ADdress abovesends an INVITE with source port non 5060....Asterisk errors with message
Cannot find peer or user with IP:port...
I cannot add a port for this user as that varies....how do we solve this problem?
Andrew (qi_yong2001 at hotmail dot com) 08 August 2008 08:34:55 -- Starting simple switch on 'Zap/4-1'
-- Executing [6099152@test:1] Dial("Zap/4-1", "Zap/3/152") in new stack
-- Called 3/152
-- Zap/3-1 answered Zap/4-1
-- Native bridging Zap/4-1 and Zap/3-1
-- Hungup 'Zap/3-1'
== Spawn extension (test, 6099152, 1) exited non-zero on 'Zap/4-1'
-- Hungup 'Zap/4-1'
can someone help me solve this problem?
thank you
Vanessa Duarte (vaneduarte at comtel dot com dot py) 09 October 2007 19:43:01 Hi all! sorry for my english
I have a problem.. I have a little LAN in my house, with a ADSL conection, and I installed a softphone for comunication to my office work..
If I have a call for outside to network, the other softphone ring, and when a call is accepted we can't ear anything on the terminals...
jcarvalho (jcarvalho at crispimabreu dot pt) 05 June 2007 11:39:57
hi all,
in fisrt place excuse about my english,
I have a network connect to a external line (PSTN) through a router, when all ports have been open for de inside to outside network, and outside to inside have been 5060 (UDP and TCP) ports open, also I have a 8000 (UDP and TCP) port open.
I'm using a AsteriskNow server on virtual machine, and I use a softphone X-Lite on the terminals.
codecs allowed in X-lite:
-G711 aLaw
-G711 uLaw
-GSM
-iLBC
settings on the users.conf (it's a file that http url asterisk create to give support for the sip.conf):
nat = yes
disallow = all
allow = ulaw,alaw,gsm,speex,gt26 ;this settings was give me by the provider (Netcall)
Ports on the rtp.conf:
rtpstart = 8000
rtpend = 9000
(this ports had open in firewall too (Lan2WAN and WAN2Lan and the ports 5060 and 8000-9000 UDP are redirect).
Problem:
- If I have a call for outside to inside network, the other softphone ring, and when a call is accepted we can't ear anything on the terminals;
- If I have a call for inside to outside network, the other softphone ring, but only the other terminal can talk and don't ear nothing, and the first terminal (who execute the call, inside network) ear perfectly and can't talk
PS: the internal calls, that are made inside network, between asterisk extensions, work fine, both sides can talk and ear.
Does anyone have any fast and friendly suggestions? Any question post her or send me a PM.
Thanks for all your help in advance!
Rose (rosedie12003 at yahoo dot com) 01 April 2007 14:42:56 Is there some1 help me?
well, i've install fedora core 6.0 and all stuff that required to install the asterisk-1.4.2 has finished install, and completed .
but i dont know how to configurate between 2 computers , because i have 3 computers 1 is server voip and 2 are voip clients.
so how to configurate/setting on the asterisk voip server. i use only 2 headsets and sjphone...
How to:
(1)
Setting in asterisk : iax.conf, extensions.conf, sip.con.
if i use Ip address 172.18.0.0/28
server is 172.18.0.4
client 1 is 172.18.0.6 & 172.18.0.8
(2)
setting at Sjphone?
Thanks for open source helps.
Rose
souvik (souvik_sadhu at yahoo dot com) 13 March 2007 05:40:37 Starting simple switch on 'Zap/1-1'
-- Executing [777@tutorial:1] Dial("Zap/1-1", "Zap/4/+919844469506") in new stack
-- Called 4/+919844469506
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
after this no ring came to my mobile...
channel tone is blank.
what might be the problem? and how i solve.?
FB (facubarrera at gmail dot com) 04 January 2007 23:09:19 Asterisk inside a NAT, so when a i receive a call i can't hear a thing, but the caller on the outside can hear me, my phone it's on my lan behind NAT , and asterisk serves on the same box that do nat for my hosts.
How can i solute this?
phantom (nopienso2000 at yahoo dot com) 27 September 2006 18:56:12 I have a sip server inside a nat and a client in another network, i can get the extensio but i can't register it on the domain i have "bat auth" when i check that.
I did the change on the sip.conf file and sip_nat.conf but i don't have the "remote extension account authentication settings" inside the sip.conf file so i can configure the nat and canreinvite, i just have the [general] section, can somebody give me and example of that section so i can put it and test. Thanks
bharath (bharath at idssoft dot com) 16 September 2006 19:18:40 we are able to make calls from sip to sip but unable to make a call from sip to h323 or h323 to h323.can u provide the complete configuration for making calls from h323 to sip&h323
toysoft (toysoft at toysoft dot net dot nospam) 28 July 2006 00:49:34 UNREACHABLE Problem. What can I do to fix ? Thank you. TS
Mior Zairuddin (aji_no at yahoo dot com) 17 July 2006 10:50:40 My sever is located after Firewall. My testing area are use LAN. When I try to call other extension it fail. Please guide me
David Medina (pcvoxdm at gmail dot com) 16 July 2006 22:23:02 Hi, I read your post about the Nat/firewall, and I do not understand something:
You said "Also enter the same externip=xxx.xxx.xxx.xxx and localnet=xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx info from your sip.conf general settings into sip_nat.conf."
What is sip_nat.conf? is it a new conf file that you create inside the asterisk directory or where?
Please can you clarify this?
Thank you,
David Medina
DrWho's Solution to Asterisk behind NAT/Firewall (techiegz at gmail dot com) 06 July 2006 05:53:50 On your router NAT/firewall, forward SIP ports 5060 - 5082 and RTP ports 8000 - 20000 to your * server IP address. Then edit the "rtpstart" value in rtp.conf - from rtpstart=10000 to rtpstart=8000 since 8000 is the default RTP port on x-lite phones. Also enter the same externip=xxx.xxx.xxx.xxx and localnet=xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx info from your sip.conf general settings into sip_nat.conf. Then in sip.conf under the remote extension account authentication settings add nat=yes, canreinvite=no . This should get it working flawlessly, it did it for me after much research and troubleshooting. This should mark the end of NAT/firewall issues with asterisk.
NOTE: Your WAN or externip address from your ISP is usually not permanent so in the case where it changes you will have to edit the "externip=" value in sip.conf general settings and sip_nat.conf to the new value or you can register with dynamic DNS (dyndns) to automaticaly update the value.
Frank.Yang (haibo dot yang at net263 dot com) 05 July 2006 10:38:19 If My client1 behind Symmetric Nat,client2 no nat(an internet open ip),Can I configure asterisk sip.conf to support client1 connect rtp with client2.
3ks a lot!
EQuake (equake at gmail dot com) 19 May 2006 19:34:30 IAX is easier.
Venkat (vsubrama at gmail dot com) 23 March 2006 02:42:19 I have an Asterisk box at home in the USA. I would like my brother who is India to connect to it and make a call to a SIP phone I have connected to Asterisk. What is the best/easiest way (IAX2, SIP, other)? We both have broadband connections.
Gerard (gg at bmsol dot com) 15 March 2006 23:58:44 have anyone experience with asterisk and softphones when calling from pc-to-pc in the internet, you cannot hear the sounds. any hints please ????
pankaj (pank200429 at yahoo dot com) 02 February 2006 12:32:33 Hi All,i m a new born baby in this huge world of voip and asterisk.................i need your help...........so plzzz help me out......
I have an asterisk box within a lan that connects to the internet via a dsl router/modem which nats. I would like remote voip sip phones(i.e xlite) on a different lan who are also behind a nat router on another dsl line to be able to register with my asterisk box and make and receive calls through the asterisk box, without using vpn into the london office i.e if i dial an extension in my office in london to an extension provided it has registered should pass the call through the internet through nat to wherever the remote user is.
My asterisk is working properly within internal lan.......but i wanna connect it to the other network also(Internet).....
plzz help me out......
cheers...
Nico (n01010100 at yahoo dot co dot uk) 29 November 2005 15:09:13 @Daniel Howe:
Unless you have specific reason to use SIP clients, I think life would be easier for you if you used IAX2 clients for this (f.i. Idefisk, available right here on this website).
IAX2 only uses one port for sig and audio and is designed with NAT in mind (or at least it is easier to troubleshoot). You will need to make a mapping between the IAX2 port (default 4569) on your router to the internal address of your Asterisk box.
For the clients to recieve calls if they are behind NAT they would need a mapping also, which may be impossible to achief on public premises.
Personally I use OpenVPN (which is FREE!) to reach my Asterisk box from allmost anywhere. Unlike IPSec and the like, OpenVPN is very easy to config, and it uses only 1 port (UDP or TCP) for the tunnel (with configurable ports!). Within this tunnel you don't have NAT or port translation/mapping you need to care about, so most if not all SIP or IAX2 clients should work. The only downside may be a little extra latency, depending on your config or hardware.
Hope this helps. Cheers!
Daniel Howe (daniel dot howe at dial dot pipex dot com) 18 November 2005 19:04:00 Hi All,
I wonder if you can help me.
I have an asterisk box within a lan that connects to the internet via a dsl router/modem which nats. I would like remote voip sip phones on a different lan who are also behind a nat router on another dsl line to be able to register with my asterisk box and make and receive calls through the asterisk box, without using vpn into the london office i.e if i dial an extension in my office in london to an extension provided it has registered should pass the call through the internet through nat to wherever the remote user is. These remote users may move around alot so port forwarding on remote sites (i.e airports) is not really an option. I'm stuck on this one.
rumon (rumon_143 at yahoo dot com) 11 October 2005 21:27:53 I am trying to connect a sip device(handy tone) with my sip server for calling under NAT. But i c tht its not registerd. But when its in pulic IP its work fine. I have make extention configuration in my server where my configuration sample is :
prashant (prashant_ydv at rediffmail dot com) 22 September 2005 20:58:07 i have registered on teliax service and i m using a hathway internet connection.with X-lite phone it is not logging in .it says login timed out whereas the phone with same X-lite and service settings i m getting logged in all other internet connection and the phone also works perfectly. the issue only remains with hathway internet connection.what is the nature of problem i need immediate help regarding it
thanking you
prashant
zoa (support at asteriskguru dot com) 07 July 2005 08:13:37 I have a patch for that in my office, but i am not the copyright holder.
The original author sells the patch though. (and also sells all rights)
Im not sure if it works or not. (never tried it myself).
Contact me at the email address above if you are interested.
Zoa
Wei (wei3hu2 at msn dot com) 07 July 2005 07:54:01 Hi,
You examples are great. They covered most phone-to-asterisk NAT scenario.
I have no problem of multiple phones behind the same NAT, registering with an asterisk server outside NAT (Pubic Address). Phones can call PSTN via Asterisk, or other phones behind other NATs with no problem.
But these phones can't speak to each other. They can ring each other (sip working). But when you pickup the phone, there are no audio (RTP not working). I can see the RTP packets are dropped on the NAT device with icmp port unreachable error. The source & destination RTP ports are correct. The NAT device can't forward these packets to the phone on its inside interface.
Any suggestion to fix this issue?
Thanks,
Wei
zoa (support at asteriskguru dot com) 26 June 2005 08:58:24 IF you cant register, this is not a NAT problem.
andre collazos (acollazos at corateck dot com) 24 June 2005 23:45:22 i have been trying to install a pocketc version of the xten pro.
i always get an error on proxi registration 407.
does anyone had the same problem ?
can it be fixed?
my asterisk is on a public ip no nat on it
but the pokect pc is behind the nat.
thanks for the help,
zoa (support at asteriskguru dot com) 11 June 2005 23:49:59 Hmm, obviously we fucked something up when resizing the images.
I will try to fix it next week. Sorry for the inconvenience.
Robbert (robbertfrank at gmail dot com) 11 June 2005 23:31:00 Hello,
I cant seem to read the text in the pictures..
Can you provide me or the site with some new readable pictures?