Differentiating between incoming and outgoing on a X100P?


#1

Sorry for the vague subject, but I’m having a hard time trying to describe my problem.

I’m testing out asterisk as an answering machine replacement. So the asterisk server shares the same incoming pstn line as my analog phones. I also use asterisk to send callerid information to a ‘misterhouse’ home automation program for notification. This works absolutely fantastic for incoming calls.

The problem is, when I dial out, asterisk sees the line as active and sends non-existant callerid information on an occasional basis. So when I call out I get a ‘phone call from unknown’ announcement every 5-6 minutes.

Is there any way to fix this such that asterisk can only activate when it senses a ring, and leaves outbound calls alone? I’ve searched and searched and haven’t found anything at all similar to my problem.

I’ve included entries from my extensions.conf, Zapata.conf as well as a relevant section from the log when I make an outgoing call.

thank you in advance very much for any assistance.

hp

extensions.conf
[pre-voip]
exten => s,1,AGI(misterhouse.agi,“CallerID”)
exten => s,2,Wait,25
exten => s,3,Answer()
exten => s,4,Macro(vm,3000)
exten => s,5,Hangup

zapata.conf
[channels]
language=en
context=pre-voip
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
callerid=asreceived
echocancel=yes
echocancelwhenbridged=no
echotraining=800
channel => 1

/var/log/asterisk/full

-- Starting simple switch on 'Zap/1-1'
-- Executing AGI("Zap/1-1", "misterhouse.agi|"CallerID"") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/misterhouse.agi

misterhouse.agi|“CallerID”: AGI Environment Dump:
misterhouse.agi|“CallerID”: – accountcode =
misterhouse.agi|“CallerID”: – callerid = unknown
misterhouse.agi|“CallerID”: – calleridname = unknown
misterhouse.agi|“CallerID”: – callingani2 = 0
misterhouse.agi|“CallerID”: – callingpres = 0
misterhouse.agi|“CallerID”: – callingtns = 0
misterhouse.agi|“CallerID”: – callington = 0
misterhouse.agi|“CallerID”: – channel = Zap/1-1
misterhouse.agi|“CallerID”: – context = pre-voip
misterhouse.agi|“CallerID”: – dnid = unknown
misterhouse.agi|“CallerID”: – enhanced = 0.0
misterhouse.agi|“CallerID”: – extension = s
misterhouse.agi|“CallerID”: – language = en
misterhouse.agi|“CallerID”: – priority = 1
misterhouse.agi|“CallerID”: – rdnis = unknown
misterhouse.agi|“CallerID”: – request = misterhouse.agi
misterhouse.agi|“CallerID”: – type = Zap
misterhouse.agi|“CallerID”: – uniqueid = 1138765741.8
– AGI Script misterhouse.agi completed, returning 0
– Executing Wait(“Zap/1-1”, “25”) in new stack
== Spawn extension (pre-voip, s, 2) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing AGI(“Zap/1-1”, “misterhouse.agi|“CallerID””) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/misterhouse.agi
misterhouse.agi|“CallerID”: AGI Environment Dump:
misterhouse.agi|“CallerID”: – accountcode =
misterhouse.agi|“CallerID”: – callerid = unknown
misterhouse.agi|“CallerID”: – calleridname = unknown
misterhouse.agi|“CallerID”: – callingani2 = 0
misterhouse.agi|“CallerID”: – callingpres = 0
misterhouse.agi|“CallerID”: – callingtns = 0
misterhouse.agi|“CallerID”: – callington = 0
misterhouse.agi|“CallerID”: – channel = Zap/1-1
misterhouse.agi|“CallerID”: – context = pre-voip
misterhouse.agi|“CallerID”: – dnid = unknown
misterhouse.agi|“CallerID”: – enhanced = 0.0
misterhouse.agi|“CallerID”: – extension = s
misterhouse.agi|“CallerID”: – language = en
misterhouse.agi|“CallerID”: – priority = 1
misterhouse.agi|“CallerID”: – rdnis = unknown
misterhouse.agi|“CallerID”: – request = misterhouse.agi
misterhouse.agi|“CallerID”: – type = Zap
misterhouse.agi|“CallerID”: – uniqueid = 1138765891.9
– AGI Script misterhouse.agi completed, returning 0
– Executing Wait(“Zap/1-1”, “25”) in new stack
== Spawn extension (pre-voip, s, 2) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’