]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_pjsip: Remove AOR check when dialing and one is specified.
authorJoshua Colp <jcolp@digium.com>
Sun, 16 Nov 2014 21:11:55 +0000 (21:11 +0000)
committerJoshua Colp <jcolp@digium.com>
Sun, 16 Nov 2014 21:11:55 +0000 (21:11 +0000)
The AOR value may contain the name of an AOR or a full SIP URI.
Checking if the AOR exists can't be done as a result of this.

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

channels/chan_pjsip.c

index a682f4f532aedc25fbde27d44613a5223c92a2cd..4c3f9c65a86848a6ed3676c4f21d9c8c6283d7b5 100644 (file)
@@ -1710,7 +1710,6 @@ static int request(void *obj)
        struct ast_sip_session *session = NULL;
        char *tmp = ast_strdupa(req_data->dest), *endpoint_name = NULL, *request_user = NULL;
        RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
-       struct ast_sip_aor *aor = NULL;
 
        AST_DECLARE_APP_ARGS(args,
                AST_APP_ARG(endpoint);
@@ -1740,14 +1739,8 @@ static int request(void *obj)
                ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name);
                req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
                return -1;
-       } else if (!ast_strlen_zero(args.aor) && (!(aor = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "aor", args.aor)))) {
-               ast_log(LOG_ERROR, "Unable to create PJSIP channel - AOR '%s' was not found\n", args.aor);
-               req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
-               return -1;
        }
 
-       ao2_cleanup(aor);
-
        if (!(session = ast_sip_session_create_outgoing(endpoint, NULL, args.aor, request_user, req_data->caps))) {
                ast_log(LOG_ERROR, "Failed to create outgoing session to endpoint '%s'\n", endpoint_name);
                req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;