freebsd-ports/misc/callid/files/patch-src_call-logd
Sam Lawrance e3c905d837 Fix detection of called/calling numbers when there is no calling number.
PR:		ports/91284
Submitted by:	Torfinn Ingolfsen <tingo@start.no>
Approved by:	possamai@xs4all.nl (maintainer, timeout 5 weeks)
2006-02-11 14:42:50 +00:00

27 lines
627 B
Text

--- sbin/call-logd.orig Tue Jan 3 22:45:53 2006
+++ sbin/call-logd Tue Jan 3 22:51:33 2006
@@ -33,13 +33,14 @@
else{
@cpn = split(' ', $grepS);
- if ($phonenr eq ''){
- $phonenr = "$cpn[3]";
- }#end if phonenr
-
- else{
- $msnnr = "$cpn[3]";
- }#end else
+ if ($cpn[0] eq "[calling") {
+ if ($cpn[3] ne "(type=national,") {
+ $phonenr = "$cpn[3]";
+ }
+ }
+ if ($cpn[0] eq "[called") {
+ $msnnr = "$cpn[3]";
+ }
if ($msnnr eq ''){