locked
Cannot cannot to PSTN gateway from Lync Server RRS feed

  • Question

  • Just setting up a Lync Server with a Asterisk PSTN gateway. Inbound calls work fine, I can call from an Asterisk extension or from outside and be correctly routed to the Lync extension. I can call out from an Asterisk extension. I cannot call out from a Lync client to either an Asterisk extension or a PSTN number. When I run sip show peers on the Asterisk box it shows the Lync_Trunk as being online so its definitely working from the Asterisk end.

    When I call out from the Lync client, in the Lync logging tool it shows either one of two errors:
    - 503 Service unavailable or
    - 504 Cannot connect to gateway

    Start-Line: INVITE sip:+613xxxx5250@192.168.64.13:5070

    The number in the sip request is in the correct format but I do notice that the port is listed as 5070. I have checked my topology and I have set it at 5060. Is the fact that it appears to be sending the request on port 5070 the problem? Or is this just a red herring?

    Friday, May 25, 2012 8:40 AM

All replies

  • Hi,

    Please check the TCP port in the PSTN gateway. The port you set in topology builder should be consistent with PSTN gateway.

    Please try to publish the topology builder again and make sure the replication is correct.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Saturday, May 26, 2012 6:04 AM
  • Hi Sean,

    Thanks for the advice but as mentioned in my original posting my Lync Server topology is set to 5060. It has always been set to 5060. The gateway is set to receive on 5060 also. Any ideas why the Lync server would be sending out on 5070?

    Saturday, May 26, 2012 7:17 AM
  • Hi Sean,

    I just tested again by deleting the gateway settings completely from voice routing in the Lync Control panel and then from the topology. Republished and restarted the mediation server service. Then added the gateway back. It (Lync) still insists on sending the invitation to the gateway at port 5070. If I change the port in the topology to something else, like 5061, it sends on 5061 but if I set it to 5060 it sends on 5070. Looks like a bug to me.

    So it looks like I will have to set the Asterisk PBX to expect incoming calls from the Lync server on 5070 or some other port. Any port other than 5060.

    Saturday, May 26, 2012 8:39 AM
  • Actually just further to this. I had originally set this up with a freeswitch pbx instead of the asterisk pbx. The same Lync server could call out to the local extensions and even call out on PSTN but it could not receive calls from the freeswitch. So I don't think the problem is with the Lync server. Perhaps it is the asterisk pbx not listening for the Lync server.
    Saturday, May 26, 2012 11:44 AM
  • Hi,

    After you set up freeswitch pbx instead of the asterisk pbx, what's the port used do you find in the log?

    Which listening port you set in the freeswitch pbx?

    About lync server could not receive calls from the freeswitch, please try to capture a log with Lync server Logging tool and snooper. Maybe the calls number from freeswith is not transfered to normalization number(E.164).


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    • Edited by Sean_Xiao Sunday, May 27, 2012 8:12 AM
    Sunday, May 27, 2012 8:12 AM
  • Hi Sean,

    It was port 5060. I have no idea what it showed in the log as I didn't check as it was working :)

    However I couldn't get inbound calls to work, I disliked the interface, thought the community support was poor, and the main application kept quitting (I was running it on Windows) so I have deleted the VM.

    I am currently building another Asterisk box (I have kept the other one) based on FreePBX to see if the behaviour I am getting is consistent between Asterisk boxes.

    Sunday, May 27, 2012 9:05 PM
  • Did you re-run the local setup on the Mediation Servers after changing the ports ? Did you also restart the Mediation Service ?

    Hany George | Consultant | IDC S.p.A | MCITP: Lync Server | MCITP: Exchange 2010 | MCTS: OCS | Blog: http://dusk1911.wordpress.com/ | If this post has been useful please click the green arrow to the left or click Propose as answer

    Monday, May 28, 2012 6:33 AM
  • could you also share the full invite details, port 5070 is an expected behaviour between the FE and the mediation as per below

    http://technet.microsoft.com/en-us/library/gg398833.aspx

    Front End Servers that also run a Collocated Mediation Server

    Lync Server Mediation service

    5070

    TCP

    Used by the Mediation Server for incoming requests from the Front End Server to the Mediation Server


    Hany George | Consultant | IDC S.p.A | MCITP: Lync Server | MCITP: Exchange 2010 | MCTS: OCS | Blog: http://dusk1911.wordpress.com/ | If this post has been useful please click the green arrow to the left or click Propose as answer

    Monday, May 28, 2012 6:39 AM
  • Hi Hany,

    Yes I did rerun local setup/restart mediation service. Hence the invite port changing when I changed the port in the topology.

    Thanks for confirming that 5070 is expected behaviour. I suspected as much in my original post. And the fact that I could receive calls from the lync server on the freeswitch pbx confirms, I think, that the Lync server is not the problem. The problem would seem to be the Asterisk box which doesn't seem to be listening for the Lync server. I must, in my inexperience, have misconfigured it. I'm not sure how, having followed a blog about setting it up. I am now trying a FreePBX setup to see if I can get a different Asterisk box to receive calls from the Lync server.

    Monday, May 28, 2012 11:19 PM
  • Hi muaddib32

    Have you tried switching off the local firewall (remaining the topology in the intended configuration)? Please report whether this has solved your problem. 

    Regards

    Wednesday, September 5, 2012 10:29 AM
  • Ok…There would be some causes. Try to follow the below options might be helpful  

      • Use the wire shark on asterisk server Filter it into Sip protocol and inspection the Packet. (Port number, Option request, dial plan )   
      • Check the Firewalls on the Servers.
      • Try to Edit the PSTN gateway at the topology broth listening port  to 5060 TCP and republish
    Friday, September 7, 2012 8:23 AM
  • Hi

    Were you able to resolve this?

    I have the same issue where the request is being sent on 5070 and the PBX and the gateway are set to use 5060 TCP.

    Many thanks

    Dave

    Sunday, October 27, 2013 3:17 PM
  • Hi muaddib32,

    Have you solved this problem? It's better to use qulified gateway or IP-PBX.

    http://technet.microsoft.com/en-us/office/dn788945

    For my enterprise, I used Itibia Technologies's IP-PBX, works very well, easy to deploy and operate, and with best performance & price.

    If you didn't solve the problem yet, please contact me eric.rennn@gmail.com.

    Regards,

    Eric

    Wednesday, October 29, 2014 8:33 AM