[asterisk-users] Update peer IP address

Daniel Heckl daniel.heckl at gmail.com
Tue Mar 31 13:36:01 CDT 2015


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 at gmail.com>:
> 
> 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
> 
>> Am 30.03.2015 um 20:09 schrieb Sebastian Kemper <sebastian_ml at 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 :-)
>> 
>>> 
>>> 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 :-) 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
>> 
>>> 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
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150331/49c8b4b7/attachment.html>


More information about the asterisk-users mailing list