Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Update peer IP address

Goto page 1, 2  Next
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
daniel.heckl at gmail.com
Guest





PostPosted: Mon Mar 30, 2015 11:32 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

Hello
I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom Germany. We have sometimes problems with incoming and outgoing calls. I hope I can explain it understandable.

For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de), the message is answered with OK and the peer is registered.

Usually INVITES comes now from this ip address. All works fine. But sometimes INVITES comes from an other IP address, for example 217.0.23.100. This request Asterisk responds with 401 Unauthorized.

In the next register procedure REGISTER are sent to the new ip address and answered also with OK. But qualify OPTIONS are continue be sent to the old ip address. Incoming and outgoing calls are canceled. Outgoing calls are answered with Forbidden.

Even if the REGISTER procedure works with the new ip address, the peers are connected with the old address.

Waiting doesn’t help, only a „sip reload“ update the ip address of the peer.

What is the solution for this problem? How can asterisk update the peer?

The Asterisk is local behind a NAT with a firewall, following settings are used:

externhost with DynDNS
stun with stun.t-online.de
nat=yes
srvlookup=yes
allowguest=no
trustrpid=no
insecure=invite
qualify=yes

Thank you!
Daniel
Back to top
sebastian_ml at gmx.net
Guest





PostPosted: Mon Mar 30, 2015 1:09 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:
Quote:
Hello

I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom
Germany. We have sometimes problems with incoming and outgoing calls.
I hope I can explain it understandable.

Hello Daniel,

I'll find myself in the same situation a few weeks from now :-)

Quote:

For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de
<http://tel.t-online.de/>), the message is answered with OK and the
peer is registered.

Usually INVITES comes now from this ip address. All works fine. But
sometimes INVITES comes from an other IP address, for example
217.0.23.100. This request Asterisk responds with 401 Unauthorized.

In the next register procedure REGISTER are sent to the new ip address
and answered also with OK. But qualify OPTIONS are continue be sent to
the old ip address. Incoming and outgoing calls are canceled. Outgoing
calls are answered with Forbidden.

Even if the REGISTER procedure works with the new ip address, the
peers are connected with the old address.

Waiting doesn’t help, only a „sip reload“ update the ip address of the
peer.

What is the solution for this problem? How can asterisk update the
peer?

I think the solution - for the inbound issue at least - could be to add
more hosts as a peer. Have a looks at this forum post:

http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371

The user used a template and than he added peers, each with its own IP
address. The provided list was last updated in 2014, though, so I assume
the provider in the meantime has added to that list.

It looks pretty tedious, though, I mean there could be dozens of IPs
you'd have to add. But I guess this is the way to go with Asterisk 11
and chan_sip.

The future looks brighter Smile I read that with pjsip, which I understand
is the replacement for chan_sip, you can have one peer entry and match
an IP range instead of a single host. That should tidy up the dialplan.

What I'm a little afraid of is the SIP provider using IPs out of a range
that they also use for other services. Maybe out of the same range they
hand out IPs to their customers. I guess we got to be careful :-)

Kind regards,
Sebastian

Quote:
The Asterisk is local behind a NAT with a firewall, following settings
are used:

externhost with DynDNS stun with stun.t-online.de
<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=no
trustrpid=no insecure=invite qualify=yes

Thank you! Daniel

Quote:
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Tue Mar 31, 2015 5:36 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

Hello Sebastian,
I had already seen this list of the hosts, but it is not active. All servers with which my Asterisk has been communicated are not listed.

A port scan, to eventually update the list, found hundreds of servers provided in the address range 217.0.0.0/13 with open port 5060, some were even not found. I think there must be another solution.

If I change insecure to insecure=port,invite - could that be a solution?

Or should I try to change to res_pjsip (upgrade to Asterisk 13 is no problem)? Has there anyone experience with dynamic ip addresses of Asterisk?

Daniel


Quote:
Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:
On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:
Quote:
HelloI use Asterisk 11 with FreePBX 12. Our SIP Provider is TelekomGermany. We have sometimes problems with incoming and outgoing calls.I hope I can explain it understandable.
Hello Daniel,I'll find myself in the same situation a few weeks from now Smile
Quote:
For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de<http://tel.t-online.de/>), the message is answered with OK and thepeer is registered.Usually INVITES comes now from this ip address. All works fine. Butsometimes INVITES comes from an other IP address, for example217.0.23.100. This request Asterisk responds with 401 Unauthorized.In the next register procedure REGISTER are sent to the new ip addressand answered also with OK. But qualify OPTIONS are continue be sent tothe old ip address. Incoming and outgoing calls are canceled. Outgoingcalls are answered with Forbidden.Even if the REGISTER procedure works with the new ip address, thepeers are connected with the old address.Waiting doesn’t help, only a „sip reload“ update the ip address of thepeer. What is the solution for this problem? How can asterisk update thepeer?
I think the solution - for the inbound issue at least - could be to addmore hosts as a peer. Have a looks at this forum post:http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371The user used a template and than he added peers, each with its own IPaddress. The provided list was last updated in 2014, though, so I assumethe provider in the meantime has added to that list.It looks pretty tedious, though, I mean there could be dozens of IPsyou'd have to add. But I guess this is the way to go with Asterisk 11and chan_sip.The future looks brighter Smile I read that with pjsip, which I understandis the replacement for chan_sip, you can have one peer entry and matchan IP range instead of a single host. That should tidy up the dialplan.What I'm a little afraid of is the SIP provider using IPs out of a rangethat they also use for other services. Maybe out of the same range theyhand out IPs to their customers. I guess we got to be careful :-)Kind regards,Sebastian
Quote:
The Asterisk is local behind a NAT with a firewall, following settingsare used:externhost with DynDNS stun with stun.t-online.de<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=notrustrpid=no insecure=invite qualify=yesThank you! Daniel
Quote:
-- _____________________________________________________________________-- Bandwidth and Colocation Provided by http://www.api-digital.com --New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/helloasterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________-- Bandwidth and Colocation Provided by http://www.api-digital.com --New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/helloasterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Tue Mar 31, 2015 1:36 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

Maybe someone could elaborate on my first question again.


If the ip address changes while a REGISTER period, the ip address of the peer isn't been updated. How can asterisk update the ip address of the peer?

Am 31.03.2015 um 12:36 schrieb Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)>:


Quote:
Hello Sebastian,
I had already seen this list of the hosts, but it is not active. All servers with which my Asterisk has been communicated are not listed.

A port scan, to eventually update the list, found hundreds of servers provided in the address range 217.0.0.0/13 with open port 5060, some were even not found. I think there must be another solution.

If I change insecure to insecure=port,invite - could that be a solution?

Or should I try to change to res_pjsip (upgrade to Asterisk 13 is no problem)? Has there anyone experience with dynamic ip addresses of Asterisk?

Daniel


Quote:
Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:
On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:
Quote:
HelloI use Asterisk 11 with FreePBX 12. Our SIP Provider is TelekomGermany. We have sometimes problems with incoming and outgoing calls.I hope I can explain it understandable.
Hello Daniel,I'll find myself in the same situation a few weeks from now Smile
Quote:
For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de<http://tel.t-online.de/>), the message is answered with OK and thepeer is registered.Usually INVITES comes now from this ip address. All works fine. Butsometimes INVITES comes from an other IP address, for example217.0.23.100. This request Asterisk responds with 401 Unauthorized.In the next register procedure REGISTER are sent to the new ip addressand answered also with OK. But qualify OPTIONS are continue be sent tothe old ip address. Incoming and outgoing calls are canceled. Outgoingcalls are answered with Forbidden.Even if the REGISTER procedure works with the new ip address, thepeers are connected with the old address.Waiting doesn’t help, only a „sip reload“ update the ip address of thepeer. What is the solution for this problem? How can asterisk update thepeer?
I think the solution - for the inbound issue at least - could be to addmore hosts as a peer. Have a looks at this forum post:http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371The user used a template and than he added peers, each with its own IPaddress. The provided list was last updated in 2014, though, so I assumethe provider in the meantime has added to that list.It looks pretty tedious, though, I mean there could be dozens of IPsyou'd have to add. But I guess this is the way to go with Asterisk 11and chan_sip.The future looks brighter Smile I read that with pjsip, which I understandis the replacement for chan_sip, you can have one peer entry and matchan IP range instead of a single host. That should tidy up the dialplan.What I'm a little afraid of is the SIP provider using IPs out of a rangethat they also use for other services. Maybe out of the same range theyhand out IPs to their customers. I guess we got to be careful :-)Kind regards,Sebastian
Quote:
The Asterisk is local behind a NAT with a firewall, following settingsare used:externhost with DynDNS stun with stun.t-online.de<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=notrustrpid=no insecure=invite qualify=yesThank you! Daniel
Quote:
-- _____________________________________________________________________-- Bandwidth and Colocation Provided by http://www.api-digital.com --New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/helloasterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________-- Bandwidth and Colocation Provided by http://www.api-digital.com --New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/helloasterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users



Back to top
sgriepentrog at digium...
Guest





PostPosted: Tue Mar 31, 2015 3:46 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

You have two options for dealing with an IP change during the registration period:


1) set the registration time to shorter period of time to minimize the downtime


2) detect that the IP address has changed via whatever method available, and then issue a "sip reload" CLI command to asterisk, which will cause it to resend registrations immediately.


On Tue, Mar 31, 2015 at 1:36 PM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Quote:
Maybe someone could elaborate on my first question again.


If the ip address changes while a REGISTER period, the ip address of the peer isn't been updated. How can asterisk update the ip address of the peer?

Am 31.03.2015 um 12:36 schrieb Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)>:


Quote:
Hello Sebastian,

I had already seen this list of the hosts, but it is not active. All servers with which my Asterisk has been communicated are not listed.


A port scan, to eventually update the list, found hundreds of servers provided in the address range 217.0.0.0/13 with open port 5060, some were even not found. I think there must be another solution.


If I change insecure to insecure=port,invite - could that be a solution?


Or should I try to change to res_pjsip (upgrade to Asterisk 13 is no problem)? Has there anyone experience with dynamic ip addresses of Asterisk?


Daniel



Quote:
Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:

On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:
Quote:
Hello

I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom
Germany. We have sometimes problems with incoming and outgoing calls.
I hope I can explain it understandable.

Hello Daniel,

I'll find myself in the same situation a few weeks from now Smile

Quote:

For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de
<http://tel.t-online.de/>), the message is answered with OK and the
peer is registered.

Usually INVITES comes now from this ip address. All works fine. But
sometimes INVITES comes from an other IP address, for example
217.0.23.100. This request Asterisk responds with 401 Unauthorized.

In the next register procedure REGISTER are sent to the new ip address
and answered also with OK. But qualify OPTIONS are continue be sent to
the old ip address. Incoming and outgoing calls are canceled. Outgoing
calls are answered with Forbidden.

Even if the REGISTER procedure works with the new ip address, the
peers are connected with the old address.

Waiting doesn’t help, only a „sip reload“ update the ip address of the
peer.

What is the solution for this problem? How can asterisk update the
peer?

I think the solution - for the inbound issue at least - could be to add
more hosts as a peer. Have a looks at this forum post:

http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371

The user used a template and than he added peers, each with its own IP
address. The provided list was last updated in 2014, though, so I assume
the provider in the meantime has added to that list.

It looks pretty tedious, though, I mean there could be dozens of IPs
you'd have to add. But I guess this is the way to go with Asterisk 11
and chan_sip.

The future looks brighter Smile I read that with pjsip, which I understand
is the replacement for chan_sip, you can have one peer entry and match
an IP range instead of a single host. That should tidy up the dialplan.

What I'm a little afraid of is the SIP provider using IPs out of a range
that they also use for other services. Maybe out of the same range they
hand out IPs to their customers. I guess we got to be careful Smile

Kind regards,
Sebastian

Quote:
The Asterisk is local behind a NAT with a firewall, following settings
are used:

externhost with DynDNS stun with stun.t-online.de
<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=no
trustrpid=no insecure=invite qualify=yes

Thank you!  Daniel
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users








--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Wed Apr 01, 2015 1:56 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

Scott, thank you four your reply.


I had already though about both options, but the problem is, that after an ip change AND a new registration the ip address of the peer is not updated automatically. INVITES are answered with 401.


Only after a sip reload the peer works again.


That can't be normal...


Daniel


Am 31.03.2015 um 22:45 schrieb Scott Griepentrog <sgriepentrog@digium.com (sgriepentrog@digium.com)>:


Quote:
You have two options for dealing with an IP change during the registration period:


1) set the registration time to shorter period of time to minimize the downtime


2) detect that the IP address has changed via whatever method available, and then issue a "sip reload" CLI command to asterisk, which will cause it to resend registrations immediately.


On Tue, Mar 31, 2015 at 1:36 PM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Quote:
Maybe someone could elaborate on my first question again.


If the ip address changes while a REGISTER period, the ip address of the peer isn't been updated. How can asterisk update the ip address of the peer?

Am 31.03.2015 um 12:36 schrieb Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)>:


Quote:
Hello Sebastian,

I had already seen this list of the hosts, but it is not active. All servers with which my Asterisk has been communicated are not listed.


A port scan, to eventually update the list, found hundreds of servers provided in the address range 217.0.0.0/13 with open port 5060, some were even not found. I think there must be another solution.


If I change insecure to insecure=port,invite - could that be a solution?


Or should I try to change to res_pjsip (upgrade to Asterisk 13 is no problem)? Has there anyone experience with dynamic ip addresses of Asterisk?


Daniel



Quote:
Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:

On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:
Quote:
Hello

I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom
Germany. We have sometimes problems with incoming and outgoing calls.
I hope I can explain it understandable.

Hello Daniel,

I'll find myself in the same situation a few weeks from now Smile

Quote:

For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de
<http://tel.t-online.de/>), the message is answered with OK and the
peer is registered.

Usually INVITES comes now from this ip address. All works fine. But
sometimes INVITES comes from an other IP address, for example
217.0.23.100. This request Asterisk responds with 401 Unauthorized.

In the next register procedure REGISTER are sent to the new ip address
and answered also with OK. But qualify OPTIONS are continue be sent to
the old ip address. Incoming and outgoing calls are canceled. Outgoing
calls are answered with Forbidden.

Even if the REGISTER procedure works with the new ip address, the
peers are connected with the old address.

Waiting doesn’t help, only a „sip reload“ update the ip address of the
peer.

What is the solution for this problem? How can asterisk update the
peer?

I think the solution - for the inbound issue at least - could be to add
more hosts as a peer. Have a looks at this forum post:

http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371

The user used a template and than he added peers, each with its own IP
address. The provided list was last updated in 2014, though, so I assume
the provider in the meantime has added to that list.

It looks pretty tedious, though, I mean there could be dozens of IPs
you'd have to add. But I guess this is the way to go with Asterisk 11
and chan_sip.

The future looks brighter Smile I read that with pjsip, which I understand
is the replacement for chan_sip, you can have one peer entry and match
an IP range instead of a single host. That should tidy up the dialplan.

What I'm a little afraid of is the SIP provider using IPs out of a range
that they also use for other services. Maybe out of the same range they
hand out IPs to their customers. I guess we got to be careful Smile

Kind regards,
Sebastian

Quote:
The Asterisk is local behind a NAT with a firewall, following settings
are used:

externhost with DynDNS stun with stun.t-online.de
<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=no
trustrpid=no insecure=invite qualify=yes

Thank you! Daniel
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users








--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org





--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
asterisk at voipbusine...
Guest





PostPosted: Wed Apr 01, 2015 9:41 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

    If I correctly understand what the problem is, what I did was write a script that runs out of CRON every 15 minutes. It checks the outside IP address by querying http://checkip.dyndns.org and compares it to the IP address stored in the parameter “externip” in the [general] section of sip.conf. If the two values are the same, the script exits quietly. If they are different, the script updates “externip” with the new address, does a sip reload, and shoots me an email saying there was an update. It's a fairly simple and straightforward process and does the job. I use this script for all PBX’s that are behind a NAT. I hope this helps.
Regards;
John

From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Daniel Heckl
Sent: Wednesday, April 01, 2015 2:56 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Update peer IP address





Scott, thank you four your reply.



I had already though about both options, but the problem is, that after an ip change AND a new registration the ip address of the peer is not updated automatically. INVITES are answered with 401.



Only after a sip reload the peer works again.



That can't be normal...



Daniel



Am 31.03.2015 um 22:45 schrieb Scott Griepentrog <sgriepentrog@digium.com (sgriepentrog@digium.com)>:
Quote:

You have two options for dealing with an IP change during the registration period:



1) set the registration time to shorter period of time to minimize the downtime



2) detect that the IP address has changed via whatever method available, and then issue a "sip reload" CLI command to asterisk, which will cause it to resend registrations immediately.



On Tue, Mar 31, 2015 at 1:36 PM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Maybe someone could elaborate on my first question again.





If the ip address changes while a REGISTER period, the ip address of the peer isn't been updated. How can asterisk update the ip address of the peer?


Am 31.03.2015 um 12:36 schrieb Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)>:
Quote:

Hello Sebastian,


I had already seen this list of the hosts, but it is not active. All servers with which my Asterisk has been communicated are not listed.



A port scan, to eventually update the list, found hundreds of servers provided in the address range 217.0.0.0/13 with open port 5060, some were even not found. I think there must be another solution.



If I change insecure to insecure=port,invite - could that be a solution?



Or should I try to change to res_pjsip (upgrade to Asterisk 13 is no problem)? Has there anyone experience with dynamic ip addresses of Asterisk?



Daniel



Quote:

Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:


On Mon, Mar 30, 2015 at 06:31:46PM +0200, Daniel Heckl wrote:


Hello

I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom
Germany. We have sometimes problems with incoming and outgoing calls.
I hope I can explain it understandable.

Hello Daniel,

I'll find myself in the same situation a few weeks from now Smile




For example, Asterisk sends a REGISTER to 217.0.23.68 (tel.t-online.de
<http://tel.t-online.de/>), the message is answered with OK and the
peer is registered.

Usually INVITES comes now from this ip address. All works fine. But
sometimes INVITES comes from an other IP address, for example
217.0.23.100. This request Asterisk responds with 401 Unauthorized.

In the next register procedure REGISTER are sent to the new ip address
and answered also with OK. But qualify OPTIONS are continue be sent to
the old ip address. Incoming and outgoing calls are canceled. Outgoing
calls are answered with Forbidden.

Even if the REGISTER procedure works with the new ip address, the
peers are connected with the old address.

Waiting doesn’t help, only a „sip reload“ update the ip address of the
peer.

What is the solution for this problem? How can asterisk update the
peer?

I think the solution - for the inbound issue at least - could be to add
more hosts as a peer. Have a looks at this forum post:

http://www.ip-phone-forum.de/showthread.php?t=268787&p=1999371&viewfull=1#post1999371

The user used a template and than he added peers, each with its own IP
address. The provided list was last updated in 2014, though, so I assume
the provider in the meantime has added to that list.

It looks pretty tedious, though, I mean there could be dozens of IPs
you'd have to add. But I guess this is the way to go with Asterisk 11
and chan_sip.

The future looks brighter Smile I read that with pjsip, which I understand
is the replacement for chan_sip, you can have one peer entry and match
an IP range instead of a single host. That should tidy up the dialplan.

What I'm a little afraid of is the SIP provider using IPs out of a range
that they also use for other services. Maybe out of the same range they
hand out IPs to their customers. I guess we got to be careful Smile

Kind regards,
Sebastian



The Asterisk is local behind a NAT with a firewall, following settings
are used:

externhost with DynDNS stun with stun.t-online.de
<http://stun.t-online.de/> nat=yes srvlookup=yes allowguest=no
trustrpid=no insecure=invite qualify=yes

Thank you! Daniel



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users









--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users





--

Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org





--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Wed Apr 01, 2015 9:48 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

John,

thank you four your answer. I think you have misunderstood the problem. It’s about a ip address change of the sip trunk, not of my asterisk server.

Kind regards,
Daniel

Quote:
Am 01.04.2015 um 16:40 schrieb Tech Support <asterisk@voipbusiness.us (asterisk@voipbusiness.us)>:
If I correctly understand what the problem is, what I did was write a script that runs out of CRON every 15 minutes. It checks the outside IP address by querying http://checkip.dyndns.org and compares it to the IP address stored in the parameter “externip” in the [general] section of sip.conf. If the two values are the same, the script exits quietly. If they are different, the script updates “externip” with the new address, does a sip reload, and shoots me an email saying there was an update. It's a fairly simple and straightforward process and does the job. I use this script for all PBX’s that are behind a NAT. I hope this helps.
Regards;
John


Back to top
andres at telesip.net
Guest





PostPosted: Wed Apr 01, 2015 10:01 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

On 4/1/15 10:48 AM, Daniel Heckl wrote:

Quote:
John,

thank you four your answer. I think you have misunderstood the problem. Its about a ip address change of the sip trunk, not of my asterisk server.
You would probably benefit by enabling the DNS Manager to allow for dynamic IP changes:

# cat dnsmgr.conf
[general]
enable=yes ; enable creation of managed DNS lookups
; default is 'no'
refreshinterval=180 ; refresh managed DNS lookups every <n> seconds
; default is 300 (5 minutes)


Quote:

Kind regards,
Daniel

Quote:
Am 01.04.2015 um 16:40 schrieb Tech Support <asterisk@voipbusiness.us (asterisk@voipbusiness.us)>:
If I correctly understand what the problem is, what I did was write a script that runs out of CRON every 15 minutes. It checks the outside IP address by queryinghttp://checkip.dyndns.organd compares it to the IP address stored in the parameter externip in the [general] section of sip.conf. If the two values are the same, the script exits quietly. If they are different, the script updates externip with the new address, does a sip reload, and shoots me an email saying there was an update. It's a fairly simple and straightforward process and does the job. I use this script for all PBXs that are behind a NAT. I hope this helps.
Regards;
John





--
Technical Support
http://www.cellroute.net
Back to top
sebastian_ml at gmx.net
Guest





PostPosted: Wed Apr 01, 2015 12:19 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

On Tue, Mar 31, 2015 at 12:36:34PM +0200, Daniel Heckl wrote:
Quote:
Hello Sebastian,

I had already seen this list of the hosts, but it is not active. All
servers with which my Asterisk has been communicated are not listed.

A port scan, to eventually update the list, found hundreds of servers
provided in the address range 217.0.0.0/13 with open port 5060, some
were even not found. I think there must be another solution.

If I change insecure to insecure=port,invite - could that be a
solution?

Hello Daniel,

I've asked myself that, too. But I don't have access to the connection,
yet, so I can't test it right away.

Kind regards,
Sebastian

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
sebastian_ml at gmx.net
Guest





PostPosted: Wed Apr 01, 2015 12:23 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

On Wed, Apr 01, 2015 at 11:00:56AM -0400, Andres wrote:
Quote:
On 4/1/15 10:48 AM, Daniel Heckl wrote:
Quote:
John,

thank you four your answer. I think you have misunderstood the
problem. It’s about a ip address change of the sip trunk, not of my
asterisk server.
You would probably benefit by enabling the DNS Manager to allow for
dynamic IP changes:

# cat dnsmgr.conf [general] enable=yes ; enable creation
of managed DNS lookups ; default is 'no' refreshinterval=180 ;
refresh managed DNS lookups every <n> seconds ; default is 300 (5
minutes)

Hello Andres,

I read that same suggestion elsewhere in connection with Deutsche
Telekom, so it seems there's some benefit in it.

Daniel, did you try it out already?

Kind regards,
Sebastian

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Thu Apr 02, 2015 9:03 am    Post subject: [asterisk-users] Update peer IP address Reply with quote

Ok, I have tested dnsmgr. This is not a solution, the situation has not changed. With dnsmgr I can not place outbound calls. I do not know why and what dnsmgr really do.

My current solution is as follows:

Say allowguest=yes, configure the default context that there can not be placed outbound calls. Use iptables to DROP all at your SIP port and allow only your local phones and the sip trunk ip range. I think srvlookup must be set to yes to place outbound calls if there is an ip address change.

I think with the restriction of the firewall that should be a secure solution.

Quote:
Am 01.04.2015 um 19:23 schrieb Sebastian Kemper <sebastian_ml@gmx.net>:

On Wed, Apr 01, 2015 at 11:00:56AM -0400, Andres wrote:
Quote:
On 4/1/15 10:48 AM, Daniel Heckl wrote:
Quote:
John,

thank you four your answer. I think you have misunderstood the
problem. It’s about a ip address change of the sip trunk, not of my
asterisk server.
You would probably benefit by enabling the DNS Manager to allow for
dynamic IP changes:

# cat dnsmgr.conf [general] enable=yes ; enable creation
of managed DNS lookups ; default is 'no' refreshinterval=180 ;
refresh managed DNS lookups every <n> seconds ; default is 300 (5
minutes)

Hello Andres,

I read that same suggestion elsewhere in connection with Deutsche
Telekom, so it seems there's some benefit in it.

Daniel, did you try it out already?

Kind regards,
Sebastian

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
sgriepentrog at digium...
Guest





PostPosted: Thu Apr 02, 2015 1:12 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

​I'd be curious if setting


insecure=invite,port


makes any difference either (without alllowguest on).



On Thu, Apr 2, 2015 at 9:03 AM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Quote:
Ok, I have tested dnsmgr. This is not a solution, the situation has not changed. With dnsmgr I can not place outbound calls. I do not know why and what dnsmgr really do.

My current solution is as follows:

Say allowguest=yes, configure the default context that there can not be placed outbound calls. Use iptables to DROP all at your SIP port and allow only your local phones and the sip trunk ip range. I think srvlookup must be set to yes to place outbound calls if there is an ip address change.

I think with the restriction of the firewall that should be a secure solution.

Quote:
Am 01.04.2015 um 19:23 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>:

On Wed, Apr 01, 2015 at 11:00:56AM -0400, Andres wrote:
Quote:
On 4/1/15 10:48 AM, Daniel Heckl wrote:
Quote:
John,

thank you four your answer. I think you have misunderstood the
problem. It’s about a ip address change of the sip trunk, not of my
asterisk server.
You would probably benefit by enabling the DNS Manager to allow for
dynamic IP changes:

# cat dnsmgr.conf [general] enable=yes             ; enable creation
of managed DNS lookups ;   default is 'no' refreshinterval=180   ;
refresh managed DNS lookups every <n> seconds ;   default is 300 (5
minutes)

Hello Andres,

I read that same suggestion elsewhere in connection with Deutsche
Telekom, so it seems there's some benefit in it.

Daniel, did you try it out already?

Kind regards,
Sebastian

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org
Back to top
daniel.heckl at gmail.com
Guest





PostPosted: Thu Apr 02, 2015 2:28 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

Scott, I have changed the configuration as said it and will test it. I’m curious.

Can you briefly explain what insecure=invite,port does?

;insecure=port ; Allow matching of peer by IP address without
; matching port number
;insecure=invite ; Do not require authentication of incoming INVITEs
;insecure=port,invite ; (both)

Do I understand correctly that in this mode the IP address is not checked and no authentication is required?

Quote:
Am 02.04.2015 um 20:11 schrieb Scott Griepentrog <sgriepentrog@digium.com (sgriepentrog@digium.com)>:
​I'd be curious if setting

insecure=invite,port

makes any difference either (without alllowguest on).


On Thu, Apr 2, 2015 at 9:03 AM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Quote:
Ok, I have tested dnsmgr. This is not a solution, the situation has not changed. With dnsmgr I can not place outbound calls. I do not know why and what dnsmgr really do. My current solution is as follows: Say allowguest=yes, configure the default context that there can not be placed outbound calls. Use iptables to DROP all at your SIP port and allow only your local phones and the sip trunk ip range. I think srvlookup must be set to yes to place outbound calls if there is an ip address change. I think with the restriction of the firewall that should be a secure solution. > Am 01.04.2015 um 19:23 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>: > > On Wed, Apr 01, 2015 at 11:00:56AM -0400, Andres wrote: >> On 4/1/15 10:48 AM, Daniel Heckl wrote: >>> John, >>> >>> thank you four your answer. I think you have misunderstood the >>> problem. It’s about a ip address change of the sip trunk, not of my >>> asterisk server. >> You would probably benefit by enabling the DNS Manager to allow for >> dynamic IP changes: >> >> # cat dnsmgr.conf [general] enable=yes ; enable creation >> of managed DNS lookups ; default is 'no' refreshinterval=180 ; >> refresh managed DNS lookups every <n> seconds ; default is 300 (5 >> minutes) > > Hello Andres, > > I read that same suggestion elsewhere in connection with Deutsche > Telekom, so it seems there's some benefit in it. > > Daniel, did you try it out already? > > Kind regards, > Sebastian > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users



-- Scott GriepentrogDigium, Inc · Software Developer445 Jan Davis Drive NW · Huntsville, AL 35806 · USdirect/fax: +1 256 428 6239 · mobile: +1 256 580 6090Check us out at: http://digium.com · http://asterisk.org



-- _____________________________________________________________________-- Bandwidth and Colocation Provided by http://www.api-digital.com --New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/helloasterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
andres at telesip.net
Guest





PostPosted: Thu Apr 02, 2015 2:58 pm    Post subject: [asterisk-users] Update peer IP address Reply with quote

On 4/2/15 3:28 PM, Daniel Heckl wrote:

Quote:
Scott, I have changed the configuration as said it and will test it. I’m curious.

Can you briefly explain what insecure=invite,port does?

;insecure=port ; Allow matching of peer by IP address without
; matching port number
;insecure=invite ; Do not require authentication of incoming INVITEs
;insecure=port,invite ; (both)

Do I understand correctly that in this mode the IP address is not checked and no authentication is required?
Not correct, the IP address is checked but not the port and if the ip address matches no password authentication is performed for the Invite.
Quote:

Quote:
Am 02.04.2015 um 20:11 schrieb Scott Griepentrog <sgriepentrog@digium.com (sgriepentrog@digium.com)>:
​I'd be curious if setting

insecure=invite,port

makes any difference either (without alllowguest on).


On Thu, Apr 2, 2015 at 9:03 AM, Daniel Heckl <daniel.heckl@gmail.com (daniel.heckl@gmail.com)> wrote:
Quote:
Ok, I have tested dnsmgr. This is not a solution, the situation has not changed. With dnsmgr I can not place outbound calls. I do not know why and what dnsmgr really do. My current solution is as follows: Say allowguest=yes, configure the default context that there can not be placed outbound calls. Use iptables to DROP all at your SIP port and allow only your local phones and the sip trunk ip range. I think srvlookup must be set to yes to place outbound calls if there is an ip address change. I think with the restriction of the firewall that should be a secure solution. > Am 01.04.2015 um 19:23 schrieb Sebastian Kemper <sebastian_ml@gmx.net (sebastian_ml@gmx.net)>: > > On Wed, Apr 01, 2015 at 11:00:56AM -0400, Andres wrote: >> On 4/1/15 10:48 AM, Daniel Heckl wrote: >>> John, >>> >>> thank you four your answer. I think you have misunderstood the >>> problem. It’s about a ip address change of the sip trunk, not of my >>> asterisk server. >> You would probably benefit by enabling the DNS Manager to allow for >> dynamic IP changes: >> >> # cat dnsmgr.conf [general] enable=yes             ; enable creation >> of managed DNS lookups ;   default is 'no' refreshinterval=180   ; >> refresh managed DNS lookups every <n> seconds ;   default is 300 (5 >> minutes) > > Hello Andres, > > I read that same suggestion elsewhere in connection with Deutsche > Telekom, so it seems there's some benefit in it. > > Daniel, did you try it out already? > > Kind regards, > Sebastian > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >               http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >   http://lists.digium.com/mailman/listinfo/asterisk-users -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:                http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit:    http://lists.digium.com/mailman/listinfo/asterisk-users



-- Scott Griepentrog Digium, Inc · Software Developer 445 Jan Davis Drive NW · Huntsville, AL 35806 · US direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090 Check us out at: http://digium.com · http://asterisk.org



-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:               http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit:   http://lists.digium.com/mailman/listinfo/asterisk-users



--
Technical Support
http://www.cellroute.net
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services