2 * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 *---------------------------------------------------------------------------
27 * q931_util.c - utility functions to print Q.931 traces
28 * -----------------------------------------------------
30 * $Id: q931_util.c,v 1.3 2003/10/06 09:43:28 itojun Exp $
34 * last edit-date: [Tue Feb 15 13:52:09 2000]
36 *---------------------------------------------------------------------------*/
40 /*---------------------------------------------------------------------------*
41 * decode and print the cause
42 *---------------------------------------------------------------------------*/
44 p_q931cause(char *pbuf
, unsigned char *buf
)
53 i
++; /* index -> length */
57 i
++; /* coding/location */
65 if (!(buf
[i
-1] & 0x80))
73 sprintf((pbuf
+strlen(pbuf
)), "%s ", print_cause_q850(buf
[i
] & 0x7f));
75 sprintf((pbuf
+strlen(pbuf
)), "\n (location=");
80 sprintf((pbuf
+strlen(pbuf
)), "user");
83 sprintf((pbuf
+strlen(pbuf
)), "private network serving local user");
86 sprintf((pbuf
+strlen(pbuf
)), "public network serving local user");
89 sprintf((pbuf
+strlen(pbuf
)), "transit network");
92 sprintf((pbuf
+strlen(pbuf
)), "public network serving remote user");
95 sprintf((pbuf
+strlen(pbuf
)), "private network serving remote user");
98 sprintf((pbuf
+strlen(pbuf
)), "international network");
101 sprintf((pbuf
+strlen(pbuf
)), "network beyond interworking point");
104 sprintf((pbuf
+strlen(pbuf
)), "reserved (0x%02x)", ls
& 0x0f);
108 sprintf((pbuf
+strlen(pbuf
)), ", std=");
110 switch ((ls
& 0x60) >> 5)
113 sprintf((pbuf
+strlen(pbuf
)), "CCITT");
116 sprintf((pbuf
+strlen(pbuf
)), "ISO/IEC");
119 sprintf((pbuf
+strlen(pbuf
)), "National");
122 sprintf((pbuf
+strlen(pbuf
)), "Local");
128 sprintf((pbuf
+strlen(pbuf
)), ", rec=");
133 sprintf((pbuf
+strlen(pbuf
)), "Q.931");
136 sprintf((pbuf
+strlen(pbuf
)), "X.21");
139 sprintf((pbuf
+strlen(pbuf
)), "X.25");
142 sprintf((pbuf
+strlen(pbuf
)), "Q.1031/Q.1051");
145 sprintf((pbuf
+strlen(pbuf
)), "Reserved");
150 sprintf((pbuf
+strlen(pbuf
)),")");
155 for (j
= 0; j
< len
; j
++)
156 sprintf((pbuf
+strlen(pbuf
))," 0x%02x", buf
[j
+i
]);
158 sprintf((pbuf
+strlen(pbuf
)),"]");
165 /*---------------------------------------------------------------------------*
166 * decode and print the bearer capability
167 *---------------------------------------------------------------------------*/
169 p_q931bc(char *pbuf
, unsigned char *buf
)
175 i
++; /* index -> length */
181 sprintf((pbuf
+strlen(pbuf
)), "\n cap=");
183 switch (buf
[i
] & 0x1f)
186 sprintf((pbuf
+strlen(pbuf
)), "speech");
189 sprintf((pbuf
+strlen(pbuf
)), "unrestricted digital information");
192 sprintf((pbuf
+strlen(pbuf
)), "restricted digital information");
195 sprintf((pbuf
+strlen(pbuf
)), "3.1 kHz audio");
198 sprintf((pbuf
+strlen(pbuf
)), "unrestricted digital information with tones");
201 sprintf((pbuf
+strlen(pbuf
)), "video");
204 sprintf((pbuf
+strlen(pbuf
)), "reserved (0x%02x)", buf
[i
] & 0x0f);
208 sprintf((pbuf
+strlen(pbuf
)), "\n std=");
210 switch ((buf
[i
] & 0x60) >> 5)
213 sprintf((pbuf
+strlen(pbuf
)), "CCITT");
216 sprintf((pbuf
+strlen(pbuf
)), "ISO/IEC");
219 sprintf((pbuf
+strlen(pbuf
)), "National");
222 sprintf((pbuf
+strlen(pbuf
)), "NSI Std");
229 sprintf((pbuf
+strlen(pbuf
)), "\n rate=");
231 switch (buf
[i
] & 0x1f)
234 sprintf((pbuf
+strlen(pbuf
)), "packet mode");
237 sprintf((pbuf
+strlen(pbuf
)), "64 kbit/s");
240 sprintf((pbuf
+strlen(pbuf
)), "2 x 64 kbit/s");
243 sprintf((pbuf
+strlen(pbuf
)), "384 kbit/s");
246 sprintf((pbuf
+strlen(pbuf
)), "1536 kbit/s");
249 sprintf((pbuf
+strlen(pbuf
)), "1920 kbit/s");
252 sprintf((pbuf
+strlen(pbuf
)), "Multirate");
256 sprintf((pbuf
+strlen(pbuf
)), "reserved (0x%02x)", buf
[i
] & 0x0f);
260 sprintf((pbuf
+strlen(pbuf
)), "\n mode=");
262 switch ((buf
[i
] & 0x60) >> 5)
265 sprintf((pbuf
+strlen(pbuf
)), "circuit");
268 sprintf((pbuf
+strlen(pbuf
)), "packet");
271 sprintf((pbuf
+strlen(pbuf
)), "reserved (0x%02x)", ((buf
[i
] & 0x60) >> 5));
283 sprintf((pbuf
+strlen(pbuf
)), "\n rate multiplier=%d", buf
[i
] & 0x7f);
291 sprintf((pbuf
+strlen(pbuf
)), "\n layer1=");
293 switch (buf
[i
] & 0x1f)
296 sprintf((pbuf
+strlen(pbuf
)), "V.110");
299 sprintf((pbuf
+strlen(pbuf
)), "G.711 mu-law");
302 sprintf((pbuf
+strlen(pbuf
)), "G.711 A-law");
305 sprintf((pbuf
+strlen(pbuf
)), "G.721");
308 sprintf((pbuf
+strlen(pbuf
)), "H.221/H.242");
311 sprintf((pbuf
+strlen(pbuf
)), "Non-Std");
314 sprintf((pbuf
+strlen(pbuf
)), "V.120");
317 sprintf((pbuf
+strlen(pbuf
)), "X.31");
320 sprintf((pbuf
+strlen(pbuf
)), "reserved (0x%02x)", buf
[i
] & 0x0f);
329 if (!(buf
[i
-1] & 0x80))
331 sprintf((pbuf
+strlen(pbuf
)), "\n user rate=0x%02x ", buf
[i
] & 0x1f);
334 sprintf((pbuf
+strlen(pbuf
)), "(async,");
336 sprintf((pbuf
+strlen(pbuf
)), "(sync,");
339 sprintf((pbuf
+strlen(pbuf
)), "in-band neg. possible)");
341 sprintf((pbuf
+strlen(pbuf
)), "in-band neg not possible)");
350 if (!(buf
[i
-1] & 0x80))
352 sprintf((pbuf
+strlen(pbuf
)), "\n clk/flow=0x%02x", buf
[i
] & 0x1f);
354 sprintf((pbuf
+strlen(pbuf
)), "\n intermediate rate=");
356 switch ((buf
[i
] & 0x60) >> 5)
359 sprintf((pbuf
+strlen(pbuf
)), "not used");
362 sprintf((pbuf
+strlen(pbuf
)), "8 kbit/s");
365 sprintf((pbuf
+strlen(pbuf
)), "16 kbit/s");
368 sprintf((pbuf
+strlen(pbuf
)), "32 kbit/s");
378 if (!(buf
[i
-1] & 0x80))
380 sprintf((pbuf
+strlen(pbuf
)), "\n hdr/mfrm/etc.=0x%02x", buf
[i
]);
388 if (!(buf
[i
-1] & 0x80))
390 sprintf((pbuf
+strlen(pbuf
)), "\n stop/data/parity=0x%02x", buf
[i
]);
398 if (!(buf
[i
-1] & 0x80))
400 sprintf((pbuf
+strlen(pbuf
)), "\n modemtype=0x%02x", buf
[i
]);
408 switch (buf
[i
] & 0x7f)
411 sprintf((pbuf
+strlen(pbuf
)), "\n layer2=Q.921/I.441");
414 sprintf((pbuf
+strlen(pbuf
)), "\n layer2=X.25 link");
417 sprintf((pbuf
+strlen(pbuf
)), "\n layer2=0x%02x",(buf
[i
] & 0x7f));
426 switch (buf
[i
] & 0x7f)
429 sprintf((pbuf
+strlen(pbuf
)), "\n layer3=Q.921/I.441");
432 sprintf((pbuf
+strlen(pbuf
)), "\n layer3=X.25 packet");
435 sprintf((pbuf
+strlen(pbuf
)), "\n layer3=0x%02x",(buf
[i
] & 0x7f));
442 sprintf((pbuf
+strlen(pbuf
)), "]");
446 /*---------------------------------------------------------------------------*
447 * decode and print the ISDN (telephone) number
448 *---------------------------------------------------------------------------*/
450 p_q931address(char *pbuf
, unsigned char *buf
)
459 i
++; /* index -> length */
462 i
++; /* index -> type/plan */
476 for (j
= 0; j
< len
; j
++)
478 sprintf((pbuf
+strlen(pbuf
)),"%c", buf
[j
+i
]);
481 switch ((tp
& 0x70) >> 4)
484 sprintf((pbuf
+strlen(pbuf
)), " (type=unknown, ");
487 sprintf((pbuf
+strlen(pbuf
)), " (type=international, ");
490 sprintf((pbuf
+strlen(pbuf
)), " (type=national, ");
493 sprintf((pbuf
+strlen(pbuf
)), " (type=network specific, ");
496 sprintf((pbuf
+strlen(pbuf
)), " (type=subscriber, ");
499 sprintf((pbuf
+strlen(pbuf
)), " (type=abbreviated, ");
502 sprintf((pbuf
+strlen(pbuf
)), " (type=reserved (%d), ", ((tp
& 0x70) >> 4));
509 sprintf((pbuf
+strlen(pbuf
)), "plan=unknown");
512 sprintf((pbuf
+strlen(pbuf
)), "plan=ISDN");
515 sprintf((pbuf
+strlen(pbuf
)), "plan=Data");
518 sprintf((pbuf
+strlen(pbuf
)), "plan=Telex");
521 sprintf((pbuf
+strlen(pbuf
)), "plan=National");
524 sprintf((pbuf
+strlen(pbuf
)), "plan=private");
527 sprintf((pbuf
+strlen(pbuf
)), "plan=reserved (%d)", (tp
& 0x0f));
533 sprintf((pbuf
+strlen(pbuf
)), ",\n ");
534 switch ((ind
& 0x60) >> 5)
537 sprintf((pbuf
+strlen(pbuf
)), "presentation allowed, ");
540 sprintf((pbuf
+strlen(pbuf
)), "presentation restricted, ");
543 sprintf((pbuf
+strlen(pbuf
)), "number not available, ");
546 sprintf((pbuf
+strlen(pbuf
)), "reserved, ");
553 sprintf((pbuf
+strlen(pbuf
)), "screening user provided: not screened");
556 sprintf((pbuf
+strlen(pbuf
)), "screening user provided: verified & passed");
559 sprintf((pbuf
+strlen(pbuf
)), "screening user provided: verified & failed");
562 sprintf((pbuf
+strlen(pbuf
)), "screening network provided");
567 sprintf((pbuf
+strlen(pbuf
)),")]");
574 /*---------------------------------------------------------------------------*
575 * decode and print HL comatibility
576 *---------------------------------------------------------------------------*/
578 p_q931high_compat(char *pbuf
, unsigned char *buf
)
582 sprintf(pbuf
+strlen(pbuf
), " standard=");
584 switch ((buf
[2] >> 5) & 0x03)
586 case 0: sprintf(pbuf
+strlen(pbuf
), "CCITT");
588 case 1: sprintf(pbuf
+strlen(pbuf
), "unknown international standard");
590 case 2: sprintf(pbuf
+strlen(pbuf
), "unknown national standard");
592 case 3: sprintf(pbuf
+strlen(pbuf
), "local network standard");
597 sprintf(pbuf
+strlen(pbuf
), ", characteristics=");
599 switch (buf
[3] & 0x7f)
602 sprintf(pbuf
+strlen(pbuf
), "Telephony");
605 sprintf(pbuf
+strlen(pbuf
), "Fax Group 2/3");
608 sprintf(pbuf
+strlen(pbuf
), "Fax Group 4 Class I (F.184)");
611 sprintf(pbuf
+strlen(pbuf
), "Teletex basic/mixed (F.230) or Fax Group 4 Class II/III (F.184)");
614 sprintf(pbuf
+strlen(pbuf
), "Teletex basic/processable (F.220)");
617 sprintf(pbuf
+strlen(pbuf
), "Teletex basic mode (F.200)");
620 sprintf(pbuf
+strlen(pbuf
), "Videotex (F.300 and T.101)");
623 sprintf(pbuf
+strlen(pbuf
), "Telex (F.60)");
626 sprintf(pbuf
+strlen(pbuf
), "MHS (X.400 series)");
629 sprintf(pbuf
+strlen(pbuf
), "OSI application (X.200 series)");
632 sprintf(pbuf
+strlen(pbuf
), "Maintenance");
635 sprintf(pbuf
+strlen(pbuf
), "Management");
638 sprintf(pbuf
+strlen(pbuf
), "reserved");
641 sprintf(pbuf
+strlen(pbuf
), "UNKNOWN (0x%02x)", buf
[3]);
649 sprintf(pbuf
+strlen(pbuf
), "]");
653 sprintf(pbuf
+strlen(pbuf
), " of ");
655 switch (buf
[4] & 0x7f)
658 sprintf(pbuf
+strlen(pbuf
), "Telephony");
661 sprintf(pbuf
+strlen(pbuf
), "Fax Group 2/3");
664 sprintf(pbuf
+strlen(pbuf
), "Fax Group 4 Class I (F.184)");
667 sprintf(pbuf
+strlen(pbuf
), "Teletex basic/mixed (F.230) or Fax Group 4 Class II/III (F.184)");
670 sprintf(pbuf
+strlen(pbuf
), "Teletex basic/processable (F.220)");
673 sprintf(pbuf
+strlen(pbuf
), "Teletex basic mode (F.200)");
676 sprintf(pbuf
+strlen(pbuf
), "Videotex (F.300 and T.101)");
679 sprintf(pbuf
+strlen(pbuf
), "Telex (F.60)");
682 sprintf(pbuf
+strlen(pbuf
), "MHS (X.400 series)");
685 sprintf(pbuf
+strlen(pbuf
), "OSI application (X.200 series)");
688 sprintf(pbuf
+strlen(pbuf
), "reserved");
691 sprintf(pbuf
+strlen(pbuf
), "UNKNOWN (0x%02x)", buf
[3]);
694 sprintf(pbuf
+strlen(pbuf
), "]");
698 /*---------------------------------------------------------------------------*
699 * decode and print user-user IE
700 *---------------------------------------------------------------------------*/
702 p_q931user_user(char *pbuf
, unsigned char *buf
)
709 i
++; /* index -> length */
712 i
++; /* index -> protocoldiscriminator */
718 sprintf((pbuf
+strlen(pbuf
)), "(pd=user-specific");
721 sprintf((pbuf
+strlen(pbuf
)), "(pd=OSI high-layer protocols");
724 sprintf((pbuf
+strlen(pbuf
)), "(pd=X.244");
727 sprintf((pbuf
+strlen(pbuf
)), "(pd=reserved for system management");
730 sprintf((pbuf
+strlen(pbuf
)), "(pd=IA5 characters");
733 sprintf((pbuf
+strlen(pbuf
)), "(pd=X.208/X.209 coded user info");
736 sprintf((pbuf
+strlen(pbuf
)), "(pd=V.120 rate adaption");
739 sprintf((pbuf
+strlen(pbuf
)), "(pd=Q.931/I.451 user network call control messages");
742 if (pd
>= 0x10 && pd
<= 0x3f)
743 sprintf((pbuf
+strlen(pbuf
)), "(pd=0x%x=reserved for other L3 protocols incl. X.25", pd
);
744 else if (pd
>= 0x40 && pd
<= 0x47)
745 sprintf((pbuf
+strlen(pbuf
)), "(pd=0x%x=national use", pd
);
746 else if (pd
>= 0x48 && pd
<= 0x4f)
747 sprintf((pbuf
+strlen(pbuf
)), "(pd=0x%x=reserved for ETSI", pd
);
748 else if (pd
>= 0x50 && pd
<= 0xfe)
749 sprintf((pbuf
+strlen(pbuf
)), "(pd=0x%x=reserved for other L3 protocols incl. X.25", pd
);
751 sprintf((pbuf
+strlen(pbuf
)), "(pd=0x%x=reserved", pd
);
758 sprintf((pbuf
+strlen(pbuf
)),": (");
760 for (j
= 0; j
< len
; j
++)
763 sprintf((pbuf
+strlen(pbuf
)),"%c", buf
[j
+i
]);
765 sprintf((pbuf
+strlen(pbuf
)),"0x%2x", buf
[j
+i
]);
768 sprintf((pbuf
+strlen(pbuf
)),"))]");
775 /*---------------------------------------------------------------------------*
776 * decode and notification indicator IE (Q.932, p44)
777 *---------------------------------------------------------------------------*/
779 p_q931notification(char *pbuf
, unsigned char *buf
)
786 i
++; /* index -> length */
789 i
++; /* index -> notification description */
795 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, user suspended", nd
);
798 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, user resumed", nd
);
801 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, bearer service changed", nd
);
805 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, BER coded information", nd
);
809 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, conference established", nd
);
812 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, conference disconnected", nd
);
815 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, other party added", nd
);
818 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, isolated", nd
);
821 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, reattached", nd
);
824 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, other party isolated", nd
);
827 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, other party reattached", nd
);
830 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, other party split", nd
);
833 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, other party disconnected", nd
);
836 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, conference floating", nd
);
839 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, conference disconnected, preemption", nd
);
842 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, conference floating, server user preempted", nd
);
846 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, call is a waiting call", nd
);
849 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, diversion activated", nd
);
851 case 0xe9: /* ECT, EN 300 369-1 V1.2.4 p12) */
852 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, call transferred, alerting", nd
);
854 case 0xea: /* ECT, EN 300 369-1 V1.2.4 p12) */
855 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, call transferred, active", nd
);
858 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, reverse charging", nd
);
862 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, remote hold", nd
);
865 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, remote retrieval", nd
);
868 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, call is diverting", nd
);
871 sprintf((pbuf
+strlen(pbuf
)), "0x%2x, undefined", nd
);
880 sprintf((pbuf
+strlen(pbuf
)),": (");
885 sprintf((pbuf
+strlen(pbuf
)),"%c", buf
[j
+i
]);
887 sprintf((pbuf
+strlen(pbuf
)),"0x%2x", buf
[j
+i
]);
890 sprintf((pbuf
+strlen(pbuf
)),")");
892 sprintf((pbuf
+strlen(pbuf
)),"]");
898 /*---------------------------------------------------------------------------*
899 * decode and print redirecting/redirection number
900 *---------------------------------------------------------------------------*/
902 p_q931redir(char *pbuf
, unsigned char *buf
)
913 i
++; /* index -> length */
916 i
++; /* index -> type/plan */
938 for (j
= 0; j
< len
; j
++)
940 sprintf((pbuf
+strlen(pbuf
)),"%c", buf
[j
+i
]);
943 switch ((tp
& 0x70) >> 4)
946 sprintf((pbuf
+strlen(pbuf
)), " (type=unknown, ");
949 sprintf((pbuf
+strlen(pbuf
)), " (type=international, ");
952 sprintf((pbuf
+strlen(pbuf
)), " (type=national, ");
955 sprintf((pbuf
+strlen(pbuf
)), " (type=network specific, ");
958 sprintf((pbuf
+strlen(pbuf
)), " (type=subscriber, ");
961 sprintf((pbuf
+strlen(pbuf
)), " (type=abbreviated, ");
964 sprintf((pbuf
+strlen(pbuf
)), " (type=reserved (%d), ", ((tp
& 0x70) >> 4));
971 sprintf((pbuf
+strlen(pbuf
)), "plan=unknown");
974 sprintf((pbuf
+strlen(pbuf
)), "plan=ISDN");
977 sprintf((pbuf
+strlen(pbuf
)), "plan=Data");
980 sprintf((pbuf
+strlen(pbuf
)), "plan=Telex");
983 sprintf((pbuf
+strlen(pbuf
)), "plan=National");
986 sprintf((pbuf
+strlen(pbuf
)), "plan=private");
989 sprintf((pbuf
+strlen(pbuf
)), "plan=reserved (%d)", (tp
& 0x0f));
995 sprintf((pbuf
+strlen(pbuf
)), ",\n ");
996 switch ((ind
& 0x60) >> 5)
999 sprintf((pbuf
+strlen(pbuf
)), "presentation allowed");
1002 sprintf((pbuf
+strlen(pbuf
)), "presentation restricted");
1005 sprintf((pbuf
+strlen(pbuf
)), "number not available");
1008 sprintf((pbuf
+strlen(pbuf
)), "reserved");
1015 sprintf((pbuf
+strlen(pbuf
)), ",\n ");
1016 switch (reas
& 0x0f)
1019 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: unknown");
1022 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: call forwarding busy");
1025 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: call forwarding unconditional");
1028 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: called DTE");
1031 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: call forwarding unconditional");
1034 sprintf((pbuf
+strlen(pbuf
)), "reason for diversion: reserved (0x%2x)",reas
& 0x0f);
1039 sprintf((pbuf
+strlen(pbuf
)),")]");