Summary: | ASTERISK-12688: [patch] outboundproxy=proxy.mmmydomain.net where domain can not be resolved silently removes the sip section | ||
Reporter: | Philippe Lindheimer (p_lindheimer) | Labels: | |
Date Opened: | 2008-09-05 15:07:35 | Date Closed: | 2009-06-29 17:53:48 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) outboundproxy.patch | |
Description: | Setting outboundproxy to a fully qualified domain name that can not be resolved results in the sip section configuration being silently removed. The only error that is provided in the log file is a warning: [Sep 5 13:07:04] WARNING[20522] acl.c: Unable to lookup 'proxy.mmmydomain.net' I don't know what the proper behavior should be. Ignore the setting, remove the section as is the case but with a very prevalent error, keep it but show it as unreachablem, or something else. But something better then this silent nature would be preferred ****** STEPS TO REPRODUCE ****** Take an existing working SIP peer. add: outboundproxy=proxy.mmmydomain.net (making sure that the fqdn above does not resolve to anything) now 'reload' or 'sip reload' now sip show peers ****** ADDITIONAL INFORMATION ****** originally encountered on 1.4.19.2 | ||
Comments: | By: Philippe Lindheimer (p_lindheimer) 2008-09-05 23:18:12 At a minimum, at least a warning message such as below should be added. Although question, if there is a host= line, should the failure mode be a warning with a fallback to the host in place of the outbound proxy? --- chan_sip.c.ORIG 2008-09-05 21:02:59.000000000 -0700 +++ chan_sip.c 2008-09-05 21:19:07.000000000 -0700 @@ -16763,6 +16763,7 @@ ast_clear_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC); if (!obproxyfound || !strcasecmp(v->name, "outboundproxy")) { if (ast_get_ip_or_srv(&peer->addr, v->value, srvlookup ? "_sip._udp" : NULL)) { + ast_log(LOG_ERROR, "srvlookup failed for outboundproxy: %s, on peer %s, removing peer\n", v->value, peer->name); ASTOBJ_UNREF(peer, sip_destroy_peer); return NULL; } By: Leif Madsen (lmadsen) 2009-02-02 14:45:53.000-0600 Assigned to oej as he said he will look at it tomorrow! w00t! By: Olle Johansson (oej) 2009-02-02 14:46:26.000-0600 No, we should not have a fallback if the outbound proxy fails. But there should be a warning, I agree on that. By: Philippe Lindheimer (p_lindheimer) 2009-05-21 08:24:52 shouldn't this be checked in and closed? By: Philippe Lindheimer (p_lindheimer) 2009-06-04 10:27:30 this ticket is a very simple log message added. Should this ticket be processed and closed? By: Olle Johansson (oej) 2009-06-04 12:29:41 Forgot all about this. My apologies. We have a lot of issues where DNS does not resolve and cause issues with peers and such. I agree though, we should at least have an error message. Putting this issue back in queue. By: Mark Michelson (mmichelson) 2009-06-29 17:43:56 oej, This issue has gotten a bit old, and I'm in agreement that the log message is a good way of indicating the problem. I'm going to commit p_lindheimer's change and close this issue. If you want to handle this differently, feel free to re-open it. Thanks! By: Digium Subversion (svnbot) 2009-06-29 17:45:35 Repository: asterisk Revision: 204300 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r204300 | mmichelson | 2009-06-29 17:45:35 -0500 (Mon, 29 Jun 2009) | 9 lines Add error message so that it is clear why a SIP peer was not processed when a DNS lookup fails on a host or outboundproxy. (closes issue ASTERISK-12688) Reported by: p_lindheimer Patches: outboundproxy.patch uploaded by p (license 558) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204300 By: Digium Subversion (svnbot) 2009-06-29 17:50:35 Repository: asterisk Revision: 204301 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r204301 | mmichelson | 2009-06-29 17:50:35 -0500 (Mon, 29 Jun 2009) | 15 lines Merged revisions 204300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r204300 | mmichelson | 2009-06-29 17:45:34 -0500 (Mon, 29 Jun 2009) | 9 lines Add error message so that it is clear why a SIP peer was not processed when a DNS lookup fails on a host or outboundproxy. (closes issue ASTERISK-12688) Reported by: p_lindheimer Patches: outboundproxy.patch uploaded by p (license 558) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204301 By: Digium Subversion (svnbot) 2009-06-29 17:52:40 Repository: asterisk Revision: 204302 _U branches/1.6.0/ U branches/1.6.0/channels/chan_sip.c ------------------------------------------------------------------------ r204302 | mmichelson | 2009-06-29 17:52:40 -0500 (Mon, 29 Jun 2009) | 22 lines Merged revisions 204301 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r204301 | mmichelson | 2009-06-29 17:50:35 -0500 (Mon, 29 Jun 2009) | 15 lines Merged revisions 204300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r204300 | mmichelson | 2009-06-29 17:45:34 -0500 (Mon, 29 Jun 2009) | 9 lines Add error message so that it is clear why a SIP peer was not processed when a DNS lookup fails on a host or outboundproxy. (closes issue ASTERISK-12688) Reported by: p_lindheimer Patches: outboundproxy.patch uploaded by p (license 558) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204302 By: Digium Subversion (svnbot) 2009-06-29 17:53:23 Repository: asterisk Revision: 204303 _U branches/1.6.1/ U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r204303 | mmichelson | 2009-06-29 17:53:22 -0500 (Mon, 29 Jun 2009) | 22 lines Merged revisions 204301 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r204301 | mmichelson | 2009-06-29 17:50:35 -0500 (Mon, 29 Jun 2009) | 15 lines Merged revisions 204300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r204300 | mmichelson | 2009-06-29 17:45:34 -0500 (Mon, 29 Jun 2009) | 9 lines Add error message so that it is clear why a SIP peer was not processed when a DNS lookup fails on a host or outboundproxy. (closes issue ASTERISK-12688) Reported by: p_lindheimer Patches: outboundproxy.patch uploaded by p (license 558) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204303 By: Digium Subversion (svnbot) 2009-06-29 17:53:47 Repository: asterisk Revision: 204304 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r204304 | mmichelson | 2009-06-29 17:53:46 -0500 (Mon, 29 Jun 2009) | 22 lines Merged revisions 204301 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r204301 | mmichelson | 2009-06-29 17:50:35 -0500 (Mon, 29 Jun 2009) | 15 lines Merged revisions 204300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r204300 | mmichelson | 2009-06-29 17:45:34 -0500 (Mon, 29 Jun 2009) | 9 lines Add error message so that it is clear why a SIP peer was not processed when a DNS lookup fails on a host or outboundproxy. (closes issue ASTERISK-12688) Reported by: p_lindheimer Patches: outboundproxy.patch uploaded by p (license 558) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204304 |