asterisk (freepbx, trixbox) In canada

magicJack Tips and Tricks

Moderators: Bill Smith, Pilot

Post Reply
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

asterisk (freepbx, trixbox) In canada

Post by joecanadian »

Hi,

I am a asterisk friendly fellow who lives in Canada.

I am attempting to add a Magicjack to my PBX.

Any one with experience in adding a jack in Canada or any Canadian microjack users out there..?? who have figured out there sip settings (possibly saving me seeing what servers I will use in ontario?!)

I first found I was unable to buy one since it would not let me select anything but the USA when making a account.. A quick Google found me a Canadian reseller http://www.themagicjack.ca

My worries so far
-can I register this , and will it work in Canada
-does these rumors of changing the jack effect me running the SIP account through asterisk
http://www.phoneservicesupport.com/chec ... e-t92.html

Anyone know of the codecs supported? g729, Gsm, iLBC? (beyond the g711 ulaw/alaw)
Last edited by joecanadian on Sat Dec 22, 2007 2:51 am, edited 1 time in total.
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

cost

Post by joecanadian »

Something else to add

Even though our dollar is on par or at least pretty much the same I noticed something bad

the cost seems double

$68.39 after $8 tax using paypal

if you click order http://www.themagicjack.ca/order.php
it shows it as $59.99 (there has to be a cheaper way to get these things.. ?)

as long as it holds up for a year then its worth it.. and if I can get renewals with out going through this fellow.. then hopefully thats cheap too..

still worried about what info they need to register and to renew living in canada!
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Re: asterisk (freepbx, trixbox) In canada

Post by MagicHack »

joecanadian wrote:Hi,

I am a asterisk friendly fellow who lives in Canada.

I am attempting to add a Magicjack to my PBX.

Any one with experience in adding a jack in Canada or any Canadian microjack users out there..?? who have figured out there sip settings (possibly saving me seeing what servers I will use in ontario?!)
You should probably just register your jack normally, then use one of the two techniques outlined here or here to obtain your SIP info. Once you have it, an Asterisk guru like yourself will be able to easily set up the proper trunks/routes/etc.
joecanadian wrote: My worries so far
-can I register this , and will it work in Canada
Yes, once registered, it should work in any country assuming you have high speed internet, and your ISP does not block VoIP...
joecanadian wrote: -does these rummors of changing the jack effect me running the SIP account through asterisk
http://www.phoneservicesupport.com/chec ... e-t92.html
Well, if you do get a new number, obviously your SIP credentials will change...
joecanadian wrote: -what state should I pick will there ever be any Canadian numbers?
That's entirely up to you. I heard rumors that Canada was being added, though I have not heard any time frames...
joecanadian wrote: I will be running 1.2 asterisk
I build and consult on asterisk so I figure after I attempt the tricks outlined in this forum I should be able to figure the connection settings. If I can get outbound working I am a happy camper!
You'll have no problems.
joecanadian wrote: Anyone know of the codecs supported? g729, Gsm, iLBC? (beyond the g711 ulaw/alaw)
If you have magicjack installed, you can see the codecs listed in the registry here:

Code: Select all

HKEY_CURRENT_USER\Software\talk4free\USB Softphone\AudioPreferences\Codecs
which are listed as

Code: Select all

SJiLBC30, SJiLBC20, MSG711A, MSG711U
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

its here..

Post by joecanadian »

it arrived

it seemed to of came from here



http://maps.google.ca/maps?f=q&hl=en&ge ... =addr&om=1maps.google link

I will soon rip it apart and start on asterisk
i will keep you updated..
ChuckIL
MagicJack Contributor
Posts: 54
Joined: Wed Nov 28, 2007 2:30 pm

Post by ChuckIL »

Here are the settings from my sip.conf configured with freepbx:

[MagicJack]
username=EXXXXXXXXXX01
type=friend
secret=XXXX
port=5070
nat=yes
insecure=very
host=67.106.133.198
fromuser=EXXXXXXXXXX01
dtmfmode=inband
context=from-trunk
canreinvite=no

register string = EXXXXXXXXXX01:[email protected]:5070

The only thing I really haven't figured out is the best dtmfmode. Inband works great for calls to IVR systems except MagicJacks voicemail.
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

canadian

Post by joecanadian »

Well just a update to cracking the seal..

I booted up a windows xp system.. (I normaly only use Debian Linux..)

Old laptop for testing runs xp pro..

Connected the jack.. it connected to where ever right away
asked to be updated..
after that there was a spot for canadian postal code.. (no canadian numbers) picked a new york one..

made a few calls so far so good!

as for the reply above

have you tried

dtmfmode=rfc2833

I mean I am not even there yet.. but almost ever provider I have and I am registered with practicaly all of them at one time or aanouther..
vbuzzer,unlimitel.ca,atlasvoice,babytel,link2voip,freeworlddialup... and that seems to work best!
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

proxy

Post by joecanadian »

ok.. hooked up with fiddler2

just installed it (required and auto installed dot net from the evil empire)
then plugged in mj and right away I got the host

prov1.talk4free.com:443
Last edited by joecanadian on Fri Dec 14, 2007 1:07 pm, edited 1 time in total.
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

Request Sent

Post by joecanadian »

no luck
Last edited by joecanadian on Sat Dec 22, 2007 2:48 am, edited 1 time in total.
ChuckIL
MagicJack Contributor
Posts: 54
Joined: Wed Nov 28, 2007 2:30 pm

Post by ChuckIL »

The provisioning server is only for obtaining SIP credentials, you need to put the user domain and proxy domain servers in your asterisk configuration files. Also, don't waste much time looking for that e-mail from MagicJack. I don't know anyone who ever got one.
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

Post by joecanadian »

Settings that work although the only codec is ulaw but just in case they add later!

allow=g729&gsm&ilbc&ulaw
auth=md5 ; I dunno if its nessary but it seems to work
canreinvite=no
context=from-trunk
disallow=all
dtmfmode=rfc2833
fromuser=EXXXXXXXXXX01
host=67.90.152.70
insecure=very
nat=yes
port=5070
secret=XXXXXXXXXXXX ; (12 digits to 4 digits)
type=friend
useragent=SJPhone
username=EXXXXXXXXXX01


so so far this works good..(in/out)
Last edited by joecanadian on Sat Dec 22, 2007 2:47 am, edited 1 time in total.
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

Post by joecanadian »

yup tried to force and even tryed to make it take 20 frames it just refuses it.. ulaw and thats it.. I am woundering if I do the software upgrade on the software would it give me access to better codecs.. cause there is a banner ad saying optimize..

anyone tried that yet..

?

heck anything is better then ulaw.. 80kbs hog..

ilbc heck be super happy with gsm

and why they would be mad at people using it for othere devices and asterisk.. frig it be no diffrent then using it through the device.. just higher quality and no dependence on a windows computer on.. (thats a virus waiting to happen!!)
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

joecanadian wrote:Although like you said the dtfm does not work.. I will play with dtmfmode=inband
MJ seems to no longer be supporting RFC 2833. Howver, inband should not be a problem, unless you have lots of outbound packet loss or jitter.
joecanadian wrote:I only been able to connect with ulaw (that sucks) I will try to force gsm or something smaller..
On PSTN calls, MJ servers support only ulaw and alaw. Why do you want to use a compression codec? They have inferior quality, especially when cascaded with another compression codec, e.g. when the remote party is on a cell phone. Also DTMF problems and higher latency. The only advantage is less bandwidth usage. However, you seem to have enough bandwidth for G.711. Do you want e.g. many simultaneous calls?
joecanadian wrote:and it just seems to show my new york number when I call out.
If you want a Canadian outbound caller ID, just send a P-Asserted-Identity header, see http://www.voip-info.org/wiki/view/P-As ... -ID+header .
Something like P-Asserted-Identity: <sip:9054289999@x>
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

Post by joecanadian »

Yes bandwidth is important.. I can handle g711 fine just that we want to all run from the same asterisk server and run all own own phone lines from this server from the same server.. 6 of us want to have there own phone.. we share one connection.. a business dsl connection..

I will try this P-Asserted-Identity header

dtmfmode=inband seems to not work with pressing buttons on other phone systems so far.. ugh
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

joecanadian wrote:Yes bandwidth is important.. I can handle g711 fine just that we want to all run from the same asterisk server and run all own own phone lines from this server from the same server.. 6 of us want to have there own phone.. we share one connection.. a business dsl connection..
What is the up/down speed of your connection? Is is limited by your distance to the CO, or by a contractual cap? If the former and your provider supports it, upgrading to a DSL2+ modem should help. Also, if your extensions are out on the Internet, you should be able to set up reinvite to keep their bandwidth off of your connection.
joecanadian wrote:I will try this P-Asserted-Identity header
I don't know a Canadian ANAC number, so can't be sure it works to CA, but you can test by calling 712-580-9999. If that shows the spoofed ID but calls to your area don't, then you'll know that the header is set up correctly but the carrier that MJ uses to CA is not accepting it.
joecanadian wrote:dtmfmode=inband seems to not work with pressing buttons on other phone systems so far.. ugh
Use Wireshark to record some outbound RTP packets, and check by ear or with an audio editor if the tones are coming through cleanly and the levels are adequate. If not, I would suspect that the originating device is attempting to encode them.
rootkit
MagicJack Newbie
Posts: 5
Joined: Mon May 26, 2008 9:15 pm

Post by rootkit »

Big thanks to all in the thread. 2 hours after recieving my mj I have a fully functioning sip trunk and callerid spoofing.

This provides a simple menu to allow a caller to set there caller id number and then place a call.

The caller is greeted with:
Please enter your caller id number, in 10 digit format. For example 8-0-0-5-5-5-1-2-1-2. Or press star to use the default number.

At any time the caller may enter there desired caller id number, at which time they hear:
You entered **********, if that was correct press 1. To enter a different caller id number press 2.

If the caller presses 2 they go back to callerid number entry, if they press 1 they hear:
Please enter the number you wish to call.

After the caller has dialed the desired number the call will be placed.

Code: Select all

;-Set CID
[setcid]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Background(pls-entr-callid-num)
exten => _NXXNXXXXXX,1,Set(CALLERID(num)=<${EXTEN}>)
exten => _NXXNXXXXXX,2,SipAddHeader(P-Asserted-Identity: <sip:${EXTEN}@sip.magicjack.com>) 
exten => _NXXNXXXXXX,3,Playback(you-entered)
exten => _NXXNXXXXXX,4,SayDigits(${EXTEN})
exten => _NXXNXXXXXX,5,Background(if-correct-press1)
exten => 1,1,Goto(authd,s,2)
exten => 2,1,Goto(setcid,s,2)
exten => *,1,Set(CALLERID(num)=<8005551212>)
exten => *,2,SipAddHeader(P-Asserted-Identity: <sip:[email protected]>) 
exten => *,3,Goto(authd,s,2)
exten => i,1,Goto(setcid,s,2)
exten => t,1,Goto(setcid,s,2)
exten => h,1,Hangup

[authd]
exten => s,1,Answer
exten => s,2,Background(pls-entr-num-uwish2-call)
;exten => _1NXXNXXXXXX,1,Dial,IAX2/XXXXXX@voipjet/${EXTEN} ;also accepts callid
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@magicjack,30,r)
exten => _1NXXNXXXXXX,2,congestion()
exten => _1NXXNXXXXXX,3,busy()
exten => i,1,Goto(authd,s,2)
exten => t,1,Goto(authd,s,2)
exten => h,1,Hangup
Sound files available at: http://revolution.hackthisbox.com/set-callerid/sounds/

They go in /var/lib/asterisk/sounds.

You may "password protect" this feature by using the Authenticate command in asterisk. ( http://www.voip-info.org/wiki/view/Aste ... thenticate )
For example, where 1234 is the password:

Code: Select all

[setcid]
exten => s,X,Authenticate(1234)
exten => s,X,Background(pls-entr-callid-num)
...
calgaryhero
MagicJack Newbie
Posts: 5
Joined: Sat Jan 10, 2009 4:54 am

Post by calgaryhero »

I tired the P-Asserted Identity as above, and have not been successful in spoofing my outgoing Caller ID. Did the last update change anything?
User avatar
JohnnyFreightTRAIN
Dan isn't smart enough to hire me
Posts: 313
Joined: Fri Aug 08, 2008 3:09 am

Post by JohnnyFreightTRAIN »

calgary,

I believe caller id spoofing is obsolete.

P.S. - I also live in Calgary! :)
Image
joecanadian
MagicJack Contributor
Posts: 58
Joined: Wed Nov 28, 2007 3:06 am

Post by joecanadian »

They must of done some changes cause I just sorta noticed my magic jack is no longer registered..(might of been a while ago..) have not used it in 2-3 days) I will attempt to get it working in the morning. anyone else notice "Auth. Sent" on there asterisk registration
dan
Dan isn't smart enough to hire me
Posts: 113
Joined: Mon Nov 12, 2007 6:57 pm
Location: Denver

Post by dan »

for the host you will need to use an IP address instead of domain name..

also you will need to plug your MJ back in let it update then get new sip credentials
Post Reply