I am sure this is simple, but have been struggling. I want to create a
call file that dials out a particular Dahdi channel to enable call
forwarding on a POTS line. I have this in extensions.conf:
[custom-callfwd]
exten => s,1,Answer
exten => s,n,Dial(DAHDI/4-1/*717157750)
exten => s,n,Verbose(${DIALSTATUS})
exten => s,n,Hangup
[custom-callfwdcanc]
exten => s,1,Answer
exten => s,n,Dial(DAHDI/4-1/*72)
exten => s,n,Verbose(${DIALSTATUS})
exten => s,n,Hangup
Using FreePBX I have setup "custom destinations" and "custom
applications" such that users can dial a code from their desks and enable
or disable forwarding via the above contexts. That works fine.
Now I whipped up a C program to create a call file to do the same thing
from the command line:
[snip]
fprintf(callfile, "Channel: Local/*71 at
custom-callfwd/n\n");
fprintf(callfile, "Application: Playback\n");
fprintf(callfile, "Data: hello-world\n");
[snip]
When I run this it creates the call file and I see this in the console:
-- Attempting call on Local/*71 at custom-callfwd/n for application
Playback(hello-world) (Retry 1)
And that is all... no call actually goes out on the Dahdi line.
I'm sure I am not properly creating the call file to do what I want. Any
suggestions?
Thanks,
j
On Thu, 1 Jul 2010, Jeff LaCoursiere wrote:> I am sure this is simple, but have been struggling. I want to create a > call file that dials out a particular Dahdi channel to enable call > forwarding on a POTS line. I have this in extensions.conf: > > [custom-callfwd] > exten => s,1,Answer > exten => s,n,Dial(DAHDI/4-1/*717157750) > exten => s,n,Verbose(${DIALSTATUS}) > exten => s,n,Hangup > > [custom-callfwdcanc] > exten => s,1,Answer > exten => s,n,Dial(DAHDI/4-1/*72) > exten => s,n,Verbose(${DIALSTATUS}) > exten => s,n,Hangup > > Using FreePBX I have setup "custom destinations" and "custom > applications" such that users can dial a code from their desks and > enable or disable forwarding via the above contexts. That works fine. > > Now I whipped up a C program to create a call file to do the same thing > from the command line: > > [snip] > fprintf(callfile, "Channel: Local/*71 at custom-callfwd/n\n");I don't see exten "*71" in custom-callfwd. Why are you using a local channel in your call file?> fprintf(callfile, "Application: Playback\n"); > fprintf(callfile, "Data: hello-world\n"); > [snip] > > When I run this it creates the call file and I see this in the console: > > -- Attempting call on Local/*71 at custom-callfwd/n for application > Playback(hello-world) (Retry 1)What does the call file look like before you mv it to the spool directory? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Seemingly Similar Threads
- Problem with callfile and CDR
- Call file problem, DelayedRetry/retrying spite MaxRetries: 0
- [1.4] Failed callfile doesn't jump to "failed" extension
- Asterisk 1.0.9-BRIstuffed-0.2.0-RC8o memory leak when using call files ?
- SOLVED: Re: Setting `userfield` from within a callfile