Click here to Skip to main content
16,006,791 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hai

I create the mspl to transfer reroute the calls to ucma application endpoint

Below is my code for MSPL
XML
<?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><

C#
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>

I register my MSPl By Using power shell
New-Csserver application

and my c# code is
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.ToHeader.Uri;

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

Console.WriteLine("Call Received!");

_inboundAVCall.BeginAccept(BeginAcceptCB, _inboundAVCall);

}}

When i get the call MSPL route the call to the UCMA application and transfer to the agents but when agent accepts the call it is not establishing and i am gettimg the following error find in ocs logger

SIP/2.0 481 Call Leg/Transaction Does Not Exit


Can Any one please help me

Thanks.
Posted
v2

1 solution

Hai All

Finally i got the solution. When using the MSPl we are getting the Re-Invite when we transfer the call at that time also it route the call. i just gave a condition when it is first request then only it goes to the retarget other wise it takes the request as it is.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900