Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add code block for some examples

...

This CDR shows that the phone was put on hold twice with hold start and stop time.

Code Block
themeEmacs
variable_hold_events: [{{1347487292379229,1347487293856872},{1347487288539686,1347487290757780}}]

...

 

hangup_complete_with_xml

...

By the way, you'll be unable to rewrite the hangup cause for a bridge that gets a 180 or 183 packet from the gateway before getting a 4xx, 5xx or 6xx packet (because those bridges don't 'fail'). This happens with SIP providers that give a 183 Session Progress before a 404 Not Found if the PSTN number dialled doesn't exist.

Usage:

Code Block
languagexml
themeEmacs
<extension name="nothing_left" continue="true">
  <condition break="always">
    <action application="set" data="proto_specific_hangup_cause=sip:503"/>
    <action application="hangup"/>
  </condition>
</extension>

...

 

Example:
SIP Response Map

...

Code Block
languagexml
themeEmacs
 <extension name="from_gw_to_internal">
     <condition field="destination_number" expression="^(.*)$">
       <action application="set" data="hangup_after_bridge=true"/>
       <action application="set" data="continue_on_fail=19"/>
       <action application="bridge" data="{sip_cid_type=none}sofia/gateway/gw/$1"/>
       <action application="transfer" data="480to503"/>
     </condition>
   </extension>

...


   <extension name="480to503">
     <condition field="${proto_specific_hangup_cause}" expression="<a href="sip:480">sip:480">
       <action application="set" data="sip_ignore_remote_cause=true"/>
       <action application="respond" data="503"/>
       <action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/>
     </condition>
   </extension>

...

 

last_bridge_hangup_cause

...

<X-PRE-PROCESS cmd="set" data="auto_hunt=true"/>

Example:

Code Block
languagexml
themeEmacs
<extension name="do_xfer">
  <condition field="destination_number" expression="^.*$">
    <action application="set" data="auto_hunt=true"/>
    <action application="transfer" data="333"/>
  </condition>
</extension>

<extension name="333">
  <condition field="destination_number" expression="^333$">
    <action application="info"/>
  </condition>
</extension>

...

 

bridge_early_media

By default this is false. Set to true, this makes the bridge use the live audio from the b-leg as ringback to the a-leg. Setting bridge_early_media=true means the early media will be buffered.

...