]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't hangup the call if we can't resolve the Contact if there's a proxy
authorOlle Johansson <oej@edvina.net>
Tue, 8 Jul 2008 09:52:21 +0000 (09:52 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 8 Jul 2008 09:52:21 +0000 (09:52 +0000)
route set for the call.
----
This comment was added a while ago and today it hit me badly.

/* OEJ: Possible issue that may need a check:
If we have a proxy route between us and the device,
should we care about resolving the contact
or should we just send it?
*/

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

channels/chan_sip.c

index 7a73bf2c5a3c32d8d838e90d1f8f98fc8a9f0f3e..b2f5fd10bbdf22f8b72358b447118e5d8b88498b 100644 (file)
@@ -12256,21 +12256,17 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
                if (outgoing) {
                        update_call_counter(p, DEC_CALL_RINGING);
                        parse_ok_contact(p, req);
+                       /* Save Record-Route for any later requests we make on this dialogue */
+                       if (!reinvite)
+                               build_route(p, req, 1);
+
                        if(set_address_from_contact(p)) {
                                /* Bad contact - we don't know how to reach this device */
                                /* We need to ACK, but then send a bye */
-                               /* OEJ: Possible issue that may need a check:
-                                       If we have a proxy route between us and the device,
-                                       should we care about resolving the contact
-                                       or should we just send it?
-                               */
-                               if (!ast_test_flag(req, SIP_PKT_IGNORE))
+                               if (!p->route && !ast_test_flag(req, SIP_PKT_IGNORE))
                                        ast_set_flag(&p->flags[0], SIP_PENDINGBYE);     
                        } 
 
-                       /* Save Record-Route for any later requests we make on this dialogue */
-                       if (!reinvite)
-                               build_route(p, req, 1);
                }
                
                if (p->owner && (p->owner->_state == AST_STATE_UP) && (bridgepeer = ast_bridged_channel(p->owner))) { /* if this is a re-invite */