[Freeswitch-users] How does Freeswitch process incoming calls

Michael Collins msc at freeswitch.org
Tue Aug 13 22:29:27 MSD 2013


On Tue, Aug 13, 2013 at 11:00 AM, Ravi <sravi123 at yahoo.com> wrote:

>  Hello Everyone,
>
> I am trying to configure a PRI connection. When I call from my mobile
> number to the PRI landline number, I get the following log: The call has
> never connected, I hear an engaged tone and it disconnects.
>
> Question 1: In the fourth line that is marked in red, the message says
> Called No:[000]. The number that I actually dialed from my mobile
> (7502029000) is +914274302000. I am not able to figure out what only
> three digits are displayed.
>
It looks like the carrier is only sending you the last 3 digits of the
called DID.


>
> Question 2: When freeswitch receives an inbound call - in what sequence is
> the call processed ? What dialplans should I be looking at?
>
Once mod_freetdm figures out what the called number is it will try to route
it in whatever context is specified in your freetdm.conf.xml file. In your
case it goes to default as you can see by this log line:

2013-08-13 11:08:45.145709 [INFO] mod_dialplan_xml.c:558 Processing
<7502029000>->000 in context default


> Question 3: How do I or where do I find the number that is being called in
> freeswitch ?
>
See my answer to question #2. Basically you need an extension with a
condition that matches 000, something like:
<condition field="destination_number" expression="^000$>

-MC


>
>
> Any pointers or advise on how to go about this, is much appreciated.
>
> Thanks.
> Ravi
>
>
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_wanpipe.c:1400 [s1c31][1:16] Link
> status is 1
> 2013-08-13 11:08:45.145709 [INFO] ftmod_sangoma_isdn_stack_rcv.c:96
> [s1c9][1:9] Received SETUP (suId:1 suInstId:0 spInstId:9)
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn_stack_hndl.c:57
> [s1c9][1:9] Processing SETUP (suId:1 suInstId:0 spInstId:9)
> 2013-08-13 11:08:45.145709 [INFO] *ftmod_sangoma_isdn_stack_hndl.c:153
> [s1c9][1:9] Incoming call: Called No:[000] Calling No:[7502029000]*
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn_stack_hndl.c:209
> [s1c9][1:9] Changed state from DOWN to RING
> 2013-08-13 11:08:45.145709 [DEBUG] ftdm_state.c:541 [s1c9][1:9] Executing
> state processor for RING
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn.c:655 [s1c9][1:9]
> processing state change to RING
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn.c:676 [s1c9][1:9]
> Sending incoming call from 7502029000 to 000 to FTDM core
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn.c:923 [s1c9][1:9]
> Completed state change from DOWN to RING in 0 ms
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:2657 got clear channel
> sig [START]
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_wanpipe.c:749 [s1c9][1:9] Enabled
> DTMF events
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:403 Set codec PCMA 20ms
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:1890 Connect inbound
> channel FreeTDM/1:9/000
> 2013-08-13 11:08:45.145709 [NOTICE] switch_channel.c:1030 New Channel
> FreeTDM/1:9/000 [9eb4ce34-03da-11e3-8bc5-0b625c405e53]
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:2093 (FreeTDM/1:9/000)
> State Change CS_NEW -> CS_INIT
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_session.c:1341 Send signal
> FreeTDM/1:9/000 [BREAK]
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:416
> (FreeTDM/1:9/000) Running State Change CS_INIT
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:455
> (FreeTDM/1:9/000) State INIT
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:430 (FreeTDM/1:9/000)
> State Change CS_INIT -> CS_ROUTING
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_session.c:1341 Send signal
> FreeTDM/1:9/000 [BREAK]
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:455
> (FreeTDM/1:9/000) State INIT going to sleep
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:416
> (FreeTDM/1:9/000) Running State Change CS_ROUTING
> 2013-08-13 11:08:45.145709 [DEBUG] switch_channel.c:2116 (FreeTDM/1:9/000)
> Callstate Change DOWN -> RINGING
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:471
> (FreeTDM/1:9/000) State ROUTING
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:453 FreeTDM/1:9/000
> CHANNEL ROUTING
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:456 [s1c9][1:9]
> Indicating PROCEED in state RING
> 2013-08-13 11:08:45.145709 [DEBUG] mod_freetdm.c:456 [s1c9][1:9] Changed
> state from RING to PROCEED
> 2013-08-13 11:08:45.145709 [DEBUG] ftdm_state.c:541 [s1c9][1:9] Executing
> state processor for PROCEED
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn.c:655 [s1c9][1:9]
> processing state change to PROCEED
> 2013-08-13 11:08:45.145709 [INFO] ftmod_sangoma_isdn_stack_out.c:175
> [s1c9][1:9] Sending PROCEED (suId:1 suInstId:9 spInstId:9 dchan:1 ces:0)
> 2013-08-13 11:08:45.145709 [DEBUG] ftmod_sangoma_isdn.c:923 [s1c9][1:9]
> Completed state change from RING to PROCEED in 0 ms
> 2013-08-13 11:08:45.145709 [DEBUG] switch_core_state_machine.c:117
> FreeTDM/1:9/000 Standard ROUTING
> 2013-08-13 11:08:45.145709 [INFO] mod_dialplan_xml.c:558 Processing
> <7502029000>->000 in context default
> Dialplan: FreeTDM/1:9/000 parsing [default->unloop] continue=false
> Dialplan: FreeTDM/1:9/000 Regex (PASS) [unloop] ${unroll_loops}(true) =~
> /^true$/ break=on-false
> Dialplan: FreeTDM/1:9/000 Regex (FAIL) [unloop] ${sip_looped_call}() =~
> /^true$/ break=on-false
> Dialplan: FreeTDM/1:9/000 parsing [default->tod_example] continue=true
> Dialplan: FreeTDM/1:9/000 Date/Time Match (PASS) [tod_example]
> break=on-false
> Dialplan: FreeTDM/1:9/000 Action set(open=true)
> Dialplan: FreeTDM/1:9/000 parsing [default->holiday_example] continue=true
> Dialplan: FreeTDM/1:9/000 Date/TimeMatch (FAIL) [holiday_example]
> break=on-false
> Dialplan: FreeTDM/1:9/000 parsing [default->global-intercept]
> continue=false
> Dialplan: FreeTDM/1:9/000 Regex (FAIL) [global-intercept]
> destination_number(000) =~ /^886$/ break=on-false
> Dialplan: FreeTDM/1:9/000 parsing [default->group-intercept] continue=false
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130813/c95a6183/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list