What Say You?


If you've found this primer useful in kickstarting your Asterisk adventure, or if you've found something unclear or have any other comments on the primer, I'd love to hear from you.

Other People's Thoughts

Posted by Kevin Roberts on
First of all very good guide just what I needed to get started. I got my phone to register, made the dialplan, but for some odd reason, I can not here any audio from the system I checked my softphones, but do not here anything. I tryed it on both my computer and my iphone. Any help would be a great help. I am doing this through the vps and am not at the computer that asterisk is running on so I am wondering if that is the problem sence it is internal it will not play over the phone or something? even though I am am in a different location? Just wondering.
Kevin Roberts Ps. I am a blind user of asterisk by the way.
Posted by BobM on
One-way (or no-way) audio is almost always firewall/NAT issues, something I've yet to cover here (I will write that section eventually.)

If the peers are behind NAT, make sure to (at minimum) set nat=yes for them in sip.conf -- I usually use nat=auto_force_rport,comedia -- because most of the time the device is unaware of its external IP address and gives out its bogus LAN one, which Asterisk needs to ignore. This also sends RTP back to the port Asterisk received it on which should punch through most NAT firewalls.

If Asterisk its self is behind NAT, it gets more complicated; you need to setup externaddr and localnet in sip.conf, and port-forward UDP 5060 for SIP and a range of UDP ports as specified in rtp.conf through the firewall to your Asterisk box, otherwise incoming connections and media won't make it. Similarly, the firewall needs to allow Asterisk to send out on almost any UDP port, as we have no control over what port the remote end will ask for us to send them media on.
Posted by kapil choudhary on
Hi, your blog is very helpfull. Thanks to share, Please share more,,,,im waiting
Posted by jim on

The most nearly definition that I can understand is that
In my opinion the relevand conditions to configure a good SIP VoIP configuration is to have a good programs SIP is like a P2P one, I mean you have opened sip port where the calls come in and you can send calls usually SIP with TCP like a HTTP browsing and the data Voice and Voice-Video with RTP with UDP on ports realtime like 5000 or 8000 not listening you listen with SIP only and pacts sdp texts, opening after the call comes with sip rings and msg, like tigrering NAT games on router, you also need static NAT on your Router to really use a peer like a friend behavior, peer for me is a friend client like zoiper or like other big softphones. So Asterisk say that you can write sip url without have be registered with asterisk, that is a peer something like sip:555@ip_addr_dyn_domain.com, and calling on your own subnetwork with host@ip. So if you are user is asterisk who does it, and you don't have to configure problems with 5060 ports and sdp/rtp 5000 8000, I think asterisk uses push notificatons storing calls registrations not over SIP like a peer only client sip requests half protocol implementation: bad issue. And its like router with users configuration or router with NAT who knows where place calls with ip subnetworks clients registrations. So if asterisk recives the sip packets from a router from internet you can do it like a router-peer-asterisk-peer, or i mean internet-peer-router-peer-lanmobiles-push-users, and so on. Where I can found this configurations, I think asterisk have it, I understand the friend is more explicit cases configurations, like how you can be user and peer on a voip router, asterisk pbx and internet subscription.
Posted by BobM on
Jim, I don't know if I understand your post completely, but here are a few notes based on what I think you're saying.

First, the User/Peer/Friend explanation at the URL you provide makes *no* sense in terms of understanding what the configuration in Asterisk actually does and knowing which to use. When a device entry in sip.conf is set to type=user, Asterisk can only match a call to that device based on its name; It has no associated IP address, so Asterisk is unable to send calls to the device, only receive calls from it since it doesn't know how to reach the device. A type=peer matches a call to the device based on its IP address and SIP port number, whether these are set statically for the device (via host=xxx and port=xxx) or dynamically if the device registers to Asterisk (via host=dynamic). Asterisk can send or receive calls from type=peer devices (assuming the IP address and port number it has for the device are good.) Finally, type=friend is a combination of the two, internally making both a type=user and type=peer for the device.

Second, in terms of the whole communications path, Asterisk is what is called a "Back-to-Back User Agent" (B2BUA) which means that, by default, Asterisk is always a "man in the middle"; When Phone-A calls Phone-B, Phone-A is connected directly to Asterisk, who sets up a new call to Phone-B, who in turn is also connected directly to Asterisk. Asterisk sits in the middle, acting as a bridge for Phone-A and Phone-B who ultimately don't know anything about each other. A SIP Proxy, on the other hand, sits off to the side, only acting as a facilitator to get Phone-A and Phone-B to connect to each other directly. Asterisk CAN be made to act more like a proxy using "directmedia=yes" to try and get the two endpoints to talk directly, but doing so is a bit beyond the scope of this comments page.
Posted by Antonius on
Bob! Your Asterisk Primer just saved my life!! I almost screamed when my test calls actually went through! Thank you so much for this resource and for spending time creating this beautiful blog post. You honestly have no idea just how helpful this has been for me! Thanks again! I owe you one!

Posted by Harry on
This is great. Thank you!

Add Your Thoughts

(Your email will not be publicly displayed.)