On Thu, Aug 23, 2012 at 11:36 PM, Tim Bock <jtbock@synacktics.com> wrote:

Hello,

I'm rather new with FreeSWITCH, migrating over from an asterisk setup.

I have a Digium TDM card, with 3 fxo ports and 1 fxs port.  I have
everything mostly working, but I'm having an issue with incoming fxo
calls.  I've found examples where people have used destination_number in
their condition, but this doesn't seem to work for me.  I can
successfully use
> <condition field="${channel_name}" expression="^(FreeTDM/2:3/)">

but not

> <condition field="destination_number" expression="(7832889)$"/>
The issue seems to be that destination_number is set to 2 early on, somehow:
> 012-08-23 20:40:43.213780 [DEBUG] ftmod_analog.c:646 [s2c3][1:3]
> Executing stat
> e handler on 2:3 for RING
> 2012-08-23 20:40:43.213780 [DEBUG] mod_freetdm.c:1992 got FXO sig 2:3
> [START]
> 2012-08-23 20:40:43.213780 [DEBUG] ftdm_io.c:3131 [s2c3][1:3] Enabled
> software D
> TMF detector
> 2012-08-23 20:40:43.213780 [DEBUG] mod_freetdm.c:407 Set codec PCMU 20ms
> 2012-08-23 20:40:43.213780 [DEBUG] mod_freetdm.c:1740 Connect inbound
> channel Fr
> eeTDM/2:3/2
so that later:
> Dialplan: FreeTDM/2:3/2 Regex (FAIL) [fxo_incoming]
> destination_number(2) =~ /(78328
> 89)$/ break=on-false
Any ideas on what I am doing wrong?  I can make it work using the
channel_name variable, but using destination_number would be much more
convenient.


The problem is that fxo lines do not receive a destination number, they just "ring". You can set a fixed destination number though, just use the "number => " configuration in freetdm.conf

ie

[span zt myspan]
number => 1234
fxo-channel => 1


Moises Silva
Manager, Software Engineering

msilva@sangoma.com

Sangoma Technologies

100 Renfrew Drive, Suite 100, Markham, ON L3R 9R6 Canada


t.   +1 800 388 2475 (N. America)

t.   +1 905 474 1990 x128

f.   +1 905 474 9223

 

Products | Solutions | Events | Contact | Wiki | Facebook | Twitter`| | YouTube