Voice Over IP in UK - Inserting pauses into Asterisk Dialing Rules

This is Interesting: Free IT Magazines  
Home > Archive > Voice Over IP in UK > February 2006 > Inserting pauses into Asterisk Dialing Rules





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Inserting pauses into Asterisk Dialing Rules
Matt

2006-01-22, 5:45 pm

Hi,

Trying to get asterisk (AAH) to callout over discountdial for cheap
calls to mobiles.

I need to tell asterisk to dial 0844 8616464 then pause, then dail the
mobile to be called.

I can do everything apart from the pause!

Any ideas?

Thanks

Matthew

Jono

2006-01-22, 5:45 pm


"Matt" <matthew.humphreys@gmail.com> wrote in message
news:1137883670.227179.38520@f14g2000cwb.googlegroups.com...
> Hi,
>
> Trying to get asterisk (AAH) to callout over discountdial for cheap
> calls to mobiles.
>
> I need to tell asterisk to dial 0844 8616464 then pause, then dail the
> mobile to be called.
>
> I can do everything apart from the pause!
>
> Any ideas?
>
> Thanks
>
> Matthew
>


I think that the best you could do is replace any number beginning with 07
with the access code you want to use. It would be easier to control this in
the dial plan of the spa3000 you're using for the pstn trunk.

In my dial plan of the spa, I have included
<07.:08448616464>

This element replaces any number beginning 07 with your access number.

Obviously, anyone ringing a mobile number would have to dial it twice, or at
least 07, then wait to be connected before dialling the number - it wouldn't
take long for them to get the idea.


TheMgt

2006-01-22, 5:45 pm

Matt wrote:

> Hi,
>
> Trying to get asterisk (AAH) to callout over discountdial for cheap
> calls to mobiles.
>
> I need to tell asterisk to dial 0844 8616464 then pause, then dail the
> mobile to be called.
>
> I can do everything apart from the pause!
>
> Any ideas?


AFAIK inserting a 'w' adds a half second pause. e.g.
08448616464ww07xxxxxxxxx
Matt

2006-01-22, 5:45 pm

Cheers for that.

I've tried:

08448616464+wwwwwww+07XXXXXXXXX


in the dialing rules, but it ignores the wwwww's to give..



Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
fixlocalprefix: Added prefix. New number: 084486164640797322xxx
-- AGI Script fixlocalprefix completed, returning 0
-- Executing SetVar("SIP/205-5589",
"OUTNUM=0844861646407973212xxx") in new stack
-- Executing Cut("SIP/205-5589", "custom=OUT_1|:|1") in new stack
-- Executing GotoIf("SIP/205-5589", "0?19") in new stack
-- Executing Dial("SIP/205-5589",
"SIP/pstn/0844861646407973212xxx") in new stack
-- Called pstn/0844861646407973212xxx


I also, if it ever works, need to add a "#" at the end, but this also
fails.

Thanks for the suggestions so far.

Looks like I might have to revert to Jono's solution above..

Thanks


Matthew

Stickems.

2006-01-22, 5:45 pm

Try a p for a pause.


"Matt" <matthew.humphreys@gmail.com> wrote in message
news:1137941936.097717.88990@g49g2000cwa.googlegroups.com...
| Cheers for that.
|
| I've tried:
|
| 08448616464+wwwwwww+07XXXXXXXXX
|
|
| in the dialing rules, but it ignores the wwwww's to give..
|
|
|
| Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
| fixlocalprefix: Added prefix. New number: 084486164640797322xxx
| -- AGI Script fixlocalprefix completed, returning 0
| -- Executing SetVar("SIP/205-5589",
| "OUTNUM=0844861646407973212xxx") in new stack
| -- Executing Cut("SIP/205-5589", "custom=OUT_1|:|1") in new stack
| -- Executing GotoIf("SIP/205-5589", "0?19") in new stack
| -- Executing Dial("SIP/205-5589",
| "SIP/pstn/0844861646407973212xxx") in new stack
| -- Called pstn/0844861646407973212xxx
|
|
| I also, if it ever works, need to add a "#" at the end, but this also
| fails.
|
| Thanks for the suggestions so far.
|
| Looks like I might have to revert to Jono's solution above..
|
| Thanks
|
|
| Matthew
|


PeterW

2006-01-22, 5:45 pm

"Stickems." <Stickems.@last.invalid> wrote in
news:43d3b4d9$0$73531$892e7fe2@authen.yellow.readfreenews.net:

> Try a p for a pause.
>
>
> "Matt" <matthew.humphreys@gmail.com> wrote in message
> news:1137941936.097717.88990@g49g2000cwa.googlegroups.com...
>| Cheers for that.
>|
>| I've tried:
>|
>| 08448616464+wwwwwww+07XXXXXXXXX
>|
>|
>| in the dialing rules, but it ignores the wwwww's to give..
>|
>|
>|
>| Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
>| fixlocalprefix: Added prefix. New number: 084486164640797322xxx
>| -- AGI Script fixlocalprefix completed, returning 0
>| -- Executing SetVar("SIP/205-5589",
>| "OUTNUM=0844861646407973212xxx") in new stack
>| -- Executing Cut("SIP/205-5589", "custom=OUT_1|:|1") in new stack
>| -- Executing GotoIf("SIP/205-5589", "0?19") in new stack
>| -- Executing Dial("SIP/205-5589",
>| "SIP/pstn/0844861646407973212xxx") in new stack
>| -- Called pstn/0844861646407973212xxx
>|
>|
>| I also, if it ever works, need to add a "#" at the end, but this also
>| fails.
>|
>| Thanks for the suggestions so far.
>|
>| Looks like I might have to revert to Jono's solution above..
>|
>| Thanks
>|
>|
>| Matthew
>|
>
>
>


This bit of Asterisk macro is designed to dial a SIP number wait 4 seconds
and the DTMF dial the second macro argument... - have a look at the
http://www.voip-info.org/wiki for details of the Dial command parameters.

exten => s,14,Dial(SIP/${num}@bt,300,M(dwait^4)D(${ARG2}))
exten => s,15,Goto(end,busy,1)

[macro-dwait]
;
; Macro to wait a delay
;
exten => s,1,Wait(${ARG1})

Regards
Peter
Matt

2006-02-19, 8:15 am


PeterW wrote:
> "Stickems." <Stickems.@last.invalid> wrote in
> news:43d3b4d9$0$73531$892e7fe2@authen.yellow.readfreenews.net:
>
>
> This bit of Asterisk macro is designed to dial a SIP number wait 4 seconds
> and the DTMF dial the second macro argument... - have a look at the
> http://www.voip-info.org/wiki for details of the Dial command parameters.
>
> exten => s,14,Dial(SIP/${num}@bt,300,M(dwait^4)D(${ARG2}))
> exten => s,15,Goto(end,busy,1)
>
> [macro-dwait]
> ;
> ; Macro to wait a delay
> ;
> exten => s,1,Wait(${ARG1})
>
> Regards
> Peter


Cheers Peter,

I tried this..

exten => 124,1,Answer
exten => 124,2,Dial(SIP/ 08444289090@pstn,300,M(dwait^4)D(0797321
2xxx))

but it didn't work.... It just dialed the 0844 number on its own.

I wasn't sure where to put the macro definition?

Many thanks


Matthew

Thomas Kenyon

2006-02-19, 8:15 am

Matt wrote:
> PeterW wrote:
>
>
>
> Cheers Peter,
>
> I tried this..
>
> exten => 124,1,Answer
> exten => 124,2,Dial(SIP/ 08444289090@pstn,300,M(dwait^4)D(0797321
2xxx))
>
> but it didn't work.... It just dialed the 0844 number on its own.
>
> I wasn't sure where to put the macro definition?
>
> Many thanks
>

Did you include the macro-dwait as the op instructed?
Matt

2006-02-19, 8:15 am

Yes...

I included


[macro-dwait]
;
; Macro to wait a delay
;
exten => s,1,Wait(${ARG1})


after the exten line.

Is this the correct place?

Thanks for the reply


Matthew

Thomas Kenyon

2006-02-19, 8:15 am

Matt wrote:
> Yes...
>
> I included
>
>
> [macro-dwait]
> ;
> ; Macro to wait a delay
> ;
> exten => s,1,Wait(${ARG1})
>
>
> after the exten line.
>
> Is this the correct place?
>
> Thanks for the reply
>
>
> Matthew
>

I don't know that it makes a difference, All my macros are defined just
after general.

It's worth noting that in some news readers the character after the
dwait will look like a superscript 4, which should really be a ^ 4
(without the space), this notation for parsing variables to macros from
within dialstrings was introduced in Asterisk 1.2.0, (so if you are
still haven't upgraded, that's another reason it wont work).

If you are upgrading to 1.2.0, be prepared to tit about with your config
files (mostly extensions.conf). A lot of stuff changed.
Matt

2006-02-19, 8:15 am

I'm still on Asterisk 1.0.9, so thats why it doesn't work....

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com