function pri_cause2str($cause) {
if ($cause < 128 ) {
switch ($cause) {
case 0:
$str= "This is usually given by the router when none of the other codes apply. This cause usually occurs in the same type of
situations as cause 1, cause 88, and cause 100.";
break;
case 1:
$str= "- Unallocated (unassigned) number.
This cause indicates that the destination requested by the calling user cannot be reached because, although the number is
in a valid format, it is not currently assigned (allocated).
What it usually means:
1. The SPIDS may be incorrectly entered in the router or the Telco switch, giving a SPID failure in the router logs.
2. The ISDN phone number being dialed by the router is invalid and the telco switch cannot locate the number tocomplete the call, as it is invalid.
3. On long distance calls, the call cannot be properly routed to its destination.";
break;
case 2:
$str= "- No route to specified transit network (national use).
This cause indicates that the equipment sending this cause has received a request to route the call through a particular transit network which it
does not recognize. The equipment sending this cause does not recognize the transit network either because the transit network does not exist or
because that particular transit network not serve the equipment which is sending this cause.";
break;
case 3: $str= "- No route to destination.
This cause indicates that the called party cannot be reached because the network through which the call has been routed does not serve the
destination desired. This cause is supported on a network dependent basis.";
case 4: $str= "- send special information tone.
This cause indicates that the called party cannot be reached for reasons that are of a long term nature and that the special information tone
should be returned to the calling party.";
case 5:
$str= "- misdialed trunk prefix (national use).
This cause indicates the erroneous inclusion of a trunk prefix in the called party number. This number is to sniped from the dialed number being
sent to the network by the customer premises equipment.";
break;
case 6:
$str= "- channel unacceptable.
This cause indicates that the channel most recently identified is not acceptable to the sending entity for use in this call.";
break;
case 7:
$str= "- call awarded. being delivered in an established channel.
This cause indicates that the user has been awarded the incoming call and that the incoming call is being connected to a channel already
established to that user for similar calls (e.g. packet-mode x.25 virtual calls).";
break;
case 8:
$str= "- preemption.
This cause indicates the call is being preempted.";
break;
case 9:
$str= "- preemption - circuit reserved for reuse.
This cause indicates that the call is being preempted and the circuit is reserved for reuse by the preempting exchange.";
break;
case 16:
$str= "- normal call clearing.
This cause indicates that the call is being cleared because one of the users involved in the call has requested that the call be cleared.
What it means:
This could be almost anything; it is the vaguest of the cause codes. The call comes down normally, but the reasons for it could be:
1. Bad username or password
2. Router's settings do not match what is expected by the remote end.
3. Telephone line problems.
4. Hung session on remote end.";
break;
case 17:
$str="- user busy.
This cause is used to indicate that the called party is unable to accept another call because the user busy condition has been encountered. This
cause value may be generated by the called user or by the network. In the case of user determined user busy it is noted that the user equipment is
compatible with the call.
What is means:
Calling end is busy.";
break;
case 18:
$str= "- no user responding.
This cause is used when a called party does not respond to a call establishment message with either an alerting or connect indication within the
prescribed period of time allocated.
What it means:
The equipment on the other end does not answer the call. Usually this is a misconfiguration on the equipment being called.";
break;
case 19:
$str= "- no answer from user (user alerted).
This cause is used when the called party has been alerted but does not respond with a connect indication within a prescribed period of time. Note -
This cause is not necessarily generated by Q.931 procedures but may be generated by internal network timers.";
break;
case 20:
$str="- subscriber absent.
This cause value is used when a mobile station has logged off. Radio contact is not obtained with a mobile station or if a personal
telecommunication user is temporarily not addressable at any user-network interface.";
break;
case 21:
$str="- call rejected.
This cause indicates that the equipment sending this cause does not wish to accept this call. although it could have accepted the call because the
equipment sending this cause is neither busy nor incompatible. This cause may also be generated by the network, indicating that the call was
cleared due to a supplementary service constraint. The diagnostic field may contain additional information about the supplementary service and
reason for rejection.
What it means:
This is usually a telco issue. The call never reaches the final destination, which can be caused by a bad switch translation, or a misconfiguration
on the equipment being called.";
break;
case 22:
$str=" - number changed.
This cause is returned to a calling party when the called party number indicated by the calling party is no longer assigned. The new called party
number may optionally be included in the diagnostic field. If a network does not support this cause, cause no. 1, unallocated (unassigned) number
shall be used.";
break;
case 26:
$str=" - non-selected user clearing.
This cause indicates that the user has not been awarded the incoming call.";
break;
case 27:
$str="- destination out of order.
This cause indicates that the destination indicated by the user cannot be reached because the interface to the destination is not functioning
correctly. The term 'not functioning correctly' indicates that a signal message was unable to be delivered to the remote party; e.g., a physical
layer or data link layer failure at the remote party or user equipment off-line.";
break;
case 28:
$str= "- invalid number format (address incomplete).
This cause indicates that the called party cannot be reached because the called party number is not in a valid format or is not complete.";
break;
case 29:
$str="- facilities rejected.
This cause is returned when a supplementary service requested by the user cannot be provide by the network.";
break;
case 30:
$str="- response to STATUS INQUIRY.
This cause is included in the STATUS message when the reason for generating the STATUS message was the prior receipt of a STATUS INQUIRY.";
break;
case 31:
$str="- normal. unspecified.
This cause is used to report a normal event only when no other cause in the normal class applies.";
break;
case 34:
$str="- no circuit/channel available.
This cause indicates that there is no appropriate circuit/channel presently available to handle the call.
What it means:
There is no place on the Public Telephone network to place the call; the call never gets to its destiation. This is usually a temporary problem.";
break;
case 35:
$str= "- Call Queued.";
break;
case 38:
$str="- network out of order.
This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time e.g.,
immediately re-attempting the call is not likely to be successful.";
break;
case 39:
$str="- permanent frame mode connection out-of-service.
This cause is included in a STATUS message to indicate that a permanently established frame mode connection is out-of-service (e.g. due to
equipment or section failure)";
break;
case 40:
$str= "- permanent frame mode connection operational.
This cause is included in a STATUS message to indicate that a permanently established frame mode connection is operational and capable of carrying
user information.";
break;
case 41:
$str= "- temporary failure.
This cause indicates that the network is not functioning correctly and that the condition is no likely to last a long period of time; e.g., the
user may wish to try another call attempt almost immediately.
What it means:
This means that there is a temporary failure at the physical layer on the ISDN network. If you remove the ISDN cable from the Netopia, you would
see this. It's usually temporary.";
break;
case 42:
$str="- swidicates that the network could not deliver access information to the remote user as requested. i.e., user-to-user information,
low layer compatibility, high layer compatibility or sub-address as indicated in the diagnostic. It is noted that the particular type of access
information discarded is optionally included in the diagnostic.";
break;
case 44:
$str="- requested circuit/channel not available.
This cause is returned when the circuit or channel indicated by the requesting entity cannot be provided by the other side of the interface.";
break;
case 46:
$str= " - precedence call blocked.
This cause indicates that there are no predictable circuits or that the called user is busy with a call of equal or higher preventable level.";
break;
case 47:
$str="- resource unavailable, unspecified.
This cause is used to report a resource unavailable event only when no other cause in the resource unavailable class applies.";
break;
case 49:
$str="- Quality of Service not available.
This cause is used to report that the requested Quality of Service, as defined in Recommendation X.213. cannot be provided (e.g., throughput of
transit delay cannot be supported).";
break;
case 50:
$str="- requested facility not subscribed.
This cause indicates that the user has requested a supplementary service which is implemented by the equipment which generated this cause but the
user is not authorized to use.
What it means:
The switch looks at the number being dialed and thinks it is for another service rather than ISDN. If the phone number is put in the correct
format, the call should be placed properly. There are no standards for this, all Telcos have their own system for programming the number formats
that the switches will recognize. Some systems want to see 7 digits, some 10, and others 11.";
break;
case 52:
$str= "- outgoing calls barred.";
break;
case 53:
$str="- outgoing calls barred within CUG.
This cause indicates that although the calling party is a member of the CUG for the outgoing CUG call. Outgoing calls are not allowed for this
member of the CUG.";
break;
case 54:
$str= "- incoming calls barred.";
break;
case 55:
$str="- in user has requested a bearer capability which is implemented by the equipment which generated this cause but the user is not
authorized to use.";
break;
case 58:
$str= "- bearer capability not presently available.
This cause indicates that the user has requested a bearer capability which is implemented by the equipment which generated this cause but which is
not available at this time.";
break;
case 62:
$str= "- inconsistency in outgoing information element.
This cause indicates an inconsistency in the designated outgoing access information and subscriber class.";
break;
case 63:
$str="- service or option not available. unspecified.
This cause is used to report a service or option not available event only when no other cause in the service or option not available class applies.";
break;
case 65:
$str="- bearer capability not implemented.
This cause indicates that the equipment sending this cause does not support the bearer capability requested.
What it means:
1. In most cases, the number being called is not an ISDN number but an analog destination.
2. The equipment is dialing at a faster rate than the circuitry allows, for example, dialing at 64K when only 56K is supported.";
break;
case 66:
$str="- channel type not implemented.
This cause indicates that the equipment sending this cause does not support the channel type requested.";
break;
case 69:
$str="- requested facility not implemented.
This cause indicates that the equipment sending this cause does not support the requested supplementary services.";
break;
case 70:
$str="- only restricted digital information bearer capability is available.
This cause indicates that the calling party has requested an unrestricted bearer service but the equipment sending this cause only supports the
restricted version of the requested bearer capability.";
break;
case 79:
$str="- service or option not implemented unspecified.
This cause is used to report a service or option not implemented event only when no other cause in the service or option not implemented class
applies.";
break;
case 81:
$str="- invalid call reference value.
This cause indicates that the equipment the equipment sending this cause has received a request to use a channel not activated on the interface for
a call. For example, if a user has subscribed to those channels on a primary rate interface numbered from l to 12 and the user equipment or the
network attempts to use channels 3 through 23, this cause is generated.";
break;
case 83:
$str="- a suspended call exists, but this call identify does not. This cause indicates that a call resume has been attempted with a call
identity which differs from that in use for any presently suspended call(s).";
break;
case 84:
$str="- call identity in use.
This cause indicates that the network has received a call suspended request containing a call identity (including the null call identity) which is
already in use for a suspended call within the domain of interfaces over which the call might be resumed.";
break;
case 85:
$str="- no call suspended.
This cause indicates that the network has received a call resume request containing a call identity information element which presently does not
indicate any suspended call within the domain of interfaces over which calls may be resumed.";
break;
case 86:
$str="- call having the requested call identity has been cleared.
This cause indicates that the network has received a call resume request containing a call identity information element indicating a suspended call
that has in the meantime been cleared while suspended (either by network time-out or by the remote user).";
break;
case 87:
$str="- user not a member of CUG.
This cause indicates that the called user for the incoming CUG call is not a member of the specified CUG or that the calling user is an ordinary
subscriber calling a CUG subscriber.";
break;
case 88:
$str="- incompatible destination.
This cause indicates that the equipment sending this cause has received a request to establish a call which has low layer compatibility. high layer
compatibility or other compatibility attributes (e.g., data rate) which cannot be accommodated.
What it means:
1. This usually means that the Number To Dial in the Connection Profile is in the wrong sage class applies.";
break;
case 96:
$str= "- mandatory information element is missing.
This cause indicates that the equipment sending this cause has received a message which is missing an information element which must be present in
the message before that message can be processed.
What it means:
This is rarely seen in North America but usually means that the number that is being dialed is in the wrong format, (similar to cause 88). Some
part of the format being used is not understood by either the remote side equipment or the switching equipment between the source and destination
of the call.";
break;
case 97:
$str= "- message type non-existent or not implemented.
This cause indicates that the equipment sending this cause has received a message with a message type it does not recognize either because this is
a message not defined of defined but not implemented by the equipment sending this cause.";
break;
case 98:
$str= "- message not compatible with call state or message type non-existent.
This cause indicates that the equipment sending this cause has received a message such that the procedures do not indicate that this is a
permissible message to receive while in the call state, or a STATUS message was received indicating an incompatible call state.";
break;
case 99:
$str= "- Information element / parameter non-existent or not implemented.
This cause indicates that the equipment sending this cause has received a message which includes information element(s)/parameter(s) not recognized
because the information element(s)/parameter name(s) are not defined or are defined but not implemented by the equipment sending the cause. This
cause indicates that the information element(s)/parameter(s) were discarded. However, the information element is not required to be present in the
message in order for the equipment sending the cause to process the message.";
break;
case 100:
$str= "- Invalid information element contents.
This cause indicates that the equipment sending this cause has received and information element which it has implemented; however, one or more of
the fielpia router that has two B Data Channels in place, the router relinquishes the second channel, but if it doesn't happen in the time allotted
by the switch programming, the call will not ring through and will be discarded by the switch.";
break;
case 101:
$str= "- This cause indicates that an received message was not compliant with the state of the call";
break;
case 103:
$str= "- parameter non-existent or not implemented - passed on (national use).
This cause indicates that the equipment sending this cause has received a message which includes parameters not recognized because the parameters
are not defined or are defined but not implemented by the equipment sending this cause. The cause indicates that the parameter(s) were ignored. In
addition, if the equipment sending this cause is an intermediate point, then this cause indicates that the parameter(s) were passed unchanged.";
break;
case 110:
$str= "- message with unrecognized parameter discarded.
This cause indicates that the equipment sending this cause has discarded a received message which includes a parameter that
is not recognized.";
break;
case 111:
$str= "- protocol error, unspecified.
This cause is used to report a protocol error event only when no other cause in the protocol error class applies.";
break;
case 127:
$str= "- Intel-working, unspecified.
This cause indicates that an interworking call (usually a call to 5W56 service) has ended.";
break;
default:
$str = "Unrecognized Cause: $cause";
}
}
else {
$str = "Non-Standard Or Proprietary Cause received: $cause";
}
return $str;
}