[asterisk-users] Optimizing this script for calling Skype users from Asterisk

Michael Robertson michael at michaelrobertson.com
Mon Feb 16 20:37:48 CST 2009


I have written this configuration script which uses OpenSky to make Skype
calls directly from Asterisk devices using my companies SIP to Skype
gateway. Users can dial skype_anyskypeusername or manually add names or
extensions which can get mapped to the correct dialing sequence. The right
sequence is username at opensky.gizmo5.com but that gets mapped to sipphone
address so I set that up to map directly to the final address.

I need a couple test sites so if anyone wants to test Skype calling on their
Asterisk network please send me email and I'l enable longer calling. Also in
the 2 hard coded examples below  (563 and echo) i want to also reference
gizmo5 and not repeatedly have proxy01.sipphone. Can someone tell me how to
construct the tightest syntax for that? Thanks.

-- MR

------------------------------------------------------------------------------------------------------------------------

[gizmo5]
type=peer                                             ;COPY THIS CONFIG
host=198.65.166.131                             ;INTO YOUR sip.conf
fromdomain=proxy01.sipphone.com    ;THIS WILL
canreinvite=no                                         ;ALLOW ANY
nat=yes                                                     ;DEVICE OR
CLIENT
dtmfmode=rfc2833                                   ;CONNECTED TO YOUR
insecure=very                                          ;ASTERISK SERVER TO
CALL
qualify=yes                                                ;SKYPE USERS
SEVERAL WAYS.
fromuser=YOURSIP                                    ;BY DIALING SKYPE NAMES
OR NUMERIC SHORTCUTS
authuser=YOURSIP                                   ;ENTERED INDIVIDUALLY
BELOW
username=YOURSIP                                 ;OR BY DIALING
skype_skypeusername
secret=YOURPASS                                    ;OR THE 333 ALIASES
disallow=all                                                ;ENTERED at
my.gizmo5.com
allow=ulaw                                                ;
allow=alaw                                                ;SEE
gizmo5.com/opensky
allow=ilbc                                                 ;FOR MORE INFO

[general]
exten => _1333.,1,Goto(opensky,,1)          ;COPY THIS CONFIG
exten => _333.,1,Goto(opensky,,1)            ;INTO YOUR
exten => _skype[_].,1,Goto(opensky,,1)     ;extensions.confexten =>
563,1,Dial(SIP/skype_echo123 at proxy01.sipphone.com<SIP/skype_joeschmo at proxy01.sipphone.com>)
  ;To dial a Skype user by dialing 563 in this example echo123
exten => echo,1,Dial(SIP/skype_echo123 at proxy01.sipphone.com<SIP/skype_joeschmo at proxy01.sipphone.com>)
;To dial a Skype name in this example echo will dial echo123

[opensky]
exten => _1.,1,NoOp('opensky dial')
exten => _1.,2,Dial(SIP/${EXTEN}@gizmo5|120|j)
exten => _1.,3,Hangup()

-------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090216/514d0fa9/attachment.htm 


More information about the asterisk-users mailing list