How to configure Skype for Asterisk as an outgoing trunk in FreePBX

Hi all,
Am trying to configure Skype for Asterisk as an outgoing trunk so that I can use it as a destination trunk in FreePBX Outgoing route. I don’t know if I should use a custom extension,existing context or edit the configuration file to add one.

I don’t know if am asking too much but I would like an HowTo to guide me in the best way to integrate Skype for Asterisk in FreePBX.

Thanks.

  1. Only Skype Business Accounts without dashes are working (underscores are OK)
  2. chan_skype.conf issues
    • you have to enter default_user=[yourbusinessSkypeID]
    • do NOT enter the exten= value, default to exten=[yourbusinessSkypeID] is OK
    • context=from-pstn
    • direction=both
  3. FreePBX Admin:
    • Create Custom Extension with dial field like: Skype/[skypeUserToBeCalled]
    • Create Inbound Route with DID Number like: [yourbusinessSkypeID]

Unbelievable but that’s all…

Thanks but what about the outbound route?

Sorry,
forgot this one:

3( (contd.) - Create a Custom Trunk with Dial String: skype/+/$OUTNUM$
Use this trunk in your Outbound Routes with appropriate
dial pattern and trunk sequence

Hi, wend I try to place a call I receve “all circuits are busy now plseas try again later” message but the Skype trunk is online and not busy.

skipe show users say the the user is login, do you have any idea as where the probleme may comme from?

-- Executing [s@macro-dialout-trunk:25] Set("SIP/0299-b7d24470", "the_num=1514892xxxx") in new stack
-- Executing [s@macro-dialout-trunk:26] Dial("SIP/0299-b7d24470", "skype/+1514892xxxx|300|") in new stack
-- Called +1514892xxxx

== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:27] Goto(“SIP/0299-b7d24470”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf(“SIP/0299-b7d24470”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp(“SIP/0299-b7d24470”, “TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 38) - failing through to other trunks”) in new stack
– Executing [15148925590@from-internal:5] Macro(“SIP/0299-b7d24470”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] GotoIf(“SIP/0299-b7d24470”, “0?emergency|1”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/0299-b7d24470”, “0?intracompany|1”) in new stack
– Executing [s@macro-outisbusy:3] Playback(“SIP/0299-b7d24470”, “all-circuits-busy-now&pls-try-call-later| noanswer”) in n

Maybe you want to try the custom extension first, since this does not use SkypeOUT (as explained im my first post). If this doesn’t work (means you dial an internal extension number you defined and are connected to the Skype user you entered in the Custom Extension dial field), try to solve this one first.

  • Are you using a Skype Business account (one you freshly set up in skype.com/business) and have you entered this one as default_user in chan_skype.conf?
  • Calling echo123 didn’t work for me (just in case you thik like me that this is a safe test)

BR

Ralph

First of all thanks alot for your help.
Yes am using a freshly created Skype Business account on witch I have assing a subscription.
Incoming call are working perfectly.
Am not sure about the Custom Extension, there is no Dial field in the form, can you give me more detail steps to configure it? And how do you assign the extension number or dial the skype name from a softphone?

Thanks

The problem seam to comme from the SkypeOut, am unable to dial a ground number.
Does it nead a special number formating exept adding the + signe in front of the number?

Skype for Asterisk dosn’t support subcription!

Calls to landlines and mobiles made using Skype for Asterisk are billed at low-cost global call rates.
Skype subscription prices do not apply to Asterisk calls.

Thanks for your help

Hi cognat,

many thanks for this joint problem solving. I didn’t experience this since I do not have a subscription anyway - good to know…

BR

Ralph

i can’t see any user with the command asterisk*CLI> skype show users.

When i try the command skype login user (skypeBussinessID), i recieved the follow erro:

/usr/sbin/safe_asterisk: line 125 : 2120 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatacally restarting Asterisk
mpg123: no process killed

Can anyone help me??? why does this occurs?

When I try to place a call using the Skype trunk with the it outgoing route I get the “All circuits are busy now” message…

chan_skype.c: User ‘songoku10’ is not ready for calls yet!

I’ve setup this acct under the Business plan… and i’m able to place calls from the actual skype software…

This is what the log shows

Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Got message (len=22) “#18 b 1264=“1” 1064=”""
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: entering poll for 2 fds
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: poll returned 1
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Wrote message “#19 a 1133 1343 1137=“4"”
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Got message (len=10) “#19 b 0=””"
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: entering poll for 2 fds
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: poll returned 1
[Sep 22 13:51:16] NOTICE[2808] core.cpp: TRANSPORT: Got message (len=20) "c 1133 1122 1137=“4"”
[Sep 22 13:51:16] NOTICE[2808] core.cpp: TRANSPORT: Wrote message “#1A a 1133 1867 1137=“4” 1846=“1157"”
[Sep 22 13:51:16] NOTICE[2808] core.cpp: TRANSPORT: Got message (len=14) “#1A b 1157=“0"”
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: entering poll for 2 fds
[Sep 22 13:51:16] WARNING[3240] chan_skype.c: User ‘songoku10’ is not ready for calls yet!
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Couldn’t call +/7863550094
[Sep 22 13:51:16] DEBUG[3240] chan_skype.c: channel 0x9504d78
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: poll returned 1
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Wrote message “#1B a 1133 1343 1137=“4"”
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Got message (len=10) “#1B b 0=”””
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: entering poll for 2 fds
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: poll returned 1
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Wrote message “#1C a 1133 1343 1137=“4"”
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Got message (len=10) “#1C b 0=”””
[Sep 22 13:51:16] NOTICE[3240] core.cpp: ending call
[Sep 22 13:51:16] NOTICE[3240] core.cpp: TRANSPORT: Wrote message "a 1133 1163 1389=“1838” 1137=“4"”
[Sep 22 13:51:16] NOTICE[2808] core.cpp: TRANSPORT: Got message (len=1) “b”
[Sep 22 13:51:16] DEBUG[2808] chan_skype.c: entering poll for 2 fds
[Sep 22 13:51:16] DEBUG[3240] chan_skype.c: channel 0x9504d78
[Sep 22 13:51:16] VERBOSE[3240] logger.c: == Everyone is busy/congested at this time (0:0/0/0)
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: Dial
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s@macro-dialout-trunk:27] Goto(“SIP/201-0959a618”, “s-CHANUNAVAIL|1”) in new stack
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: Goto
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf(“SIP/201-0959a618”, “1?noreport”) in new stack
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp(“SIP/201-0959a618”, “TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 0) - failing through to other trunks”) in new stack
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: Noop
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [87863550094@from-internal:5] Macro(“SIP/201-0959a618”, “outisbusy|”) in new stack
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s@macro-outisbusy:1] GotoIf(“SIP/201-0959a618”, “0?emergency|1”) in new stack
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s@macro-outisbusy:2] GotoIf(“SIP/201-0959a618”, “0?intracompany|1”) in new stack
[Sep 22 13:51:16] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – Executing [s@macro-outisbusy:3] Playback(“SIP/201-0959a618”, “all-circuits-busy-now&pls-try-call-later| noanswer”) in new stack
[Sep 22 13:51:16] VERBOSE[3240] logger.c: – <SIP/201-0959a618> Playing ‘all-circuits-busy-now’ (language ‘en’)
[Sep 22 13:51:18] VERBOSE[3240] logger.c: == Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/201-0959a618’ in macro ‘outisbusy’
[Sep 22 13:51:18] VERBOSE[3240] logger.c: == Spawn extension (from-internal, 87863550094, 5) exited non-zero on ‘SIP/201-0959a618’
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Executing [h@from-internal:1] Macro(“SIP/201-0959a618”, “hangupcall”) in new stack
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/201-0959a618”, “1?skiprg”) in new stack
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Goto (macro-hangupcall,s,4)
[Sep 22 13:51:18] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Executing [s@macro-hangupcall:4] GotoIf(“SIP/201-0959a618”, “1?skipblkvm”) in new stack
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Goto (macro-hangupcall,s,7)
[Sep 22 13:51:18] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Executing [s@macro-hangupcall:7] GotoIf(“SIP/201-0959a618”, “1?theend”) in new stack
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Goto (macro-hangupcall,s,9)
[Sep 22 13:51:18] DEBUG[3240] app_macro.c: Executed application: GotoIf
[Sep 22 13:51:18] VERBOSE[3240] logger.c: – Executing [s@macro-hangupcall:9] Hangup(“SIP/201-0959a618”, “”) in new stack
[Sep 22 13:51:18] VERBOSE[3240] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-0959a618’ in macro ‘hangupcall’
[Sep 22 13:51:18] VERBOSE[3240] logger.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/201-0959a618’

any pointers?

You must create the account in the control panel and assign it some credits.
You can not use imported account with Skype for Asterisk.

I went ahead and created a brand new acct on the skype business control panel and I was able to login and star receiving calls from skype. Cognat thanks a lot for that little pointer… But the poblem I’m having now is placing calls… I’ve setup a subcription for my business skype username and I can place call from the skype program but not from asterisk.

I keep getting “all circuits are busy” message… I’ve tried modifying the custom trunk to skype/+/thedestinationuser. And it works just fine but when I put it back to skype/+/$OUTNUM$ and try to dial a regular number the same “all circuits are busy MSG” comes back

Any pointers?

Skype for Asterisk dosn’t support subcription!

I wish they could have mentioned it somewhere in their website and avoid a lo of people from waisitin their time… What is the point to brink skype over asterisk when most used device is a phone??? How are the users supose to dial skype usernames from a touch tone phone??? This product is pointless and a waste of money…

Will there be a fix for the problem that a dash in the Skype Business Accounts is not working?

Not only the dash is affected but also upercase and dot.
I don’t think they will be fixing this soon.

My boss showed me the Skype for asterisk and was all excited and wanted it set up. I bought the channels, figured out all the business manager stuff, got it installed (after business hours of course) and purchased subscriptions for the users and then receive an email like this:

“Here’s a quick reminder that Skype’s subscriptions are for individual use only and do not include calling from or through multi-user devices such as PBXs - as stated in our Fair Use Policy. Any members of your Business Control Panel who call landlines or mobiles from such devices will be charged at our standard call rates.”

We already have a long distance plan. When I purchased the channels at $66 each if that previous paragraph was clear it sure would have saved me a LOT of time and I would have abandoned the idea MUCH earlier.

If you have successfully created a SFA trunk as described above, here is an way I found to use the Skype Out trunk to call Skypenames directly without setting up custom extensions.

Install Asterisk Dial and Announce tool (ADAT) available from here:
http://www.tttelecom.nl/index.php/en/products/adat

Here are the settings I used, adapt as needed:
The Skype trunk access code I used for this feature is 88, defined by a Freepbx Outbound Route dial pattern of 88|.
In the ADAT Account/Dial Transform tab I made three Search entries, all variants of “Skype” as follows - Skype: SKYPE: skype: with a Replace entry of 88 (Instead of these variants of skype I maybe could have used a RegEx)

The effect of this is that a URI like “Skype:echo123” is actually dialed as “88echo123”, and can either be manually dialed via ADAT, or from a web page context menu if IE integration is switched on in ADAT. The ADAT Firefox plugin does not allow this.

Any comments/improvements appreciated.

John