You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用SIP/{Number}@{Provider}格式呼叫时如何添加transport=udp参数

Fix Missing transport=udp in SIP INVITE URI for SIP/{Number}@{Provider} Dial Format

Got it, let's tackle this issue where your SIP/{Number}@{Provider} dial format isn't including the transport=udp parameter in the SIP INVITE request URI, even though the SIP/{Provider} format works fine. Here are a few straightforward solutions depending on your PBX setup (I'll use Asterisk examples since it's the most common, but the logic applies to most systems):

  • Explicitly append the transport parameter in your dial plan
    If you're using a dial plan rule that constructs the SIP URI directly, just add ;transport=udp to the end of the target. For example, if your original rule looks like this:

    exten => _X.,1,Dial(SIP/${EXTEN}@{Provider})
    

    Update it to:

    exten => _X.,1,Dial(SIP/${EXTEN}@{Provider};transport=udp)
    

    This forces the transport parameter to be included every time this dial pattern is used, no matter the format.

  • Set a default transport for your SIP provider
    Head into your SIP configuration file (like sip.conf for Asterisk) and add the transport=udp parameter to your provider's peer definition. This makes UDP the default transport for all calls to that provider, so the parameter will automatically be added to the INVITE URI regardless of the dial format you use. Example:

    [Provider]
    type=peer
    host=your-provider-domain.com
    transport=udp
    ; Keep your existing config parameters here
    
  • Use dial plan functions for dynamic parameter addition (for advanced cases)
    If you need more flexibility (like switching transport protocols based on conditions), you can build the URI dynamically. In Asterisk, this would look like:

    exten => _X.,1,Set(TARGET=SIP/${EXTEN}@{Provider})
    exten => _X.,n,Set(TARGET=${TARGET};transport=udp)
    exten => _X.,n,Dial(${TARGET})
    

    This lets you add extra logic before dialing if needed.

The core idea here is ensuring the transport=udp parameter is either hardcoded into your dial string or set as a default for the provider. Most SIP systems won't automatically add this parameter when you include a number in the URI, so explicit configuration is the way to go.

内容的提问来源于stack exchange,提问作者Abhinav Nimesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:09:51