GoogleVoiceCall -> SIP proxy
My idea was
When I forward my phone to a US number than the dialplan should detect that it should go to google voice
But when I forward my phone to a dutch mobile number then the dialplan should detect that it should go to provider1 or provider2
and the last if I would forward to another local user then it should detect that it should go to local
should it be possible to overide the num with the forwarding number
then detect on wich provider the forwardnumber should be dialed on
en then something like this
callswitch(num"&#{req.URI.User}@local")
When I forward my phone to a US number than the dialplan should detect that it should go to google voice
But when I forward my phone to a dutch mobile number then the dialplan should detect that it should go to provider1 or provider2
and the last if I would forward to another local user then it should detect that it should go to local
should it be possible to overide the num with the forwarding number
then detect on wich provider the forwardnumber should be dialed on
en then something like this
callswitch(num"&#{req.URI.User}@local")
I think this question is more appropriate for my other thread:
Flexible table-controlled dialplan, optimized for US, GV
but since you posted it here, I'll respond here.
Please take a look at the following lines in inbound call processing section of my dialplan:
As you can see, I use callswitch("0",35) to forward incoming call to my home landline phone if my IP phone is offline and the call arrived between 8am and 11pm.
Callswitch method is the answer to your question. It takes care of everything, it will find '0' in speed dial table and replace it with my home phone number and automatically select VoIP provider from VSPtab. Thus, if I ever change my home phone number, I will only need to change corresponding entry in speed dial table. If I find a better provider for calling landline numbers in my home city, I will only have to change VSPtab. I don't need to change the code itself And if I decide to call my mobile number instead of home number, I'll only need to add corresponding entry to speed dial or use the number as a literal parameter of callswitch, like this: callswitch("+1 212 555-1212").
Of course, all this has nothing to do with the subject of this thread.
Flexible table-controlled dialplan, optimized for US, GV
but since you posted it here, I'll respond here.
Please take a look at the following lines in inbound call processing section of my dialplan:
Code: Select all
if sys.IsAvailable() # If my ATA is registered
callswitch("#{sys.Username}@local[fu=#{name}]") # forward all incoming calls to it
elsif (8..23) === t.hour # else forward calls to my home
sys.Log("#{sys.Username} is not online, forwarding call to home number...")
callswitch("0",35) # Note that '0' is in my speed dial list
end
Callswitch method is the answer to your question. It takes care of everything, it will find '0' in speed dial table and replace it with my home phone number and automatically select VoIP provider from VSPtab. Thus, if I ever change my home phone number, I will only need to change corresponding entry in speed dial table. If I find a better provider for calling landline numbers in my home city, I will only have to change VSPtab. I don't need to change the code itself And if I decide to call my mobile number instead of home number, I'll only need to add corresponding entry to speed dial or use the number as a literal parameter of callswitch, like this: callswitch("+1 212 555-1212").
Of course, all this has nothing to do with the subject of this thread.
That does not solve my problem
I have a website where you can insert your forwarding number in a form
So If someone would enter a number I don't know the number and so I can only route it to my default provider and not automaticly trough google or other provider
I would really like to have a forward function where you can let 2 phones ring when you are called on your voip
I have a website where you can insert your forwarding number in a form
So If someone would enter a number I don't know the number and so I can only route it to my default provider and not automaticly trough google or other provider
I would really like to have a forward function where you can let 2 phones ring when you are called on your voip
Well, then you're in the right thread.
Indeed, you'll have to convert GoogleVoiceCall into SIP proxy, that's the only way (at the moment) to multi-forward (forward to 2 or more destinations simultaneously).
Then you'll have to write your own code for forwarding. Use selectVSP to pick the right provider for every forwarding number (except @local, of course) and then build dial string for sys.Dial by joining all destination string with '&'.
Indeed, you'll have to convert GoogleVoiceCall into SIP proxy, that's the only way (at the moment) to multi-forward (forward to 2 or more destinations simultaneously).
Then you'll have to write your own code for forwarding. Use selectVSP to pick the right provider for every forwarding number (except @local, of course) and then build dial string for sys.Dial by joining all destination string with '&'.
Hi Mike
I think I have your Google Sip Proxy working
when I call from outside my voip network to sip:number.GV_Call@sip.huizenwireless.nl the dialplan starts en calls to google
But the problem that I have when I try it internal I get the message that the local sip account could not be found
Any idea how to solve this
Another question would there not be a security isiue
If I would call for example sip:12026422987.GV_Call@sipsorcery.com
I wil be using your google acount (I tryed it but think you have disabled the sip account)
I think I have your Google Sip Proxy working
when I call from outside my voip network to sip:number.GV_Call@sip.huizenwireless.nl the dialplan starts en calls to google
But the problem that I have when I try it internal I get the message that the local sip account could not be found
Any idea how to solve this
Another question would there not be a security isiue
If I would call for example sip:12026422987.GV_Call@sipsorcery.com
I wil be using your google acount (I tryed it but think you have disabled the sip account)
Hi MikeMikeTelis wrote:gvtricks,
the problem with this approach is that your SIP phone (or softphone) rings for 5 seconds only, then it stops ringing and the call gets forwarded to your cell phone. 5 seconds is quite a short time and most of the time it's not enough to grab IP phone and answer the call on it.
If you converted GoogleVoice into a proxy you could make both IP phone and cell phone ring at the same time and the chances you answer incoming call on IP phone and don't waste cell phone minutes are much higher.
I finally got your Google Voice -> Proxy working with some help from jainpj
But ringing both my ata and google number is not working
If I forward it to my ata and my google number
My google number doesn't ring until my ata has stopped ringing
Any tips or is this the way it is