none
Lync 2010 Server PSTN/Gateway ASTERISK / TRIXBOX for udp<--sip-->tcp

    General discussion

  • I have successfully configure on a few occasions now, a Lync 2010 with external access / UM integration



    LYNC: Single Front End Server, Mediation Server



    IP ADDRESS/s: 10.0.0.2

    FQDN on instld. Cert: lync.domain.local



    RP: Microsoft Forefront TMG - Reverse Proxy for external ABS PUBLIC/PRIVATE(DOMAIN.local) Interface


    IP ADDRESS/s: eg, 252.252.252.252, 10.0.0.40

    FQDN on instld. Cert: sipweb.domain.com





    SIP: Edge Server for external IM + A/V


    IP ADDRESS/s: 252.252.252.253, 10.0.0.103

    FQDN on instld. Cert: sip.domain.com, sip.domain.local







    TRIXBOX: (FROM: SIP@provider.com:UDP) -> (TO: +61@domain.com:TCP)





    I have also set up Exchange 2010 SP1 w/ UM integration huntgroup/dialplan and UMIPGateway = LYNC





    Lync 2010 i386 Client - Windows 7 External Client (Public access  SRV *sip_tls/ % .domain.com )

    External Dialing successful (through PSTN:/Gateway-TRIXBOX) Call forwarding also successful (problem with symultaneous ring = essentially working same as forward, lync client receive "XXXXXXX has answered, while the call rings and transfers successfully to external PSTN client )

    Recieve External Call (from PSTN:/Gateway-TRIXBOX)

    Address Book Synchronising

    Voice Mail will download to Push-to-Play under Dial Tab in Lync 2010

    Lync to Lync A/V/Conferencing/IM/File/Desktop/Sharing is all working

    AUDIO Test Service works



    Voice MAIL / UM Auto Attendant ---- Do Not Work 

    Information;

    I have sniffed the ethernet interface on my laptop at home while connected automatically with public cert verification (External)



    What i see when dialing call is STUN Traffic to 10.0.0.1 (Exchange2010Sp1, UM,CAS,HUB,MBS) 



    What do i need to do to enable Voice mail for external clients, making the Polycom CX700 that is connected / Updated to version 4.* (lync phone edition) and everything works, Calendar, Call history and Voice Mail List but 1 touch to play voice-mail not work from external. Why?





    All of this has been on virtual hardware in a test environment running Xenserver 5.6 - 



    All Windows Servers (Edge,RP,SFE,Exch) VM 4096MB RAM - 24GB VHD 4VCPU Xeon 3.0GHz

    Trixbox VM







    • Edited by Jad Seifeddine Thursday, January 06, 2011 1:44 PM autoformat keep chaning font size
    Thursday, January 06, 2011 1:42 PM

All replies

  • What version of Trixbox are you running?
    Thursday, January 06, 2011 9:19 PM
  • I am running trixbox 2.8.0.4 on xenserver virt guest with 2048mb and 15GBVHD with 2VCPU

     

    The config is as easy as below, following installation of Trixbox with 2 interfaces (public and private)

    once you have that set up in the trixbox conf and DNS is correct

     

     

     

    trixboxserv.domain.com/maint

     

    ontop menu

    choose PBX_-->PBX Settings

     

    then on left hand menu

    choose Trunks

     

    then from this page choose add + SIP Trunk

     

     

    ALL DEFAULTS ----

     

    until;

     

    Trunk Name:provider

    PEER Details:

    allow=alaw&ulaw

    canredirect=no

    context=custom-get-did-from-sip

    disallow=all

    fromdomain=nsw.sydneyaus.net.au

    host=nsw.sydneyaus.net.au

    insecure=very

    secret=my-sip-secret

    type=peer

    username=02XXXXXXXX

     

    Incoming Settings

     

    USER Context:02XXXXXXXX

    USER Details:

    canreinvite=no

    context=custom-get-did-from-sip

    qualify=no

    secret=my-sip-secret

    type=user

    username=02XXXXXXXX

     

    Registration

     

    Register String:

    02XXXXXXXX:my-sip-secret@nsw.sydneyaus.net.au/02XXXXXXXX

     

     

     

     

    Now for the LYNC go click save, apply and go back to the trunks page to add another trunk

     

     

    all default until

     

    Outgoing Settings

     

    Trunk Name:Connect-with-LYNC

    PEER Details:

    host=lync.domain.local

    transport=tcp

    port=5068

    insecure=very

    type=peer

    fromdomain=lync.domain.com.au

    context=from-Lync

    promiscredir=yes

    qualify=yes

    canreinvite=yes

     

     

    Incoming Settings

     

    USER Context:from-LYNC

    USER Details:

    host=lync.domain.local (OR IP ADDRESS, Hostname requires host record /etc/hosts/)

    transport=tcp

    port=5068

    insecure=very

    type=peer

    context=from-Lync

    promiscredir=yes

    qualify=yes

    canreinvite=yes



    Now you need to add dailin exten handlin rules in ASTERISK (behind trixbox) using the terminal preferably


    ssh sipout.domain.local (TRIXBOX IP address added to DNS)
    cd /etc/asterisk/
    vi extensions_custom.conf

    ; I added the following for use my purpose - matching my dailing plan in LYNC

    Incoming calls (from the world (PSTN) to LYNC ) note; This is the only rule for calls from [custom-get-did-from-sip]

    [custom-get-did-from-sip]
    exten => _.,1,Noop(External Call coming in from PROVIDER!)
    exten => _.,n,Set(pseudodid=${SIP_HEADER(To)})
    exten => _.,n,Set(pseudodid=${CUT(pseudodid,@,1)})
    exten => _.,n,Set(pseudodid=${CUT(pseudodid,:,2)})
    exten => _.,n,Set(LYNC_Client=+61${pseudodid:1})
    ;exten => _.,n,Set(LYNC_Client=${pseudodid})
    exten => _.,n,Answer
    exten => _.,n,Dial(SIP/${LYNC_Client}@Connect-with-LYNC,,tr)



    ;If I normalize a number like 94811111 make it 0294811111 - note I have many rules like this to achieve complete dialing capabilities

    [from-Lync]
    exten => _0.,1,Set(numDialled=${EXTEN})
    exten => _0.,n,Set(REALCALLERIDNUM=${CALLERID(number)})
    exten => _0.,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
    exten => _0.,n,Set(USEROUTCID=${CALLERID(number)})
    exten => _0.,n,Set(CALLERID(number)=0${USEROUTCID:3})
    exten => _0.,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
    exten => _0.,n,Answer
    exten => _0.,n,Dial(SIP/${numDialled}@provider,,tr)



    NOW ON YOUR Front End Server -

    add sipout.hbi.local in your topology for pstn gateway using port 5060 TCP

     

     

    Everythings working perfectly, the phone has all call history and updated to lync phone edition as well as calendar and address book... funny thing is its sitting here re-siging in every 5-10 minutes like clock work... strange

     

    Using the details above

    Friday, January 07, 2011 3:01 PM
  • I've been able to get to the same level of functionality, with the exception of dial in conferencing with 2.8.0.4, which is why I was curious. I can dial in from the outside to a Lync client, a Lync client can dial out. A meeting attendee can join a meeting and use the call me function and it works successfully. When someone tries to dial one of the published PSTN conference dial in numbers, it accepts the call, has them enter their information, says they are now being joined to the conference. I see the person popup as joined on my Lync client for maybe 2 seconds, then the attendant says they cannot be joined to this meeting. I just keep getting the same error in the tracing, no matter what I do:

     

    TL_INFO(TF_PROTOCOL) [0]0A8C.2324::01/07/2011-21:08:51.397.0001d81f (SIPStack,SIPAdminLog::TraceProtocolRecord:SIPAdminLog.cpp(125))$$begin_record

    Trace-Correlation-Id: 3960482742

    Instance-Id: 00032E07

    Direction: incoming

    Peer: invmalyncvm01.involtadc.local:5070

    Message-Type: response

    Start-Line: SIP/2.0 491 Invite with Replaces failed because Gateway side reinvite failed.

    From: <sip:jward@involta.com;gruu;opaque=app:conf:audio-video:id:BGLLFH39>;tag=a76ecf72e5;epid=051387A305

    To: <sip:invmalyncvm01.involtadc.local@involta.com;gruu;opaque=srvr:MediationServer:BFHgCdcQO1GRCR3WP3DGKAAA;grid=d721707d4d5941f4b5de18c653c23214>;epid=B19108E3F4;tag=66c420364a

    CSeq: 65 INVITE

    Call-ID: 49085289-6ee0-4a15-9c28-789160b6f6fe

    VIA: SIP/2.0/TLS 10.128.10.57:52813;branch=z9hG4bKA1C4C9D9.25A66D77A9F5F212;branched=FALSE,SIP/2.0/TLS 10.128.10.57:52812;branch=z9hG4bKe71642d9;ms-received-port=52812;ms-received-cid=412800

    CONTENT-LENGTH: 0

    P-ASSERTED-IDENTITY: "U.S. CELLULAR"<sip:319XXXXXXX;phone-context=DefaultProfile@involta.com;user=phone>

    SERVER: RTCC/4.0.0.0 MediationServer

    ms-diagnostics: 10010;source="invmalyncvm01.involtadc.local";reason="Gateway side Media negotiation failed";component="MediationServer";SipResponseText="Invite with Replaces failed because Gateway side reinvite failed."

    ms-diagnostics-public: 10010;reason="Gateway side Media negotiation failed";component="MediationServer";SipResponseText="Invite with Replaces failed because Gateway side reinvite failed."

    ms-endpoint-location-data: NetworkScope;ms-media-location-type=intranet

    Message-Body: –

    $$end_record

     

    In the mean time, I'll talk to our UM person and see if they can shed any light on the issue you're facing.

    Friday, January 07, 2011 9:39 PM
  • I'm not sure, but please check your trunk configuration -

    at the moment for me this appears to be disabled as i have not ventured to that yet but take not of the below;

    "

    Incoming Settings

     

    USER Context:02XXXXXXXX

     

    USER Details:

    canreinvite=no

    "

    Sunday, January 09, 2011 2:37 PM
  • I am trying to connect Lyc to AsteriskNOW (FreePBX 2.8.1.4, Asterisk Version 1.6.2.17)

    I am able to dial Lync extension from my Asterisk but can't dial back to Asterisk from Lync. Here is my Trunk configuration (Peer Details and Incoming Settings)

    host=10.10.0.60
    transport=tcp
    port=5060
    insecure=very
    type=peer
    fromdomain=mydomain.com
    context=from-lync
    promiscredir=yes
    qualify=yes
    canreinvite=yes

    host=10.10.0.60
    transport=tcp
    port=5060
    insecure=very
    type=peer
    context=from-Lync
    promiscredir=yes
    qualify=yes
    canreinvite=yes
     

    I am able to trace following error using Lync logging tool

    Received status code 503 for request sip:817@10.10.0.7:5070;user=phone;maddr=lyncfe.identitymine.com

    (0000000003248F2F)Gateway 10.10.0.7 being taken down. Time of shutdown:7/21/2011 11:57:08 AM; Timer set for:8

    Gateway [10.10.0.7] failure - reason [503 Service Unavailable]

    Next hop not found. Responding with 503.

    An exception 'Microsoft.Rtc.OutboundRouting.OutboundRoutingException' was thrown at '   at Microsoft.Rtc.OutboundRouting.OutboundRoutingDispatcher.PrepareRequest(OutboundRoutingTransaction transaction)
       at Microsoft.Rtc.OutboundRouting.OutboundRoutingDispatcher.ReRouteRequest(OutboundRoutingTransaction transaction, Response response, Boolean isCACFailure)'. Message 'Routes available, but no next hop available'

    Cannot reroute request: Routes available, but no next hop available

    Any help will be much appreciated :)

    Savi

    Thursday, July 21, 2011 7:09 PM
  • Asterisk by default uses port 5060 for SIP, (UDP or TCP).

    This line from your Lync log shows 5070

    "Received status code 503 for request sip:817@10.10.0.7:5070;user=phone;maddr=lyncfe.identitymine.com"

     

    Double check the port number where your Mediaition server is sending to, and double check the port Asterisk is receiving on.

    Also, by default, the Mediaition server receives on 5068, but if 5060 is working for you then it's all good.

     

    Regards

    Paul Adams

     


    MS Lync Server 2010 Resource Kit writer | website: www.pauladamsit.com
    Friday, July 22, 2011 11:28 PM
  • Paul,

    I think this trace is from the Front End and port 5070 is correct, since "Port 5070 is used by the Mediation Server for incoming requests from the Front End Server to the Mediation Server.” i.e. in co-located scenario FE talks to itself on 5070.

    A clean "Mediation Server" (no S4, no SIPStack must be examined.

     

    Drago


    http://www.lynclog.com
    Saturday, July 23, 2011 12:33 AM
  • I was able to fix the dialing issues, here the steps that I documented http://savithomas.blogspot.com/2011/07/connecting-lync-server-2010-with.html


    • Edited by Savi Thomas Monday, July 25, 2011 10:11 PM typo
    Monday, July 25, 2011 10:11 PM