SIP / 2.0 481呼叫支路/交易不退出(UCMA)

时间:2014-03-24 10:44:22

标签: ucma

我创建mspl以将调用重新路由到ucma应用程序端点

以下是我的MSPL代码

<?xml version="1.0" ?>
<lc:applicationManifest
appUri="http://"Domain NAme"/AltRGS"
xmlns:lc="http://schemas.microsoft.com/lcs/2006/05">
<lc:allowRegistrationBeforeUserServices action="true" />
<lc:requestFilter methodNames="INVITE"
strictRoute="false"
registrarGenerated="true"
domainSupported="true" />
<lc:responseFilter reasonCodes="NONE" />
<lc:proxyByDefault action="true" />
<lc:scriptOnly />
<lc:splScript><![CDATA[


  fromUri = GetUri( sipRequest.From );
  fromUser = Concatenate( GetUserName( fromUri ) );
  toUri = GetUri( sipRequest.To );
  toUserAtHost = Concatenate( GetUserName( toUri ), "@", GetHostName( toUri ) );

   foreach ( sessionExpires in GetHeaderValues( "Session-Expires" ) ) {
       if ( ContainsString( sessionExpires, "refresher", true ) ) {
           Log( "Debug", false, "RespondWithRinging: * skipped; This is a session refreshing invite" );
           return;
       }
   }

   foreach ( userAgent in GetHeaderValues( "USER-AGENT" ) ) {
       if ( ! ContainsString( userAgent, "mediation", true ) ) {
           Log( "Debug", false, "RespondWithRinging: * skipped; not a mediation server request" );
           return;
       }
   }

   if (sipRequest && sipRequest.Method == "INVITE")

{
     ProxyRequest("sip:lync1.sti.ksac.com@ksac.com;gruu;opaque=srvr:app1:nKftzU4ORVGCO9Nqq3-m3QAA");
 }
 else {
    // Forward the call to the UCMA app.
    Log("Debugr", 1, "Forwarded caller to UCMA app: ", sipRequest.From);
    Respond("302", "Moved Temporarily", "Contact=");
  }

]]>

</lc:splScript>

</lc:applicationManifest>

我通过使用电源shell注册我的MSPl New-Csserver应用程序

我的c#代码是

private void Run()
    {
        try
        {
            _helper = new UCMASampleHelper();

          _appEndpoint = _helper.CreateAutoProvisionedApplicationEndpoint();
            _appEndpoint.RegisterForIncomingCall<AudioVideoCall>(AudioVideoCall_Received);

 void AudioVideoCall_Received(object sender, CallReceivedEventArgs<AudioVideoCall> e)
    {
        try
        {
            string _originalRecipientUri = e.RequestData.To Header.Uri;



 _inboundAVCall.StateChanged += new EventHandler<CallStateChangedEventArgs>_inboundAVCall_StateChanged);
 _inboundAVCall.AudioVideoFlowConfigurationRequested += new EventHandler<AudioVideoFlowConfigurationRequestedEventArgs>(_inboundAVCall_AudioVideoFlowConfigurationRequested);

            Console.WriteLine("Call Received!");

 _inboundAVCall.BeginAccept(BeginAcceptCB, _inboundAVCall);

}}

当我接到电话时,MSPL将呼叫路由到UCMA应用程序并转移到代理,但是当代理接受呼叫时它没有建立,我在ocs logger中收到以下错误:

SIP / 2.0 481呼叫支路/交易不退出

任何人都可以帮助我

感谢。

0 个答案:

没有答案