Upgrade 3CX to v18 and get it hosted free!

Asterisk SIP externip

Author image

Description

externip = extern.ip.address

Indicates the IP address (alternatively you can enter a hostname) that will be used as the source IP address for all SIP messages when Asterisk sip nat is specified.

Examples:

Use it in [general] section of SIP.CONF

[general]
externip = 200.201.202.203
localnet=192.168.2.0/255.255.255.0
localnet=10.5.1.0/255.255.255.192

Notes:  externip 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.8

Addition of the ‘subscribe_network_change’ option for turning on and off res_stun_monitor module support in chan_sip.
The ‘Asterisk SIP 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.x

Apparently CVS head (Dec ’04 and later) comes with an in-box solution that doesn’t require the solutions discussed above. 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.x

Discussion (Nov ’04):
The issue: DSL provider hands out new IP every 24h (forced re-connect).

Comments:

  • 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 Address 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)?

See Also


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.