Jump to content

Asterisk + Uplink skype2sip Examples


Recommended Posts

There are probably a million ways to accomplish the same end result, but it always helps to see an example of a working solution. Here is good place for examples of the tricks and approaches you have taken that actually work with Asterisk + Uplink in making and receiving Skype calls to phones in Asterisk pbx systems. I'll start with my own setup, for example:

 

Asterisk version 1.2.6 on a power-pc based Mac-Mini running OS X (Tiger 10.4.5)

 

Uplink downloaded 4/21/2006 on a Dell running Windows XP Pro /SP2

 

In asterisk, I created a sip.conf entry for Uplink called [5506] of the type: friend

In uplink, I matched the credentials from [5506] in sip.conf, and send skype incoming calls to my main [inbound] setup that I call '1000' (which is setup to ring at a number of desks in the office).

 

To use skype-out from any extention in the office the user just enters the entire country code-area-code-number.

 

To dial skype accounts directly I setup a numeric extension for each of our clients, friends or family.

 

That's it, works great.

 

Below are some snips from sip.conf and extensions.conf:

 

;Skype 2.0, Windows XP Pro/SP2

;Uplink downloaded 4/21/2006

;Asterisk 1.2.6 (Running on a mac-mini with OS X Tiger 10.4.5 )

 

;On Uplink sip setup:

;username: 5506, passwd: xxxxxxx

;Send to username: 1000 main [incoming] call group on asterisk

 

;sip.conf

 

[5506]

username=5506

host=dynamic

nat=yes

secret=xxxxxxx

allow=all

type=friend

insecure=very

context=extensions

canreinvite=yes

caninvite=yes

callerid="Incoming Skype"<206-555-1212>

 

;extensions.conf

[globals]

 

DIALIN1=SIP/2001&SIP/1955&SIP/2000&SIP/1973

 

[incoming]

 

exten => 1000,1,Dial(${DIALIN1},20,r) ; DIALIN1 is a list of extensions to ring

exten => 1000,2,Voicemail(u101) ; main voicemain for office

exten => 1000,3,Hangup

 

 

[dialout]

exten => _001XXXXXXXXXX,1,Macro(UpLink,${EXTEN}) ;for skype-out numbers from pbx

 

[macro-UpLink]

exten => s,1,Dial(SIP/${ARG1}@5506,60,)

exten => s,2,Congestion

 

[extensions]

include=>dialout

 

;friends on skype that I can call from regular old phone on the pbx

exten => 1977,1,Macro(UpLink,myskypebuddy)

exten => 1976,1,Macro(UpLink,mymomskyer)

 

exten => 5506,1,NoOp(Skype Extension)

exten => 5506,2,Dial(SIP/5506,15,tr)

exten => 5506,3,Hangup

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I am trying to connect uplink with asterisk@home (which is asterisk with a gui http interface). I am trying to follow the above example but I am stuck.

 

I have setup an incoming trunk (sip.conf) as follows:-

 

[5506]

username=5506

host=dynamic

nat=yes

secret=5506

allow=all

type=friend

insecure=very

context=extensions

canreinvite=yes

caninvite=yes

callerid="Incoming Skype"

 

I have tried setting extensions and also DIDs with the number 5506 but this is where I am confused, do I need an extension or inbound route with a number of 5506?

 

My asterisk curently has two extensions which I use with other voip services, 200 and 201. I also have one inbound route with a DID for each PSTN to VOIP number I have.

 

I am also confused about the uplink options, I have to tell uplink what to call when it gets a skype call, I have tried telling it to call 5506 or 200 and 201 but nothing will work.

 

When I run uplink it gives this info:-

 

Uplink Skype2Sip started.

SIP Private IP is 192.168.1.4:5070

SIP Public IP is 81.86.xxx.xxx:5070

SIP Number 5506@81.86.xxx.xxx:5070

Attempting to register sip:5506@192.168.1.5

Registered as sip:5506@192.168.1.5

 

Receiving call...

Initiated sip call to:5506

XError returned:Not Found

 

I have also tried routing the call to 201 and 5506@192.168.1.5 (the ip of the asterisk server) but they all return a Not Found error from uplink.

 

Can anyone please advise what I have done wrong?

 

Many thanks,

Andy.

Link to comment
Share on other sites

Hi Andy,

 

You haven't given me a lot of specifics to go on, but your 'Xerror: not found' may be just that, it can't find the extension you are directing incoming calls to. Make sure in your extensions.conf that the extension (5506 in my example) has access to the extension (1000 in my example). Do you have your uplink extension (5506 in example) setup also in the extensions.conf as another extension? (I didn't include that in my example).

 

1) You need to setup your Uplink to send incoming calls to a valid incoming extension or extensions in your pbx. In my example, I send it to a incoming extension called '1000', which then rings a group of extensions, phones. But you could just send to to any working extension.

 

2) 5506 was just a number I made up for an extension, you could use a 3 digit extension that fits with your system.

 

3) Do you have a [context] in your 'extensions.conf' called '[extensions]'? And if you do, do you have a line: include => incoming

 

Hope this helps. I was only playing with this setup and no longer have access to that windows pc I installed Uplink on, but it worked great for incoming calls from skype. Lag wasn't bad at all even though my asterisk pbx is about 50 miles away from the uplink pc. The only problem I had with outgoing calls was that I had to call my skype number to 'wake' it up before I could call out via skype from my pbx.

 

Jeff

Link to comment
Share on other sites

Hi Jeff,

 

Thanks for the reply, the problem was the context, I changed the context to from-internal and then uplink would call the extension, hoorah!

 

Now I am trying to get uplink to dump the call straight into an IVR, not got this going yet although I have managed to get it to dump straight into a call queue by changing the context to ext-queues and dialling 123 from uplink, where 123 is a call queue.

 

I have tried changing the context to IVR and then asked uplink to dial ivr-2 but this doesn't work it says not found, perhaps you cannot call stright into an IVR?

 

Looking for a way to connect the Skype users into my main IVR, any ideas?

 

Many thanks for the help,

Andy.

Link to comment
Share on other sites

Andy,

 

Anything you can do with a normal incoming call you can do with the incoming skype call. Just treat it the same. For my setup I had it ring like my normal did, and if nobody picked up, it went to the standard office voicemail box.

 

So maybe you should focus on setting it up just like your incoming DID calls, I even had it entering the same queue. My fxo is a SPA 3000 and it rings in exactly the same, to:

 

[incoming]

exten =>1000,1,Dial(...

 

I think that's why it clicked for me, I only recently started messing with fxo devices and so I'm just treating the uplink as another virtual fxo device.

 

Have fun :) ,

 

Jeff

Link to comment
Share on other sites

:huh:

 

Ok, I'm new so sorry But I'm confused.

Are you guys setting up the skype2sip as a trunk ?

Or are you setting the skype2sip up as an extension.

 

tried all the code snipes but no real sucess if I use the first post

code I can get the skype2sip to register but it won't connect the inbound calls.

 

I'm running A@H 2.5 / and A@H 2.8 troubles the same on both.

 

Thanks in Advance!

 

Bill

Link to comment
Share on other sites

:)

Here's a trunk set up to use skype2sip with asterisk@home !

First set the When Skype calls sip to 7777 in the options

on uplink.

 

 

Dial rules:

 

00+1NXXNXXXXXX ; Long Distance

001970+NXXXXXX ; Local calls sub your area code for the 970

XX ; speed dial numbers for skype

 

 

 

Truck Name 1001

 

canreinvite=no

context=from-internal

dtmfmode=inband

host=dynamic

nat=never

port=5060

qualify=no

record_in=Never

record_out=Never

secret=1001

type=friend

username=1001

 

 

 

Incoming Settings

USER Context 1001cfg

 

canreinvite=no

context=from-internal

dtmfmode=inband

host=dynamic

nat=never

port=5060

qualify=no

record_in=Never

record_out=Never

secret=1001

type=friend

username=1001

 

 

**I'm running a static ip so I don't set nat to yes!

 

anyway this works well for inbound and outbound!

Link to comment
Share on other sites

Everything seems to be working from asterisk to uplink. It's answering incoming calls from outside (lan lines, skype users), but if I place an outgoing call from a internal phone on the PBX, uplink sees the incoming call, but Skype won't pick it up and dial out.. ANything I need to enable in skype???????

 

 

 

 

:)

Here's a trunk set up to use skype2sip with asterisk@home !

First set the When Skype calls sip to 7777 in the options

on uplink.

Dial rules:

 

00+1NXXNXXXXXX  ; Long Distance

001970+NXXXXXX  ; Local calls sub your area code for the 970

XX                          ; speed dial numbers for skype

Truck Name 1001 

 

canreinvite=no

context=from-internal

dtmfmode=inband

host=dynamic

nat=never

port=5060

qualify=no

record_in=Never

record_out=Never

secret=1001

type=friend

username=1001

 

Incoming Settings

USER Context  1001cfg

 

canreinvite=no

context=from-internal

dtmfmode=inband

host=dynamic

nat=never

port=5060

qualify=no

record_in=Never

record_out=Never

secret=1001

type=friend

username=1001

 

 

**I'm running a static ip so I don't set nat to yes!

 

anyway this works well for inbound and outbound!

Link to comment
Share on other sites

I use A@H 2.8. I've copied the configuration data as posted and the * registers the skype trunk.

 

However, when I dial out it rings once or twice and disconnects.

 

on incoming call it starts the uplink than disconnects.

 

May I point out that while UPlink is active I can't use Skype at all either for incoming or outgoing calls.

 

Any advice? :(

Link to comment
Share on other sites

  • 2 months later...

Sup Bill

 

You set the extension to work with the Uplink or a Trunk...i set up an extension example 55 and is connected to the UPlink and the asterisk....works great for the inbound calls....but when i out...

 

I need to create a trunk?

if it works with the extension...what else i need?

 

Thanxs in advance :mellow:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...