返回列表 發帖

Callback in IP01

The same as described in last callback post.
1. Add a few rows to your dialplan, say, you want to callback to phone number 01234567890:
  1.   exten=s,1,NoOp(Incoming call from # ${CALLERID(num)})
  2.   exten=s,2,GotoIf($["${CALLERID(num)}"="01234567890"]?mycallback,s,1)
  3.   ;other original codes
複製代碼
2. Use File Editor to edit extensions.conf
Create an extension, mycallback using Add context:
  1. exten=s,1,NoOp(Hangup then callback to cellphone)
  2. exten=s,2,Wait(1)
  3. exten=s,3,system(cp /persistent/var/lib/asterisk/agi-bin/template.call /var/lib/asterisk/tmp.call)
  4. exten=s,4,system(echo "Channel: SIP/mysiptrunk/${CALLERID(num)}" >> /var/lib/asterisk/tmp.call)
  5. exten=s,5,Hangup()
  6. exten=h,1,NoOp(copy tmp.call file to /var/spool/asterisk/outgoing)
  7. exten=h,2,system(/persistent/var/lib/asterisk/agi-bin/callback.sh)
  8. exten=h,3,Hangup()
複製代碼
3. The callback template file template.call is
  1. context: customCallback
  2. Extension: s
  3. Priority: 1
  4. CallerID: 1380013800
複製代碼
and the shell script file callback.sh is
  1. #!/bin/sh
  2. sleep 10
  3. mv /var/lib/asterisk/tmp.call /var/spool/asterisk/outgoing
  4. exit 0;
複製代碼
4. Related settings in module.conf, especially pbx_spool.so must be loaded.
5. Do not forget add an context named customCallback!

Enjoy the callback function in IP01!

回復 2# bubblestar


    I am just a newbie but concentrate on the specific applications(callback and DISA). Both are well-written on the web and you can get them simply by your finger tips(google)

   Other things, like security, I think you and ckleea are really experts. I got more from all C-hings in this forum but just share my experience.

TOP

回復 6# 角色


    I place IP01 in Sweden.

Yes, I would use the callback as soon as the phone list(to work around the blocking of China mobile ) is available for me.

TOP

回復 8# ckleea


    Of cause you can. Here we share !

In fact, it is better to modify it to some kind of macro.

TOP

返回列表