Return to LanScape's home page Go back a page...       Active TopicsActive Topics   Display List of Forum MembersMember List   Knowledge Base SearchSearch   HelpHelp  RegisterRegister  LoginLogin

LanScape VOIP Media Engine™ - Technical Support
 LanScape Support Forum -> LanScape VOIP Media Engine™ - Technical Support
Subject Topic: Problem with AbortIncomingCall() Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mfitzgerald
Vetran
Vetran


Joined: June 14 2006
Location: United States
Posts: 142
Posted: March 01 2007 at 11:39am | IP Logged Quote mfitzgerald



We didn’t have a problem with the AbortIncomingCall with the previous media engine 5.12.3.13. But for some reason now we don’t get an outgoing SIP message for a 486.


Scenario:
Agent is on a call.
Call is finished.
Agent continues to work on data, is not ready for a new call. Ie: (pCPhoneBase->m_sPhoneStatus.bReadyForCall = false)
New INVITE comes in.
Application needs to send an automatic AbortIncomingCall() ie: 486
AbortIncomingCall is called, but fails with return value ‘Call Failure’






Code in: TelephonyEngineCallback
Code:

. . .
Case SipIncomingCallInitialized:
{
     if(!pCPhoneBase->m_sPhoneSt atus.bReadyForCall)
     {
           TELEPHONY_RETURN_VALUE stat;
           stat = AbortIncomingCall(pCPhoneBase->m_hSipEngine, PhoneLine,486,"Busy Here");
           if(stat != SipSuccess)
                Logs a notice of the return value
                
           break;
     }
}
. . .



Sip Log:
Code:


<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (9422 Ms, From: 10.2.2.75:5060) <<<<
INVITE sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70adb-681-1
To: <sip:7002004307@172.26.253.176:5060>
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
Date: Fri, 1 Mar 2007 17:18:19 GMT
Call-ID: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8820 INVITE
Max-Forwards: 70
X-XLData: pc=875256;dnis=8667339098
Contact: <sip:8067472474@10.2.2.75:5060>
User-Agent: ENS2.2.102-IS1-RMRG3125-RG3149-EP2594-CO1665-CPO01943
Content-Type: application/sdp
Content-Length: 279

v=0
o=- 2142963881 1035667625 IN IP4 10.2.2.75
s=ENS Session
c=IN IP4 10.2.2.73
t=0 0
m=audio 8868 RTP/AVP 8 0 4 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv


>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (9468 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0adb-681-1
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
To: <sip:7002004307@172.26.253.176:5060>
Call-ID: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8820 INVITE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0




>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (0 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0adb-681-1
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
To: <sip:7002004307@172.26.253.176:5060>;tag=9b79fe
Call-ID: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8820 INVITE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0




>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (500 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0adb-681-1
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
To: <sip:7002004307@172.26.253.176>;tag=9b79fe
Call-Id: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8820 INVITE
Contact: <sip:7002004307@172.26.253.176:5060>
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 179
Content-Type: application/sdp

v=0
o=LanScape 3381758299 3381758299 IN IP4 172.26.253.176
s=LanScape
c=IN IP4 172.26.253.176
t=0 0
m=audio 8236 RTP/AVP 18
a=rtpmap:18 G729/8000/1
a=sendrecv
a=ptime:20


<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (547 Ms, From: 10.2.2.75:5060) <<<<
ACK sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70adb-681-2
To: <sip:7002004307@172.26.253.176:5060>;tag=9b79fe
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
Call-ID: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8820 ACK
Max-Forwards: 70
User-Agent: ENS2.2.102-IS1-RMRG3125-RG3149-EP2594-CO1665-CPO01943
Content-Length: 0



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (12656 Ms, From: 10.2.2.75:5060) <<<<
BYE sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70adb-67f-3
To: <sip:7002004307@172.26.253.176:5060>;tag=9b79fe
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769499-co1665
Call-ID: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8830 BYE
Max-Forwards: 70
User-Agent: ENS2.2.102-IS1-RMRG3125-RG3149-EP2594-CO1663-CPO01943
Content-Length: 0



>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (12688 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0adb-67f-3
From: <sip:8067472474@10.2.2.75>;tag=t1172769499-co1665
To: <sip:7002004307@172.26.253.176>;tag=9b79fe
Call-Id: 45e70ada0000079600000013724ff2d1@ens.com
CSeq: 8830 BYE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (7594 Ms, From: 10.2.2.75:5060) <<<<
INVITE sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70aef-74b-1
To: <sip:7002004307@172.26.253.176:5060>
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769519-co1867
Date: Fri, 1 Mar 2007 17:18:39 GMT
Call-ID: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 INVITE
Max-Forwards: 70
X-XLData: pc=875334;dnis=8667339098
Contact: <sip:8067472474@10.2.2.75:5060>
User-Agent: ENS2.2.102-IS1-RMRG3125-RG3149-EP2594-CO1867-CPO00153
Content-Type: application/sdp
Content-Length: 279

v=0
o=- 2131707227 1661945179 IN IP4 10.2.2.75
s=ENS Session
c=IN IP4 10.2.2.73
t=0 0
m=audio 9316 RTP/AVP 8 0 4 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv


>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (7594 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0aef-74b-1
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769519-co1867
To: <sip:7002004307@172.26.253.176:5060>
Call-ID: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 INVITE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0




>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (0 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0aef-74b-1
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769519-co1867
To: <sip:7002004307@172.26.253.176:5060>;tag=9bcb2c
Call-ID: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 INVITE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (25219 Ms, From: 10.2.2.75:5060) <<<<
CANCEL sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70aef-74b-1
To: <sip:7002004307@172.26.253.176:5060>
From: <sip:8067472474@10.2.2.75:5060>;tag=t1172769519-co1867
Call-ID: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 CANCEL
Reason: Q.850 ;cause=102 ;text="Unknown"
Max-Forwards: 70
User-Agent: ENS2.2.102-IS1-RMRG3125-RG3149-EP2594-CO1867-CPO00153
Content-Length: 0



>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (25218 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 487 Transaction Cancelled
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0aef-74b-1
From: <sip:8067472474@10.2.2.75>;tag=t1172769519-co1867
To: <sip:7002004307@172.26.253.176>
Call-Id: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 INVITE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0



>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (0 Ms, To: 10.2.2.75:5060) >>>>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.2.2.75:5060;branch=z9hG4bK1a02024b45e70aef-74b-1
From: <sip:8067472474@10.2.2.75>;tag=t1172769519-co1867
To: <sip:7002004307@172.26.253.176>
Call-Id: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 CANCEL
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com)
Content-Length: 0



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (31 Ms, From: 10.2.2.75:5060) <<<<
ACK sip:7002004307@172.26.253.176:5060 SIP/2.0
Via: SIP/2.0/UDP 10.2.2.75:5060;received=10.2.2.75;branch=z9hG4bK1a02024b45e7 0aef-74b-1
To: <sip:7002004307@172.26.253.176>
From: <sip:8067472474@10.2.2.75>;tag=t1172769519-co1867
Call-ID: 45e70aef0000009700000013724ff2d1@ens.com
CSeq: 32280 ACK
Max-Forwards: 70
User-Agent: ENS2.2.102-IS1
Content-Length: 0


In the SIP Log above, the caller hung up, no 486 message was sent.




Back to Top View mfitzgerald's Profile Search for other posts by mfitzgerald Visit mfitzgerald's Homepage
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: March 01 2007 at 2:01pm | IP Logged Quote support

Hi Fitz,

We will check it out right away.

Note: We are having a snow storm here today and the power is cycling on and off. We hope this does not interfere too much with our work today.

Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
mfitzgerald
Vetran
Vetran


Joined: June 14 2006
Location: United States
Posts: 142
Posted: March 01 2007 at 2:17pm | IP Logged Quote mfitzgerald

Congrats on the weather. All we got was 60 mph winds snow-ish-mud and mud-ish-sprinkles Saturday, and just dust & wind yesterday.

You can tell a Texan when their teeth match the color of the land... brown/red.

Anyway I'm looking forward to hearing from you. This is an issue that needs to be resolved quickly, it is holding up our deployment.

Thanks for working through the weather... If you want, we could exchange snow for tumbleweeds--we have plenty to spare... and I've been wondering what snow looks like.
Back to Top View mfitzgerald's Profile Search for other posts by mfitzgerald Visit mfitzgerald's Homepage
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: March 01 2007 at 4:35pm | IP Logged Quote support

Hi Fitz,

I don’t think we ever had it where you could call the AbortIncomingCall() API proc to terminate the call when you are executing in the SipIncomingCallInitialized immediate event. Check out the developer’s reference for the docs on the AbortIncomingCall() proc.

You can do what you want but in a slightly different way. Check out the code below:

Code:


.
.
.
Case SipIncomingCallInitialized:
{
     if(!pCPhoneBase->m_sPhoneSt atus.bReadyForCall)
     {
             // calling the AbortIncomingCall() API proc here will always return
             // an error. applications should only call this proc when the call
             // is in the SipOkToAnswerCall state.
             stat = AbortIncomingCall(hStateMachine,PhoneLine,486,"Busy Here");
             
             if(stat != SipSuccess)
             {
                   // handle the error.
             }
             
             // to abort the incoming call and to send a "486 Busy Here"
             // SIP response, do the following:
             pIncomingCallInitEventData->TerminateIncoming Call = TRUE;
             pIncomingCallInitEventData->SipResponseCode   = 486;
     
     }
     break;
}
.
.
.
     


Let us know what your results are.

Support

Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
mfitzgerald
Vetran
Vetran


Joined: June 14 2006
Location: United States
Posts: 142
Posted: March 02 2007 at 9:37am | IP Logged Quote mfitzgerald

Oh, you mean read the manual?

argh… I guess I missed that line.

That method had been used in a previous version of the Media Engine (prior to specifying the 400 to 699 and phrase—I think that was version 5.12.3.7) and it worked flawlessly.

Your replacement example worked perfectly:
Code:

void __stdcall TelephonyEngineCallback(SIPHANDLE hStateMachine, SIP_NOTIFY_TYPE NotificationType, int PhoneLine,
                                 TELEPHONY_RETURN_VALUE TelephonyEvent, void *pUserDefinedData, void *pEventData)
{
     CPhoneBase *pCPhoneBase;
     SipStatusData *pSipStatusData;
     INCOMING_CALL_INITIALIZED_DATA *pIncomingCallInitEventData;

     // access the user specified data.
     pCPhoneBase = (CPhoneBase *)pUserDefinedData;
     pIncomingCallInitEventData = (INCOMING_CALL_INITIALIZED_DATA *) pEventData;
.
.
.
Case SipIncomingCallInitialized:
{
     if(!pCPhoneBase->m_sPhoneSt atus.bReadyForCall)
     {
             pIncomingCallInitEventData->TerminateIncoming Call = TRUE;
             pIncomingCallInitEventData->SipResponseCode&n bsp;  = 486;
     
     }
     break;
}
.
.
.


Thanks again
Back to Top View mfitzgerald's Profile Search for other posts by mfitzgerald Visit mfitzgerald's Homepage
 
Jalal
Vetran
Vetran


Joined: April 24 2006
Location: Iran
Posts: 188
Posted: March 04 2007 at 8:45am | IP Logged Quote Jalal

Hi

Does it make any difference to abort a call using TerminateIncomingCall flag when SipIncomingCallInitialized event is received or to use AbortIncomingCall when we receive SipIncomingCallStart event?

We logged the events and we realized that when use the first solution we receive SipIncomingCallStart. Is it correct? If yes what's the reason to receive SipIncomingCallStart for an aborted call.

Thanks
Back to Top View Jalal's Profile Search for other posts by Jalal Visit Jalal's Homepage
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: March 05 2007 at 11:28am | IP Logged Quote support

Hi Jalal,

There are basically 2 ways to abort an incoming call.

Method 1:
Handle the SipIncomingCallInitialized event and set the TerminateIncomingCall flag to non zero value and the SIP response code SipResponseCode to some SIP response value. See Developer’s reference for more info. This method is the fastest way (and has the lowest internal overhead) to terminate an incoming call.


Method 2:

Call the AbortIncomingCall() API procedure when the incoming call state hits the SipOkToAnswerCall state. If you wait until the SipOkToAnswerCall state, incoming phone ringing will be active and extra internal processing will have been performed to get to the SipOkToAnswerCall state.

Select whatever method best suits your application. Generally, VOIP server apps will use method 1 and applications like soft phones will use method 2.


Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum






Contact LanScape Hear what the Lawyers have to say How youm may use this site Read your privacy rights