]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fixes no default transport for temp peer creation in chan_sip
authorDavid Vossel <dvossel@digium.com>
Tue, 17 Aug 2010 21:35:17 +0000 (21:35 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 17 Aug 2010 21:35:17 +0000 (21:35 +0000)
(closes issue #17829)
Reported by: falves11
Patches:
      issue_17829.rev1.txt uploaded by russell (license 2)
      issue_17829.diff uploaded by dvossel (license 671)
Tested by: falves11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@282576 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 92b37daad92b11dc65fca00de4da9ea168779201..628ebe151dee2b2d24f3eefc030180479832f767 100644 (file)
@@ -23776,6 +23776,8 @@ static void set_peer_defaults(struct sip_peer *peer)
        peer->timer_t1 = global_t1;
        peer->timer_b = global_timer_b;
        clear_peer_mailboxes(peer);
+       peer->transports = default_transports;
+       peer->default_outbound_transport = default_primary_transport;
 }
 
 /*! \brief Create temporary peer (used in autocreatepeer mode) */
@@ -23918,6 +23920,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
        /* If we have realm authentication information, remove them (reload) */
        clear_realm_authentication(peer->auth);
        peer->auth = NULL;
+       /* clear the transport information.  We will detect if a default value is required after parsing the config */
        peer->default_outbound_transport = 0;
        peer->transports = 0;