Jump to content

Loop Back


Recommended Posts

Attempting to get loop back working so if you dial another on-net so to speak DID that's on the PBX it will connect internally. 

I notice on loopback it wants to UPDATE the SIP Contact to say, 200@  i.e extension@rawip from the extension@domain original contact. 

I suspect my loop back calls are not working when testing because I have , Ignore packets that do not match a domain on the system turned on, is there a way to do it preserving the contact domain?

I can see otherwise its matching to the other domain no problem 





Link to comment
Share on other sites

4 hours ago, Vodia PBX said:

The host in the contact does not interfere with the domain check. This should be no problem. Do you see the call in the tenant call log?

I just get static and the call gets held up there for ever until ended on Domain A never shows up in Domain B logs

Trunk debug 9 on Domain A shows its matched the DID on Domain B 

Trunk debug 9 on Domain B shows nothing


[9] 19:36:50.282 TRUN: Dialplan: Simple match begin of 0877777777 to *

[9] 19:36:50.282 TRUN: Last message repeated 2 times

[9] 19:36:50.282 TRUN: Dialplan: Evaluating * against 0877777777@domainA.com

[5] 19:36:50.282 TRUN: Dialplan "loopback-test": Match 0877777777@domainA to sip:+61877777777@domainB;user=phone on Try Loopback trunk

[7] 19:36:50.283 MEDI: Port 345: Set codec preference count 2

[7] 19:36:50.283 MEDI: Port 346: Set codec preference count 2

[8] 19:36:50.283 MEDI: Port 346: state code from 0 to 100

[9] 19:36:50.283 MEDI: Port 346: Adding codec PCMA/8000 to available list

[9] 19:36:50.283 MEDI: Port 346: Update codecs preference size 2, available codecs size 2

[7] 19:36:50.283 MEDI: Port 346: Allocated ports 53646 and 53647

[8] 19:36:50.284 MEDI: Port 345: state code from 0 to 183

[8] 19:36:50.284 MEDI: Port 345: Ignore double SDP

[9] 19:36:50.284 MEDI: Port 345: Adding codec PCMA/8000 to available list

[9] 19:36:50.284 MEDI: Port 345: Update codecs preference size 2, available codecs size 2

[6] 19:36:50.284 MEDI: Port 345: Choose codec PCMA/8000

[6] 19:36:50.520 MEDI: Port 345: Sending RTP to my.wan.ip:49940, codec PCMA/8000

[7] 19:36:50.601 MEDI: Port 345: Set DTLS SRTP key for client

[9] 19:36:50.623 MEDI: Port 345: Received first RTP packet

Static so hangup,

[8] 19:36:58.967 MEDI: Port 345: Clearing port with SIP Call-ID kwegJ14w

[8] 19:36:58.969 MEDI: Port 346: state code from 100 to 487

[8] 19:36:58.969 MEDI: Port 346: Send hangup with reason bye

[8] 19:37:30.969    MEDI:    Port 346: Clearing port with SIP Call-ID be3cbe2b@pbx

Link to comment
Share on other sites

I think it might be because I am using non standard sip ports and its not factoring that in when doing the loopback? 

I forgot to look before but the PCAP does not define any SIP ports so it would be defaulting to 5060 ?

The loop back call user agent shows up as Vodia-WEBRTC, maybe as my attempts where vodia app.

Link to comment
Share on other sites

  • 1 month later...

After further testing the only way I could get loop back to work when the base system was on non-standard SIP ports was to also add the original ports back in to the "SIP Settings" page. Even with specifying the on the loopback trunk to use the nonstandard port it would not work.


Edit - Got it working on the standard port. I will post some doco as I was not able to find much to get this working.

Link to comment
Share on other sites

Inter domain dialling multi-tenant.

As I was not able to find good doco when attempting this, I have made my own notes to share. Obviously special considerations are needed for overlapping extension domains, which the standard doco talks about.

Ideally, I would like a way to only allow the alias/DID to be matched on the loop back not extension, mainly so when I dial the on-net tenant DID it goes internally, I don’t necessarily care about extension number to extension number but an option to pick would be nice. But I might be able to do that with, Use a list of expressions option for the inbound side matching. 


  • Using global tenant dial plans
  • This does not leverage a "try loop back" dial plan at all, not sure the danger but seems to be fine. 
  • No need to disable Loopback detection 

What I did,

  1. Create localhost domain
  2. Create trunk in localhost domain called on-net, sip gateway no registration, Outbound Proxy = sip: (or pbx custom sip port) with the following settings.
  3. aadr:
    analog: false
    behind_nat: false
    cobusy: 500 Line Unavailable
    codec_lock: false
    dis: false
    dtmf: false
    earlymedia: true
    expires: 3600
    failover: except_busy
    fraction: 128
    from_source: ppi
    global: true
    hf: {from}
    hru: {request-uri}
    ht: <{request-uri}>
    ice: false
    ignore_18x_sdp: true
    info_agent: false
    interoffice: false
    minimum: 10
    name: on-net
    outbound_proxy: sip:
    pidflo: false
    prack: false
    redirect: false
    reregister_dns: false
    rfcrtp: false
    ring180: false
    rtcpxr: false
    spam: false
    t38_enabled: false
    teams: false
    tel: true
    trusted: true
    type: gateway
    use_epid: false
    use_history: false
    use_uuid: false


  4. Edit your dial plans and place below emergency but above your normal region dial plans. 

As trunk on-net is set to fail-over except busy if no internal match is found it will flow as per the rest of the dial plan. 




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...