PJSIP with a dynamic public ip address

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

PJSIP with a dynamic public ip address

Postby danielyk » Wed Jan 20, 2016 10:04 am

Hi

I have an Asterisk 13 with can_sip running. My ISP gives me for a reconnection a new IP address.

Can I use PJSIP with those circumstances?

Thanks
Daniel
danielyk
Newsterisk
 
Posts: 6
Joined: Wed Jan 20, 2016 10:00 am

Re: PJSIP with a dynamic public ip address

Postby jcolp » Thu Jan 21, 2016 5:37 am

PJSIP does not currently have functionality to automatically update the public address (externhost / externrefresh). You would need to update this yourself or write a script to do it in the config file.
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am

Re: PJSIP with a dynamic public ip address

Postby danielyk » Thu Jan 21, 2016 7:37 am

Okay, nevertheless it works even without the public IP. In the header it is written:
Code: Select all
Via: SIP/2.0/UDP 10.158.2.5:5060


Only re-registration after an ip address change fails. I have compared the REGISTER from chan_sip with pjsip. chan_sip includes following line (pjsip does not add this line):
Code: Select all
Supported: replaces


How can I add this line in pjsip REGISTER SIP header?
danielyk
Newsterisk
 
Posts: 6
Joined: Wed Jan 20, 2016 10:00 am

Re: PJSIP with a dynamic public ip address

Postby david55 » Thu Jan 21, 2016 3:21 pm

It is very unlikely that an ITSP would ever use Replaces, so this header should be irrelevant.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: PJSIP with a dynamic public ip address

Postby danielyk » Thu Jan 21, 2016 4:04 pm

Okay, was just an idea.

PJSIP works very well, until the IP address changes. I can't register my trunks any more.
res_pjsip_outbound_registration.c: Temporal response '500' received from 'sip:tel.t-online.de:5060' on registration attempt to 'sip:phonenumber@tel.t-online.de:5060', retrying in '60'
res_pjsip_outbound_registration.c: Fatal response '403' received from 'sip:tel.t-online.de:5060' on registration attempt to 'sip:phonenumber@tel.t-online.de:5060', stopping outbound registration


If I shutdown Asterisk and wait for example 30 Minutes (PJSIP Expiration: 480 sec), Asterisk is able again register successfully.
danielyk
Newsterisk
 
Posts: 6
Joined: Wed Jan 20, 2016 10:00 am

Re: PJSIP with a dynamic public ip address

Postby danielyk » Mon Jan 25, 2016 4:54 am

No idea?
danielyk
Newsterisk
 
Posts: 6
Joined: Wed Jan 20, 2016 10:00 am


Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest