Sipsorcery for no XMPP calling with Google Voice
azrobert:
Quote from: giqcass on December 13, 2013, 10:03:57 pm
It should be noted that Sipsorcery allows you to use your Google Voice contacts for incoming caller Id.
You can also setup your own cname table in the dialplan.
It's been a long time since I did this, but I think you need a "begin" between the table and the code and an extra "end" at the end of the code. You can get into trouble if you don't get a match and callername ends up with a null value. That is why I set it to "unknown".
TNAME = {
'4801111111' => 'Dad',
'4802222222' => 'Sister',
'6023333333' => 'Brother' }
begin
callername = "unknown"
callername = TNAME[CID]
end
AntonS:
I have some questions about the sip sorcery dial plan. Currently I use Google Voice also for my international calls. In giqcass's dial plan I assume I can simplify his dial plan, but what is the simplest way. In azrobert's dial plan I am not sure it will handle international calls as listed and I do not understand the role of the 480 area code. Do I change that to my area code and does it handle international calls via Google voice?
Thanks for these explanations, I feel that I am close to implementing this, initially maybe as a fall back.
azrobert:
"480" is your local area code. The command inserts "480" to the beginning of a 7 digit dialed number. You could do this function in the OBi.
Here is an updated dial plan and OBi changes including international numbers:
Code:
#Ruby # DialPlan
if sys.In # IN DIALPLAN STARTS
CID = req.Header.From.FromURI.User
CID = "#{$1}" if CID =~ /^1?(\d{10})$/ # Remove leading "1"
CallerName = req.Header.From.FromName
sys.Dial("user1@local[fu=#{CID},fd=#{CallerName}]",30)
else # OUT DIALPLAN STARTS
UserID="#{req.Header.From.FromURI.User}"
dialnum="#{req.URI.User}"
sys.Log("Phone Number #{dialnum}")
dialnum.insert(0,"480") if dialnum =~ /^\d{7}$/ # 7 digit Domestic (480=area code)
if dialnum.match /^1?[2-9]\d{9}$/ or # GV-Callcentric
dialnum[0,3].match /^011$/
sys.GoogleVoiceCall("GVuserID", "password", "12121234567", "#{dialnum}", ".*", 1, 20)
# GVuserID without @gmail.com
# 12121234567 = Callcentric DID
# Next to last parm = GV forwarding DID type. 1=Home, 2=Mobile, 3=Work
else
sys.Respond(400,"Invalid Call")
end
end
OBi110
Define Voice Gateway 2:
Name = SipSorcery
AccessNumber = sp2(sipsorcery.com)
DigitMap = (<2:>xxxxxxxxxx|<2:>xxxxxxx|<2:>011xx.)
AuthUserID = user1
AuthPassword = password
Add to Phone Port Digit Map:
2xxxxxxxxxx|2xxxxxxx|2011xx.
Add to Phone Port OutboundCallRoute:
{(Mvg2):vg2}
Dial 24805551212, 25551212 or 2011xx.
AntonS:
I tried this, but I get immediately a busy call when dialing my cell phone, while I know the number is not busy (my cell phone is right next to me). I get a busy call after two rings when I call my office phone number. When looking at the OBI Call history page it shows that the cell phone call never connected, while my office phone was connected for 8 seconds. A few details I guessed at:
When creating the sip provider account for call centric on the Silverlight page it asks me for the username. I tried using both my Callcentric login username and the 1777xxxxxxx number. I also entered callcentric.com as server, which was updated to sip:callcentric.com and I ticked the Register button. The register contact got populated by my callcentric username@callcentric.com
Is this all correct? The Sip provider registry part is populated and seems correct to me.
I must say that I have no clue what is wrong. Any hints?
giqcass:
If you were following my instructions and you added Callcentric as a Sip Provider in the Sipsorcery silverlight portal. Thats problem number 1. It can work that way but why don't we try to see what else is different.
Why don't you go to the silverlight portal and see what errors you are getting for the calls. Click the calls tab and tell me what you see.
Navigation
[0] Message Index
[#] Next page
[*] Previous page