Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300832 - net-misc/asterisk - support SIP scripts for /usr/share/doc
Summary: net-misc/asterisk - support SIP scripts for /usr/share/doc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 12:08 UTC by Jaco Kroon
Modified: 2010-07-19 15:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
find_call_ids.sh (find_call_ids.sh,381 bytes, text/plain)
2010-01-13 12:09 UTC, Jaco Kroon
Details
find_call_sip_trace.sh (find_call_sip_trace.sh,518 bytes, text/plain)
2010-01-13 12:10 UTC, Jaco Kroon
Details
call_data.txt (call_data.txt,1.09 KB, text/plain)
2010-01-13 12:10 UTC, Jaco Kroon
Details
find_call_ids.sh (find_call_ids.sh,446 bytes, text/plain)
2010-01-14 08:35 UTC, Jaco Kroon
Details
find_call_sip_trace.sh (find_call_sip_trace.sh,530 bytes, text/plain)
2010-01-14 13:30 UTC, Jaco Kroon
Details
sip_calc_auth (sip_calc_auth,493 bytes, text/plain)
2010-05-25 07:20 UTC, Jaco Kroon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2010-01-13 12:08:00 UTC
I'm about to attach some scripts which can be placed (discussed with Chainsaw) in /usr/share/doc/asterisk-*/ somewhere which is potentially useful for trouble-shooting SIP problems, esp on busy servers.

Reproducible: Always

Steps to Reproduce:
Comment 1 Jaco Kroon 2010-01-13 12:09:35 UTC
Created attachment 216344 [details]
find_call_ids.sh

Extract Call-ID values given an A and B number.  (.* is valid).
Comment 2 Jaco Kroon 2010-01-13 12:10:08 UTC
Created attachment 216345 [details]
find_call_sip_trace.sh

extract the sip trace given a Call-ID
Comment 3 Jaco Kroon 2010-01-13 12:10:41 UTC
Created attachment 216346 [details]
call_data.txt

some really elementary docs.
Comment 4 Jaco Kroon 2010-01-14 08:35:26 UTC
Created attachment 216463 [details]
find_call_ids.sh

Replacement, slight tweak (include the date/time of the call on the output lines).
Comment 5 Jaco Kroon 2010-01-14 13:30:56 UTC
Created attachment 216496 [details]
find_call_sip_trace.sh

now deals properly with retransmits too.

Please hold this ticket until I can get the following check to pass on all calls on not only 99.5 % of calls I've checked it on so far (a set of a few hundred).

grep ^Call-ID: debug | dos2unix | sed -re 's/.* (.*)/\1/' | sort | uniq -c | while read C ID; do echo -n "$ID: "; [ $(find_call_sip_trace.sh debug $ID | grep ^Call-ID: | wc -l) -eq $C ] && echo OK || echo FAILED; done
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2010-05-21 14:44:04 UTC
To confirm, still holding this ticket as I've not received your final acknowledgement...
Comment 7 Jaco Kroon 2010-05-25 07:20:27 UTC
Created attachment 232847 [details]
sip_calc_auth

Script useful for debugging auth issues such as http://forum.snom.com/index.php?showtopic=4519&st=0, basically it just calculates the response that would be expected given the various inputs, example:

$ ./sip_calc_auth 1234 asterisk 4321 REGISTER sip:192.168.61.5 md5 123456
Using 1234@asterisk (secret 4321) for method REGISTER to sip:192.168.61.5 with nonce 123456 (alg=md5)
a1=1234:asterisk:4321
a2=REGISTER:sip:192.168.61.5
ha1=425e103542b10fcfac3786e3171cc819
ha2=2184e704b6fe942aec1d0d5fded60222
resp=45dac37ee46706f14282974435de691f
Comment 8 Jaco Kroon 2010-05-25 07:38:31 UTC
chainsaw, as discussed on IRC - I should perhaps rather roll a package for scripts such as these, eg voip-tools or something?  Otherwise, you're welcome to (in the meantime at least) include these scripts as part of the asterisk package.
Comment 9 Jaco Kroon 2010-07-15 22:46:46 UTC
This is ready to be merged ... been using it without problems now for a while and it managed to actually pinpoint quite a few problems already.
Comment 10 Tony Vroon (RETIRED) gentoo-dev 2010-07-19 15:48:01 UTC
+*asterisk-1.6.2.9-r1 (19 Jul 2010)
+
+  19 Jul 2010; <chainsaw@gentoo.org> +files/1.6.2/asterisk.initd,
+  +files/1.6.2/call_data.txt, +files/1.6.2/find_call_ids.sh,
+  +files/1.6.2/find_call_sip_trace.sh, +files/1.6.2/sip_calc_auth,
+  +asterisk-1.6.2.9-r1.ebuild:
+  Revision bump for enhancements by Jaco Kroon in bugs #300832, #305265 &
+  #328517. This improves the initscript and simplifies the ebuild.
+  Environmental variables for module overrides (which were a bad idea in the
+  first place) are no longer supported.