Asterisk Callback DISA

One reason I love my job so much is I learn a lot. Also, I can apply everything I’ve learned and be able to do something with it (read: play with a lot of stuff). The following is a forwarded email at the asterisk-ph Yahoo! Group. Originally posted here. Asterisk users are such cheap bastards. Ha ha ha!

Who needs this?

If you have an unlimited incoming cellphone service plan, you can use this method to call out without paying outgoing minute charge. You may also take advantage of your low long distance calling rate of your VoIP service by calling out through your home Asterisk server.

Requirements

  1. Your Asterisk box should be able to make at least two simultaneous outgoing calls. (One to call you back and the other provides DISA to dial out.)
  2. A separate Direct-Inward-Dial (DID) number dedicated to this task.
  3. Your cellphone should have a legitimate CallerID number. (We use this to identify the caller.)

How it works?

  1. Call your DID number on your Asterisk box from your cellphone. When you hear the ringing tone, just hang up your cellphone.
  2. Wait 20 seconds, your cellphone will get a incoming call from your Asterisk box. Answer it, follow the instructions. Press your password and the #. If everything is all right, you should get a dial tone.
  3. Now you may make an outgoing call from there. All calls should be routed from your Asterisk PBX using the lowest calling rate.

Setup

Here is how I setup my home Asterisk on Slug. I am using UnSlung 6.8 with Asterisk14 installed. A DID number 6085558888 from MyVSP is setup for this task. My cellphone number is 6081112222. You should change these to fit your situation.

  1. Create a file named /opt/etc/asterisk/callback.call with the following lines:
    Channel: SIP/6081112222@MyVSP
    Context: custom-DISA-out
    Extension: s
    Priority: 1
    CallerID: 6085558888
  2. Create a file named /opt/etc/asterisk/callback_exe with the following lines:
    sleep 20
    cp /opt/etc/asterisk/callback.call /opt/var/spool/asterisk/outgoing

    Make this file executable:
    chmod +x /opt/etc/asterisk/callback_exe

  3. In your extensions.conf:
    [MyVSP-incoming]
    exten => 6085558888 ,1,NoOp(Incoming call from # ${CALLERID(num)})
    exten => 6085558888 ,n,GotoIf($["${CALLERID(num)}" = "6081112222"]?custom-CallBack,s,1)

    [custom-CallBack]
    ;;prepare for callback and DISA
    exten => s,1,NoOp(Hangup then callback to cellphone)
    exten => s,2,Hangup()
    exten => h,1,NoOp(copy callback.call file to /opt/var/spool/asterisk/outgoing)
    exten => h,2,System(/opt/etc/asterisk/callback_exe)
    exten => h,3,Hangup()

    [custom-DISA-out]
    exten => s,1,Wait(1)
    exten => s,n,Background(agent-pass)
    exten => s,n,Authenticate(87235) ;this number is the password
    exten => s,n,Background(pls-wait-connect-call)
    exten => s,n,DISA(no-password|out-pstn)

  4. In your modules.conf, make sure the following modules are loaded:
    load=app_authenticate.so
    load=app_disa.so
    load=app_system.so
    load=pbx_spool.so
    load=func_callerid.so
  5. Restart Asterisk and test it.
  • Pingback: Dog Training » Blog Archive » Asterisk Callback DISA

  • hailang

    hello!
    Could you tell me how to get callback_exe ?

  • http://blog.jploh.com jploh

    You create it. See step 2.

  • http://none Pierre-Louis

    Hi every body,
    I am trying to test the callback disa with a zap channel but I see on the asterisk cli the following message : pbx_spool… call failed to go through reason 0.Can you help me please.But he works fine with a SIP channel

    Best regards
    Pierre

  • Pingback: Baby name meaning and origin for Disa

  • Pingback: Blog

  • http://searscardcom.com Searscard

    Hey there. I just did some web surfing and discovered this weblog. I walked through this blog put up and it’s definitely amazing.I definitely definitely get pleasure from your blog site.Perfectly, the part of publishing is in conviction the quite best on this genuinely really worth although topic. I book marked it and i’m wanting forward for your upcoming website writes. I also seen that your website has some very good leading completed to it. I will right aside carry hold of your rss feed to remain informed of any update versions. Incredible info you acquired right here.Be sure to keep replace on your fantastic post.Many thanks.

  • http://lymediseasereview.com Lyme Disease

    I really concept i’d write and let you realize your sites is helpful for pointed out the valuable mystery.I essentially love your blog.In the correct way, the write-up is in veracity the top on this worth while subject. I concur along with your conclusions and will desperately appear forward to your forthcoming messages. Pretty much saying thanks won’t just be sufficient, for that phenomenal lucidity as part of your composing. I will right away capture your rss feed to stay abreast of any updates.Reliable give good results and much being successful in your own do the job and organization efforts.Anyways hold up the wonderful show results.Many thanks.

  • http://brianlidgardz1.moreoneteam.com Cemal

    i went to naples when i was 16

  • http://babiespregnancy.com babies pregnancy

    Just want commentabout this article, after reading whole of this it make me to have new thinking about one big event, hope I can read more great news again from you so I bookmark your website.

  • http://gerberbaby.net/ gerber baby

    Hello just thought i would let you know something.. It is twice now i have landed on your blog inside the last 2 weeks looking for completely unrelated things. Spooky or what?

  • Wangqin29

    These will be one more restraining aspect using the handful of business shades. A lot of enjoy putting one more url from stress for the cycle.A good thing to try and do here’s so that the basic fundamentals initially. Find the garments plan from christian louboutin outlet to see just what that states. The majority of the girls will not know that will what’s helped and what’s prohibited in work per what’s noted.

  • Pingback: Best VOIP Place

  • Pingback: Ver mujeres