Skip to content

NethVoice: TIM Trunk Compatibility and Dialplan Adjustments #7321

@andrea-marchionni

Description

@andrea-marchionni

🔧 Configuration Requirements for TIM Trunk

To ensure full compatibility with the TIM SIP trunk, the following changes are required on both the phone configuration and the Asterisk dialplan:


📞 Phone Configuration

  1. Codec Prioritization (G729):

    • Provisioned phones must prioritize the G729 codec to ensure it is used as the primary codec for outgoing calls.
    • Action Required: Tancredi must provide a phone template that sets G729 as the first codec in priority order.
    • NethVoice Configuration: The G729 codec must be enabled in FreePBX under the codec settings, ensuring consistency across the system and propagation to the TIM trunk.

📜 FreePBX Dialplan Modifications

  1. Incorrect SIP Response for Unregistered Extensions:

    • Previously, when an incoming call was routed to an unregistered extension, the system responded with a 6XX SIP error, which is formally incorrect.
    • Fix: The dialplan in macro-exten-vm was updated to return cause 20 (Subscriber absent) instead, as shown below:
    exten => _s-!,1,GotoIf($["${IVR_RETVM}"="RETURN" & "${IVR_CONTEXT}"!=""]?exit,1)
    exten => _s-!,n,Playtones(congestion)
    exten => _s-!,n,HangUp(20)
    
    ; Previous (incorrect) implementation:
    ; exten => _s-!,1,GotoIf($["${IVR_RETVM}"="RETURN" & "${IVR_CONTEXT}"!=""]?exit,1)
    ; exten => _s-!,n,Playtones(congestion)
    ; exten => _s-!,n,Congestion(10)
    
  2. Auto-answer Interference with Call Forwarding:

    • When handling direct DID calls that require diversion, enabling auto-answer on the inbound route was necessary to preserve audio.
    • However, this behavior caused internal calls to be answered prematurely, before the actual recipient responded.
    • Fix: In macro-dial-one, insert an Answer() directive only when the call forward (CF) logic is active, ensuring that auto-answer is applied only in appropriate call diversion scenarios.

Image

After further tests, it is necessary to also add ringing() as in the figure:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethvoiceBug or features releted to the NethVoice project

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions