[Freeswitch-users] intercept call

Peder @ NetworkOblivion peder at networkoblivion.com
Mon Jun 9 05:48:49 PDT 2008


Do you have a DB function in the 'ring phone dialplan' that inserts the 
value into the DB in the first place?  Such as "<anti-action 
application="db" data="insert/last_dial_ext/${dialed_ext}/${uuid}"/>"? 
A full debug would be better because we could see the all of the lines 
to determine if it is inserting/selecting for the same extension.

Josip Djuricic wrote:
> Hi there,
> 
> I'm having little problem with intercept_function, can't seam to make it
> work with sqlite. I'm probably doing something wrong, so perhaps you have
> an idea?
> 
> This is what xml_curl returns:
> <extension name="test-intercept-extension">
>     <condition field="destination_number" expression="^10392$">
>         <action application="answer"/>
>         <action application="intercept" data="${db
> select/last_dial_ext/38514002000)}"/>
>     </condition>
> </extension>
> 
> And this is what happens on fs-console (I tried full debug but there's no
> more info regarding uuid on intercept fucntion, only the same error as
> below, so I've posted smaller trace):
> 2008-06-08 23:30:06 [NOTICE] switch_channel.c:533
> switch_channel_set_name() New Channel sofia/outbound/0993001140 at 10.0.3.220
> [0c04ffb1-1f84-4048-a069-edfea4bc471d]
> 2008-06-08 23:30:06 [INFO] mod_dialplan_xml.c:222 dialplan_hunt()
> Processing 0993001140->38514002000 at public
> 2008-06-08 23:30:06 [NOTICE] switch_ivr.c:1047
> switch_ivr_session_transfer() Transfer
> sofia/outbound/0993001140 at 10.0.3.220 to XML[4002000 at default]
> 2008-06-08 23:30:06 [INFO] mod_dialplan_xml.c:222 dialplan_hunt()
> Processing 0993001140->4002000 at default
> 2008-06-08 23:30:06 [NOTICE] switch_channel.c:533
> switch_channel_set_name() New Channel sofia/default/38514002000
> [bea1a54e-d016-4a23-83cb-4864eaa32d1b]
> 2008-06-08 23:30:07 [NOTICE] sofia.c:1739 nua() Ring-Ready
> sofia/default/38514002000!
> 2008-06-08 23:30:07 [NOTICE] mod_sofia.c:1024 nua() Ring-Ready
> sofia/outbound/0993001140 at 10.0.3.220!
> 2008-06-08 23:30:07 [NOTICE] switch_ivr_originate.c:1104
> switch_ivr_originate() Ring Ready sofia/outbound/0993001140 at 10.0.3.220!
> 2008-06-08 23:30:15 [NOTICE] switch_channel.c:533
> switch_channel_set_name() New Channel
> sofia/default/38514001148 at 89.18.32.19
> [8d9434ba-cce5-46af-9b3f-9840b6ee578a]
> 2008-06-08 23:30:15 [INFO] mod_dialplan_xml.c:222 dialplan_hunt()
> Processing CSI GRUPA->10392 at default
> 2008-06-08 23:30:15 [NOTICE] mod_dptools.c:645 answer_function() Channel
> [sofia/default/38514001148 at 89.18.32.19] has been answered
> 2008-06-08 23:30:15 [ERR] mod_dptools.c:248 intercept_function() Usage:
> [-bleg] <uuid>
> 2008-06-08 23:30:17 [NOTICE] switch_core_state_machine.c:157
> switch_core_standard_on_execute() Hangup
> sofia/default/38514001148 at 89.18.32.19 [CS_EXECUTE] [NORMAL_CLEARING]
> 2008-06-08 23:30:17 [NOTICE] switch_core_session.c:753
> switch_core_session_thread() Session 44
> (sofia/default/38514001148 at 89.18.32.19) Ended
> 2008-06-08 23:30:17 [NOTICE] switch_core_session.c:755
> switch_core_session_thread() Close Channel
> sofia/default/38514001148 at 89.18.32.19 [CS_HANGUP]
> 2008-06-08 23:30:23 [NOTICE] sofia.c:2117 nua() Hangup
> sofia/outbound/0993001140 at 10.0.3.220 [CS_EXECUTE] [ORIGINATOR_CANCEL]
> 2008-06-08 23:30:23 [NOTICE] switch_ivr_originate.c:1231
> switch_ivr_originate() Hangup sofia/default/38514002000 [CS_CONSUME_MEDIA]
> [ORIGINATOR_CANCEL]
> 2008-06-08 23:30:23 [INFO] mod_dptools.c:1797 audio_bridge_function()
> Originate Failed.  Cause: ORIGINATOR_CANCEL
> 2008-06-08 23:30:23 [NOTICE] switch_core_session.c:753
> switch_core_session_thread() Session 42
> (sofia/outbound/0993001140 at 10.0.3.220) Ended
> 2008-06-08 23:30:23 [NOTICE] switch_core_session.c:755
> switch_core_session_thread() Close Channel
> sofia/outbound/0993001140 at 10.0.3.220 [CS_HANGUP]
> 2008-06-08 23:30:23 [NOTICE] switch_core_session.c:753
> switch_core_session_thread() Session 43 (sofia/default/38514002000) Ended
> 2008-06-08 23:30:23 [NOTICE] switch_core_session.c:755
> switch_core_session_thread() Close Channel sofia/default/38514002000
> [CS_HANGUP]
> 
> notice this line: 2008-06-08 23:30:15 [ERR] mod_dptools.c:248
> intercept_function() Usage: [-bleg] <uuid>, it would mean most probably
> that {db...} returns nothing.
> 
> I've tried replacing ${db} part with real uuid and it works perfectly.
> 
> Any ideas?
> 
> 
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 




More information about the FreeSWITCH-users mailing list