X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=joinpbx.cpp;h=ff8fcd1ad2454a09cf2caaf34dfc99e69aa6ae4f;hp=62da7f0348801013940fd1b0fc456ec58c68d009;hb=54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3;hpb=fb872d7e65ffc0563789f92e9e6f10d855f13207 diff --git a/joinpbx.cpp b/joinpbx.cpp index 62da7f0..ff8fcd1 100644 --- a/joinpbx.cpp +++ b/joinpbx.cpp @@ -255,8 +255,8 @@ JoinPBX::JoinPBX(class Endpoint *epoint) : Join() j_pid = getpid(); j_updatebridge = 0; j_partyline = 0; - j_multicause = CAUSE_NOUSER; - j_multilocation = LOCATION_PRIVATE_LOCAL; + j_multicause = 0; + j_multilocation = 0; /* initialize a relation only to the calling interface */ relation = j_relation = (struct join_relation *)MALLOC(sizeof(struct join_relation)); @@ -791,7 +791,10 @@ void JoinPBX::message_epoint(unsigned long epoint_id, int message_type, union pa case RELATION_TYPE_SETUP: /* by called */ /* collect cause and send collected cause */ collect_cause(&j_multicause, &j_multilocation, param->disconnectinfo.cause, param->disconnectinfo.location); - release(relation, j_multilocation, j_multicause); + if (j_multicause) + release(relation, j_multilocation, j_multicause); + else + release(relation, LOCATION_PRIVATE_LOCAL, CAUSE_UNSPECIFIED); break; case RELATION_TYPE_CALLING: /* by calling */