| View previous topic :: View next topic |
| Author |
Message |
laserjobs Dan Should Pay Me
Joined: 12 Nov 2007 Posts: 536
|
Posted: Mon Jul 13, 2009 7:59 pm Post subject: |
|
|
Richard, could the Outgoing Dial Plan be this simple or does it need more to work?
| Code: | #Ruby
sys.Dial("Magicjack")
end |
|
|
| Back to top |
|
 |
Google AdSense

|
Posted: Mon Jul 13, 2009 7:59 pm Post subject: Magicjack support, tips, tricks, and hacks |
|
|
|
|
| Back to top |
|
 |
richardtaur Dan isn't smart enough to hire me
Joined: 17 Mar 2008 Posts: 117
|
Posted: Mon Jul 13, 2009 8:05 pm Post subject: |
|
|
| Yes. |
|
| Back to top |
|
 |
MagicDump Dan isn't smart enough to hire me
Joined: 11 Sep 2008 Posts: 100
|
Posted: Mon Jul 13, 2009 8:08 pm Post subject: |
|
|
I want to thank you Richard for your help, I did have the same problem trying to dial out but the dial plan you pointed out solve the problem, now my PAP2T is working in and out with no problem.
Thank you again.
Magicdump |
|
| Back to top |
|
 |
richardtaur Dan isn't smart enough to hire me
Joined: 17 Mar 2008 Posts: 117
|
Posted: Mon Jul 13, 2009 8:36 pm Post subject: |
|
|
I am happy for you... ^_^
I have inbound issue, and I think SS doesn't like my ATA. I have HT-286. O, well! |
|
| Back to top |
|
 |
wondabwoy Apprentice
Joined: 08 May 2009 Posts: 16
|
Posted: Mon Jul 13, 2009 9:25 pm Post subject: |
|
|
| MagicDump wrote: | I want to thank you Richard for your help, I did have the same problem trying to dial out but the dial plan you pointed out solve the problem, now my PAP2T is working in and out with no problem.
Thank you again.
Magicdump |
I also want to give Richard a HUGE THX for helping get my outgoing working with his suggestions at the myipswitch forum, and pm. I AM UP AND RUNNING BOTH OUTGOING AND INCOMING. THX AGAIN! |
|
| Back to top |
|
 |
zixy_tris MagicJack User
Joined: 16 Jun 2008 Posts: 32
|
Posted: Mon Jul 13, 2009 9:36 pm Post subject: |
|
|
| Guys I cant get outgoing to work. can you put dial plan you use. I am having trouble. |
|
| Back to top |
|
 |
richardtaur Dan isn't smart enough to hire me
Joined: 17 Mar 2008 Posts: 117
|
Posted: Mon Jul 13, 2009 9:37 pm Post subject: |
|
|
| Are you using PAP2T as well? |
|
| Back to top |
|
 |
zixy_tris MagicJack User
Joined: 16 Jun 2008 Posts: 32
|
Posted: Mon Jul 13, 2009 9:41 pm Post subject: |
|
|
| yes pap2t. I am not sure what I am doing wrong. I was able to stop my incoming work but then using blank option for in dial plan I was able to make it work. No go on out going. I tried the code richard posted and simple code someone else posted. something I am still doing wrong |
|
| Back to top |
|
 |
richardtaur Dan isn't smart enough to hire me
Joined: 17 Mar 2008 Posts: 117
|
Posted: Mon Jul 13, 2009 9:59 pm Post subject: |
|
|
Make sure the following settings should be right.
Under SIP Providers Tab
Provider Name: MagicJack
User Name: Exxxxxxxxxx01
Password: xxxxxxxxxxxxxxxx
Server: sip:proxy01.xxxxx.talk4free.com:5070
Register: Checked
Register Contact: sip:your_ss_username@sipsorcery.com
Then click on Update or add(if this is the fist time to add a provider)
After add the provider, if you want to set the User-Agent.
Click on Show more advanced settings,
Custom Headers: User-Agent: MagicJack/1.80.484a (SJ Labs)
After that, go to dial plan, and create a outbound dial plan.
Click on Add,
Dial Plan Name: MagickJack_out
Trace E-Mail Address: your E-Mail address for tsht purpose,
Script Type: Ruby
copy the outbound dial plan and paste in the coding area, make sure you will replace some info to your own info in the code. After that, add the dial plan.
Click on SIP Accounts tab
click on your account,
the option for Out Dial Plan, chose MagicJack_out, and In Dial Plan, you can leave it empty. then try it out.
Whomever you want to try with inboud dial plan on SS with MJ. You can try it out.
| Code: | #Ruby
sys.Trace = true
sys.Log("*****************************************************\t")
sys.Log("* MAGICJACK INBOUND CALL FROM RUBY DIALPLAN *\t")
sys.Log("*****************************************************\t")
sys.Log(" Received-URI:#{req.URI.User}\t URI-Length:#{req.URI.User.Length}\t")
sys.Log(" URI-Host:#{req.URI.Host}\t")
sys.Log(" From:#{req.Header.From.FromURI.User}\t\t Name:#{req.Header.From.FromName}\t")
sys.Log(" Incoming-Call:#{sys.In().ToString()}\t Outgoing-Call:#{sys.Out().ToString()}\t")
sys.Log(" ATA-Online:#{sys.IsAvailable("your_ss_username", "sipsorcery.com").ToString()}\t") #Replace your_ss_username to your ss user name.
# Logic for receiving incoming calls.
caller = req.Header.From.FromURI.User.to_s
case caller
when /^phone1|phone2/ # blocking the call, just replace 10 digit numbers with phone1....if there is more just put | with no spacing.
sys.Log(" Rejecting call from #{caller}\t")
sys.Log("*****************************************************\n")
sys.Respond(488, "Your call is not welcome")
else
if sys.IsAvailable("#{req.URI.User}","sipsorcery.com") # you can also replace #{req.URI.User} to your ss user name
sys.Log(" Accepting call from #{caller}\t")
sys.Log("*****************************************************\n")
sys.Dial("local")
else
sys.Log(" Missed Call from #{caller}\t")
sys.Log("*****************************************************\n")
sys.Dial("xxxxxxxxxx@MagicJack") # your MJ number, so it will go to the voice system.
end
end |
From: http://www.mysipswitch.com/forum/viewtopic.php?p=8397#8397 |
|
| Back to top |
|
 |
MagicDump Dan isn't smart enough to hire me
Joined: 11 Sep 2008 Posts: 100
|
Posted: Mon Jul 13, 2009 10:00 pm Post subject: |
|
|
| zixy_tris wrote: | | yes pap2t. I am not sure what I am doing wrong. I was able to stop my incoming work but then using blank option for in dial plan I was able to make it work. No go on out going. I tried the code richard posted and simple code someone else posted. something I am still doing wrong |
| Code: | #Ruby
sys.Trace = true
sys.Log("*****************************************************\t")
sys.Log("* MAGICJACK OUTBOUND CALL FROM RUBY DIALPLAN *\t")
sys.Log("*****************************************************\t")
sys.Log(" Received-URI:#{req.URI.User}\t URI-Length:#{req.URI.User.Length}\t")
sys.Log(" URI-Host:#{req.URI.Host}\t")
sys.Log(" From:#{req.Header.From.FromURI.User}\t\t Name:#{req.Header.From.FromName}\t")
sys.Log(" Incoming-Call:#{sys.In().ToString()}\t Outgoing-Call:#{sys.Out().ToString()}\t")
sys.Log(" ATA-Online:#{sys.IsAvailable("your_ss_username", "sipsorcery.com").ToString()}\t") #put your SS user name.
# Logic for routing outgoing calls.
dialer = req.URI.User
case dialer
when /^911/
sys.Log(" Dialing #{req.URI.User} for emergencey.\t")
sys.Log("*****************************************************\n")
sys.Dial("MagicJack")
when /^411/
sys.Log(" Dialing #{req.URI.User} for Directory via MagicJack.\t")
sys.Log("*****************************************************\n")
sys.Dial("MagicJack")
else
case dialer
when /^phone1|phone2/
sys.Log(" Rejecting call to #{dialer}\t")
sys.Log("*****************************************************\n")
sys.Respond(488, "Your call is not welcome")
else
dialer_length = req.URI.User.Length.to_s
case dialer_length
when /^7/
sys.Log(" Phone Call to xxx#{dialer} through MagicJack service.\t") #Replace xxx to your area code.
sys.Log("*****************************************************\n")
sys.Dial("xxx${dst}@MagicJack") #Replace xxx to your area code.
when /^10|11/
sys.Log(" Phone Call to #{dialer} through MagicJack service.\t")
sys.Log("*****************************************************\n")
sys.Dial("MagicJack")
else
sys.Log(" Call Result: No dial plan match.\t")
sys.Log("*****************************************************\n")
sys.Respond(404, "No dial plan match")
end
end
end |
You have to copy this code and make a dial plan for outgoing, make sure you replace the XXX with your area call, that way you only have to dial 7 numbers if you are calling your area call.
Name your dial plan Magicjack and save it, in order to copy the dial plan in the silverlight screen you have to press Ctrl v. Then go the Sip account tag and replace the default dial plan in the Out Dial plan for the one you just did. Refresh your server and you should be up an running.
Good luck
Magicdump |
|
| Back to top |
|
 |
macman4hire Dan isn't smart enough to hire me
Joined: 09 Jan 2009 Posts: 147
|
Posted: Mon Jul 13, 2009 10:20 pm Post subject: |
|
|
| How to I find the numeric Server: sip:xxx.xxx.xxx.xxx:5070 as mentioned. Stroths MagicJack suite only gives me proxy01.miami.talk4free.com |
|
| Back to top |
|
 |
zixy_tris MagicJack User
Joined: 16 Jun 2008 Posts: 32
|
Posted: Mon Jul 13, 2009 10:21 pm Post subject: |
|
|
Still No go on out. Not sure why. I have multiple accounts. Is that something to do with it
Last edited by zixy_tris on Mon Jul 13, 2009 10:24 pm; edited 1 time in total |
|
| Back to top |
|
 |
laserjobs Dan Should Pay Me
Joined: 12 Nov 2007 Posts: 536
|
Posted: Mon Jul 13, 2009 10:24 pm Post subject: |
|
|
| macman4hire wrote: | | How to I find the numeric Server: sip:xxx.xxx.xxx.xxx:5070 as mentioned. Stroths MagicJack suite only gives me proxy01.miami.talk4free.com |
then use "sip:proxy01.miami.talk4free.com:5070" |
|
| Back to top |
|
 |
MagicDump Dan isn't smart enough to hire me
Joined: 11 Sep 2008 Posts: 100
|
Posted: Mon Jul 13, 2009 10:25 pm Post subject: |
|
|
| macman4hire wrote: | | How to I find the numeric Server: sip:xxx.xxx.xxx.xxx:5070 as mentioned. Stroths MagicJack suite only gives me proxy01.miami.talk4free.com |
Go to the command Prompt and ping proxy01.miami.talk4free.com.
in your case it should be 216.234.79.8 |
|
| Back to top |
|
 |
zixy_tris MagicJack User
Joined: 16 Jun 2008 Posts: 32
|
Posted: Mon Jul 13, 2009 10:54 pm Post subject: |
|
|
| OK something else is going on. When I press talk on phone I get dialtone for 2-3sec and than I start getting busy tone. So something else not the dial plan is causing problem |
|
| Back to top |
|
 |
|