Roger wrote:

William Suffill wrote:

check the caller id in your incoming extension before you pass to to a
end user. Reset $calleridname to unavaliable if no number is given



Thanks a good suggestion... How would I implement this??? Any docs/web pages/examples you could point me to?


Ok reading over

doc/README.variables

gave me a good idea on how to do this...

I've setup the following in extensions.conf with this idea that if my cell phone calls the office I'll have a call from Blah w/ a number of 111-1111. xxxxxxxxxx is the number for my cell phone which I've removed

exten => s,1,gotoif,"$[${CALLERIDNUM} = xxxxxxxxxx]?2:5";
exten => s,2,SetVar,CALLERIDNUM=1111111
exten => s,3,SetVar,CALLERIDNAME=blah
exten => s,4,SetVar,CALLERID=blah
exten => s,5,setmusiconhold,default
exten => s,6,responsetimeout,30
exten => s,7,Answer
exten => s,8,Background(topgreet)
exten => s,9,Background(menu)
exten => s,10,Wait,7
exten => s,11,Voicemail(u102)
exten => s,12,Hangup

This is the output when my cell phone calls in - then dials extension 102

   -- Starting simple switch on 'Zap/1-1'
   -- Executing GotoIf("Zap/1-1", "1?2:5") in new stack
   -- Goto (pstn,s,2)
   -- Executing SetVar("Zap/1-1", "CALLERIDNUM=1111111") in new stack
   -- Executing SetVar("Zap/1-1", "CALLERIDNAME=blah") in new stack
   -- Executing SetVar("Zap/1-1", "CALLERID=blah") in new stack
   -- Executing SetMusicOnHold("Zap/1-1", "default") in new stack
   -- Executing ResponseTimeout("Zap/1-1", "30") in new stack
   -- Set Response Timeout to 30
   -- Executing Answer("Zap/1-1", "") in new stack
   -- Executing BackGround("Zap/1-1", "topgreet") in new stack
   -- Playing 'topgreet' (language 'en')
 == CDR updated on Zap/1-1
   -- Executing Dial("Zap/1-1", "SIP/102|20|r") in new stack
   -- Called 102
   -- SIP/102-b22b is ringing
 == Spawn extension (pstn, 102, 1) exited non-zero on 'Zap/1-1'
   -- Hungup 'Zap/1-1'

I called from another number and it did not do the 3 SetVars - called from my cell phone and it did reset the 3 caller id variables. However when looking at the caller id displayed on my phone it still gives the normal caller id info - not the modified caller id I was expecting.


-- Rock River Internet Roger Grunkemeyer 202 W. State St, 8th Floor [EMAIL PROTECTED] Rockford, IL 61101 815-968-9888 x102

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to