├── Active-Media ├── uac-active.xml └── uas-active.xml ├── BLF └── uas-blf-recipient.xml ├── Basic ├── uac.xml └── uas.xml ├── Call-pickup-3pcc ├── uac-3pcc-C-A.xml └── uac-3pcc-C-B.xml ├── Hold-UAC ├── uac-hold.xml └── uas-hold.xml ├── Hold-UAS ├── uac-hold.xml └── uas-hold.xml ├── MWI-unsolicited └── uas-mwi.xml ├── Passive-Media ├── uac-passive.xml └── uas-passive.xml ├── README.md ├── build.sh ├── pcap └── g711a.pcap ├── reINVITE-PAI ├── uac.xml └── uas.xml └── template ├── LICENSE ├── README.md ├── index.html ├── jquery.sticky-kit.js ├── lang ├── da │ └── language.php └── en │ └── language.php ├── menu ├── css │ ├── dcaccordion.css │ └── skins │ │ ├── black.css │ │ ├── blue.css │ │ ├── clean.css │ │ ├── demo.css │ │ ├── graphite.css │ │ ├── grey.css │ │ └── images │ │ ├── arr_black.gif │ │ ├── arr_white.gif │ │ ├── arrow.png │ │ ├── arrow1.png │ │ ├── arrow2.gif │ │ ├── arrow_black_down.png │ │ ├── arrow_black_right.png │ │ ├── arrow_grey.png │ │ ├── arrow_grey_down.png │ │ ├── arrow_grey_down_x.png │ │ ├── arrow_grey_right.png │ │ ├── arrow_grey_right_x.png │ │ ├── arrow_red_down.png │ │ ├── arrow_red_right.png │ │ ├── arrow_right.png │ │ ├── arrv_white.gif │ │ ├── bcgWepButton.gif │ │ ├── bg_black.png │ │ ├── bg_clean.png │ │ ├── bg_clean_on.png │ │ ├── bg_graphite.png │ │ ├── bg_graphite_arrow.png │ │ ├── bg_green_blue.png │ │ ├── bg_grey.png │ │ ├── bg_white.jpg │ │ ├── bullet.png │ │ ├── bullet_active.png │ │ ├── checkers.png │ │ ├── checkers_x.png │ │ ├── graphite_arrow_down.png │ │ ├── graphite_arrow_right.png │ │ ├── minus_grey.png │ │ ├── minus_red.png │ │ ├── opacity.png │ │ ├── plus_grey.png │ │ ├── plus_red.png │ │ └── stripes.png ├── index.html └── js │ ├── jquery.cookie.js │ ├── jquery.dcjqaccordion.2.7.js │ ├── jquery.dcjqaccordion.2.7.min.js │ └── jquery.hoverIntent.minified.js ├── script.js ├── standalone.html ├── template.css └── template.html /Active-Media/uac-active.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ;tag=[pid]SIPpTag00[call_number] 12 | To: [service] 13 | Call-ID: [call_id] 14 | CSeq: 1 INVITE 15 | Contact: sip:sipp@[local_ip]:[local_port] 16 | Max-Forwards: 70 17 | Subject: Performance Test 18 | Content-Type: application/sdp 19 | Content-Length: [len] 20 | 21 | v=0 22 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 23 | s=- 24 | c=IN IP[media_ip_type] [media_ip] 25 | t=0 0 26 | m=audio [media_port] RTP/AVP 8 101 27 | a=rtpmap:8 PCMA/8000 28 | a=rtpmap:101 telephone-event/8000 29 | a=fmtp:101 0-15 30 | a=ptime:20 31 | 32 | ]]> 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ;tag=[pid]SIPpTag00[call_number] 59 | To: [service] [peer_tag_param] 60 | Call-ID: [call_id] 61 | CSeq: 1 ACK 62 | Contact: sip:sipp@[local_ip]:[local_port] 63 | Max-Forwards: 70 64 | Content-Length: 0 65 | 66 | ]]> 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | ;tag=[pid]SIPpTag00[call_number] 86 | To: [service] [peer_tag_param] 87 | Call-ID: [call_id] 88 | CSeq: 2 BYE 89 | Contact: sip:sipp@[local_ip]:[local_port] 90 | Max-Forwards: 70 91 | Subject: Performance Test 92 | Content-Length: 0 93 | 94 | ]]> 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Active-Media/uas-active.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | Content-Length: 0 19 | 20 | ]]> 21 | 22 | 23 | 24 | 33 | Content-Type: application/sdp 34 | Content-Length: [len] 35 | 36 | v=0 37 | o=sipp 87308505 1 IN IP[local_ip_type] [local_ip] 38 | s=- 39 | t=0 0 40 | m=audio [media_port] RTP/AVP 8 101 41 | c=IN IP[media_ip_type] [media_ip] 42 | a=rtpmap:8 PCMA/8000 43 | a=rtpmap:101 telephone-event/8000 44 | a=fmtp:101 0-15 45 | a=ptime:20 46 | 47 | ]]> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 72 | Content-Length: 0 73 | 74 | ]]> 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /BLF/uas-blf-recipient.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | Content-Length: 0 30 | ]]> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ;tag=[call_number] 43 | To: "[service]" 44 | [last_Call-ID:] 45 | Cseq: [cseq] NOTIFY 46 | Max-Forwards: 70 47 | Event: dialog 48 | Subscription-State: active 49 | Content-Type: application/dialog-info+xml 50 | Content-Length: [len] 51 | 52 | 53 | 54 | ]]> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | ;tag=[call_number] 71 | To: "[service]" ;tag=1 72 | [last_Call-ID:] 73 | Cseq: [cseq] NOTIFY 74 | Max-Forwards: 70 75 | Event: dialog 76 | Subscription-State: active 77 | Content-Type: application/dialog-info+xml 78 | Content-Length: [len] 79 | 80 | 81 | 82 | 83 | 84 | early 85 | 86 | [local_identity] 87 | 88 | 89 | 90 | [remote_identity] 91 | 92 | 93 | 94 | 95 | ]]> 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | ;tag=[call_number] 111 | To: "[service]" ;tag=1 112 | [last_Call-ID:] 113 | Cseq: [cseq] NOTIFY 114 | Max-Forwards: 70 115 | Event: dialog 116 | Subscription-State: active 117 | Content-Type: application/dialog-info+xml 118 | Content-Length: [len] 119 | 120 | 121 | 122 | 123 | confirmed 124 | 125 | [local_identity] 126 | 127 | 128 | 129 | [remote_identity] 130 | 131 | 132 | 133 | 134 | ]]> 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | ;tag=[call_number] 149 | To: "[service]" ;tag=1 150 | [last_Call-ID:] 151 | Cseq: [cseq] NOTIFY 152 | Max-Forwards: 70 153 | Event: dialog 154 | Subscription-State: active 155 | Content-Type: application/dialog-info+xml 156 | Content-Length: [len] 157 | 158 | 159 | 160 | 161 | terminated 162 | 163 | [local_identity] 164 | 165 | 166 | 167 | [remote_identity] 168 | 169 | 170 | 171 | 172 | ]]> 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /Basic/uac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ;tag=[call_number] 8 | To: sut 9 | Call-ID: [call_id] 10 | Cseq: 1 INVITE 11 | Contact: sip:sipp@[local_ip]:[local_port] 12 | Content-Type: application/sdp 13 | Content-Length: [len] 14 | 15 | v=0 16 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 17 | s=- 18 | t=0 0 19 | c=IN IP[media_ip_type] [media_ip] 20 | m=audio [media_port] RTP/AVP 0 21 | a=rtpmap:0 PCMU/8000 22 | ]]> 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | ;tag=[call_number] 39 | To: sut [peer_tag_param] 40 | Call-ID: [call_id] 41 | Cseq: 1 ACK 42 | Contact: sip:sipp@[local_ip]:[local_port] 43 | Content-Length: 0 44 | ]]> 45 | 46 | 47 | 48 | 49 | 50 | ;tag=[call_number] 54 | To: sut [peer_tag_param] 55 | Call-ID: [call_id] 56 | Cseq: 2 BYE 57 | Contact: sip:sipp@[local_ip]:[local_port] 58 | Content-Length: 0 59 | ]]> 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /Basic/uas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | Content-Type: application/sdp 28 | Content-Length: [len] 29 | 30 | v=0 31 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 32 | s=- 33 | c=IN IP[media_ip_type] [media_ip] 34 | t=0 0 35 | m=audio [media_port] RTP/AVP 0 36 | a=rtpmap:0 PCMU/8000 37 | ]]> 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 55 | Content-Length: 0 56 | ]]> 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 83 | -------------------------------------------------------------------------------- /Call-pickup-3pcc/uac-3pcc-C-A.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | From: sipp A ;tag=[call_number] 11 | To: 12 | Call-ID: [call_id] 13 | CSeq: 1 INVITE 14 | Max-Forwards: 70 15 | Allow: INVITE, ACK, CANCEL, BYE, REFER, PRACK, INFO, UPDATE 16 | Contact: 17 | Supported: replaces 18 | Content-Length: [len] 19 | Content-Type: application/sdp 20 | 21 | v=0 22 | o=root 1035771577 1035771577 IN IP4 [local_ip] 23 | s=call 24 | c=IN IP4 [local_ip] 25 | t=0 0 26 | m=audio [auto_media_port] RTP/AVP 8 27 | c=IN IP[local_ip_type] [local_ip] 28 | a=rtpmap:8 PCMA/8000 29 | a=rtpmap:101 telephone-event/8000 30 | a=fmtp:101 0-15 31 | a=sendrecv 32 | a=ptime:20 33 | ]]> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 68 | Content-Length: 0 69 | 70 | ]]> 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Call-pickup-3pcc/uac-3pcc-C-B.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | From: sipp B ;tag=[call_number] 26 | To: 27 | Call-ID: [call_id] 28 | CSeq: 2 INVITE 29 | Replaces: [$callid];to-tag=[$localtag];from-tag=[$remotetag] 30 | Max-Forwards: 70 31 | Allow: INVITE, ACK, CANCEL, BYE, REFER, PRACK, INFO, UPDATE 32 | Contact: 33 | Supported: replaces 34 | Content-Length: [len] 35 | Content-Type: application/sdp 36 | 37 | v=0 38 | o=root 1035771577 1035771577 IN IP4 [local_ip] 39 | s=call 40 | c=IN IP4 [local_ip] 41 | t=0 0 42 | m=audio [auto_media_port] RTP/AVP 8 43 | c=IN IP[local_ip_type] [local_ip] 44 | a=rtpmap:8 PCMA/8000 45 | a=rtpmap:101 telephone-event/8000 46 | a=fmtp:101 0-15 47 | a=sendrecv 48 | a=rtcp:RC5 49 | a=ptime:20 50 | ]]> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | 70 | 74 | From: sipp[call_number] ;tag=[call_number] 75 | To: sut [peer_tag_param] 76 | Call-ID: [call_id] 77 | CSeq: 2 ACK 78 | Contact: 79 | Max-Forwards: 70 80 | Content-Length: 0 81 | ]]> 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 98 | Content-Length: 0 99 | 100 | ]]> 101 | 102 | 103 | -------------------------------------------------------------------------------- /Hold-UAC/uac-hold.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ;tag=[pid]SIPpTag00[call_number] 12 | To: [service] 13 | Call-ID: [call_id] 14 | CSeq: 1 INVITE 15 | Contact: sip:sipp@[local_ip]:[local_port] 16 | Max-Forwards: 70 17 | Subject: Performance Test 18 | Content-Type: application/sdp 19 | Content-Length: [len] 20 | 21 | v=0 22 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 23 | s=- 24 | c=IN IP[media_ip_type] [media_ip] 25 | t=0 0 26 | m=audio [media_port] RTP/AVP 8 101 27 | a=rtpmap:8 PCMA/8000 28 | a=rtpmap:101 telephone-event/8000 29 | a=fmtp:101 0-15 30 | a=ptime:20 31 | 32 | ]]> 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ;tag=[pid]SIPpTag00[call_number] 59 | To: [service] [peer_tag_param] 60 | Call-ID: [call_id] 61 | CSeq: 1 ACK 62 | Contact: sip:sipp@[local_ip]:[local_port] 63 | Max-Forwards: 70 64 | Content-Length: 0 65 | 66 | ]]> 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | ;tag=[pid]SIPpTag00[call_number] 92 | To: [service] [peer_tag_param] 93 | Call-ID: [call_id] 94 | CSeq: 2 INVITE 95 | Contact: sip:sipp@[local_ip]:[local_port] 96 | Max-Forwards: 70 97 | Content-Type: application/sdp 98 | Content-Length: [len] 99 | 100 | v=0 101 | o=user1 53655765 2353687638 IN IP[local_ip_type] [local_ip] 102 | s=- 103 | c=IN IP[media_ip_type] [media_ip] 104 | t=0 0 105 | m=audio [media_port] RTP/AVP 8 101 106 | a=rtpmap:8 PCMA/8000 107 | a=rtpmap:101 telephone-event/8000 108 | a=fmtp:101 0-15 109 | a=ptime:20 110 | a=sendonly 111 | 112 | ]]> 113 | 114 | 115 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | ;tag=[pid]SIPpTag00[call_number] 131 | To: [service] [peer_tag_param] 132 | Call-ID: [call_id] 133 | CSeq: 2 ACK 134 | Contact: sip:sipp@[local_ip]:[local_port] 135 | Max-Forwards: 70 136 | Content-Length: 0 137 | 138 | ]]> 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | ;tag=[pid]SIPpTag00[call_number] 152 | To: [service] [peer_tag_param] 153 | Call-ID: [call_id] 154 | CSeq: 3 INVITE 155 | Contact: sip:sipp@[local_ip]:[local_port] 156 | Max-Forwards: 70 157 | Content-Type: application/sdp 158 | Content-Length: [len] 159 | 160 | v=0 161 | o=user1 53655765 2353687638 IN IP[local_ip_type] [local_ip] 162 | s=- 163 | c=IN IP[media_ip_type] [media_ip] 164 | t=0 0 165 | m=audio [media_port] RTP/AVP 8 101 166 | a=rtpmap:8 PCMA/8000 167 | a=rtpmap:101 telephone-event/8000 168 | a=fmtp:101 0-15 169 | a=ptime:20 170 | a=sendonly 171 | 172 | ]]> 173 | 174 | 175 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | ;tag=[pid]SIPpTag00[call_number] 191 | To: [service] [peer_tag_param] 192 | Call-ID: [call_id] 193 | CSeq: 3 ACK 194 | Contact: sip:sipp@[local_ip]:[local_port] 195 | Max-Forwards: 70 196 | Content-Length: 0 197 | 198 | ]]> 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | ;tag=[pid]SIPpTag00[call_number] 211 | To: [service] [peer_tag_param] 212 | Call-ID: [call_id] 213 | CSeq: 2 BYE 214 | Contact: sip:sipp@[local_ip]:[local_port] 215 | Max-Forwards: 70 216 | Subject: Performance Test 217 | Content-Length: 0 218 | 219 | ]]> 220 | 221 | 222 | 223 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /Hold-UAC/uas-hold.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | Content-Length: 0 19 | 20 | ]]> 21 | 22 | 23 | 24 | 33 | Content-Type: application/sdp 34 | Content-Length: [len] 35 | 36 | v=0 37 | o=sipp 87308505 1 IN IP[local_ip_type] [local_ip] 38 | s=- 39 | t=0 0 40 | m=audio [media_port] RTP/AVP 8 101 41 | c=IN IP[media_ip_type] [media_ip] 42 | a=rtpmap:8 PCMA/8000 43 | a=rtpmap:101 telephone-event/8000 44 | a=fmtp:101 0-15 45 | a=ptime:20 46 | 47 | ]]> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 77 | Content-Type: application/sdp 78 | Content-Length: [len] 79 | 80 | v=0 81 | o=sipp 87308505 2 IN IP[local_ip_type] [local_ip] 82 | s=- 83 | t=0 0 84 | m=audio [media_port] RTP/AVP 8 101 85 | c=IN IP[media_ip_type] [media_ip] 86 | a=rtpmap:8 PCMA/8000 87 | a=rtpmap:101 telephone-event/8000 88 | a=fmtp:101 0-15 89 | a=ptime:20 90 | a=recvonly 91 | ]]> 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 115 | Content-Type: application/sdp 116 | Content-Length: [len] 117 | 118 | v=0 119 | o=sipp 87308505 2 IN IP[local_ip_type] [local_ip] 120 | s=- 121 | t=0 0 122 | m=audio [media_port] RTP/AVP 8 101 123 | c=IN IP[media_ip_type] [media_ip] 124 | a=rtpmap:8 PCMA/8000 125 | a=rtpmap:101 telephone-event/8000 126 | a=fmtp:101 0-15 127 | a=ptime:20 128 | a=sendrecv 129 | ]]> 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 149 | Content-Length: 0 150 | 151 | ]]> 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /Hold-UAS/uac-hold.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ;tag=[pid]SIPpTag00[call_number] 12 | To: [service] 13 | Call-ID: [call_id] 14 | CSeq: 1 INVITE 15 | Contact: sip:sipp@[local_ip]:[local_port] 16 | Max-Forwards: 70 17 | Subject: Performance Test 18 | Content-Type: application/sdp 19 | Content-Length: [len] 20 | 21 | v=0 22 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 23 | s=- 24 | c=IN IP[media_ip_type] [media_ip] 25 | t=0 0 26 | m=audio [media_port] RTP/AVP 8 101 27 | a=rtpmap:8 PCMA/8000 28 | a=rtpmap:101 telephone-event/8000 29 | a=fmtp:101 0-15 30 | a=ptime:20 31 | 32 | ]]> 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | ;tag=[pid]SIPpTag00[call_number] 54 | To: [service] [peer_tag_param] 55 | Call-ID: [call_id] 56 | CSeq: 1 ACK 57 | Contact: sip:sipp@[local_ip]:[local_port] 58 | Max-Forwards: 70 59 | Content-Length: 0 60 | 61 | ]]> 62 | 63 | 64 | 65 | 66 | 67 | 68 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | ;tag=[pid]SIPpTag00[call_number] 106 | To: [service] [peer_tag_param] 107 | Call-ID: [call_id] 108 | CSeq: 2 BYE 109 | Contact: sip:sipp@[local_ip]:[local_port] 110 | Max-Forwards: 70 111 | Subject: Performance Test 112 | Content-Length: 0 113 | 114 | ]]> 115 | 116 | 117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /Hold-UAS/uas-hold.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | Content-Length: 0 30 | 31 | ]]> 32 | 33 | 34 | 35 | 44 | Content-Type: application/sdp 45 | Content-Length: [len] 46 | 47 | v=0 48 | o=sipp 87308505 1 IN IP[local_ip_type] [local_ip] 49 | s=- 50 | t=0 0 51 | m=audio [media_port] RTP/AVP 8 101 52 | c=IN IP[media_ip_type] [media_ip] 53 | a=rtpmap:8 PCMA/8000 54 | a=rtpmap:101 telephone-event/8000 55 | a=fmtp:101 0-15 56 | a=ptime:20 57 | 58 | ]]> 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | ;tag=[call_number] 73 | To: [$remote_from] 74 | [last_Call-ID:] 75 | CSeq: 1 INVITE 76 | Contact: 77 | Content-Type: application/sdp 78 | Content-Length: [len] 79 | 80 | v=0 81 | o=sipp 87308505 2 IN IP[local_ip_type] [local_ip] 82 | s=- 83 | t=0 0 84 | m=audio [media_port] RTP/AVP 8 101 85 | c=IN IP[media_ip_type] [media_ip] 86 | a=rtpmap:8 PCMA/8000 87 | a=rtpmap:101 telephone-event/8000 88 | a=fmtp:101 0-15 89 | a=ptime:20 90 | a=sendonly 91 | ]]> 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | ;tag=[call_number] 105 | To: [$remote_from] 106 | [last_Call-ID:] 107 | CSeq: 1 ACK 108 | Contact: 109 | ]]> 110 | 111 | 112 | 113 | 114 | 115 | 116 | 125 | Content-Length: 0 126 | 127 | ]]> 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /MWI-unsolicited/uas-mwi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 24 | Expires: 3600 25 | Content-Length: 0 26 | 27 | ]]> 28 | 29 | 30 | 31 | 32 | 33 | 34 | ;tag=[call_number] 39 | To: 40 | Call-ID: [call_id] 41 | CSeq: [cseq] NOTIFY 42 | Contact: sip:[local_ip]:[local_port] 43 | Max-Forwards: 10 44 | Event: message-summary 45 | Content-Type: application/simple-message-summary 46 | Content-Length: [len] 47 | 48 | Messages-Waiting: yes 49 | Message-Account: sip:[service]@[local_ip] 50 | Voice-Message: 2/8 (0/2) 51 | 52 | ]]> 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ;tag=[call_number] 69 | To: 70 | Call-ID: [call_id] 71 | CSeq: [cseq] NOTIFY 72 | Contact: sip:[local_ip]:[local_port] 73 | Max-Forwards: 10 74 | Event: message-summary 75 | Content-Type: application/simple-message-summary 76 | Content-Length: [len] 77 | 78 | Messages-Waiting: no 79 | Message-Account: sip:[service]@[local_ip] 80 | Voice-Message: 0/0 (0/0) 81 | 82 | ]]> 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | ;tag=[call_number] 99 | To: 100 | Call-ID: [call_id] 101 | CSeq: [cseq] NOTIFY 102 | Contact: sip:[local_ip]:[local_port] 103 | Max-Forwards: 10 104 | Event: message-summary 105 | Content-Type: application/simple-message-summary 106 | Content-Length: [len] 107 | 108 | Messages-Waiting: yes 109 | Message-Account: sip:[service]@[local_ip] 110 | Voice-Message: 3/9 (1/1) 111 | 112 | ]]> 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | ;tag=[call_number] 129 | To: 130 | Call-ID: [call_id] 131 | CSeq: [cseq] NOTIFY 132 | Contact: sip:[local_ip]:[local_port] 133 | Max-Forwards: 10 134 | Event: message-summary 135 | Content-Type: application/simple-message-summary 136 | Content-Length: [len] 137 | 138 | Messages-Waiting: no 139 | Message-Account: sip:[service]@[local_ip] 140 | Voice-Message: 0/0 (0/0) 141 | 142 | ]]> 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /Passive-Media/uac-passive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ;tag=[pid]SIPpTag00[call_number] 12 | To: [service] 13 | Call-ID: [call_id] 14 | CSeq: 1 INVITE 15 | Contact: sip:sipp@[local_ip]:[local_port] 16 | Max-Forwards: 70 17 | 18 | ]]> 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | ;tag=[pid]SIPpTag00[call_number] 45 | To: [service] [peer_tag_param] 46 | Call-ID: [call_id] 47 | CSeq: 1 ACK 48 | Contact: sip:sipp@[local_ip]:[local_port] 49 | Max-Forwards: 70 50 | Content-Type: application/sdp 51 | Content-Length: [len] 52 | 53 | v=0 54 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 55 | s=- 56 | c=IN IP[media_ip_type] [media_ip] 57 | t=0 0 58 | m=audio [media_port] RTP/AVP 8 101 59 | a=rtpmap:8 PCMA/8000 60 | a=rtpmap:101 telephone-event/8000 61 | a=fmtp:101 0-15 62 | a=ptime:20 63 | 64 | ]]> 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | ;tag=[pid]SIPpTag00[call_number] 84 | To: [service] [peer_tag_param] 85 | Call-ID: [call_id] 86 | CSeq: 2 BYE 87 | Contact: sip:sipp@[local_ip]:[local_port] 88 | Max-Forwards: 70 89 | Subject: Performance Test 90 | Content-Length: 0 91 | 92 | ]]> 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Passive-Media/uas-passive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | Content-Length: 0 19 | 20 | ]]> 21 | 22 | 23 | 24 | 33 | Content-Type: application/sdp 34 | Content-Length: [len] 35 | 36 | v=0 37 | o=sipp 87308505 1 IN IP[local_ip_type] [local_ip] 38 | s=- 39 | t=0 0 40 | m=audio [media_port] RTP/AVP 8 101 41 | c=IN IP[media_ip_type] [media_ip] 42 | a=rtpmap:8 PCMA/8000 43 | a=rtpmap:101 telephone-event/8000 44 | a=fmtp:101 0-15 45 | a=ptime:20 46 | 47 | ]]> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 72 | Content-Length: 0 73 | 74 | ]]> 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SIPp by Examples 2 | 3 | ## Introduction 4 | 5 | This document provides some step-by-step examples using SIPp in order to emulate different call scenarios. 6 | 7 | ## Requirements: 8 | 9 | **IMPORTANT: In order to execute all the examples, you will need:** 10 | 11 | - A computer with SIPp installed 12 | - A SIP Proxy ([SPLiT](https://github.com/pbertera/SPLiT) or other) 13 | - One or more Snom phone. 14 | - A file editor; one with XML syntax highlighting and validation support is preferred 15 | - A computer equipped with: 16 | - Ethernet card (10/100 or Gigabit) 17 | - Supported operating systems: GNU/Linux, Mac OSX > 10.4 18 | - You must have administrator privileges 19 | - [Wireshark](https://www.wireshark.org) installed 20 | - SIPp installed (scenario are tested with SIPp v3.5.1 with `PCAP` and `RTPSTREAM` features) 21 | 22 | ### How to work with the example code 23 | 24 | This document refers to some example scenario that can be found in this repository. 25 | 26 | You can clone the repository using the `git` command: `git clone https://github.com/pbertera/SIPp-by-example`. Every directory contains a discussed example. 27 | 28 | # SIPp main features: 29 | 30 | **SIPp** is a tool originally developed to benchmark SIP proxy and UAs. SIPp provides a list of complex features like 31 | 32 | * Builtin scenarios 33 | * Custom XML-defined scenarios 34 | * Statistics generation 35 | * Control channel 36 | * RTP echo 37 | * PCAP playback 38 | 39 | The tool was originally developed by Hewlett-Packard, now is maintained by an OSS community on Github 40 | 41 | Here some important online resources: 42 | 43 | * Main documentation [reference](http://sipp.sourceforge.net/doc3.3/reference.html/) 44 | * Project homepage on [github](https://github.com/SIPp/sipp) 45 | * [Mailing list](https://lists.sourceforge.net/lists/listinfo/sipp-users) 46 | 47 | # Basic concepts 48 | 49 | SIPp is a tool capable the send and receive SIP messages, can operate both as a UAC and UAS. The message exchange must be defined in a scenario file. 50 | 51 | One of the biggest SIPp limitations is that the tool can handle only one SIP dialog (one Call-ID) in a scenario, however there is some workaround that can be adopted in some situations. 52 | 53 | ## SIPp command line options: 54 | 55 | Following a list of the most common command line options. You can obtain the full list executing the command `sipp -h`. 56 | 57 | ##### Scenario options 58 | 59 | * `-sn `: use a builtin scenario (*uas*, *uac*, *regexp*, ...) 60 | * `-sd `: dump the XML implementing the builtin scenario 61 | * `-sf `: load a custom scenario file 62 | * `-set `: set the variable *var* with *val* value, the variable can then used into the scenario file as `[$var]` 63 | 64 | ##### SIP IP address and port 65 | 66 | * `-i `: set the local IP address for the *Contact*, *Via* and *From* headers, can be referenced with `[local_ip]` keyword into a scenario file. Applies to the SIP protocol only. 67 | * `-p `: set the local port for the SIP protocol. Can be referenced using the `[local_port]`keyword. 68 | 69 | ##### Media and RTP options 70 | 71 | * `-mi `: set the local media IP address, this value can also be referred using the `[media_ip]` keyword into the scenario file 72 | * `-mp `: set the local media port, this value can also be referred using the `[media_port]` keyword into the scenario file 73 | * `-rtp_echo`: Enable RTP echo. RTP/UDP packets received on port defined by -mp are echoed to their sender. 74 | 75 | ##### Call rate options 76 | 77 | * `-l `: set the maximum number of simultaneous calls 78 | * `-m `: Stop the test and exit when *calls* calls are processed 79 | 80 | ##### Tracing and logging options 81 | 82 | * `-trace_msg`: dump sent and received SIP messages in `__messages.log` 83 | * `-message_file`: Set the name of the message log file 84 | * `-trace_err`: trace all unexpected messages in `__errors.log` 85 | * `-error_file`: set the name of the error log file 86 | * `-trace_logs`: allow tracing of actions in `__logs.log` 87 | * `-log_file`: set the name of the log actions log file 88 | 89 | ## SIPp scenario file syntax 90 | 91 | * root XML tag is named **scenario** and must have the **name** attribute: 92 | 93 | ```xml 94 | 95 | 96 | 97 | 98 | ``` 99 | 100 | ### Scenario commands 101 | 102 | Here is a lost of the most important scenario commands: 103 | 104 | * ``: send a SIP message or a response. Important attributes are: 105 | * `retrans`: set the T1 timer for this message in milliseconds 106 | * `lost`: emulate packet lost, value in percentage 107 | 108 | * ``: wait for a SIP message or response. Important attributes are: 109 | * `response`: indicates what SIP message code is expected 110 | * `request`: indicates what SIP message request is expected 111 | * `optional`: Indicates if the message to receive is optional. If optional is set to "global", SIPp will look every previous steps of the scenario 112 | * `lost`: emulate packet lost, value in percentage 113 | * `timeout`: specify a timeout while waiting for a message. If the message is not received, the call is aborted 114 | * `ontimeout`: specify a label to jump to if the timeout popped 115 | regexp_match: boolean. Indicates if 'request' ('response' is not available) is given as a regular expression. 116 | 117 | The `recv` command can also include the action tag defining the action to execute upon the message reception 118 | 119 | * `pause`: pause the scenario execution. Important attributes are: 120 | * `milliseconds`: time to pause in milliseconds 121 | * `variable`: scenario variable defining the pause time 122 | 123 | * `nop`: the `nop` action doesn’t do nothing at SIP signalling level, is just a tag containing the `action` subtag 124 | 125 | * `sendCmd`: content to be sent to the twin 3PCC (3rd Party Call Control) SIPp instance. The Call-ID must be included 126 | 127 | * `recvCmd`: specify an action when receiving the command 128 | 129 | * `label`: a label is used when you want to branch to specific parts in your scenarios 130 | 131 | #### Common command attributes 132 | 133 | Here is a list of attributes common to all the scenario commands: 134 | 135 | * `crlf`: Displays an empty line after the arrow for the message in main SIPp screen 136 | * `next`: You can put a "next" in any command element to go to another part of the script when you are done with sending the message. For optional receives, the next is only taken if that message was received 137 | * `test`: You can put a "test" next to a "next" attribute to indicate that you only want to branch to the label specified with "next" if the variable specified in "test" is set 138 | * `display`: Display a text into the SIPp screen 139 | 140 | 141 | ### Scenario keywords 142 | 143 | Inside the `send` command, you have to enclose your SIP message between the `` tags. 144 | 145 | Everything between those tags is going to be sent toward the remote system. 146 | Into the SIP message you can include some keywords (Eg. `[service]`, `[remote_ip]`, etc..). 147 | 148 | Those keywords will get replaced at runtime by SIPp. 149 | 150 | * `[service]`: service field, as passed in the -s command line option (default: service) 151 | * `[remote_ip]` and `[remote_port]`: remote IP address and port 152 | * `[transport]`: the transport mode (depending on the -t CLI parameter) (default: UDP) 153 | * `[local_ip]`, `[local_ip_type]`, `[local_port]`: depending on the `-l` and `-p` CLI params. Type can be **4** or **6** 154 | * `[len]`: computed length of the SIP body. To be used in *Content-Length* header 155 | * `[cseq]`: generates automatically the *CSeq* number 156 | * `[call_id]`: a call_id identifies a call and is generated by SIPp for each new call. In client mode, it is mandatory to use the value generated by SIPp in the *Call-ID* header 157 | * `[media_ip]`, `[media_ip_type]`, `[media_port]`: depending on the value of *-mi* and *-mp* params. 158 | * `[last_*]`: is replaced automatically by the specified header if it was present in the last message received (Eg. `[last_From]`) 159 | 160 | ### Scenario actions 161 | 162 | In a `recv`, `recvCmd` or `nop` command you can execute one or more actions: 163 | 164 | * `ereg`: execute a regular expression matching 165 | * `log`: write a log message 166 | * `exec`: execute a command on the operating system shell, or an internal SIPp command or play a pcap file 167 | * `jump`: jump to an arbitrary scenario index 168 | 169 | # Creating an UAC scenario 170 | 171 | 1. An UAC scenario starts with a `send` command: 172 | 173 | ```xml 174 | 175 | 176 | 177 | ;tag=[call_number] 181 | To: sut 182 | Call-ID: [call_id] 183 | Cseq: 1 INVITE 184 | Contact: sip:sipp@[local_ip]:[local_port] 185 | Content-Type: application/sdp 186 | Content-Length: [len] 187 | 188 | v=0 189 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 190 | s=- 191 | t=0 0 192 | c=IN IP[media_ip_type] [media_ip] 193 | m=audio [media_port] RTP/AVP 0 194 | a=rtpmap:0 PCMU/8000 195 | ]]> 196 | 197 | ``` 198 | 199 | 1. The scenario waits for an answer: `100 Trying` and `180 Ringing` are optional. the `200 OK` is mandatory. 200 | 201 | ```xml 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | ``` 211 | 212 | 1. Once the `200 OK` is received the scenario sends the `ACK` and waits for 5 seconds: 213 | 214 | ```xml 215 | 216 | ;tag=[call_number] 220 | To: sut [peer_tag_param] 221 | Call-ID: [call_id] 222 | Cseq: 1 ACK 223 | Contact: sip:sipp@[local_ip]:[local_port] 224 | Content-Length: 0 225 | ]]> 226 | 227 | 228 | ``` 229 | 230 | 1. The scenario terminates sending a `BYE` and waiting for the `200 OK`: 231 | 232 | ```xml 233 | 234 | ;tag=[call_number] 238 | To: sut [peer_tag_param] 239 | Call-ID: [call_id] 240 | Cseq: 2 BYE 241 | Contact: sip:sipp@[local_ip]:[local_port] 242 | Content-Length: 0 243 | ]]> 244 | 245 | 246 | 247 | 248 | ``` 249 | 250 | # Creating an UAS scenario 251 | 252 | 1. An UAS scenario starts with a `recv` command, the scenario replies with `180 Ringing`. The scenario extract the `From` header value and the `Contact` SIP URI from the request: 253 | 254 | ```xml 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | ``` 272 | 273 | 1. Now the scenario should answer the call with 200 OK and wait for the ACK message: 274 | 275 | ```xml 276 | 277 | 285 | Content-Type: application/sdp 286 | Content-Length: [len] 287 | 288 | v=0 289 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 290 | s=- 291 | c=IN IP[media_ip_type] [media_ip] 292 | t=0 0 293 | m=audio [media_port] RTP/AVP 0 294 | a=rtpmap:0 PCMU/8000 295 | ]]> 296 | 297 | 298 | 299 | ``` 300 | 301 | 302 | 1. To end the call the scenario waits for the `BYE` and accept it with `200 OK`. In case the `BYE` is not received in 3000 ms the scenario jumps to the `send_bye` label: 303 | 304 | ```xml 305 | 306 | 307 | 308 | 316 | Content-Length: 0 317 | ]]> 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | ``` 326 | 327 | 1. Define the `send_bye` label: 328 | 329 | ```xml 330 | 352 | ``` 353 | 354 | **NOTE: Both UAC and UAS scenario can be found into the Basic folder: [Basic/uac.xml](Basic/uac.xml) and [Basic/uas.xml](Basic/uas.xml)** 355 | 356 | # Specific settings for SIPp and Snom phones 357 | 358 | If you want to run and UAC against a Snom phone (calling the phone from SIPp), you should pay attention the following points: 359 | 360 | * disable the [filter_registrar](http://wiki.snom.com/wiki/index.php/Settings/filter_registrar) unless you are not running the SIPp from the PBX 361 | * configure the [network_id_port](http://wiki.snom.com/wiki/index.php/Settings/network_id_port) unless you don't want to figure out from the phone registration (look at the `Contact` header sent by the phone during the registration) 362 | * configure the [user_sipusername_as_line](http://wiki.snom.com/wiki/index.php/Settings/user_sipusername_as_line) unless you don't want to figure out from the phone registration (look at the `Contact` header sent by the phone during the registration) 363 | * you should use the `-s` command line option to define the `[service]` keyword containing the SIP identity username 364 | 365 | If you want to call an UAS scenario from a Snom phone the simplest way is to configure a speed dial function key calling the SIPp scenario, Eg.: `fkey3=speed sip:sipp@172.16.18.55:5060`, where `172.16.18.55` is the SIPp address and `5060`is the SIPp port. 366 | 367 | # Some sample scenario 368 | 369 | ## SIP Call with re-INVITE 370 | 371 | This scenario is quite similar to the basic described before: UAC sends an INVITE containing the SDP offer, once the dialog is established the UAC sends an in-dialog INVITE. 372 | 373 | ### The UAS 374 | 375 | **Scenario file:** [reINVITE-PAI/uas.xml](reINVITE-PAI/uas.xml) 376 | 377 | `./sipp -sf reINVITE-PAI/uas.xml -i -p -m 1` 378 | 379 | Where: 380 | 381 | * **** is the local IP address 382 | * ** -i :` 389 | 390 | Where: 391 | 392 | * **** is the local IP address 393 | * **** is the remote IP address 394 | * **** is the remote port 395 | * **** is the called service, if you are calling a phone should be username. 396 | 397 | ## Active Media call scenario 398 | 399 | The folder [Active-Media](Active-Media) contains UAS and UAC scenarios for Active media negotiation (SDP offer sent into the INVITE request). 400 | 401 | The UAC is responsible for the dialog creation and closure. 402 | 403 | ### The UAS 404 | 405 | **Scenario file:** [Active-Media/uas-active.xml](Active-Media/uas-active.xml) 406 | 407 | Since the UAS scenario is playing a PCAP file, SIPp should run with a priviledged user. 408 | 409 | `sudo sipp -sf Active-Media/uas-active.xml -i -p -m 1` 410 | 411 | Where: 412 | 413 | * **** is the local IP address 414 | * ** -i :` 421 | 422 | Where: 423 | 424 | * **** is the local IP address 425 | * **** is the remote IP address 426 | * **** is the remote port 427 | * **** is the called service, if you are calling a phone should be username. 428 | 429 | ### RTP Echo 430 | 431 | If you want to use the RTP echo feature instead of playing a PCAP file you can commend out the section: 432 | 433 | ```xml 434 | 435 | 436 | 437 | 438 | 439 | ``` 440 | 441 | and then add the `-rtp_echo` option to the SIPp command line 442 | 443 | ## Passive Media call scenarios 444 | 445 | The folder [Passive-Media](Passive-Media) contains UAS and UAC scenarios for Passive media negotiation (SDP offer sent into the `200 OK`). 446 | 447 | The UAC is responsible for the dialog creation and closure. 448 | 449 | ### The UAS 450 | 451 | **Scenario file:** [Passive-Media/uas-passive.xml](Passive-Media/uas-passive.xml) 452 | 453 | Since the UAS scenario is playing a PCAP file should run with a proviledged user. 454 | 455 | `sudo sipp -sf Passive-Media/uas-passive.xml -i -p -m 1` 456 | 457 | Where: 458 | 459 | * **** is the local IP address 460 | * ** -i :` 467 | 468 | Where: 469 | 470 | * **** is the local IP address 471 | * **** is the remote IP address 472 | * **** is the remote port 473 | * **** is the called service 474 | 475 | ## Hold call scenario (hold from UAC) 476 | 477 | The folder [Hold-UAC](Hold-UAC) contains UAS and UAC scenarios for call hold using the [RFC 3264](https://tools.ietf.org/html/rfc3264) specification (`a=sendonly/recvonly`). 478 | 479 | In this scenario the UAC sends the first INVITE, and the hold and retrieve re-INVITEs. 480 | 481 | ### The UAS 482 | 483 | **Scenario file:** [Hold-UAC/uas-hold.xml](Hold-UAC/uas-hold.xml) 484 | 485 | Since the UAS scenario is playing a PCAP file should run with a proviledged user. 486 | 487 | `sudo sipp -sf Hold-UAC/uas-hold.xml -i -p -m 1` 488 | 489 | Where: 490 | 491 | * **** is the local IP address 492 | * ** -i :` 501 | 502 | Where: 503 | 504 | * **** is the local IP address 505 | * **** is the remote IP address 506 | * **** is the remote port 507 | * **** is the called service 508 | 509 | ## Hold call scenario (hold from UAS) 510 | 511 | The scenario in the [Hold-UAS](Hold-UAS) folder is a little bit different from the previous one: in this case the hold re-INVITE is send by the UAS. For this reason the UAS need to save the original `From` header and the `Contact` URI from the UAC request. 512 | 513 | ### The UAS 514 | 515 | **Scenario file:** [Hold-UAS/uas-hold.xml](Hold-UAS/uas-hold.xml) 516 | 517 | You can run the UAS scenario using the command: 518 | 519 | `sipp -sf Hold-UAS/uas-hold.xml -i -p -m 1` 520 | 521 | Where: 522 | 523 | * **** is the local IP address 524 | * ** -s -m 1 :` 535 | 536 | Where: 537 | 538 | * **** is the local IP address 539 | * **** is the remote IP address 540 | * **** is the remote port 541 | * **** is the called service 542 | 543 | 544 | ## UAS MWI notification 545 | 546 | **Scenario file:** [MWI-unsolicited/uas-mwi.xml](MWI-unsolicited/uas-mwi.xml) 547 | 548 | This scenario accepts an UAC registration, the scenario accepts the REGISTER and then sends some unsolicited NOTIFY containing the MWI notification. 549 | 550 | You can run the UAS scenario using the command: 551 | 552 | `sipp -sf MWI-unsolicited/uas-mwi.xml -i 172.16.18.69 -m 1 -p 5060` 553 | 554 | Please note that this scenario is using the same Call-ID for the REGISTER reply and the NOTIFY. 555 | 556 | To use this scenario with a Snom phone you can configure an identity with SIPp IP address as registrar. 557 | 558 | ## UAS BLF implementing the signalling defined by RFC4235 559 | 560 | **Scenario file:** [BLF/uas-blf-recipient.xml](BLF/uas-blf-recipient.xml) 561 | 562 | This UAS scenario implements the protocol and syntax described by [RFC 4235](https://tools.ietf.org/html/rfc4235) defining the BLF functionality 563 | 564 | The scenario simulates a monitored SIP entity receiving a call 565 | 566 | ### Executing the scenario 567 | 568 | You can execute the scenario running the following command: 569 | 570 | * *local_display* defines the local display name of the incoming dialog 571 | * *local_identity* defines the local identity of incoming dialog 572 | * *local_uri* defines the caller URI 573 | * *remote_display* defines the remote display name of the incoming dialog 574 | * *remote_identity* defines the remote identity of the incoming dialog 575 | * *target_uri* defines the remote contact of the incoming dialog 576 | 577 | **Example:** 578 | 579 | ``` 580 | sipp -sf BLF/uas-blf-recipient.xml -i 172.16.18.69 -m 1 \ 581 | -key local_display Bob \ 582 | -key local_identity bob@houseofbob:5060 \ 583 | -key local_uri sip:bob@wonderlan.com \ 584 | -key remote_display Carl \ 585 | -key remote_identity carl@carl@houseofcarl:5060 \ 586 | -key target_uri bob@wonderland.com \ 587 | ``` 588 | 589 | ### Call diagram 590 | 591 | * **A** is the monitoring UAC 592 | * **B** is registered with *Contact: bob@houseofbob.com:5060*, AOR is *bob@wonderland.com* and displayname is "Bob" 593 | * **C** is registered with *Contact: carl@houseofcarl.om:5060*, AOR is *carl@wonderland.com* and displayname is "Carl" 594 | * **C** calls **B* INVITING the URI bob@wonderland.com 595 | 596 | ``` 597 | A B C 598 | | | | 599 | | SUBSCRIBE | | 600 | |-------------->| | 601 | | | | 602 | | 202 Accepted | | 603 | |<--------------| | 604 | | | INVITE | 605 | | |<---------------| 606 | | | |-+ 607 | | | 180 Ringing | | 608 | | |--------------->| | 609 | | NOTIFY | | | 610 | |<--------------| | | EARLY 611 | | | | | 612 | | 200 OK | | | 613 | |-------------->| | | 614 | | | 200 OK | | 615 | | |--------------->|-+ 616 | | | ACK | 617 | | |<---------------|-+ 618 | | NOTIFY | | | 619 | |<--------------| | | 620 | | | | | 621 | | 200 OK | | | CONNECTED 622 | |-------------->| | | 623 | | | BYE | | 624 | | |<---------------|-+ 625 | | | 200 OK | 626 | | |--------------->|-+ 627 | | NOTIFY | | | 628 | |<--------------| | | TERMINATED 629 | | | | | 630 | | 200 OK | | | 631 | |-------------->| |-+ 632 | ``` 633 | 634 | **Note usage with a Snom Phone as UAC:** after executing the scenario you should configure a function key as a BLF monitoring the SIPp instance, Eg.: `fkey3=blf sipp@172.16.18.69` 635 | 636 | ## Call Pickup with 3PCC (Replaces header) 637 | 638 | **Scenario files:** [Call-pickup-3pcc/uac-3pcc-C-A.xml](Call-pickup-3pcc/uac-3pcc-C-A.xml) and [Call-pickup-3pcc/uac-3pcc-C-B.xml](Call-pickup-3pcc/uac-3pcc-C-B.xml) 639 | 640 | The whole scenario need 2 SIPp instances in communication trough the [3PCC](http://sipp.sourceforge.net/doc/reference.html#3PCC) SIPp feature. 641 | 642 | * `Call-pickup-3pcc/uac-3pcc-C-A.xml` is the scenario controlling the first SIPp instance (A) 643 | * `Call-pickup-3pcc/uac-3pcc-C-B.xml` is the scenario controlling the second SIPp instance (B) 644 | 645 | The whole scenario can be described with the following steps: 646 | 647 | 1. Instance **A** starts a call with DUT 648 | 2. As soon **DUT** answers the call, instance **B** sends a new INVITE containing the *Replaces* header, the header must contain the `Call-ID` and the local and remote tags of the first dialog (see the previous point) 649 | 3. Now **DUT** should terminate the first dialog (replaced by the new one). The caller ID should be updated 650 | 4. **DUT** should answer the call 651 | 5. Now instance B waits for a `BYE` from the phone 652 | 653 | #### Message diagram 654 | 655 | ``` 656 | DUT A(uac-3pcc-C-A.xml) B(uac-3pcc-C-B.xml) 657 | | INVITE | | 658 | |<-------------------------| | 659 | | | | 660 | | 180 Ringing | | 661 | |------------------------->| | 662 | | | | 663 | | | Cmd (Call-ID,local-tag,remote-tag) | 664 | | |-------------------------------------->| 665 | | INVITE (Replaces) | | 666 | |<-----------------------------------------------------------------| 667 | | | | 668 | | BYE | | 669 | |------------------------->| | 670 | | | | 671 | | 200 OK | | 672 | |<-------------------------| | 673 | | | | 674 | | 200 OK | | 675 | |----------------------------------------------------------------->| 676 | | | | 677 | | BYE | | 678 | |----------------------------------------------------------------->| 679 | | | | 680 | | 200 OK | | 681 | |<-----------------------------------------------------------------| 682 | | | | 683 | ``` 684 | 685 | The 3PCC feature is designed to reuse the same Call-ID of the first call (adding the Call-ID header in the *sendCmd* is mandatory), but in this scenario we need to instantiate a new SIP dialog, for this reason we add the prefix *new-* into the header value. 686 | 687 | ### How to use 688 | 689 | 1) You have to start the SIPp instance **B**, assuming that: 690 | 691 | * *172.16.18.15* is your computer address 692 | * you want to receive the messages from instance **A** to the port *7777* 693 | * *172.16.18.64* is DUT (Device Under Test) 694 | * *382* is the DUT extension 695 | 696 | ``` 697 | sipp -p 5061 -sf Call-pickup-3pcc/uac-3pcc-C-B.xml -s 382 -3pcc 127.0.0.1:7777 -i 172.16.18.15 -mi 172.16.18.15 -m 1 172.16.18.64 698 | ``` 699 | 700 | Once instance started SIPp will wait for the command from instance **A** 701 | 702 | 2) Start the instance **A**, assuming that: 703 | 704 | * *172.16.18.15* is your computer address 705 | * you want to send the messages to instance **B** to the port *7777* 706 | * *172.16.18.64* is DUT 707 | * *382* is the DUT extension 708 | 709 | ``` 710 | sipp -p 5062 -sf Call-pickup-3pcc/uac-3pcc-C-A.xml -s 382 -3pcc 127.0.0.1:7777 -i 172.16.18.15 -mi 172.16.18.15 -m 1 172.16.18.64 711 | ``` 712 | 713 | 3) At this point DUT should ring, once you answer the call instance **A** should exit and the call should be terminated on instance **B** 714 | 715 | **NOTE: if *DUT* is a Snom phone and you want to automate the call answer last point you can de-comment the following action:** 716 | 717 | ```xml 718 | 719 | 720 | 721 | 722 | 723 | ``` 724 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | pandoc README.md -o index.html -f markdown --template template/standalone.html --css template/template.css --toc --toc-depth=2 5 | -------------------------------------------------------------------------------- /pcap/g711a.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbertera/SIPp-by-example/25f46299af4cb0a6c4d7400f17d5aec42d2db7f1/pcap/g711a.pcap -------------------------------------------------------------------------------- /reINVITE-PAI/uac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ;tag=[call_number] 8 | To: sut 9 | Call-ID: [call_id] 10 | CSeq: 1 INVITE 11 | Contact: sip:123@[local_ip]:[local_port] 12 | Content-Type: application/sdp 13 | Content-Length: [len] 14 | 15 | v=0 16 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 17 | s=- 18 | t=0 0 19 | c=IN IP[media_ip_type] [media_ip] 20 | m=audio [media_port] RTP/AVP 0 21 | a=rtpmap:0 PCMU/8000 22 | ]]> 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | ;tag=[call_number] 39 | To: sut [peer_tag_param] 40 | Call-ID: [call_id] 41 | CSeq: 1 ACK 42 | Contact: sip:123@[local_ip]:[local_port] 43 | Content-Length: 0 44 | ]]> 45 | 46 | 47 | 48 | 49 | 50 | ;tag=[call_number] 54 | To: sut [peer_tag_param] 55 | P-Asserted-Identity: 56 | Call-ID: [call_id] 57 | CSeq: 2 INVITE 58 | Contact: sip:123@[local_ip]:[local_port] 59 | Content-Type: application/sdp 60 | Content-Length: [len] 61 | 62 | v=0 63 | o=user1 53655765 2353687638 IN IP[local_ip_type] [local_ip] 64 | s=- 65 | t=0 0 66 | c=IN IP[media_ip_type] [media_ip] 67 | m=audio [media_port] RTP/AVP 0 68 | a=rtpmap:0 PCMU/8000 69 | ]]> 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | ;tag=[call_number] 83 | To: sut [peer_tag_param] 84 | Call-ID: [call_id] 85 | CSeq: 2 ACK 86 | Contact: sip:123@[local_ip]:[local_port] 87 | Content-Length: 0 88 | ]]> 89 | 90 | 91 | 92 | 93 | 94 | ;tag=[call_number] 98 | To: sut [peer_tag_param] 99 | Call-ID: [call_id] 100 | Cseq: 2 BYE 101 | Contact: sip:123@[local_ip]:[local_port] 102 | Content-Length: 0 103 | ]]> 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /reINVITE-PAI/uas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | Content-Type: application/sdp 28 | Content-Length: [len] 29 | 30 | v=0 31 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 32 | s=- 33 | c=IN IP[media_ip_type] [media_ip] 34 | t=0 0 35 | m=audio [media_port] RTP/AVP 0 36 | a=rtpmap:0 PCMU/8000 37 | ]]> 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 54 | Content-Type: application/sdp 55 | Content-Length: [len] 56 | 57 | v=0 58 | o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] 59 | s=- 60 | c=IN IP[media_ip_type] [media_ip] 61 | t=0 0 62 | m=audio [media_port] RTP/AVP 0 63 | a=rtpmap:0 PCMU/8000 64 | ]]> 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 83 | Content-Length: 0 84 | ]]> 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 111 | -------------------------------------------------------------------------------- /template/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | # pandoc bootstrap adaptive template 2 | 3 | Inspired from: 4 | 5 | [https://github.com/tonyblundell/pandoc-bootstrap-template](https://github.com/tonyblundell/pandoc-bootstrap-template) 6 | 7 | Includes a sticky adaptive menu and some other nice things: 8 | 9 | # Install: 10 | 11 | git clone https://github.com/diversen/pandoc-bootstrap-adaptive-template 12 | 13 | cd pandoc-bootstrap-adaptive-template 14 | 15 | Example (fetch latest pandoc README and transform to HTML) 16 | 17 | pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o index.html -f markdown --template standalone.html --css template.css --toc --toc-depth=2 18 | 19 | Start a server in current directory, e.g.: 20 | 21 | php -S localhost:8080 22 | 23 | Point a browser to [http://localhost:8080](http://localhost:8080) 24 | 25 | Or checout the gh-page for this repository, which is the pandoc documentation with this template: 26 | 27 | [http://diversen.github.io/pandoc-bootstrap-adaptive-template/](http://diversen.github.io/pandoc-bootstrap-adaptive-template/) 28 | 29 | # Variables 30 | 31 | google analytics: 32 | 33 | --variable=analytics:XXX-ANALYTICS-CODE 34 | 35 | 36 | -------------------------------------------------------------------------------- /template/jquery.sticky-kit.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.9.2 2 | 3 | /** 4 | @license Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net 5 | */ 6 | 7 | (function() { 8 | var $, win; 9 | 10 | $ = this.jQuery || window.jQuery; 11 | 12 | win = $(window); 13 | 14 | $.fn.stick_in_parent = function(opts) { 15 | var doc, elm, enable_bottoming, fn, i, inner_scrolling, len, manual_spacer, offset_top, parent_selector, recalc_every, sticky_class; 16 | if (opts == null) { 17 | opts = {}; 18 | } 19 | sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming; 20 | if (offset_top == null) { 21 | offset_top = 0; 22 | } 23 | if (parent_selector == null) { 24 | parent_selector = void 0; 25 | } 26 | if (inner_scrolling == null) { 27 | inner_scrolling = true; 28 | } 29 | if (sticky_class == null) { 30 | sticky_class = "is_stuck"; 31 | } 32 | doc = $(document); 33 | if (enable_bottoming == null) { 34 | enable_bottoming = true; 35 | } 36 | fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) { 37 | var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick; 38 | if (elm.data("sticky_kit")) { 39 | return; 40 | } 41 | elm.data("sticky_kit", true); 42 | last_scroll_height = doc.height(); 43 | parent = elm.parent(); 44 | if (parent_selector != null) { 45 | parent = parent.closest(parent_selector); 46 | } 47 | if (!parent.length) { 48 | throw "failed to find stick parent"; 49 | } 50 | fixed = false; 51 | bottomed = false; 52 | spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : $("
"); 53 | if (spacer) { 54 | spacer.css('position', elm.css('position')); 55 | } 56 | recalc = function() { 57 | var border_top, padding_top, restore; 58 | if (detached) { 59 | return; 60 | } 61 | last_scroll_height = doc.height(); 62 | border_top = parseInt(parent.css("border-top-width"), 10); 63 | padding_top = parseInt(parent.css("padding-top"), 10); 64 | padding_bottom = parseInt(parent.css("padding-bottom"), 10); 65 | parent_top = parent.offset().top + border_top + padding_top; 66 | parent_height = parent.height(); 67 | if (fixed) { 68 | fixed = false; 69 | bottomed = false; 70 | if (manual_spacer == null) { 71 | elm.insertAfter(spacer); 72 | spacer.detach(); 73 | } 74 | elm.css({ 75 | position: "", 76 | top: "", 77 | width: "", 78 | bottom: "" 79 | }).removeClass(sticky_class); 80 | restore = true; 81 | } 82 | top = elm.offset().top - (parseInt(elm.css("margin-top"), 10) || 0) - offset_top; 83 | height = elm.outerHeight(true); 84 | el_float = elm.css("float"); 85 | if (spacer) { 86 | spacer.css({ 87 | width: elm.outerWidth(true), 88 | height: height, 89 | display: elm.css("display"), 90 | "vertical-align": elm.css("vertical-align"), 91 | "float": el_float 92 | }); 93 | } 94 | if (restore) { 95 | return tick(); 96 | } 97 | }; 98 | recalc(); 99 | if (height === parent_height) { 100 | return; 101 | } 102 | last_pos = void 0; 103 | offset = offset_top; 104 | recalc_counter = recalc_every; 105 | tick = function() { 106 | var css, delta, recalced, scroll, will_bottom, win_height; 107 | if (detached) { 108 | return; 109 | } 110 | recalced = false; 111 | if (recalc_counter != null) { 112 | recalc_counter -= 1; 113 | if (recalc_counter <= 0) { 114 | recalc_counter = recalc_every; 115 | recalc(); 116 | recalced = true; 117 | } 118 | } 119 | if (!recalced && doc.height() !== last_scroll_height) { 120 | recalc(); 121 | recalced = true; 122 | } 123 | scroll = win.scrollTop(); 124 | if (last_pos != null) { 125 | delta = scroll - last_pos; 126 | } 127 | last_pos = scroll; 128 | if (fixed) { 129 | if (enable_bottoming) { 130 | will_bottom = scroll + height + offset > parent_height + parent_top; 131 | if (bottomed && !will_bottom) { 132 | bottomed = false; 133 | elm.css({ 134 | position: "fixed", 135 | bottom: "", 136 | top: offset 137 | }).trigger("sticky_kit:unbottom"); 138 | } 139 | } 140 | if (scroll < top) { 141 | fixed = false; 142 | offset = offset_top; 143 | if (manual_spacer == null) { 144 | if (el_float === "left" || el_float === "right") { 145 | elm.insertAfter(spacer); 146 | } 147 | spacer.detach(); 148 | } 149 | css = { 150 | position: "", 151 | width: "", 152 | top: "" 153 | }; 154 | elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick"); 155 | } 156 | if (inner_scrolling) { 157 | win_height = win.height(); 158 | if (height + offset_top > win_height) { 159 | if (!bottomed) { 160 | offset -= delta; 161 | offset = Math.max(win_height - height, offset); 162 | offset = Math.min(offset_top, offset); 163 | if (fixed) { 164 | elm.css({ 165 | top: offset + "px" 166 | }); 167 | } 168 | } 169 | } 170 | } 171 | } else { 172 | if (scroll > top) { 173 | fixed = true; 174 | css = { 175 | position: "fixed", 176 | top: offset 177 | }; 178 | css.width = elm.css("box-sizing") === "border-box" ? elm.outerWidth() + "px" : elm.width() + "px"; 179 | elm.css(css).addClass(sticky_class); 180 | if (manual_spacer == null) { 181 | elm.after(spacer); 182 | if (el_float === "left" || el_float === "right") { 183 | spacer.append(elm); 184 | } 185 | } 186 | elm.trigger("sticky_kit:stick"); 187 | } 188 | } 189 | if (fixed && enable_bottoming) { 190 | if (will_bottom == null) { 191 | will_bottom = scroll + height + offset > parent_height + parent_top; 192 | } 193 | if (!bottomed && will_bottom) { 194 | bottomed = true; 195 | if (parent.css("position") === "static") { 196 | parent.css({ 197 | position: "relative" 198 | }); 199 | } 200 | return elm.css({ 201 | position: "absolute", 202 | bottom: padding_bottom, 203 | top: "auto" 204 | }).trigger("sticky_kit:bottom"); 205 | } 206 | } 207 | }; 208 | recalc_and_tick = function() { 209 | recalc(); 210 | return tick(); 211 | }; 212 | detach = function() { 213 | detached = true; 214 | win.off("touchmove", tick); 215 | win.off("scroll", tick); 216 | win.off("resize", recalc_and_tick); 217 | $(document.body).off("sticky_kit:recalc", recalc_and_tick); 218 | elm.off("sticky_kit:detach", detach); 219 | elm.removeData("sticky_kit"); 220 | elm.css({ 221 | position: "", 222 | bottom: "", 223 | top: "", 224 | width: "" 225 | }); 226 | parent.position("position", ""); 227 | if (fixed) { 228 | if (manual_spacer == null) { 229 | if (el_float === "left" || el_float === "right") { 230 | elm.insertAfter(spacer); 231 | } 232 | spacer.remove(); 233 | } 234 | return elm.removeClass(sticky_class); 235 | } 236 | }; 237 | win.on("touchmove", tick); 238 | win.on("scroll", tick); 239 | win.on("resize", recalc_and_tick); 240 | $(document.body).on("sticky_kit:recalc", recalc_and_tick); 241 | elm.on("sticky_kit:detach", detach); 242 | return setTimeout(tick, 0); 243 | }; 244 | for (i = 0, len = this.length; i < len; i++) { 245 | elm = this[i]; 246 | fn($(elm)); 247 | } 248 | return this; 249 | }; 250 | 251 | }).call(this); 252 | -------------------------------------------------------------------------------- /template/lang/da/language.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Vertical Accordion Menu Plugin v 2.6 7 | 8 | 9 | 10 | 11 | 12 | 71 | 72 | 73 | 74 | 75 | 76 |
77 |

jQuery Vertical Accordion Menu Plugin v 2.6 - Visit Plugin Site

78 |

Demo Menus Using "Click"

79 |
80 |
    81 |
  • Close Open Sub-menus: On
  • 82 |
  • Save State: On
  • 83 |
  • Auto Expand: On
  • 84 |
  • Disable Parent links: On
  • 85 |
  • Speed: slow
  • 86 |
  • Count: on
  • 87 |
88 | 178 |
179 |
180 |
    181 |
  • Close Open Sub-menus: Off
  • 182 |
  • Save State: On
  • 183 |
  • Disable Parent links: On
  • 184 |
  • Speed: fast
  • 185 |
  • Count: on
  • 186 |
187 | 279 |
280 |
281 |
    282 |
  • Close Open Sub-menus: Off
  • 283 |
  • Save State: Off
  • 284 |
  • Disable Parent links: Off
  • 285 |
  • Speed: slow
  • 286 |
  • Count: off
  • 287 |
288 | 386 |
387 |

Demo Menus Using "Hover"

388 |
389 |
    390 |
  • Close Open Sub-menus: On
  • 391 |
  • Auto-Close: Off
  • 392 |
  • Save State: On
  • 393 |
  • Disable Parent links: On
  • 394 |
  • Speed: slow
  • 395 |
  • Count: on
  • 396 |
397 | 489 |
490 |
491 |
    492 |
  • Close Open Sub-menus: Off
  • 493 |
  • Auto-Close: On
  • 494 |
  • Save State: On
  • 495 |
  • Disable Parent links: On
  • 496 |
  • Speed: fast
  • 497 |
  • Count: on
  • 498 |
499 | 591 |
592 |
593 |
    594 |
  • Close Open Sub-menus: Off
  • 595 |
  • Auto-Close: On
  • 596 |
  • Save State: Off
  • 597 |
  • Disable Parent links: Off
  • 598 |
  • Speed: slow
  • 599 |
  • Count: Off
  • 600 |
601 | 701 |
702 |
703 |
704 |
705 | 706 | 707 | -------------------------------------------------------------------------------- /template/menu/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Cookie plugin 3 | * 4 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | * 9 | */ 10 | 11 | /** 12 | * Create a cookie with the given name and value and other optional parameters. 13 | * 14 | * @example $.cookie('the_cookie', 'the_value'); 15 | * @desc Set the value of a cookie. 16 | * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 17 | * @desc Create a cookie with all available options. 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Create a session cookie. 20 | * @example $.cookie('the_cookie', null); 21 | * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 22 | * used when the cookie was set. 23 | * 24 | * @param String name The name of the cookie. 25 | * @param String value The value of the cookie. 26 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 27 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 28 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 29 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 30 | * when the the browser exits. 31 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 32 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 33 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 34 | * require a secure protocol (like HTTPS). 35 | * @type undefined 36 | * 37 | * @name $.cookie 38 | * @cat Plugins/Cookie 39 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 40 | */ 41 | 42 | /** 43 | * Get the value of a cookie with the given name. 44 | * 45 | * @example $.cookie('the_cookie'); 46 | * @desc Get the value of a cookie. 47 | * 48 | * @param String name The name of the cookie. 49 | * @return The value of the cookie. 50 | * @type String 51 | * 52 | * @name $.cookie 53 | * @cat Plugins/Cookie 54 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 55 | */ 56 | jQuery.cookie = function(name, value, options) { 57 | if (typeof value != 'undefined') { // name and value given, set cookie 58 | options = options || {}; 59 | if (value === null) { 60 | value = ''; 61 | options.expires = -1; 62 | } 63 | var expires = ''; 64 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 65 | var date; 66 | if (typeof options.expires == 'number') { 67 | date = new Date(); 68 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 69 | } else { 70 | date = options.expires; 71 | } 72 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 73 | } 74 | // CAUTION: Needed to parenthesize options.path and options.domain 75 | // in the following expressions, otherwise they evaluate to undefined 76 | // in the packed version for some reason... 77 | var path = options.path ? '; path=' + (options.path) : ''; 78 | var domain = options.domain ? '; domain=' + (options.domain) : ''; 79 | var secure = options.secure ? '; secure' : ''; 80 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 81 | } else { // only name given, get cookie 82 | var cookieValue = null; 83 | if (document.cookie && document.cookie != '') { 84 | var cookies = document.cookie.split(';'); 85 | for (var i = 0; i < cookies.length; i++) { 86 | var cookie = jQuery.trim(cookies[i]); 87 | // Does this cookie string begin with the name we want? 88 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 89 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 90 | break; 91 | } 92 | } 93 | } 94 | return cookieValue; 95 | } 96 | }; -------------------------------------------------------------------------------- /template/menu/js/jquery.dcjqaccordion.2.7.js: -------------------------------------------------------------------------------- 1 | /* 2 | * DC jQuery Vertical Accordion Menu - jQuery vertical accordion menu plugin 3 | * Copyright (c) 2011 Design Chemical 4 | * 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | * 9 | */ 10 | (function($){ 11 | $.fn.dcAccordion = function(options) { 12 | //set default options 13 | var defaults = { 14 | classParent : 'dcjq-parent', 15 | classActive : 'active', classArrow : 'dcjq-icon', classCount : 'dcjq-count', 16 | classExpand : 'dcjq-current-parent', 17 | eventType : 'click', 18 | hoverDelay : 300, 19 | menuClose : true, 20 | autoClose : true, 21 | autoExpand : false, 22 | speed : 'slow', 23 | saveState : true, 24 | disableLink : true, showCount : false, 25 | cookie : 'dcjq-accordion' 26 | }; 27 | //call in the default otions 28 | var options = $.extend(defaults, options); 29 | this.each(function(options){ 30 | var obj = this; 31 | setUpAccordion(); 32 | if(defaults.saveState == true){ 33 | checkCookie(defaults.cookie, obj); 34 | } 35 | if(defaults.autoExpand == true){ 36 | $('li.'+defaults.classExpand+' > a').addClass(defaults.classActive); 37 | } 38 | resetAccordion(); 39 | if(defaults.eventType == 'hover'){ 40 | var config = { 41 | sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 42 | interval: defaults.hoverDelay, // number = milliseconds for onMouseOver polling interval 43 | over: linkOver, // function = onMouseOver callback (REQUIRED) 44 | timeout: defaults.hoverDelay, // number = milliseconds delay before onMouseOut 45 | out: linkOut // function = onMouseOut callback (REQUIRED) 46 | }; 47 | $('li a',obj).hoverIntent(config); 48 | var configMenu = { 49 | sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 50 | interval: 1000, // number = milliseconds for onMouseOver polling interval 51 | over: menuOver, // function = onMouseOver callback (REQUIRED) 52 | timeout: 1000, // number = milliseconds delay before onMouseOut 53 | out: menuOut // function = onMouseOut callback (REQUIRED) 54 | }; 55 | $(obj).hoverIntent(configMenu); 56 | // Disable parent links 57 | if(defaults.disableLink == true){ 58 | $('li a',obj).click(function(e){ 59 | if($(this).siblings('ul').length >0){ 60 | e.preventDefault(); 61 | } 62 | }); 63 | } 64 | } else { 65 | $('li a',obj).click(function(e){ 66 | $activeLi = $(this).parent('li'); 67 | $parentsLi = $activeLi.parents('li'); 68 | $parentsUl = $activeLi.parents('ul'); 69 | // Prevent browsing to link if has child links 70 | if(defaults.disableLink == true){ 71 | if($(this).siblings('ul').length >0){ 72 | e.preventDefault(); 73 | } 74 | } 75 | // Auto close sibling menus 76 | if(defaults.autoClose == true){ 77 | autoCloseAccordion($parentsLi, $parentsUl); 78 | } 79 | if ($('> ul',$activeLi).is(':visible')){ 80 | $('ul',$activeLi).slideUp(defaults.speed); 81 | $('a',$activeLi).removeClass(defaults.classActive); 82 | } else { 83 | $(this).siblings('ul').slideToggle(defaults.speed); 84 | $('> a',$activeLi).addClass(defaults.classActive); 85 | } 86 | // Write cookie if save state is on 87 | if(defaults.saveState == true){ 88 | createCookie(defaults.cookie, obj); 89 | } 90 | }); 91 | } 92 | // Set up accordion 93 | function setUpAccordion(){ 94 | $arrow = ''; 95 | var classParentLi = defaults.classParent+'-li'; 96 | $('> ul',obj).show(); 97 | $('li',obj).each(function(){ 98 | if($('> ul',this).length > 0){ $(this).addClass(classParentLi); 99 | $('> a',this).addClass(defaults.classParent).append($arrow); 100 | } 101 | }); 102 | $('> ul',obj).hide(); 103 | if(defaults.showCount == true){ 104 | $('li.'+classParentLi,obj).each(function(){ 105 | if(defaults.disableLink == true){ 106 | var getCount = parseInt($('ul a:not(.'+defaults.classParent+')',this).length); 107 | } else { 108 | var getCount = parseInt($('ul a',this).length); 109 | } 110 | $('> a',this).append(' ('+getCount+')'); 111 | }); 112 | } 113 | } 114 | 115 | function linkOver(){ 116 | 117 | $activeLi = $(this).parent('li'); 118 | $parentsLi = $activeLi.parents('li'); 119 | $parentsUl = $activeLi.parents('ul'); 120 | 121 | // Auto close sibling menus 122 | if(defaults.autoClose == true){ 123 | autoCloseAccordion($parentsLi, $parentsUl); 124 | 125 | } 126 | 127 | if ($('> ul',$activeLi).is(':visible')){ 128 | $('ul',$activeLi).slideUp(defaults.speed); 129 | $('a',$activeLi).removeClass(defaults.classActive); 130 | } else { 131 | $(this).siblings('ul').slideToggle(defaults.speed); 132 | $('> a',$activeLi).addClass(defaults.classActive); 133 | } 134 | 135 | // Write cookie if save state is on 136 | if(defaults.saveState == true){ 137 | createCookie(defaults.cookie, obj); 138 | } 139 | } 140 | 141 | function linkOut(){ 142 | } 143 | 144 | function menuOver(){ 145 | } 146 | 147 | function menuOut(){ 148 | 149 | if(defaults.menuClose == true){ 150 | $('ul',obj).slideUp(defaults.speed); 151 | // Reset active links 152 | $('a',obj).removeClass(defaults.classActive); 153 | createCookie(defaults.cookie, obj); 154 | } 155 | } 156 | 157 | // Auto-Close Open Menu Items 158 | function autoCloseAccordion($parentsLi, $parentsUl){ 159 | $('ul',obj).not($parentsUl).slideUp(defaults.speed); 160 | // Reset active links 161 | $('a',obj).removeClass(defaults.classActive); 162 | $('> a',$parentsLi).addClass(defaults.classActive); 163 | } 164 | // Reset accordion using active links 165 | function resetAccordion(){ 166 | $('ul',obj).hide(); 167 | $allActiveLi = $('a.'+defaults.classActive,obj); 168 | $allActiveLi.siblings('ul').show(); 169 | } 170 | }); 171 | // Retrieve cookie value and set active items 172 | function checkCookie(cookieId, obj){ 173 | var cookieVal = $.cookie(cookieId); 174 | if(cookieVal != null){ 175 | // create array from cookie string 176 | var activeArray = cookieVal.split(','); 177 | $.each(activeArray, function(index,value){ 178 | var $cookieLi = $('li:eq('+value+')',obj); 179 | $('> a',$cookieLi).addClass(defaults.classActive); 180 | var $parentsLi = $cookieLi.parents('li'); 181 | $('> a',$parentsLi).addClass(defaults.classActive); 182 | }); 183 | } 184 | } 185 | // Write cookie 186 | function createCookie(cookieId, obj){ 187 | var activeIndex = []; 188 | // Create array of active items index value 189 | $('li a.'+defaults.classActive,obj).each(function(i){ 190 | var $arrayItem = $(this).parent('li'); 191 | var itemIndex = $('li',obj).index($arrayItem); 192 | activeIndex.push(itemIndex); 193 | }); 194 | // Store in cookie 195 | $.cookie(cookieId, activeIndex, { path: '/' }); 196 | } 197 | }; 198 | })(jQuery); -------------------------------------------------------------------------------- /template/menu/js/jquery.dcjqaccordion.2.7.min.js: -------------------------------------------------------------------------------- 1 | (function($){$.fn.dcAccordion=function(options){var defaults={classParent:'dcjq-parent',classActive:'active',classArrow:'dcjq-icon',classCount:'dcjq-count',classExpand:'dcjq-current-parent',eventType:'click',hoverDelay:300,menuClose:true,autoClose:true,autoExpand:false,speed:'slow',saveState:true,disableLink:true,showCount:false,cookie:'dcjq-accordion'};var options=$.extend(defaults,options);this.each(function(options){var obj=this;setUpAccordion();if(defaults.saveState==true){checkCookie(defaults.cookie,obj)}if(defaults.autoExpand==true){$('li.'+defaults.classExpand+' > a').addClass(defaults.classActive)}resetAccordion();if(defaults.eventType=='hover'){var config={sensitivity:2,interval:defaults.hoverDelay,over:linkOver,timeout:defaults.hoverDelay,out:linkOut};$('li a',obj).hoverIntent(config);var configMenu={sensitivity:2,interval:1000,over:menuOver,timeout:1000,out:menuOut};$(obj).hoverIntent(configMenu);if(defaults.disableLink==true){$('li a',obj).click(function(e){if($(this).siblings('ul').length>0){e.preventDefault()}})}}else{$('li a',obj).click(function(e){$activeLi=$(this).parent('li');$parentsLi=$activeLi.parents('li');$parentsUl=$activeLi.parents('ul');if(defaults.disableLink==true){if($(this).siblings('ul').length>0){e.preventDefault()}}if(defaults.autoClose==true){autoCloseAccordion($parentsLi,$parentsUl)}if($('> ul',$activeLi).is(':visible')){$('ul',$activeLi).slideUp(defaults.speed);$('a',$activeLi).removeClass(defaults.classActive)}else{$(this).siblings('ul').slideToggle(defaults.speed);$('> a',$activeLi).addClass(defaults.classActive)}if(defaults.saveState==true){createCookie(defaults.cookie,obj)}})}function setUpAccordion(){$arrow='';var classParentLi=defaults.classParent+'-li';$('> ul',obj).show();$('li',obj).each(function(){if($('> ul',this).length>0){$(this).addClass(classParentLi);$('> a',this).addClass(defaults.classParent).append($arrow)}});$('> ul',obj).hide();if(defaults.showCount==true){$('li.'+classParentLi,obj).each(function(){if(defaults.disableLink==true){var getCount=parseInt($('ul a:not(.'+defaults.classParent+')',this).length)}else{var getCount=parseInt($('ul a',this).length)}$('> a',this).append(' ('+getCount+')')})}}function linkOver(){$activeLi=$(this).parent('li');$parentsLi=$activeLi.parents('li');$parentsUl=$activeLi.parents('ul');if(defaults.autoClose==true){autoCloseAccordion($parentsLi,$parentsUl)}if($('> ul',$activeLi).is(':visible')){$('ul',$activeLi).slideUp(defaults.speed);$('a',$activeLi).removeClass(defaults.classActive)}else{$(this).siblings('ul').slideToggle(defaults.speed);$('> a',$activeLi).addClass(defaults.classActive)}if(defaults.saveState==true){createCookie(defaults.cookie,obj)}}function linkOut(){}function menuOver(){}function menuOut(){if(defaults.menuClose==true){$('ul',obj).slideUp(defaults.speed);$('a',obj).removeClass(defaults.classActive);createCookie(defaults.cookie,obj)}}function autoCloseAccordion($parentsLi,$parentsUl){$('ul',obj).not($parentsUl).slideUp(defaults.speed);$('a',obj).removeClass(defaults.classActive);$('> a',$parentsLi).addClass(defaults.classActive)}function resetAccordion(){$('ul',obj).hide();$allActiveLi=$('a.'+defaults.classActive,obj);$allActiveLi.siblings('ul').show()}});function checkCookie(cookieId,obj){var cookieVal=$.cookie(cookieId);if(cookieVal!=null){var activeArray=cookieVal.split(',');$.each(activeArray,function(index,value){var $cookieLi=$('li:eq('+value+')',obj);$('> a',$cookieLi).addClass(defaults.classActive);var $parentsLi=$cookieLi.parents('li');$('> a',$parentsLi).addClass(defaults.classActive)})}}function createCookie(cookieId,obj){var activeIndex=[];$('li a.'+defaults.classActive,obj).each(function(i){var $arrayItem=$(this).parent('li');var itemIndex=$('li',obj).index($arrayItem);activeIndex.push(itemIndex)});$.cookie(cookieId,activeIndex,{path:'/'})}}})(jQuery); -------------------------------------------------------------------------------- /template/menu/js/jquery.hoverIntent.minified.js: -------------------------------------------------------------------------------- 1 | /** 2 | * hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ 3 | * 4 | * 5 | * @param f onMouseOver function || An object with configuration options 6 | * @param g onMouseOut function || Nothing (use configuration options object) 7 | * @author Brian Cherne 8 | */ 9 | (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))= 768) { 23 | console.log('fold in'); 24 | //$(sticky).hide(); 25 | //$(sticky).show(); 26 | $(sticky).stick_in_parent(options); 27 | // $(".well ul").addClass('menu'); 28 | 29 | $(".well ul").attr('id', 'accordion-1'); 30 | 31 | } else { 32 | $(".well ul").attr('id', ''); 33 | $(sticky).trigger("sticky_kit:detach"); 34 | console.log('fold out'); 35 | 36 | } 37 | }; 38 | 39 | $(document).ready(function () { 40 | $(window).on('resize', function () { 41 | 42 | setStickyMenu(); 43 | }); 44 | }); 45 | function doAccordion () { 46 | 47 | $("#accordion-1").dcAccordion({ 48 | eventType: 'click', 49 | autoClose: false, 50 | saveState: false, 51 | disableLink: false, 52 | speed: 0, 53 | showCount: true, 54 | autoExpand: true, 55 | cookie: 'dcjq-accordion-1', 56 | classExpand: 'dcjq-current-parent' 57 | }); 58 | } 59 | 60 | $(document).ready(function () { 61 | setStickyMenu(); 62 | doAccordion(); 63 | }); 64 | 65 | $(document).ready(function () { 66 | $( 'table' ).addClass( "table" ); 67 | }); 68 | 69 | /* 70 | $(window).resize(function() { 71 | if(this.resizeTO) clearTimeout(this.resizeTO); 72 | this.resizeTO = setTimeout(function() { 73 | $(this).trigger('resizeEnd'); 74 | }, 200); 75 | }); 76 | 77 | $(window).bind('resizeEnd', function() { 78 | //do something, window hasn't changed size in 500ms 79 | //window.location = location.pathname + location.hash; 80 | //location.reload(); 81 | setStickyMenu(); 82 | });*/ 83 | -------------------------------------------------------------------------------- /template/standalone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | $for(author-meta)$ 35 | 36 | $endfor$ 37 | $if(date-meta)$ 38 | 39 | $endif$ 40 | $if(title-prefix)$$title-prefix$ - $endif$$pagetitle$ 41 | 42 | $if(quotes)$ 43 | 44 | $endif$ 45 | $if(highlighting-css)$ 46 | 49 | $endif$ 50 | $for(css)$ 51 | 52 | $endfor$ 53 | $if(math)$ 54 | $math$ 55 | $endif$ 56 | $for(header-includes)$ 57 | $header-includes$ 58 | $endfor$ 59 | 60 | 61 | 62 | 63 | $if(title)$ 64 | 79 | $endif$ 80 |
81 |
82 | $if(toc)$ 83 |
84 | 85 |
86 |

Index

87 | $toc$ 88 | 89 |
90 |
91 | $endif$ 92 |
93 | $if(abstract)$ 94 |
95 |
$abstract$
96 |
97 | $endif$ 98 | $for(include-before)$ 99 | $include-before$ 100 | $endfor$ 101 | $body$ 102 | $for(include-after)$ 103 | $include-after$ 104 | $endfor$ 105 |
106 |
107 |
108 | $if(analytics)$ 109 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /template/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | $for(author-meta)$ 35 | 36 | $endfor$ 37 | $if(date-meta)$ 38 | 39 | $endif$ 40 | $if(title-prefix)$$title-prefix$ - $endif$$pagetitle$ 41 | 42 | $if(quotes)$ 43 | 44 | $endif$ 45 | $if(highlighting-css)$ 46 | 49 | $endif$ 50 | $for(css)$ 51 | 52 | $endfor$ 53 | $if(math)$ 54 | $math$ 55 | $endif$ 56 | $for(header-includes)$ 57 | $header-includes$ 58 | $endfor$ 59 | 60 | 61 | 62 | 63 | $if(title)$ 64 | 79 | $endif$ 80 |
81 |
82 | $if(toc)$ 83 |
84 |
85 | 86 | $toc$ 87 |
88 |
89 | $endif$ 90 |
91 | $for(include-before)$ 92 | $include-before$ 93 | $endfor$ 94 | $body$ 95 | $for(include-after)$ 96 | $include-after$ 97 | $endfor$ 98 |
99 |
100 |
101 | $if(analytics)$ 102 | 112 | 113 | 114 | 115 | --------------------------------------------------------------------------------