Astrad V8 : Teste Notify
Oussama Hammami, 2011-06-09
Switzernet
L’objective de ce teste est déterminer l’impact de l’envoi des paquets SIP NOTIFY (avec event : keep-alive), dont le but est de garder le port sur le routeur NAT des clients ouvert, sur l’utilisation du CPU dans le serveur Astrad.
#! /usr/local/bin/bash
for user in `mysql -uUSER -pPASSWORD asterisk -BN -e "select username from location3"`; do
asterisk -rx 'sip notify nat '$user
echo "-Sending NOTIFY to $user"
done
echo "Done";
[nat]
Event=>keep-alive
Content-Length=>0
# date
Thu Jun 9 19:37:54 CEST 2011
astrad6:/etc/asterisk#
astrad6:/etc/asterisk#
astrad6:/etc/asterisk#
astrad6:/etc/asterisk#
astrad6:/etc/asterisk# date
Thu Jun 9 19:37:57 CEST 2011
astrad6:/etc/asterisk# mysql -uroot -p asterisk -e 'select count(*) from location3'
Enter password:
+----------+
| count(*) |
+----------+
| 202 |
+----------+
astrad6:/etc/asterisk# ./test.sh
Sending NOTIFY of type 'nat' to '41215500027'
-Sending NOTIFY to 41215500027
Sending NOTIFY of type 'nat' to '41215500027'
-Sending NOTIFY to 41215500027
Sending NOTIFY of type 'nat' to '41215500045'
-Sending NOTIFY to 41215500045
Sending NOTIFY of type 'nat' to '41215500068'
-Sending NOTIFY to 41215500068
Sending NOTIFY of type 'nat' to '41215500119'
-Sending NOTIFY to 41215500119
Sending NOTIFY of type 'nat' to '41215500154'
-Sending NOTIFY to 41215500154
...
-Sending NOTIFY to 41625041502
Sending NOTIFY of type 'nat' to '41625041503'
-Sending NOTIFY to 41625041503
Sending NOTIFY of type 'nat' to '41912091709'
-Sending NOTIFY to 41912091709
Done
astrad6:/etc/asterisk#
# ngrep -pql -W byline "" port 5060 | egrep -B7 '^CSeq.*NOTIFY'
* * *