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(123.34.203.23) on the other end.
originate sofia/external/12345678@123.34.203.23;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"/>
</condition>
</extension>
then in CLI:
originate loopback/fakecall 1000
ref
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge
misc
http://wiki.freeswitch.org/wiki/Example_Offsite_phones
define outbound proxy
http://permalink.gmane.org/gmane.comp.telephony.freeswitch.user/42676
{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
http://www.mail-archive.com/freeswitch-users@lists.freeswitch.org/msg16594.html
<variable name="sip-force-contact" value="sip:1011 at 10.0.0.2:5060"/>
add/strip headers
http://wiki.freeswitch.org/wiki/Mod_sofia#Adding_Request_Headers
caller ID
http://kiwi.pbxnsip.com/index.php/Outbound_Calls_on_Trunk
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.
http://wiki.snomone.com/index.php?title=Outbound_Calls
http://excelsupport.dialogic.com/imgpubs/webhelp/Description/SIP/sip_privacy.htm
http://www.cisco.com/en/US/docs/voice_ip_comm/pgw/9/feature/module/9.7_3_/SIPrp973.pdf
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