Forum Replies Created
-
Hi Pta200,
Pta200 wrote:
The problem I’m having with the custom code component is that VDP won’t validate this because the last custom return doesn’t have it’s output port connected to anything.Yes and thats why I put regular return block, just to pass validation.
Pta200 wrote:
It shouldn’t need to as it’s a returnIt’s custom code block and VDP can’t predict what command user would type.
The code I’m trying to write looks like this:
exten => s,1,GotoIf($${DB_EXISTS(holiday/${STRFTIME(${EPOCH},,%Y%m%d)})}=1?s,closed)
exten => s,n,GotoIfTime(12:00-23:00,*,31,dec?s,closed)
exten => s,n,GotoIfTime(*,*,1,jan?s,closed)
exten => s,n,GotoIfTime(${open_monfri}:00-${close_monfri}:00,Mon-Fri,*,*?s,open)
exten => s,n,GotoIfTime(${open_sat}:00-${close_sat}:00,Sat,*,*?s,open)
exten => s,n(closed),Return(1)
exten => s,n(open),Return(0)The problem I’m having with the custom code component is that VDP won’t validate this because the last custom return doesn’t have it’s output port connected to anything. It shouldn’t need to as it’s a return. I looked around but didn’t see an end anywhere. Would just need to be an actual return to connect it?
Paolo
Maybe you should try with CustomCode component,it’s located on the General sheet.
CustomCode block allows user to write traditional Asterisk dialplan code and to keep that code inside the Visual Dialplan.
So, just type Return(1) and connect output port with regular Return block.
In this way asterisk will read and accept Return command from custom block and return control back from the subroutine to the main call flow.
Regular Return block will be ignored.Raoul,
you are more than welcome. I’m glad I could help.
You can see the expression in the picture under the Build tab.Bernard
yeah something like that from that i can work it out thx.
What kind of expression did you use in the gotoif??thx alot Bernard
Raoul,
I’m not sure I fully understand your question but if you need repeating playback block you may use GoToIf block to create loop.
In this way you will have loop that repeat until some condition is met(in my case infinite loop 🙂 ).
Bernard
Not what im looking for (But thanks anyway) im more looking for like a parallel where there is a playback repeating it self and while it is doing that it calls a row of numbers in the background and if something is free will put the caller through i dought that that is possible in Visual D. but maybe there is a way.
Hi Raoul,
Have you tried with MusicOnHold block? This block is located on the playback sheet.
Bernard
Sure it is possible.
Try with the Custom Code component (General sheet).
You can put your code directly in the custom code component and call remote web service, as you described above.But in example the file php isn’t remote? And my web service is remote, it is possible? If yes how?
I need access to remote web service from the dialplan, in other words I need something like this command,
exten => _X.,1,AGI(agi://192.168.2.1:1048/TestAGI|${EXTEN}|{VAR2}), but if is possible in visual dialplan.
Please an example…
Thanks
Try to make AGI that works with WS and then call that AGI from dial plan.
Here is an tutorial on how to work with AGI from dial plan:
http://www.apstel.com/while-loop/calling-external-script-using-agi/-
This reply was modified 10 years, 6 months ago by
admin.
I have a similar problem ‘I need to call an exe file or a web service in the middle of my call flow. Is there anyone who can help me on that?
I can answer your questions, can you please let me know what you need to know.Giridhar,
You have not provided much information about this project so I’m not sure how anyone will be able to assist. If you can post further information maybe someone can help, although integrating CC processing within asterisk is a fairly involved process.Kevin
Hello Stephon,
The first two digits from the called number can be stripped using ${EXTEN:2} expression.
So, the dial plan code should be like this:
exten => _94xxx,2,Dial(SIP/105/${EXTEN:2},5)I hope this answers your question.
Best regards,
Michael DenichApstel support team
http://www.Apstel.comHi,
I have local SIP clients and SIP clients connected through trunk. The calls coming from that trunk comes with prefix=94. That’s how the system is set up by previous admin and I can not change it.
But now, in asterisk, I want to have the called number without this two
leading digits so the exten variable will be according to my actual
dialplan. Here is an example:exten => 200,1,Dial(SIP/105/${EXTEN},5)
It’s ok if I call 200 from local asterisk SIP client but If I want to reach this
extension from SIP client coming through trunk, I have to call 94200. -
This reply was modified 10 years, 6 months ago by