Dialing Fashions
dial an internal address
originate sofia/internal/%${local_ip_v4} 2333
originate user/1000 2333
dial an external address via SIP end point
originate sofia/gateway/abcd.com/12345678 2333
originate sofia/gateway/abcd.com/alice@registereddomain.com 2333
dial an external address via SIP trunk

sip trunk has address( on the other end.

originate sofia/external/12345678@;transport=tcp 2333
enforce a outbound proxy
originate sofia/internal/alice@bar.com;fs_path=proxy.foo.com
call a dialplan extension from CLI
the configuration of fakecall in dialplan/default.xml
<context name="default">
   <extension name="fakecall">
     <condition field="destination_number" expression="^fakecall$">
       <action application="lua" data="lua/helloworld.lua test $1"/>

then in CLI:
originate loopback/fakecall 1000




define outbound proxy


{sip_route_uri=sip:ip_of_sip_proxy:5060}sofia/some_profile/sip:some_user <at> mydomain.com

<param name="outbound-proxy" value="sip:ip_of_sip_proxy:5060"/>

<action application="bridge" data="sofia/internal/u...@target.com;fs_path=sip:some.proxy.com"/>

<action application="bridge" data="${sofia_contact($${sip_profile}/${dialed_ext}@$${domain})}"/>
for contact


<variable name="sip-force-contact" value="sip:1011 at"/>

add/strip headers


caller ID


The PBX differentiates between two numbers that need to be presented on the trunk.
- The first number is the "display" number. This number is the number that the user should see on the display of the phone. In the case of a redirected call, this number would be the original caller-ID that the PBX saw on the incoming call.
- The second number is the "network" number. That number is the number that the provider wants to see for billing purposes. in the re-direction case, it is the party who starts the transfer process.

Over the last couple of years, different providers developed different ways to represent the two numbers:

  • RFC3325 describes a way to represent these two numbers. In most cases it makes sense to use the "P-Asserted-Identity" header. In this case, the "From" header in the INVITE represents the display number, while the "P-Asserted-Identity" header has the network number.
  • A similar representation can be done with the "P-Preferred-Identity" header. The PBX only changes the name of the header from "P-Asserted-Identity" to "P-Preferred-Identity"; the rest stays the same like in the first method.
  • "No Indication" just discards the display number and uses only the network number in the "From" header. This method is a fallback when the provider cannot deal with any other method. The disadvantage here is clearly that any redirection information gets lost.
  • The "Remote-Party-ID" is described in a draft that expired years ago; however there is still a lot of equipment outside that is supporting this method. In this case, the "From" header in the INVITE represents the network number, while the "P-Asserted-Identity" header has the display number.
  • The method "RFC3325, but don't hide" should not be used. It is used in environments where the fields got mixed up, which is causing even more confusion.




Send no extra caller id info: 
{sip_cid_type=none}sofia/default/[hidden email] 

Send RPID (default) 
{sip_cid_type=rpid}sofia/default/[hidden email] 

Send P-XXX-Identity 
{sip_cid_type=pid}sofia/default/[hidden email] 

Send RPID with chosen content 
{sip_cid_type=rpid,origination_caller_id_name=test,origination_caller_id_number=1234}sofia/default/[hidden email] 

Send RPID with chosen content and privacy flags (+ delimited, none to clear all flags)
{sip_cid_type=rpid,origination_caller_id_name=test,origination_caller_id_number=1234,origination_privacy=screen+hide_name+hide_number}sofia/default/[hidden email] 

Also the privacy app on the inbound leg controls the remaining contents of the RPID and Privacy headers.
<!--<action application="set" data="sip_h_P-Asserted-Identity=tel:+1xxxxxxxx"/>-->        
        <action application="bridge" data="{sip_cid_type=rpid,origination_caller_id_name=+1xxxxxxxx,origination_caller_id_number=+1xxxxxxxx}sofia/gateway
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License