Can Asterisk do this?

hi everybody!
i have a situation where i have i SIP/VOIP account with 5 numbers and all outgoing phonecalls are free ( i have a hone flatrate). i want to use this to also phone free from my cell phone.
my plan was to do the following:
have my freebsd server manage all voip traffic (with asterisk), whenever a phone call comes in on a certain number (numberA) asterisk should check two things:

  1. is the calling person me (is the number my cellphones number)
  2. what was added after numberA and if that is a valid number.
    then the server should reject the incoming call, wait for 3 seconds then dial-out to the caller (my cellphone); as soon as i pick up, it should dial a second connection to the number that was appended to its own.

this would enable me to dial any number from my cellphone for free by just prepending one of my voip numbers at home…

is this possible with asterisk?

thanks for any help!

p.s.: dont consider this a “do this for me”-post, i just want to know whether stuff like this is possible in general or if i should look for different software/maybe write my own

Yes it is. It seems you want call back. Is that correct ?

[quote]Yes it is. It seems you want call back. Is that correct ?[/quote] well yes, sort of…
i’ll try to explain ore clearly:
the features asterisk would have to be capable of are:

  • identify the calling number
  • identify if another number is appended to the one it is watching
  • dial two voip calls and connect them
  • if possible it would also be great if it could fake a calling-number (make a voip call where the number that appears on the receiving phone can be modified)

is this possble?

thx

check out this issue:

forums.digium.com/viewtopic.php?t=7634

if you’re into java-programming, that shouldn’t be a big task. in my case i’m using a j2me-application to do what you want to do.

[quote]if you’re into java-programming,[/quote] i never got into java because its not free software…
are there any c or python based implmentations of the asterisk-api/manager?
or could i issue the required commands from simple unix command line?
is there any built-in configuration options to set up rules like,
on “incoming call from SIP-account-foobar” do “not pick up” and “call numberXYZ”

thanks for your help

i think you’ll get stuck where your ITSP doesn’t send you the complete number, but your account/login/DID and no more. mostly because the CO the call originates from will probably strip off or ignore the extra DTMF.

nice idea, but i don’t think it’s going to work :cry:

@baconbuttie:
you mean that if my number is 0123456 that if i call 01234509876 from my cellphone that 09876 wont by transmitted?

hm… then i could have the server call me back anyhow and i would dial the numer after having picked up, that would definitely work, right?

although it wouldnt be as handy… couldnt use saved numbers and stuff like that…

or i could maybe do it with short messages… but that is rather unhandy too…