Media delay / re-invite issue with unsupported VoIP provider

Discussion in '3CX Phone System - General' started by mit, Jan 4, 2010.

Thread Status:
Not open for further replies.
  1. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Hi,

    We have been running 3CX for a couple of months now with great success with the exception of one issue. This is a delay in the media transmission when media is routing via the 3cx server. This delay is around 300ms in our setup which is enough to make conversation awkward.

    We have tried to bypass the 3CX server for the media, and this certainly fixes the issue with delay, but we then get an issue with transfers. When we try a transfer out to the VoIP provider we get a 481 "call transaction does not exist" back. We believe this to be because while the call id on the re-invite matches, our VoIP provider is rejecting the call because the contact info or some other field does not match (we are not certain of this though).

    So this leads me to a couple of questions for the group:

    1) has anyone experieced similar issues with media delay when routing media through the 3CX server or is this likely to be a configuration issue ?

    2) any thoughts on how to make transfers work when bypassing the 3CX server for media (everything else seems to work fine, just transfers that are an issue) ?

    A few more details:

    > 3CX is running on VMWare ESX Enterprise 3.5
    > Network latency between phone and 3CX is <1ms
    > Network latency between 3CX and VoIP provider is 2ms
    > Phones are running dynamic jitter buffers min of 0ms max 100ms normal 20ms
    > VoIP provider is running Nextone SBC's version 4.0
    > media delay (when looping a call in and out of a phone on the 3CX via the VoIP provider, but not routing media) is about 50ms
    > in the same setup above, but routing the media via the 3CX, about 150ms gets added per leg of the call, therefore total delay of about 350ms is apparent.

    Any thoughts much appreicated.
     
  2. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Re: Media delay / re-invite issue

    Could you please add objective information that will highlight the delay of traffic on PBX host?
    Could you please provide media server logs for "good" and "bad" calls?

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Re: Media delay / re-invite issue

    Not sure what objective information I can provide for this. The way I identified this was to run a packet capture of a port mirror on the interface out to the server. On this trace I have the RTP coming from the source handset to the 3CX server and from the 3CX server to the VoIP provider. When playing the RTP streams there is an obvious delay in the media when comparing these legs (there was also an obvious delay when making the actual call). I have inserted an image of the wireshark player with the timestamps aligned where it is possible to see this delay below:


    This above capture is taken from a single interface on the switch to which the 3CX server is connected. I am only showing one leg of the RTP, although the same delay is visible on the RTP in the other direction.

    In terms of logs from the media server. I have taken a look and cannot actually find any on the server. I did not configure this server, so maybe it is not-standard, but there appear to be no (recent) log files anywhere on the filesystem.

    Regards good calls and bad calls. Just to clarify that all calls through the 3CX server are subject to this delay (with the exception of internal calls between handsets). Currently I can remove the delay by enabling re-invites on the VoIP provider's which will change the mode of the media server so RTP is routed directly. I can confirm this takes place, as when enabled I am unable to capture the RTP from the port mirror used above.

    Thanks
     

    Attached Files:

  4. danj

    Joined:
    Oct 26, 2007
    Messages:
    16
    Likes Received:
    0
    Re: Media delay / re-invite issue

    Hey Mit,

    Media Server logs are located here:

    C:\Documents and Settings\All Users\Application Data\3CX\Data\Logs
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Re: Media delay / re-invite issue

    Perfect, thanks for that, I rather foolishly didn't think to search in hidden folders - I have set logging to verbose, restarted and run another test call.

    I don't get anything in the 3CXmediaserver.log, but do in the 3CXmediaserver.trace.log, which I have attached. I made a couple of calls, both successful, and both with delay. There may have been some other activity on the system at the time. To be honest, the log isn't enormously meaningful to me (in terms of attempting to identify a potential source of RTP delay), but perhaps someone else can shed some light.

    Thanks.
     

    Attached Files:

  6. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Re: Media delay / re-invite issue

    The names of log files are 3CXMediaServer.trace.log and 3CXMediaServer.log
    Set the log level to "Verbose" and then restart 3CX Media Server service.
    Make a call. It will be good if duration of call will be ~1-2 min. If you add captures of network traffic on PBX host it will make picture more clear.
    I will be glad to look on wireshark captures and logs for described situation.

    In any case, media server tries to leash delay in 100ms range (internaly) and compensate jitter and other timing issues. Also, transcoding service is required in situation which is described in your original post (problems related to transfer, no music on hold, unexpected behavior of attendant transfer etc...).
    It is the cost of this service, sorry.

    By the way, there is only one network hop in case of "by-pass" and 3 hops in case of "transcoding mode". In addition, there is a loop over "switch-server-virtual machine-PBX-virtual machine-server-switch" and the traffic is not a "ping request" as well...

    That's all :)

    P.S. basing on information provided by the log - the quality of RTP streams is quite good. Could you please send me additional information? ( it is not "mandatory" :) )
    Thanks :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. wzaatar

    Joined:
    Aug 1, 2007
    Messages:
    90
    Likes Received:
    0
    Re: Media delay / re-invite issue

    I propose you bypass the Media Server all in all by treating all calls as internal (Adding a LocalSubnets= 0.0.0.0/0 in your custom parameters). The Phone/ATA should be able to handshake with your VoIP provider and 3CX will one be used for initial signaling only.

    My 2 cents,

    W.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Re: Media delay / re-invite issue

    Thanks for the replies.

    Given the suggestion that there is an inherent delay when using the media server (approx 100ms), it seems that there is little point in progressing with diagnosing that and trying to reduce it.

    To be honest, I would far rather do as suggested and bypass the media server entirely. However, I have already done this, but then experience the other issue I raised in the initial post. That is a 481 "call transaction does not exist" back from my VoIP provider when attempting to transfer. At a low traffic time I will try the suggestion of adding a local networks entry to the customer parameters and then switch on "supports reinivites" to bypass the media, but is this likely to resolve the 481 issue with transfers ?

    If not, has anyone had this 481 problem before that could suggest where the issue might be ?

    Thanks
     
  9. wzaatar

    Joined:
    Aug 1, 2007
    Messages:
    90
    Likes Received:
    0
    Re: Media delay / re-invite issue

    Hello again,

    It's all hardware dependent and VoiP provider dependent. In my case, I use Grandstream and Nokia products, in terms of providers; tried many and in all cases had no problems with re-invites.

    Please post back outcomes, would be interesting.

    Cheers,

    Wadih
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Re: Media delay / re-invite issue

    ok, I have run a few more tests, focussing on trying to get transfers working with the media bypassing the 3CX media server.
    I have captured some data under the following conditions:

    the two extensions and the voip provider are configured with
    > reinvites enabled
    > replaces disabled (I have also tried with this setting enabled)
    > pbx routes media disabled

    I ran a test of :
    > Call in from my mobile (447769XXXXXX) to DDI of extension 4155 (44207XXXXXXX)
    > Call answered then put on hold
    > New call made from extension 4155 to extension 4207
    > Call answered on extension 4207
    > initiated transfer from extension 4155

    The result was :
    > Extension being transferred to disconnects
    > My mobile remains connected, although the music on hold stops, I just get dead air.
    > wireshark shows a 481 coming back from the SBC on receipt of the invite to invoke the transfer

    I have included some of the data captured below, in case anyone has any ideas what is going on. Obviously the SBC does not like something about the invite from the 3CX server, even though the call id's match.

    Here is the 3CX server log for the series of calls:
    Code:
    18:50:18.629  [MS105000] C:12036.1: No RTP packets were received:remoteAddr=10.130.1.23:36278,extAddr=0.0.0.0:0,localAddr=10.129.10.10:7180
    18:50:18.270  [CM503008]: Call(12036): Call is terminated
    18:50:18.160  [CM503008]: Call(12037): Call is terminated
    18:50:18.129  Relpaces: 790656966@10.129.10.50;to-tag=8e6a3e0c;from-tag=1877794867
    18:50:18.129  Refer: from=<sip:4155@10.129.10.10>;tag=1697407869; to="TMF:"<sip:+447769XXXXXX@10.129.10.10:5060>;tag=514b2852; RefTo=<sip:4207@10.129.10.10?Replaces=790656966%4010.129.10.50%3Bto-tag%3D8e6a3e0c%3Bfrom-tag%3D1877794867>
    18:50:16.082  Session 698833 of leg C:12037.1 is confirmed
    18:50:15.723  [CM503007]: Call(12037): Device joined: sip:4207@10.129.10.124:5062
    18:50:15.723  [CM503007]: Call(12037): Device joined: sip:4155@10.129.10.50:5062
    18:50:15.707  [MS210007] C:12037.1:Answer provided. Connection(by pass mode): 10.129.10.124:11790(11791)
    18:50:15.707  [MS210001] C:12037.2:Answer received. RTP connection[unsecure]: 10.129.10.124:11790(11791)
    18:50:15.707  Remote SDP is set for legC:12037.2
    18:50:13.488  [CM505001]: Ext.4207: Device info: Device Identified: [Man: Yealink;Mod: T28;Rev: General] Capabilities:[reinvite, no-replaces, unable-no-sdp, no-recvonly] UserAgent: [T28 2.41.23.2] PBX contact: [sip:4207@10.129.10.10:5060]
    18:50:13.488  [CM503002]: Call(12037): Alerting sip:4207@10.129.10.124:5062
    18:50:13.160  [CM503025]: Call(12037): Calling Ext:Ext.4207@[Dev:sip:4207@10.129.10.124:5062]
    18:50:13.160  [MS210006] C:12037.2:Offer provided. Connection(by pass mode): 10.129.10.50:11792(11793)
    18:50:13.113  [CM503004]: Call(12037): Route 1: Ext:Ext.4207@[Dev:sip:4207@10.129.10.124:5062]
    18:50:13.113  [CM503010]: Making route(s) to <sip:4207@10.129.10.10>
    18:50:13.113  [MS210000] C:12037.1:Offer received. RTP connection: 10.129.10.50:11792(11793)
    18:50:13.113  Remote SDP is set for legC:12037.1
    18:50:13.113  [CM505001]: Ext.4155: Device info: Device Identified: [Man: Yealink;Mod: T28;Rev: General] Capabilities:[reinvite, no-replaces, unable-no-sdp, no-recvonly] UserAgent: [T28 2.41.23.2] PBX contact: [sip:4155@10.129.10.10:5060]
    18:50:13.113  [CM503001]: Call(12037): Incoming call from Ext.4155 to <sip:4207@10.129.10.10>
    18:50:13.098  [CM500002]: Info on incoming INVITE:
      INVITE sip:4207@10.129.10.10 SIP/2.0
      Via: SIP/2.0/UDP 10.129.10.50:5062;branch=z9hG4bK1932363040
      Max-Forwards: 70
      Contact: <sip:4155@10.129.10.50:5062>
      To: <sip:4207@10.129.10.10>
      From: "TMF"<sip:4155@10.129.10.10>;tag=1877794867
      Call-ID: 790656966@10.129.10.50
      CSeq: 21 INVITE
      Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
      Proxy-Authorization: Digest username="4155",realm="3CXPhoneSystem",nonce="414d535c0156bde400:6231de669273c1b11035d22be5012484",uri="sip:4207@10.129.10.10",response="e99a748e3fb96aa42cf19164fc49bbca",algorithm=MD5
      User-Agent: T28 2.41.23.2
      Allow-Events: talk, hold, conference, refer, check-sync
      Content-Length: 0
      
    18:50:10.738  [MS210003] C:12036.2:Answer provided. Connection(transcoding mode[unsecure]):10.129.10.10:7182(7183)
    18:50:10.738  [MS210001] C:12036.1:Answer received. RTP connection[unsecure]: 10.130.1.23:36278(36279)
    18:50:10.738  Remote SDP is set for legC:12036.1
    18:50:10.598  [MS210002] C:12036.1:Offer provided. Connection(transcoding mode): 10.129.10.10:7180(7181)
    18:50:10.598  [MS210000] C:12036.2:Offer received. RTP connection: 10.129.10.50:11790(11791)
    18:50:10.598  Remote SDP is set for legC:12036.2
    18:50:09.317  Session 698827 of leg C:12036.1 is confirmed
    18:50:09.239  [CM503007]: Call(12036): Device joined: sip:4155@10.129.10.50:5062
    18:50:09.223  [CM503007]: Call(12036): Device joined: sip:10.130.1.8:5060
    18:50:09.223  [MS210007] C:12036.1:Answer provided. Connection(by pass mode): 10.129.10.50:11790(11791)
    18:50:09.223  [MS210001] C:12036.2:Answer received. RTP connection[unsecure]: 10.129.10.50:11790(11791)
    18:50:09.223  Remote SDP is set for legC:12036.2
    18:50:08.114  [CM505001]: Ext.4155: Device info: Device Identified: [Man: Yealink;Mod: T28;Rev: General] Capabilities:[reinvite, no-replaces, unable-no-sdp, no-recvonly] UserAgent: [T28 2.41.23.2] PBX contact: [sip:4155@10.129.10.10:5060]
    18:50:08.114  [CM503002]: Call(12036): Alerting sip:4155@10.129.10.50:5062
    18:50:07.598  [CM503025]: Call(12036): Calling Ext:Ext.4155@[Dev:sip:4155@10.129.10.50:5062]
    18:50:07.598  [MS210006] C:12036.2:Offer provided. Connection(by pass mode): 10.130.1.23:36278(36279)
    18:50:07.567  [CM503004]: Call(12036): Route 1: Ext:Ext.4155@[Dev:sip:4155@10.129.10.50:5062]
    18:50:07.567  [CM503010]: Making route(s) to <sip:4155@10.129.10.10:5060>
    18:50:07.567  [MS210000] C:12036.1:Offer received. RTP connection: 10.130.1.23:36278(36279)
    18:50:07.567  Remote SDP is set for legC:12036.1
    18:50:07.567  [CM505003]: Provider:[voipprovider1] Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [] PBX contact: [sip:10.129.10.10:5060]
    18:50:07.551  [CM503001]: Call(12036): Incoming call from +447769XXXXXX@(Ln.10001@voipprovider1) to <sip:4155@10.129.10.10:5060>
    18:50:07.551  [CM503012]: Inbound out-of-office hours rule (TMF) for 10001 forwards to DN:4155
    18:50:07.551  Looking for inbound target: called=44207XXXXXXX; caller=+447769XXXXXX
    18:50:07.535  [CM500002]: Info on incoming INVITE:
      INVITE sip:44207XXXXXXX@10.129.10.10 SIP/2.0
      Via: SIP/2.0/UDP 10.130.1.8:5060;branch=z9hG4bK03432438c90c75a300a60c683bdd95d1
      Max-Forwards: 67
      Contact: <sip:+447769XXXXXX@10.130.1.8:5060>
      To: "44207XXXXXXX"<sip:44207XXXXXXX@10.130.1.8>
      From: <sip:+447769XXXXXX@10.130.1.8>;tag=3471879004-911228
      Call-ID: 89218256-3471879004-911219@UK1-SBC-07-1.mydomain.com
      CSeq: 1 INVITE
      Expires: 300
      Session-Expires: 3700;refresher=uac
      Allow: INVITE, BYE, OPTIONS, CANCEL, ACK, REGISTER, NOTIFY, INFO, REFER, SUBSCRIBE, PRACK, UPDATE
      Call-Info: <sip:10.130.1.8>;method="NOTIFY;Event=telephone-event;Duration=1000"
      Supported: timer, 100rel
      P-Asserted-Identity: "447769XXXXXX"<sip:447769XXXXXX@10.130.1.104>
      Content-Length: 0

    Here is a wireshark call graph of the series of calls. This includes the 2 extensions involved, the 3CX server and also the SBC the 3CX server is communicating with. The identifications are as follows:
    10.129.10.50 : extension recieving initial call (4155)
    10.129.10.10 : 3CX server
    10.129.10.124 : extension being transferred to (4207)
    10.130.1.8 : SBC signalling address
    10.130.1.23 : SBC media address
    (this will probably need to be pasted into a window that does not wrap text to read clearly)

    Code:
    Conv.| Time    | 10.130.1.8                            | 10.129.10.50                          | 10.129.10.124                         |
         |         |                   | 10.129.10.10      |                   | 10.130.1.23       |                   
    0    |3.759    |         INVITE SDP ( g711A g711U g729 g723 telephone-e...t)          |                   |                   |                   |SIP From: sip:+447769XXXXXX@10.130.1.8 To:sip:44207XXXXXXX@10.130.1.8
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |3.846    |                   |         INVITE SDP ( g711A g711U g729 g723 telephone-e...t)          |                   |                   |SIP From: sip:+447769XXXXXX@10.129.10.10:5060 To:sip:4155@10.129.10.10
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |3.846    |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |3.872    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |4.319    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |4.428    |         180 Ringing                   |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |5.442    |                   |         200 OK SDP ( g711A telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |5.494    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |5.494    |         200 OK SDP ( g711A telephone-event)          |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |5.531    |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |6.823    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |6.925    |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |6.925    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |6.926    |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |6.947    |                   |         RTP (g711A)                   |                   |                   |RTP Num packets:1  Duration:0.000s SSRC:0x3E2E750E
         |         |                   |(7180)   <--------------------------------------  (36278)  |                   |
    0    |6.953    |         200 OK SDP ( g711A telephone-event)          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |6.970    |                   |         RTP (g711A)                   |                   |                   |RTP Num packets:376  Duration:7.508s SSRC:0x2E21
         |         |                   |(7180)   -------------------------------------->  (36278)  |                   |
    0    |7.049    |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |7.050    |                   |         200 OK SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |7.147    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.057    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP From: sip:4155@10.129.10.10 To:sip:4207@10.129.10.10
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    2    |9.158    |                   |         407 Proxy Authentication Required          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    2    |9.169    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    2    |9.320    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP From: sip:4155@10.129.10.10 To:sip:4207@10.129.10.10
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |9.399    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)    |                   |SIP From: sip:4155@10.129.10.10:5060 To:sip:4207@10.129.10.10
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    3    |9.429    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.430    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |9.705    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.820    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |11.930   |                   |         200 OK SDP ( g711A telephone-event)               |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    3    |12.039   |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |12.040   |                   |         200 OK SDP ( g711A telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    2    |12.305   |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.353   |                   |         REFER     |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |14.477   |                   |         202 Accepted                  |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.477   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.477   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.478   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |14.478   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |14.478   |         INVITE    |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |14.479   |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |14.480   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |14.481   |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |14.503   |         BYE       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |14.504   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |14.504   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |14.521   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.646   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |14.701   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.888   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |14.986   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |15.008   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |15.058   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |17.744   |         BYE       |                   |                   |                   |                   |SIP Request
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |17.846   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    Conv.| Time    | 10.130.1.8                            | 10.129.10.50                          | 10.129.10.124                         |
         |         |                   | 10.129.10.10      |                   | 10.130.1.23       |                   
    0    |3.759    |         INVITE SDP ( g711A g711U g729 g723 telephone-e...t)          |                   |                   |                   |SIP From: sip:+447769XXXXXX@10.130.1.8 To:sip:44207XXXXXXX@10.130.1.8
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |3.846    |                   |         INVITE SDP ( g711A g711U g729 g723 telephone-e...t)          |                   |                   |SIP From: sip:+447769XXXXXX@10.129.10.10:5060 To:sip:4155@10.129.10.10
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |3.846    |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |3.872    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |4.319    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |4.428    |         180 Ringing                   |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |5.442    |                   |         200 OK SDP ( g711A telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |5.494    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |5.494    |         200 OK SDP ( g711A telephone-event)          |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |5.531    |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |6.823    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |6.925    |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |6.925    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |6.926    |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |6.947    |                   |         RTP (g711A)                   |                   |                   |RTP Num packets:1  Duration:0.000s SSRC:0x3E2E750E
         |         |                   |(7180)   <--------------------------------------  (36278)  |                   |
    0    |6.953    |         200 OK SDP ( g711A telephone-event)          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |6.970    |                   |         RTP (g711A)                   |                   |                   |RTP Num packets:376  Duration:7.508s SSRC:0x2E21
         |         |                   |(7180)   -------------------------------------->  (36278)  |                   |
    0    |7.049    |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |7.050    |                   |         200 OK SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |7.147    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.057    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP From: sip:4155@10.129.10.10 To:sip:4207@10.129.10.10
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    2    |9.158    |                   |         407 Proxy Authentication Required          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    2    |9.169    |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    2    |9.320    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)          |                   |                   |SIP From: sip:4155@10.129.10.10 To:sip:4207@10.129.10.10
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |9.399    |                   |         INVITE SDP ( g711A g711U g729 telephone-event)    |                   |SIP From: sip:4155@10.129.10.10:5060 To:sip:4207@10.129.10.10
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    3    |9.429    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.430    |                   |         100 Trying|                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |9.705    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |9.820    |                   |         180 Ringing                   |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |11.930   |                   |         200 OK SDP ( g711A telephone-event)               |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    3    |12.039   |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |12.040   |                   |         200 OK SDP ( g711A telephone-event)          |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    2    |12.305   |                   |         ACK       |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.353   |                   |         REFER     |                   |                   |                   |SIP Request
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |14.477   |                   |         202 Accepted                  |                   |                   |SIP Status
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.477   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.477   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |14.478   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |14.478   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |14.478   |         INVITE    |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |14.479   |         100 Trying|                   |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |14.480   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |14.481   |         ACK       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    0    |14.503   |         BYE       |                   |                   |                   |                   |SIP Request
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |14.504   |                   |         BYE       |                   |                   |                   |SIP Request
         |         |                   |(5060)   ---------------------------------------------------------->  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |14.504   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    3    |14.521   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <----------------------------------------------------------  (5062)   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.646   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    2    |14.701   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    1    |14.888   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |14.986   |                   |         NOTIFY    |                   |                   |                   |SIP Request
         |         |                   |(5060)   ------------------>  (5062)   |                   |                   |
    1    |15.008   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    1    |15.058   |                   |         200 OK    |                   |                   |                   |SIP Status
         |         |                   |(5060)   <------------------  (5062)   |                   |                   |
    ---------------------------------------------------------------------------------------------------------------------
    0    |17.744   |         BYE       |                   |                   |                   |                   |SIP Request
         |         |(5060)   ------------------>  (5060)   |                   |                   |                   |
    0    |17.846   |         481 Call/Transaction Does Not Exist          |                   |                   |                   |SIP Status
         |         |(5060)   <------------------  (5060)   |                   |                   |                   |


    And finally, I have attached a file with the SIP packets for the call ID of the call being transferred, which fails.

    As always, any thoughts much appreciated.
     

    Attached Files:

  11. comresource

    comresource Member

    Joined:
    May 22, 2009
    Messages:
    303
    Likes Received:
    0
    Re: Media delay / re-invite issue

    The odd thing I see is that the transfer INVITE has the following

    Code:
    From: <sip:4207@10.130.1.8>;tag=3a65841b
                SIP from address: sip:4207@10.130.1.8
    Which is the SBC address and not 3CX
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Nick Galea

    Nick Galea Site Admin

    Joined:
    Jun 6, 2006
    Messages:
    1,887
    Likes Received:
    190
    I suggest trying with a supported gateway first and then with a supported VoIP provider and see if the delay is still there.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Thanks to all for replies thus far, however, I am still not there yet !

    To summarise thus far:
    > I think we are resigned to the fact that we will encounter delay if we pass media through the 3CX server (based on some of the responses and our own tests)
    > Bypassing the the 3CX server for media works in every respect, except with transfers, where we have an inter-working issue between the 3CX server and an SBC also involved in the call flow. Re-invites from the 3CX server are getting rejected with a 481.

    Update:
    We have had some discussion with the SBC manufacturers and they have given us some information. As other replies have suggested there is an issue with the format of the invite, but not the IP address. The three invites involved in the call are below :

    Invite 1: from SBC to 3CX server to setup initial incoming call
    To: 44207XXXXXXX <sip:44207XXXXXXX@10.130.1.8>
    From: <sip:+447769XXXXXX@10.130.1.8>
    Call-ID: 89218256-3471879004-911219@UK1-SBC-07-1.mydomain.com

    Invite 2: from 3CX server to SBC to invite media back to play music on hold
    To: <sip:+447769XXXXXX@10.130.1.8>
    From: "44207XXXXXXX"<sip:44207XXXXXXX@10.130.1.8>
    Call-ID: 89218256-3471879004-911219@UK1-SBC-07-1.mydomain.com

    Invite 3: from 3CX server to SBC for actual call transfer, one assumes to setup media path direct to 4207 extension
    To: <sip:+447769XXXXXX@10.130.1.8>
    From: <sip:4207@10.130.1.8>
    Call-ID: 89218256-3471879004-911219@UK1-SBC-07-1.mydomain.com

    Apparently the SBC is rejecting this 3rd invite because the "from" is different to that in the original invite (although it is fine for "from" and "to" to be inverted, as one would expect given that the invites are coming from different sources, the content must match that of the original call). Rather than being "from" 44207XXXXXXX@10.130.1.8 it is "from" 4207@10.130.1.8 which was not in the original invite and therefore is causing the SBC to reject the call. The second invite (to bring the media back in for the music on hold) maintains the information from the original invite in the from field and that works fine.

    Does anyone know if there is any way of controlling the format of the "from" in the invite being sent from the 3CX server ?
     
  14. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    May I ask you why do you think so?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    Good question, the simple answer is because that is what I have been told by the SBC manufacturers. I have obviously gone back to them to ask them why but am awaiting a response.......

    In the interim, I have taken a quick look at RFC 3261 to see if I can find a potential reason, and it seems there may be one in terms of backward compatibility to RFC 2543 - see the extract below from section 12.2.1.1 of RFC 3261 which covers the format of a re-invite for what I believe is this type of call (section 12 is referenced from section 14 which seems to cover the specific example).

    Usage of the URI from the To and From fields in the original
    request within subsequent requests is done for backwards
    compatibility with RFC 2543, which used the URI for dialog
    identification. In this specification, only the tags are used for
    dialog identification. It is expected that mandatory reflection
    of the original To and From URI in mid-dialog requests will be
    deprecated in a subsequent revision of this specification.


    So it could be that the SBC is checking for this compliance in the invite. I am not sure if this has actually been deprecated in a later revision as it suggests may happen, but perhaps you could let me know whether you a complying with some later modifications to the RFC, or if the call flow the server is attempting is different from the one I have identified ?
     
  16. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    I am aware about requirements for backward compatibility, but we had no any SIP-1.0-only soft- or hardware, so we haven't care about that much.
    We had a press of requests for target refresh on transfers, and we have implemented it as a target-refreshing re-INVITE, as you can see. It was not supposed that such re-INVITE will be sent to provider, because vast majority of VoIP providers do not understand re-INVITEs correctly, so by default, they are bound to MS to exclude re-INVITE from the flow at all. All phones and PSTN gateways we support DO understand such re-INVITE. Though, many of them do not change displayed caller-id, but at least they do not drop a call.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    What do you think the chances are of getting a feature change that would support the backward compatible form of re-invite ?

    Incidently, if most VoIP providers do not support re-invites correctly, then does this mean that in most cases where 3CX users are using a VoIP provider, then the media is passing through the 3CX server and therefore is potentially subject to the same delay that we are experiencing ?
     
  18. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    Nobody has ever complained that 100 ms delay is noticeable, not speaking about annoying. A blink of an eye is 1/6 sec, which is ~166ms
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. mit

    mit

    Joined:
    Jan 4, 2010
    Messages:
    14
    Likes Received:
    0
    In our case it is certainly noticeable. Firstly the 100ms delay (in reality, in our case I think it is a bit longer than this) is incurred on each pass through the 3CX server, so on a conversation this adds a total additional delay of 200ms between parties speaking. Obviously any latency outside our network is additional and any jitter buffers at either end can add this, so in a typical example calling a number from the UK to the UK we might experience a media round trip delay of about 300ms.

    This probably makes what would normally sound like a local call in the UK have an equivalent delay to calling between the UK and West Coast US or thereabouts (and when calling from the UK to the US it is accordingly worse). In our situation, having moved all users over one weekend from traditional TDM based PBX to a fully IP solution we have had comments from almost all users mainly related to awkwardness in conversation, where one party inadvertantly talks over the other.

    I think the ITU reckons that the maximum acceptible end to end delay is 150ms, so on a call from the phone on my desk to another number in the same city my delay can be approaching this limit.

    What I guess is quite frustrating is that this delay is not necessary, there is no need for me to transocde this audio stream on the 3CX server, it can remain as IP until it hits the PSTN, where the transcoding can be performed by a device capable of doing so without significant delay.
     
  20. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    Sorry, I do not understand your topology. Specifically, I do not understand why RTP stream passes PBX twice on its way to PSTN gateway.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.