| |
| News & Reviews |
Welcome to the Voxilla VoIP Forum.
Voxilla has been a trusted source for accurate, up-to-date information on the IP Communications industry since 2002. A dedicated staff of reporters and engineers produce feature articles and product reviews to keep industry watchers abreast of the people, companies, and trends driving a fast moving market.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
Voxilla VoIP Forum |
Introducing waits 'w' in Dial destination number variableTechnical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX. |
| | LinkBack | Thread Tools | Rate Thread | Display Modes |
| |||
| Hi, I am trying to implement calling card automated system as described in the thread below: http://forum.voxilla.com/asterisk-su...out-15422.html (Calling Card Out) It seems to be dialing the acccess number and the password okay but it seems that the EXTEN number in the variable is being dialed too fast and I wanted to intoduce some 'w' in there too. exten => 1212XX.,1,Dial(SIP/pout/1800XXXXXXX,D(123456#ww+$EXTEN+#)) but I dont know how to go about and introduce w in a variable? Any way to break it down and insert 'w' and then send the DTMF tones? Thanks in advace -DS |
| |||
| Hi As you mentioed you requirement that you want to wait for few seconds b4 dial i am suggesting you foolwing option which dial flagwhich is use at the end of dial cmd Dial(SIP/900,tTd,20) allll this tTd ARE DAIL FLAG SAME AS THIS USE D or d for you requirements d: This flag trumps the 'H' flag and intercepts any dtmf while waiting for the call to be answered and returns that value on the spot. This allows you to dial a 1-digit exit extension while waiting for the call to be answered - see also RetryDial D(digits): After the called party answers, send digits as a DTMF stream, then connect the call to the originating channel. (You can also use 'w' to produce .5 second pauses.) try this also go for voip-info more search And if you want to dila with same wait seconds ues wait(2) b4 dila command try this thing it may helpo you Amit |
| |||
| Thanks for your response but maybe I did not state my problem clearly enough. I have the dial number part already in place and its working properly. What I am looking for is inserting 'w' in the digits for $EXTEN. Let me use an example: Supposing I am dialing (444)555-6666 . Now my * recognizes that it is supposed to route this through the calling card. So it dials the calling card access number. Waits for the prompt and then sends in the PIN. All this works fine with some w inserted in the command. Now the system has to send the above phone number (444-555-6666) to the remote end. This number is contained in $EXTEN variable. What ends up happening is my * server is sending the numbers in $EXTEN too fast. Like it is sending 4445556666 with no delays whereas I want it to send 4ww4ww4ww5ww... and so on. So my question is how can I insert 'w' in the number contained in the variable $EXTEN? -DS |
| |||
| Looked around some more and could not find sometime on the web so I am tasking myself with writing a AGI script to do this: This is what I have so far: #!/usr/bin/php -q <?php /* This program takes in a 10 digit number and introduces delay char 'w' for use in Dial cmd. */ define("AGIBIN_DIR", "/var/lib/asterisk/agi-bin"); include(AGIBIN_DIR."/phpagi.php"); function str_multi_insert($inserts, $string) { ksort($inserts); $new_string = ''; $prev_index = 0; foreach ($inserts as $index => $insert) { $tmp = substr($string, $prev_index, $index - $prev_index); $new_string .= $tmp.$insert; $prev_index = $index; } $new_string .= substr($string, $prev_index); return $new_string; } $agi = new AGI(); $r = $agi->get_variable("EXTEN"); if ($r["result"] == 0) { $agi->verbose("EXTEN not set -- nothing to do"); exit(1); } $number = $r["data"]; $agi->verbose(" Number is $number"); $inserts = array( 0 => 'ww', 1 => 'ww', 2 => 'ww', 3 => 'ww', 4 => 'ww', 5 => 'ww', 6 => 'ww', 7 => 'ww', 8 => 'ww', 9 => 'ww', ); $new_number = str_multi_insert($inserts, $number); $agi->verbose("New number is $new_number"); $agi->set_variable("EXTEN", $new_number); exit(0); And the way I am calling is: [serviceName] exten => _X.,1,NoOp(Number originally dialed was ${EXTEN}) exten => _X.,2,AGI(name_of_above_agi) exten => _X.,3,Dial(Local/1800ACCESSNO@outbound-allroutes,,D(wwwwwwwwPwIwNwNOw#wwwwwwwwwwwwwwwwwww 0ww${EXTEN}ww#)) exten => _X.,4,Hangup In the above string replace the: 1800ACCESSNO by your access number PINNO - by the service PIN number. So far the script seems to be doing the right thing by introducing delays and modifys the variable $EXTEN to the new value. The problem I am seeing is that when the script returns and I run the Dial Command I still get the old value in $EXTEN. I need to do some more debugging to make sure I modify and save the $EXTEN variable correctly in my AGI script. This is my first AGI script and suggestions are welcome!! -DS |
| Thread Tools | |
| Display Modes | Rate This Thread |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Introducing PhoneGnome Mobile Web with Visual Voicemail | PhoneGnome | PhoneGnome Support Forum | 0 | October 31st, 2007 05:58 AM |
| Destination Unreachable (Host administratively prohibited) | sprawl78 | Asterisk Support Forum | 2 | September 14th, 2007 07:59 AM |
| Variable lost in dial plan | MrLoofer | Asterisk Support Forum | 0 | August 22nd, 2007 02:58 PM |
| Destination specific codec / dialplan | Daine | Linksys (Sipura) VoIP Support Forum | 2 | September 22nd, 2006 01:54 AM |
| Introducing Firefly Free VoIP soft-phone with Voicemail and | Firefly | General VoIP Discussion | 1 | February 2nd, 2004 05:13 PM |