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™ - Pre-Sales Technical Support
 LanScape Support Forum -> LanScape VOIP Media Engine™ - Pre-Sales Technical Support
Subject Topic: New Headers in SIP Message? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
tomach
Intermediate
Intermediate


Joined: February 23 2007
Location: Poland
Posts: 22
Posted: March 12 2007 at 4:10am | IP Logged Quote tomach

Here are logs from application. Problem is that every time I make call, after 5 seconds I recieve from SIP, BYE message and disconnection happends. I did not notice this kind of behaviur with many other softphones before.

Logs in Media Gateway says that RTP channel is broken. Thats why it send BYE message.


************* Log Opened (Mar 12 09:33:38) *************
>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (0 Ms, To: 192.168.2.191:5060) >>>>
INVITE sip:8726@192.168.2.191 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>
Contact: <sip:201@192.168.2.138:5060>
Call-Id: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 INVITE
Max-Forwards: 70
Organization: 97A5A208-C29E-475F-B849-07AA8895C245
x-MyCustomHeader: "This is a modified transmitted SIP message."
Content-Length: 224
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com - This is a trial version not for general deployment)
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY
Content-Type: application/sdp

v=0
o=201 4988625 4988625 IN IP4 192.168.2.138
s=LanScape
c=IN IP4 192.168.2.138
t=0 0
m=audio 8034 RTP/AVP 18 101
a=rtpmap:18 G729/8000/1
a=rtpmap:101 telephone-event/8000/1
a=sendrecv
a=ptime:20
a=fmtp:101 0-15




<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (0 Ms, From: 192.168.2.191:5060) <<<<
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>;tag=1c1762200347
Call-ID: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 INVITE
Supported: em,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,IN FO,SUBSCRIBE,UPDATE
Server: Audiocodes-Sip-Gateway-Mediant 2000/v.4.60A.034
Content-Length: 0




<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (110 Ms, From: 192.168.2.191:5060) <<<<
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>;tag=1c1762200347
Call-ID: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 INVITE
Contact: <sip:*@192.168.2.191;user=phone>
Supported: em,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,IN FO,SUBSCRIBE,UPDATE
Server: Audiocodes-Sip-Gateway-Mediant 2000/v.4.60A.034
Content-Type: application/sdp
Content-Length: 258

v=0
o=AudiocodesGW 1762302076 1762301689 IN IP4 192.168.2.191
s=Phone-Call
c=IN IP4 192.168.2.191
t=0 0
m=audio 6000 RTP/AVP 18 101
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (453 Ms, From: 192.168.2.191:5060) <<<<
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>;tag=1c1762200347
Call-ID: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 INVITE
Contact: <sip:*@192.168.2.191;user=phone>
Supported: em,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,IN FO,SUBSCRIBE,UPDATE
Server: Audiocodes-Sip-Gateway-Mediant 2000/v.4.60A.034
Content-Type: application/sdp
Content-Length: 258

v=0
o=AudiocodesGW 1762302076 1762301689 IN IP4 192.168.2.191
s=Phone-Call
c=IN IP4 192.168.2.191
t=0 0
m=audio 6000 RTP/AVP 18 101
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv



<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (1922 Ms, From: 192.168.2.191:5060) <<<<
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>;tag=1c1762200347
Call-ID: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 INVITE
Contact: <sip:*@192.168.2.191;user=phone>
Supported: em,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,IN FO,SUBSCRIBE,UPDATE
Server: Audiocodes-Sip-Gateway-Mediant 2000/v.4.60A.034
Content-Type: application/sdp
Content-Length: 258

v=0
o=AudiocodesGW 1762302076 1762301689 IN IP4 192.168.2.191
s=Phone-Call
c=IN IP4 192.168.2.191
t=0 0
m=audio 6000 RTP/AVP 18 101
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv



>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (2578 Ms, To: 192.168.2.191:5060) >>>>
ACK sip:8726@192.168.2.191;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK004c7179
From: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
To: <sip:8726@192.168.2.191>;tag=1c1762200347
Call-Id: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 5018005 ACK
Max-Forwards: 70
Route: <sip:*@192.168.2.191>
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com - This is a trial version not for general deployment)
x-MyCustomHeader: "This is a modified transmitted SIP message."
Content-Length: 0




<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (10125 Ms, From: 192.168.2.191:5060) <<<<
BYE sip:201@192.168.2.138:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.191;branch=z9hG4bKac1970465478
Max-Forwards: 70
From: <sip:8726@192.168.2.191>;tag=1c1762200347
To: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
Call-ID: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 1 BYE
Contact: <sip:*@192.168.2.191;user=phone>
Supported: em,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,IN FO,SUBSCRIBE,UPDATE
User-Agent: Audiocodes-Sip-Gateway-Mediant 2000/v.4.60A.034
Content-Length: 0




>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (10125 Ms, To: 192.168.2.191:5060) >>>>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.191:5060;received=192.168.2.191;branch=z9hG4bKac19 70465478
From: <sip:8726@192.168.2.191>;tag=1c1762200347
To: "LanScape Phone" <sip:201@192.168.2.138>;tag=4c3587
Call-Id: 6f048d5b-9925-43cc-a940-ae067160972a-00000c68@192.168.2.138
CSeq: 1 BYE
User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com - This is a trial version not for general deployment)
Content-Length: 0




************* Log Closed (Mar 12 09:34:07) *************


Here are logs from my Media Gateway:

10d:0h:1m:55s ACK sip:8726@192.168.2.191;user=phone SIP/2.0 Via: SIP/2.0/UDP 192.168.2.138:5060;rport;branch=z9hG4bK006f2572 From: "LanScape Phone" <sip:201@192.168.2.138>;tag=6f49e7 To: <sip:8726@192.168.2.191>;tag=1c733739525 Call-Id: 5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009f8@192.168.2.138 CSeq: 7278542 ACK Max-Forwards: 70 Route: <sip:*@192.168.2.191> User-Agent: LanScape VOIP Media Engine/5.12.3.14 (www.LanScapeCorp.com - This is a trial version not for general deployment) x-MyCustomHeader: "This is a modified transmitted SIP message." Content-Length: 0

10d:0h:1m:55s ( sip_stack)(155029 ) There are 1 NEW HEADERS in the incoming message .

10d:0h:1m:55s ( sip_stack)(155030 ) New Header number 1 is at line : 10

10d:0h:1m:55s ( sip_stack)(155031 ) UdpRtxMngr::Remove 200 Response 7278542 INVITE

10d:0h:1m:55s ( lgr_flow)(155032 ) | |(SIPTU#10)ACK State:LocalAccepted(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000 009f8@192.168.2.138)

10d:0h:1m:55s ( sip_stack)(155033 ) SIPCall(#10) changes state from LocalAccepted to Connected

10d:0h:1m:55s ( lgr_flow)(155034 ) | | | #12:SIP_MEDIA_EV(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009 f8@192.168.2.138)

10d:0h:1m:55s ( lgr_stk_ses)(155035 ) DtmfCapNegotiationAlgorithm :: TxDtmfMethod = DTMF_RFC2833_SUPPORTED

10d:0h:1m:55s ( lgr_stk_ses)(155036 ) DtmfCapNegotiationAlgorithm :: TxRtpRfc2833Payload = 101

10d:0h:1m:55s ( lgr_stk_ses)(155037 ) <SESSION #12> SendToCall - event: DTMF_CONTROL_EV m_Call = 42867296

10d:0h:1m:55s ( lgr_flow)(155038 ) | | #12:DTMF_CONTROL_EV:(5b33206c-22e4-4aa9-a545-aefdc4c6166d-00 0009f8@192)

10d:0h:1m:55s ( lgr_stk_ses)(155039 ) <SESSION #12> SendToCall - event: OPEN_LOGICAL_CHANNEL_ACK m_Call = 42867296

10d:0h:1m:55s ( lgr_flow)(155040 ) | | #12:OPEN_LOGICAL_CHANNEL_ACK:(5b33206c-22e4-4aa9-a545-aefdc4 c6166d-000009f8@192)

10d:0h:1m:58s ( lgr_psbrdex)(155041 ) recv <-- UnHandled event: 313

10d:0h:2m:5s ( lgr_psbrdex)(155042 ) recv <-- acEV_BROKEN_CONNECTION, Ch:0 push LOCAL_MANUAL_DISCONNECT_CALL_EV

10d:0h:2m:5s ( lgr_flow)(155043 ) #0:LOCAL_MANUAL_DISCONNECT_CALL_EV(Trunk:0 Conn:-100 Bchannel:1 TpEv=38)

10d:0h:2m:5s ( lgr_flow)(155044 ) | #0:LOCAL_MANUAL_DISCONNECT_CALL_EV

10d:0h:2m:5s ( lgr_flow)(155045 ) | #0:MANUAL_DISCONNECT_CALL_EV (send) : (5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009f8@192)

10d:0h:2m:5s ( lgr_flow)(155046 ) | | #12:MANUAL_DISCONNECT_CALL_EV:(5b33206c-22e4-4aa9-a545-aefdc 4c6166d-000009f8@192)

10d:0h:2m:5s ( lgr_flow)(155047 ) | | #12:RELEASE:(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009f8@1 92)

10d:0h:2m:5s ( lgr_flow)(155048 ) | | #12:RELEASE_ACK:(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009 f8@192)

10d:0h:2m:5s ( lgr_flow)(155049 ) | | | #12:RELEASE(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009f8@19 2.168.2.138)

10d:0h:2m:5s ( lgr_flow)(155050 ) | |(SIPTU#10)DISCONNECT_REQ State:Connected(5b33206c-22e4-4aa9-a545-aefdc4c6166d-000009f 8@192.168.2.138)

10d:0h:2m:5s ( lgr_flow)(155051 ) ---- Outgoing SIP Message to 192.168.2.138:5060 ----

I suspect that problem is with your sip message, because my Media Gateway says its :

10d:0h:1m:55s (     sip_stack)(155029     ) There are 1 NEW HEADERS in the incoming message .

Do you have any idea?


Back to Top View tomach's Profile Search for other posts by tomach
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: March 12 2007 at 10:19am | IP Logged Quote support

Hi tomach,

The custom header(s) that appear in the sample apps SIP messages should not bother your gateway. If you want to change the example source code for the apps to remove the extra SIP headers please do so to verify that they are not causing your problem.

What we suspect is that your media gateway is terminating the call after 10 seconds because the sample examples only transmit RTP media data if it is required - like when you are talking. Either you have to disable the use of "noise discrimination (it's the same thing as transmit VAD in this case) or you need to enable RTP keep-alive mechanism in the media engine. You will have to look at the source code to determine how to do this. Take a look at the PhoneBase.cpp module.


To get more info, take a look at the media engine's developer reference for the API proc:

SetNoiseDiscriminationEnableState()


Also look up the EnableKeepAliveTransmissions() API proc.
The code below shows how you can turn on RTP keep-alive:

Code:


     // enable RTP keep alive so this app works with RTP media proxy.
     // we like to use RTP keep alive capability so the media proxy
     // will not time out the media session due to going data starve.
     status = EnableKeepAliveTransmissions(
                hSipEngine,
                FALSE,     // SIP OPTIONS keep alive during calls.
                TRUE,    & nbsp;     // RTP session keep alive.
                10000    & nbsp;  // NAT or media gateway session time MS.
                );


If these two suggestions do not fix the hang up issue, then we will have to look further into a possible inter-op problem.

Repost as needed,


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


Joined: February 23 2007
Location: Poland
Posts: 22
Posted: March 13 2007 at 5:20am | IP Logged Quote tomach

Hello!

Thnaks for help.

This is what I noticed:
1. When I set
    SetNoiseDiscriminationEnableState(FA LSE)
Then everythnig worked fine but I was able to hear my own voice in phone with 2-3 sec delay. So I changed it back to TRUE.

2. I changed in my media gateway setting to not disconnect after connection broken and it helped :).

If I understand right (if there is TRUE) it stopped RTP transsmision if there is noise in background. And here is problem. There is no more echo in my phone or anything bad. But your codec implemantation cut even some my real words, that I was talking to computer's microphone. I mean esspesially when there was noise in background some parts of my phone talk were removed. Is it your codec implementation bug? or I didnt configure it right?

3.
status = EnableKeepAliveTransmissions(
    hSipEngine,FALSE,   & nbsp; // SIP OPTIONS keep alive during calls. TRUE,    & nbsp;     // RTP session keep alive. 10000    & nbsp; // NAT or media gateway session time MS.
                );


It didnt changed anything, even I have all set correct in media gateway.

Best Regards,
Back to Top View tomach's Profile Search for other posts by tomach
 
tomach
Intermediate
Intermediate


Joined: February 23 2007
Location: Poland
Posts: 22
Posted: March 13 2007 at 5:28am | IP Logged Quote tomach

I am not very flexible in C++. So could you advice me what lines of code and where should I add to play wav file after somebody pick up the phone?

Best Regards,

Back to Top View tomach's Profile Search for other posts by tomach
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: March 13 2007 at 7:03am | IP Logged Quote support

Hi tomach,

Item 1:
Don’t know why this should be. You will have to investigate more. If the media engine continuously streams RTP media to the gateway, there should be no problem.

Item 2:
Changing a setting in your gateway is what we suspected. This is good.

<<< You
But your codec implemantation cut even some my real words…

Support >>>
You will have to change in the example application source code the call to the SetNoiseThreshold() API procedure so this does not happen. What is happening is the voice activation detection (noise discrimination) for the phone line’s transmitted audio is activating too soon. Use the SetNoiseThreshold() proc to set a lower value.

Alternatively you can also increase the microphone input record level in your system’s multimedia audio mixer settings.

Item 3:
If you changed settings in your media gateway to not terminate calls due to short timed out RTP media streams, then you do not need this.


Playing wave file after picking up the phone:
The best way to see how to play a wave file to the phone line after answering the call would be to see the “Playback wave file” example software application that comes with the product. It’s a simple console app that shows exactly how to do this.

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


Joined: February 23 2007
Location: Poland
Posts: 22
Posted: March 13 2007 at 9:34am | IP Logged Quote tomach

Hello!

1. I guess there is problem with your echo camcellation with codec G 729.

2. This is weird cos usually everything works fine, but sometimes (very rare), your application recognise my voice as noise. Untill I stop talking and start again my voice is toatlly earased :(. Even changing the SetNoiseThreshhold() proc doesnt help nor increasing microphone value. I totally agree there is somethign with noise discrimination.

3. Next thing I have noticed, that never happend on different softphone:
When I start phone call its ok, but during phone call delays are getting longer and longer that after 3 minutes they are about 3 seconds. Have you noticed also?
And Im convinced it is not because of network delay, cos it is in the same inner network and it alwasy works good with other softphones.

Back to Top View tomach's Profile Search for other posts by tomach
 
support
Administrator
Administrator


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

tomach,

Item 1:
The G729/G729A codec implementation in the media engine does not support echo cancellation as applied to transmitted and received RTP media.

Normally the PSTN gateway must handle phone line echo coming from the central switching office. If the PSTN gateway doesn’t handle line echo properly then you may hear echo as you describe.

We have had requests in the past to implement software based line echo cancellation but it is not yet available. Because you have full access to received and transmitted RTP media packets, you can add any echo cancellation processing you require at your own discretion.


Item 2:
We need a more detailed description regarding the test phone calls you are making.


Item 3:
Regarding built up delays in audio:

We have had another report regarding a delay issue. In our testing, we have seen that on some PCs, record and playback times for the multimedia hardware are not the same. This may cause these issues. The worst case default rx or tx delay would be 1.28 seconds. You can reduce this max delay if you specify a value of 64 or less for the MaxMixerLinebuffers values in the START_SIP_TELEPHONY_PARAMS structure that gets passed to the media engine when it is started. We are looking into this.


We normally use the current media engine in VOIP apps this way:

1)
Enable G729 for all lines.

2)
Enable tx noise discrimination (this is the same as tx VAD) for each phone line. This removes any tx built up audio delays due to multimedia hardware timing not corresponding to 20Ms block times.

3)
Enable RTP keep-alive (solves media related timeout issues).

4)
Application performs simple VAD on received phone line RTP media. Dump all received RTP media if signal level falls below a set point. This minimizes rx audio delays that may build up.

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


Joined: February 23 2007
Location: Poland
Posts: 22
Posted: March 20 2007 at 6:03am | IP Logged Quote tomach

Hello!

Here are my all settings.

SetSilenceDecay(pCPhoneBase->hSipEngine,300);
SetNoiseThreshold(pCPhoneBase->hSipEngine,200);
SetNoiseDiscriminationEnableState(pCPhoneBase->SipEngine, TRUE);

status = EnableKeepAliveTransmissions(pCPhoneBase->hSipEngine, FALSE,TRUE,10000);

My problem:

When I call to other JPhone, which is registered to sipx, (using aLaw). At the beggining of call everythig works fine. After several minutes delays 2-3 seconds comes and whats more echo appears. Delays appears only when I talk (side which started call), when other side talks there is no delay.

My question is:
Can you tell me exactly which parameters shoudl i set and where? To get best quality and no delays?
JPhone do not make delays, because i tested it before.

PS. I was trying to changed settings by myslef but it didnt work as I wanted.

Best Regards,



Back to Top View tomach's Profile Search for other posts by tomach
 

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