Tap here to compare the top VoIP providersTap here to hide the top VoIP Providers
Asterisk SIP externip
Business SIP Providers
|Provider||Plan Details||Monthly Rate *|
Vonage Business SIP Trunking
Ultimate SIP Trunking Solution
Asterisk SIP externip
Synopsisexternip = extern.ip.address
DescriptionIndicates the IP address (alternatively you can enter a hostname) that will be used as the source IP address for all SIP messages when NAT is specified.
Examples - Use it in [general] section of SIP.CONF[general]
externip = 22.214.171.124
Notesexternip can only appear under the [general] section of the sip.conf
If you have SIP peers both inside and outside your NAT'ed network, you will need to use the localnet parameter so Asterisk can distinguish between them.
Asterisk 1.8Addition of the 'subscribe_network_change' option for turning on and off res_stun_monitor module support in chan_sip.
The 'stunaddr' option has been removed from chan_sip. This feature did not behave as expected, had no correct use case, and was not RFC compliant. The removal of this feature will hopefully be followed by a correct RFC compliant STUN implementation in chan_sip in the future.
Changes for Asterisk 1.2.xApparently CVS head (Dec '04 and later) comes with an in-box solution that doesn't require the solutions discussed above. See bugs 3086 and 3262. Taken from the sample sip.conf:
;externhost=foo.dyndns.net ; Alternatively you can specify an
; external host, and Asterisk will
; perform DNS queries periodically. Not
; recommended for production
; environments! Use externip instead
;externrefresh=10 ; How often to refresh externhost if
; used (in seconds)
Implementation tips Asterisk 1.0.xDiscussion (Nov '04):
The issue: DSL provider hands out new IP every 24h (forced re-connect)
See also bug 3086 (included in Asterisk v1.0.6 and later)
> Have your cron job issue an "asterisk -rx 'restart when convenient'"
> command instead of a hard restart. That will wait until there are no
> active channels to restart. Also, issuing a 'sip reload' instead of
> restarting * is probably sufficient to re-register with Broadvoice.
Unfortunately not. I have the same problem and the same solution here.
You really have to do a restart of asterisk. I think the reason that
asterisk does not always lookup the IP Adress for the DDNS-Hostname is
performance. But it would be nice if a sip reload could do so.
Question: With Asterisk v1.0.3 and later we don't need to issue a "reload"
in order for Asterisk to pick up its new IP address (for SIP)?
- How to update externip= when IP address changes
- More considerations
- bug 2662: Closed, not implemented
- Discussion in German of this issue
- Solution for Asterisk on fli4l (German)
- Asterisk SIP externhost: New in Asterisk v1.2.x
- Asterisk SIP externrefresh: New in Asterisk v1.2.x
- Asterisk SIP stunaddr: For STUN support (new in Asterisk 1.6 but unreliable)
Go back to Asterisk config sip.conf
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+