Call files making two calls


#1

Hi, I am using the call file facility. Very handy, but I have a problem: it sometimes places two phone calls. Here is the call file itself:

Channel: CAPI/ISDN4/3488866859
WaitTime: 30
RetryTime: 10
MaxRetries: 0
Context: sendfax
Extension: 1
Priority: 1
SetVar: FAXFILE=/tmp/testfax.tif

And the extension:

[sendfax]
exten => s,1,Wait(3)
exten => s,2,SayDigits(123456)
exten => s,3,Hangup()
exten => failed,1,Dial(SIP/davidw)

And here’s what it’s doing:

-- Attempting call on CAPI/ISDN4/3488866859 for 1@sendfax:1 (Retry 1)

Dec 30 13:28:43 NOTICE[23631]: channel.c:2416 __ast_request_and_dial: Don’t know what to do with control frame 15
== ISDN4: Setting up echo canceller (PLCI=0x204, function=1, options=4, tail=64)
== ISDN4: Setting up DTMF detector (PLCI=0x204, flag=1)
> Channel CAPI/ISDN4/3488866859-38 was answered.
== Starting CAPI/ISDN4/3488866859-38 at sendfax,1,1 failed so falling back to exten ‘s’
– Executing Wait(“CAPI/ISDN4/3488866859-38”, “3”) in new stack
– ISDN4: Error setting up echo canceller (PLCI=0x204)
Dec 30 13:28:49 WARNING[18722]: chan_capi.c:3334 show_capi_conf_error: ISDN4: conf_error 0x300b PLCI=0x204 Command=FACILITY_CONF,0x8497
> CAPI INFO 0x300b: Facility not supported
– Executing SayDigits(“CAPI/ISDN4/3488866859-38”, “123456”) in new stack
– Playing ‘digits/1’ (language ‘en’)
– Playing ‘digits/2’ (language ‘en’)
– Playing ‘digits/3’ (language ‘en’)
– Attempting call on CAPI/ISDN4/3488866859 for 1@sendfax:1 (Retry 1)
Dec 30 13:28:54 NOTICE[23639]: channel.c:2416 __ast_request_and_dial: Don’t know what to do with control frame 15
– Playing ‘digits/4’ (language ‘en’)
– Playing ‘digits/5’ (language ‘en’)
– Playing ‘digits/6’ (language ‘en’)
– Executing Hangup(“CAPI/ISDN4/3488866859-38”, “”) in new stack
== Spawn extension (sendfax, s, 3) exited non-zero on ‘CAPI/ISDN4/3488866859-38’
== ISDN4: CAPI Hangingup
Dec 30 13:28:56 NOTICE[23631]: pbx_spool.c:280 attempt_thread: Call completed to CAPI/ISDN4/3488866859
> CAPI INFO 0x3490: Normal call clearing
== ISDN4: Setting up echo canceller (PLCI=0x304, function=1, options=4, tail=64)
== ISDN4: Setting up DTMF detector (PLCI=0x304, flag=1)
> Channel CAPI/ISDN4/3488866859-39 was answered.
== Starting CAPI/ISDN4/3488866859-39 at sendfax,1,1 failed so falling back to exten ‘s’
– Executing Wait(“CAPI/ISDN4/3488866859-39”, “3”) in new stack
– ISDN4: Error setting up echo canceller (PLCI=0x304)
Dec 30 13:29:01 WARNING[18722]: chan_capi.c:3334 show_capi_conf_error: ISDN4: conf_error 0x300b PLCI=0x304 Command=FACILITY_CONF,0x8497
> CAPI INFO 0x300b: Facility not supported
– Executing SayDigits(“CAPI/ISDN4/3488866859-39”, “123456”) in new stack
– Playing ‘digits/1’ (language ‘en’)
– Playing ‘digits/2’ (language ‘en’)
– Playing ‘digits/3’ (language ‘en’)
– Playing ‘digits/4’ (language ‘en’)
– Playing ‘digits/5’ (language ‘en’)
– Playing ‘digits/6’ (language ‘en’)
– Executing Hangup(“CAPI/ISDN4/3488866859-39”, “”) in new stack
== Spawn extension (sendfax, s, 3) exited non-zero on ‘CAPI/ISDN4/3488866859-39’
== ISDN4: CAPI Hangingup
Dec 30 13:29:07 NOTICE[23639]: pbx_spool.c:280 attempt_thread: Call completed to CAPI/ISDN4/3488866859
> CAPI INFO 0x3490: Normal call clearing

Weird, eh?

I can’t make heads nor tails of it.

Thanks for any information you can provide,
Dave


#2

Before it just seemed to be doing this with CAPI. Now it’s doing it with SIP, too…


#3

The Wait() seems to foul things up. Now I’m doing this:

exten => 1,1,Answer()
exten => 1,2,Wait(3)
exten => 1,3,SayDigits(123456)
exten => 1,4,Hangup()

That seems to make things better.


#4

I’m stumped. That fixed things with SIP calls, but it all seems to be rather random. Removing the Wait entirely seems to help, but I’m really stumped… Why would it call 2 times instead of just the 1 it’s supposed to, or N times?