turn on the debug option in mod_cdr_csv and you will get something similar to the info app only at the end of the call<br><br><br><div class="gmail_quote">On Thu, Apr 16, 2009 at 3:19 AM, Mikael Aleksander Bjerkeland <span dir="ltr">&lt;<a href="mailto:mikael@bjerkeland.com">mikael@bjerkeland.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">El mié, 15-04-2009 a las 17:43 +0200, Mikael Bjerkeland escribió:<br>
<div><div></div><div class="h5">&gt; Hi,<br>
&gt;<br>
&gt; I have two scenarios I&#39;m having trouble figuring out and I&#39;d be happy<br>
&gt; if someone could tell me what I&#39;m doing wrong.<br>
&gt;<br>
&gt; 1. leg_delay_start=N not working<br>
&gt;<br>
&gt; I am trying to delay the origination of the second leg in a forked<br>
&gt; dial with the following:<br>
&gt;<br>
&gt; &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;user/<a href="mailto:mikael-nokia@voip.domain.com">mikael-nokia@voip.domain.com</a>,[leg_delay_start=10]openzap/1/a/99355151&quot;/&gt;<br>
&gt;<br>
&gt;<br>
&gt; However the second leg is called at exactly the same time as the first<br>
&gt; one. I am away from my testing environment right now, so I&#39;m sorry for<br>
&gt; not posting my logs. It appears to me that leg_delay_start is broken<br>
&gt; on at least rev 13013.<br>
&gt;<br>
&gt;<br>
&gt; 2. I&#39;d like to stop processing the dialplan after a bridge, but not on<br>
&gt; specific hangup causes. If I get a MEDIA_TIMEOUT hangup cause in the<br>
&gt; call I&#39;d like to continue in the dialplan. Currently I have the<br>
&gt; following:<br>
&gt;<br>
&gt;         &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;         &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>
&gt;         &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;user/<a href="mailto:mikael-nokia@voip.domain.com">mikael-nokia@voip.domain.com</a>&quot;/&gt;<br>
&gt;         &lt;!-- I will only get here if the first bridge is rejected or<br>
&gt; TODO: I get a MEDIA_TIMEOUT on it --&gt;<br>
&gt;         &lt;action application=&quot;bridge&quot; data=&quot;openzap/1/a/99355151&quot;/&gt;<br>
&gt;<br>
&gt;<br>
&gt; Any ideas on how to accomplish this?<br>
<br>
</div></div>I started testing this with the following dialplan:<br>
<br>
    &lt;extension name=&quot;mikael-nokia+fallback&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^503$&quot;&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br>
<div class="im">        &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>
        &lt;action application=&quot;bridge&quot;<br>
</div>data=&quot;user/<a href="mailto:mikael-nokia@fs.voip.domain.com">mikael-nokia@fs.voip.domain.com</a>&quot;/&gt;<br>
        &lt;action application=&quot;info&quot;/&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;followme_extension=99355151&quot;/&gt;<br>
        &lt;action application=&quot;execute_extension&quot;<br>
data=&quot;post_call_followme_check&quot;/&gt;<br>
        &lt;action application=&quot;hangup&quot;/&gt;<br>
      &lt;/condition&gt;<br>
    &lt;/extension&gt;<br>
<br>
  &lt;extension name=&quot;post_call_followme_check&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot;<br>
expression=&quot;^post_call_followme_check$&quot;/&gt;<br>
    &lt;condition field=&quot;${originate_disposition}&quot;<br>
expression=&quot;^MEDIA_TIMEOUT|$${continue_on_fail_causes}$&quot;<br>
break=&quot;on-true&quot;&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;1 Follow me transferring call<br>
because of orig disposition: ${originate_disposition}&quot;/&gt;<br>
      &lt;action application=&quot;transfer&quot; data=&quot;${followme_extension}&quot;/&gt;<br>
    &lt;/condition&gt;<br>
    &lt;condition&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;1 Follow me call ended normally<br>
with orig disposition: ${originate_disposition}.&quot;/&gt;<br>
      &lt;action application=&quot;hangup&quot;/&gt;<br>
    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br>
<br>
<br>
${originate_disposition} never has the value of MEDIA_TIMEOUT since the<br>
call was answered, which is absolutely correct, so what I am searching<br>
for now is how to get the actual hangup cause. The info app doesn&#39;t show<br>
MEDIA_TIMEOUT anywhere, but my logs show this:<br>
<br>
2009-04-16 10:02:34 [DEBUG] switch_ivr_bridge.c:377<br>
audio_bridge_thread() sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a><br>
ending bridge by request from read function<br>
2009-04-16 10:02:34 [DEBUG] switch_ivr_bridge.c:456<br>
audio_bridge_thread() Send signal<br>
sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a> [BREAK]<br>
2009-04-16 10:02:34 [DEBUG] switch_ivr_bridge.c:452<br>
audio_bridge_thread() BRIDGE THREAD DONE<br>
[sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>]<br>
2009-04-16 10:02:34 [DEBUG] switch_ivr_bridge.c:456<br>
audio_bridge_thread() Send signal<br>
sofia/internal/<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a> [BREAK]<br>
2009-04-16 10:02:34 [DEBUG] switch_core_state_machine.c:508<br>
switch_core_session_run() (sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>)<br>
State EXCHANGE_MEDIA going to sleep<br>
2009-04-16 10:02:34 [DEBUG] switch_core_state_machine.c:397<br>
switch_core_session_run() (sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>)<br>
Running State Change CS_HANGUP<br>
EXECUTE sofia/internal/<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a> info()<br>
2009-04-16 10:02:34 [DEBUG] switch_core_state_machine.c:448<br>
switch_core_session_run() (sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>)<br>
State HANGUP<br>
2009-04-16 10:02:34 [DEBUG] mod_sofia.c:315 sofia_on_hangup() Channel<br>
sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a> hanging up, cause:<br>
MEDIA_TIMEOUT<br>
2009-04-16 10:02:34 [DEBUG] mod_sofia.c:370 sofia_on_hangup() Sending<br>
BYE to sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a><br>
2009-04-16 10:02:34 [DEBUG] switch_core_state_machine.c:46<br>
switch_core_standard_on_hangup()<br>
sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a> Standard HANGUP, cause:<br>
MEDIA_TIMEOUT<br>
2009-04-16 10:02:34 [DEBUG] switch_core_state_machine.c:448<br>
switch_core_session_run() (sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>)<br>
State HANGUP going to sleep<br>
2009-04-16 10:02:34 [INFO] mod_dptools.c:946 info_function()<br>
CHANNEL_DATA:<br>
Channel-State: [CS_EXECUTE]<br>
Channel-State-Number: [4]<br>
Channel-Name: [sofia/internal/<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a>]<br>
Unique-ID: [d505477c-2a5c-11de-9175-4ba93d212d75]<br>
Call-Direction: [inbound]<br>
Presence-Call-Direction: [inbound]<br>
Answer-State: [answered]<br>
Channel-Read-Codec-Name: [G722]<br>
Channel-Read-Codec-Rate: [16000]<br>
Channel-Write-Codec-Name: [G722]<br>
Channel-Write-Codec-Rate: [16000]<br>
Caller-Username: [mikael-ekiga]<br>
Caller-Dialplan: [XML]<br>
Caller-Caller-ID-Name: [Mikael Bjerkeland]<br>
Caller-Caller-ID-Number: [mikael-ekiga]<br>
Caller-Network-Addr: [10.0.255.251]<br>
Caller-Destination-Number: [503]<br>
Caller-Unique-ID: [d505477c-2a5c-11de-9175-4ba93d212d75]<br>
Caller-Source: [mod_sofia]<br>
Caller-Context: [customers]<br>
Caller-Channel-Name: [sofia/internal/<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a>]<br>
Caller-Profile-Index: [1]<br>
Caller-Profile-Created-Time: [1239868906687578]<br>
Caller-Channel-Created-Time: [1239868906687578]<br>
Caller-Channel-Answered-Time: [1239868911327578]<br>
Caller-Channel-Progress-Time: [1239868907307602]<br>
Caller-Channel-Progress-Media-Time: [1239868911327578]<br>
Caller-Channel-Hangup-Time: [0]<br>
Caller-Channel-Transfer-Time: [0]<br>
Caller-Screen-Bit: [true]<br>
Caller-Privacy-Hide-Name: [false]<br>
Caller-Privacy-Hide-Number: [false]<br>
Other-Leg-Username: [mikael-ekiga]<br>
Other-Leg-Dialplan: [XML]<br>
Other-Leg-Caller-ID-Name: [Mikael Bjerkeland]<br>
Other-Leg-Caller-ID-Number: [21651012]<br>
Other-Leg-Network-Addr: [10.247.3.253]<br>
Other-Leg-Destination-Number: [<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>]<br>
Other-Leg-Unique-ID: [d50bf8c4-2a5c-11de-9175-4ba93d212d75]<br>
Other-Leg-Source: [mod_sofia]<br>
Other-Leg-Context: [customers]<br>
Other-Leg-Channel-Name: [sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>]<br>
Other-Leg-Screen-Bit: [true]<br>
Other-Leg-Privacy-Hide-Name: [false]<br>
Other-Leg-Privacy-Hide-Number: [false]<br>
variable_sip_received_ip: [10.0.255.251]<br>
variable_sip_received_port: [5065]<br>
variable_sip_via_protocol: [udp]<br>
variable_sip_authorized: [true]<br>
variable_sip_mailbox: [4723695000]<br>
variable_sip_auth_username: [mikael-ekiga]<br>
variable_sip_auth_realm: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_mailbox: [4723695000]<br>
variable_user_name: [mikael-ekiga]<br>
variable_domain_name: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_effective_caller_id_number: [21651012]<br>
variable_effective_caller_id_name: [Mikael Bjerkeland]<br>
variable_caller_id_number: [21651012]<br>
variable_caller_id_name: [Mikael Bjerkeland]<br>
variable_line_open_for_external_calls: [true]<br>
variable_room_number: [800]<br>
variable_user_context: [customers]<br>
variable_sip_from_user: [mikael-ekiga]<br>
variable_sip_from_uri: [<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a>]<br>
variable_sip_from_host: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_sip_from_user_stripped: [mikael-ekiga]<br>
variable_sip_from_tag: [942742a2-ca28-de11-854f-0015c583ee77]<br>
variable_sofia_profile_name: [internal]<br>
variable_sip_req_user: [503]<br>
variable_sip_req_uri: [<a href="mailto:503@fs.voip.domain.com">503@fs.voip.domain.com</a>]<br>
variable_sip_req_host: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_sip_to_user: [503]<br>
variable_sip_to_uri: [<a href="mailto:503@fs.voip.domain.com">503@fs.voip.domain.com</a>]<br>
variable_sip_to_host: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_sip_contact_user: [mikael-ekiga]<br>
variable_sip_contact_port: [5065]<br>
variable_sip_contact_uri: [<a href="http://mikael-ekiga@10.0.255.251:5065" target="_blank">mikael-ekiga@10.0.255.251:5065</a>]<br>
variable_sip_contact_host: [10.0.255.251]<br>
variable_channel_name: [sofia/internal/<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a>]<br>
variable_sip_call_id:<br>
[e82d42a2-ca28-de11-854f-0015c583ee77@mikael-xpsm1530]<br>
variable_sip_user_agent: [Ekiga/3.2.0]<br>
variable_sip_via_host: [10.0.255.251]<br>
variable_sip_via_port: [5065]<br>
variable_sip_via_rport: [5065]<br>
variable_max_forwards: [70]<br>
variable_presence_id: [<a href="mailto:mikael-ekiga@fs.voip.domain.com">mikael-ekiga@fs.voip.domain.com</a>]<br>
variable_switch_r_sdp: [v=0<br>
o=- 1239868973 1239868973 IN IP4 10.0.255.251<br>
s=Opal SIP Session<br>
c=IN IP4 10.0.255.251<br>
t=0 0<br>
m=audio 5090 RTP/AVP 9 8 117 0 116 101 120<br>
a=rtpmap:9 G722/8000/1<br>
a=rtpmap:8 PCMA/8000/1<br>
a=rtpmap:117 Speex/16000/1<br>
a=fmtp:117 sr=16000,mode=any<br>
a=rtpmap:0 PCMU/8000/1<br>
a=rtpmap:116 Speex/8000/1<br>
a=fmtp:116 sr=8000,mode=any<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-16,32,36<br>
a=rtpmap:120 NSE/8000<br>
a=fmtp:120 192-193<br>
m=video 5092 RTP/AVP 119 31<br>
a=rtpmap:119 theora/90000<br>
a=fmtp:119<br>
delivery-method=&quot;in_band&quot;;height=576;sampling=&quot;YCbCr-4:2:0&quot;;width=704<br>
a=rtpmap:31 h261/90000<br>
a=fmtp:31 CIF=1;QCIF=1<br>
]<br>
variable_ep_codec_string:<br>
[G722@8000h@0i,PCMA@8000h@0i,SPEEX@16000h@0i,SPEEX@16000h@0i,SPEEX@16000h@0i,PCMU@8000h@0i,H261@90000h@0i]<br>
variable_hangup_after_bridge: [false]<br>
variable_continue_on_fail: [true]<br>
variable_dialed_user: [mikael-nokia]<br>
variable_dialed_domain: [<a href="http://fs.voip.domain.com" target="_blank">fs.voip.domain.com</a>]<br>
variable_switch_m_sdp: [v=0<br>
o=Nokia-SIPUA 603233522614072812 292890395656351010 IN IP4 10.247.3.253<br>
s=FreeSWITCH<br>
c=IN IP4 10.247.3.253<br>
t=0 0<br>
m=audio 49152 RTP/AVP 8 101 13<br>
a=rtpmap:8 PCMA/8000/1<br>
a=rtpmap:101 telephone-event/8000/1<br>
a=fmtp:101 0-15<br>
a=rtpmap:13 CN/8000/1<br>
a=ptime:20<br>
a=maxptime:200<br>
m=video 0 RTP/AVP 99<br>
a=rtpmap:99 H264/90000<br>
]<br>
variable_remote_media_ip: [10.0.255.251]<br>
variable_remote_media_port: [5090]<br>
variable_read_codec: [G722]<br>
variable_read_rate: [16000]<br>
variable_write_codec: [G722]<br>
variable_write_rate: [16000]<br>
variable_video_possible: [true]<br>
variable_remote_video_ip: [10.0.255.251]<br>
variable_remote_video_port: [5092]<br>
variable_sip_video_fmtp: [CIF=1;QCIF=1]<br>
variable_sip_video_pt: [31]<br>
variable_local_media_ip: [10.100.4.192]<br>
variable_local_media_port: [56008]<br>
variable_local_video_ip: [10.100.4.192]<br>
variable_local_video_port: [59022]<br>
variable_video_read_codec: [H261]<br>
variable_video_read_rate: [90000]<br>
variable_video_write_codec: [H261]<br>
variable_video_write_rate: [90000]<br>
variable_endpoint_disposition: [ANSWER]<br>
variable_originate_disposition: [SUCCESS]<br>
variable_bridge_channel: [sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a>]<br>
variable_bridge_uuid: [d50bf8c4-2a5c-11de-9175-4ba93d212d75]<br>
variable_signal_bond: [d50bf8c4-2a5c-11de-9175-4ba93d212d75]<br>
variable_current_application: [info]<br>
<br>
<br>
<br>
How do I get the &quot;raw&quot; hangup cause first mentioned below?<br>
<br>
&quot;<br>
2009-04-16 10:02:34 [DEBUG] mod_sofia.c:315 sofia_on_hangup() Channel<br>
sofia/internal/<a href="mailto:sip%3Amikael-nokia@10.247.3.253">sip:mikael-nokia@10.247.3.253</a> hanging up, cause:<br>
MEDIA_TIMEOUT<br>
&quot;<br>
<br>
As mentioned earlier the origination was in fact a success, but since I<br>
moved out of wi-fi coverage area I got a MEDIA_TIMEOUT which should<br>
trigger a transfer to my cell phone number. :-)<br>
<br>
<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Mikael<br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>