A Broadband and ADSL forum. BroadbanterBanter

Welcome to BroadbanterBanter.

You are currently viewing as a guest which gives you limited access to view most discussions and other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today.

Go Back   Home » BroadbanterBanter forum » Newsgroup Discussions » uk.telecom.voip (UK VOIP)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.telecom.voip (UK VOIP) (uk.telecom.voip) Discussion of topics relevant to packet based voice technologies including Voice over IP (VoIP), Fax over IP (FoIP), Voice over Frame Relay (VoFR), Voice over Broadband (VoB) and Voice on the Net (VoN) as well as service providers, hardware and software for use with these technologies. Advertising is not allowed.

Asterisk - remote ringback



 
 
Thread Tools Display Modes
  #1  
Old October 28th 05, 11:21 PM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 209
Default Asterisk - remote ringback

This could be a long one, sorry. The question will be
short, but right down at the bottom

Making use of the instructions on Nerd Vittles & with
a lot of help from chandave on Voxilla, I've setup
Asterisk with a special Sipgate DID number.

If either my wife or I call it on from our mobiles,
it rings & should hang up after a couple of rings. (For
some reason, it's not hanging up in this example but is in
the 2nd example, though the call back works fine)

Then, using DISA, Asterisk will wait 8 seconds and call
me back using the trunk specified in line h,100. This happens
to be a premicell to make use of bundled minutes. Once I
answer, it asks me for my password & then gives me
a dialtone. I can then ring out on any of my trunks,
exept for the one doing the call back of course.

Example 1

In extensions_custom_conf:

[custom-sipgate-in]
exten = 1234567,1,NoOp(Incoming call from Sip #1234567); replace 1234567
with your Sipgate DID
exten = 1234567,2,ringing(3)
exten = 1234567,3,Wait(5)
exten = 1234567,4,Congestion
exten = 1234567,5,Hangup
exten = h,1,SetCIDNum(${CALLERIDNUM:0})
exten = h,2,GotoIf($["x${CALLERIDNUM}x" = "xMyMobileCLIDx"]?100)
exten = h,3,GotoIf($["x${CALLERIDNUM}x" = "xWife'sMobileCLIDx"]?100)
exten = h,99,Goto(999)
exten = h,100,System(echo channel: SIP/spa mobile/${CALLERIDNUM}
/tmp/${CALLERIDNUM});spa mobile is the name of my chosen callback trunk
exten = h,101,System(echo context: custom-disa-callout
/tmp/${CALLERIDNUM})
exten = h,102,System(echo extension: ${CALLERIDNUM} /tmp/${CALLERIDNUM})
exten = h,103,System(echo priority: 1 /tmp/${CALLERIDNUM})
exten = h,104,System(echo callerid: 01234567890 /tmp/${CALLERIDNUM}) ;
Your CallerID for your SIP account goes here
exten = h,105,System(echo sleep 8 /tmp/${CALLERIDNUM}.2)
exten = h,106,System(echo cp /tmp/${CALLERIDNUM}
/var/spool/asterisk/outgoing /tmp/${CALLERIDNUM}.2)
exten = h,107,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten = h,108,System(/tmp/${CALLERIDNUM}.2)
exten = h,109,Goto(999)
exten = h,999,Hangup()

[custom-disa-callout]
exten = s,1,Playback(enter_pin)
exten = s,2,Authenticate(17599)
exten = s,3,Background(pls-wait-connect-call)
exten = s,4,DISA(no-password|from-internal)

***************************************

edit or create & edit disa.conf (in /etc/asterisk)

add the line

SecureNumericPassword|outbound-allroutes ;replace SecureNumericPassword with
numbers!

***************************************

Create a DID (1234567)

Point it to custom app, replace 1234567 with your Sipgate DID
custom-sipgate-in,1234567,1

=======================================

Example 2

In extensions_custom.conf

[custom-landline-in]
exten = 7654321,1,NoOp(Incoming call from Sip #7654321)
exten = 7654321,2,ringing(3)
exten = 7654321,3,Wait(5)
exten = 7654321,4,Congestion
exten = 7654321,5,Hangup
exten = h,1,Goto(100)
exten = h,100,SetVar(num=0044${CALLERIDNUM:1})
exten = h,101,GotoIf($[$num :
^0044[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]]?:999) ; Priority
999 should be a Hangup()
exten = h,102,SetCIDNum($num)
exten = h,103,System(echo channel: IAX2/sipdiscount/${CALLERIDNUM}
/tmp/${CALLERIDNUM})
exten = h,104,System(echo context: custom-disa-callout
/tmp/${CALLERIDNUM})
exten = h,105,System(echo extension: ${CALLERIDNUM} /tmp/${CALLERIDNUM})
exten = h,106,System(echo priority: 1 /tmp/${CALLERIDNUM})
exten = h,107,System(echo callerid: 01234567890 /tmp/${CALLERIDNUM}) ;
Your CallerID for your SIP account goes here
exten = h,108,System(echo sleep 20 /tmp/${CALLERIDNUM}.2)
exten = h,109,System(echo cp /tmp/${CALLERIDNUM}
/var/spool/asterisk/outgoing /tmp/${CALLERIDNUM}.2)
exten = h,110,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten = h,111,System(/tmp/${CALLERIDNUM}.2)
exten = h,112,Goto(999)
exten = h,999,Hangup()

**************************************

Create a DID (7654321)

Point it to custom app, replace 7654321 with your Sipgate DID
custom-landline-in,7654321,1

**************************************

In the above example, I'm attempting to allow a call back
ONLY to numbers that start 01 or 02 and are 11 digits
long - so that it can be used from any landline or payphone.

Line h,100 strips the leading zero & prepends 0044 and
sets this number as the variable num

Line h,100 checks that the number (now) is in the format
00441XXXXXXXXX or 00442XXXXXXXXX, I think. If the number
isn't in this format, it should go to priority 999,
which is a hang up.

Unfortunately, the call back nevers happens. (it works great
in example 1)

Any experts see any errors around lines h,100 to 103 in example 2?


  #2  
Old October 29th 05, 01:05 PM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 209
Default Asterisk - remote ringback



||| Any experts see any errors around lines h,100 to 103 in example 2?
|||
|||
|| you could try
||
|| exten = h,100,SetVar(test=${CALLERIDNUM:2:1})
|| exten = h,101,GotoIf($[${test} = [1-2]]?103) ; Priority 103 would be
|| the continuation of the call
|| exten = h,102,Goto (custom-landline-in,h,999);
||
|| This has assumed the cli is presented in UK number format not 0044
|| also I havent tested the length but thats not hard.
||
|| I havn't tested that it would work but it looks ok.
||
|| Ian
|| www.cyber-cottage.co.uk

Hello Ian,

Thanks for taking the time to reply.

I will check out your suggestion!

Could you, by any chance explain the arguments used in:
exten = h,101,GotoIf($[${test} = [1-2]]?103)

Cheers.


  #3  
Old October 29th 05, 06:15 PM posted to uk.telecom.voip
Ian
external usenet poster
 
Posts: 289
Default Asterisk - remote ringback


"Jono" wrote in message
o.uk...


||| Any experts see any errors around lines h,100 to 103 in example 2?
|||
|||
|| you could try
||
|| exten = h,100,SetVar(test=${CALLERIDNUM:2:1})
|| exten = h,101,GotoIf($[${test} = [1-2]]?103) ; Priority 103 would be
|| the continuation of the call
|| exten = h,102,Goto (custom-landline-in,h,999);
||
|| This has assumed the cli is presented in UK number format not 0044
|| also I havent tested the length but thats not hard.
||
|| I havn't tested that it would work but it looks ok.
||
|| Ian
|| www.cyber-cottage.co.uk

Hello Ian,

Thanks for taking the time to reply.

I will check out your suggestion!

Could you, by any chance explain the arguments used in:
exten = h,101,GotoIf($[${test} = [1-2]]?103)

Cheers.


Havng reread it it looks wrong.

The following should work though
(still not tested it but it looks ok)

exten = h,101,GotoIf( $["${CALLERIDNUM:1:1}" = "1"]?105) ; Priority 105
would be the continuation of the call
exten = h,102,GotoIf( $["${CALLERIDNUM:1:1}" = "2"]?105) ; Priority 105
would be the continuation of the call
exten = h,103,GotoIf ($[${LEN(${CALLERIDNUM})} = 11]?105) ; Priority 105
would be the continuation of the call
exten = h,104,Goto (custom-landline-in,h,999);

as to what its doing 101 checks to see if the second digit is 102 checks to
see if its 2 then 103 checks that its 11 digits long.

Ian
www.cyber-cottage.co.uk


  #4  
Old October 29th 05, 06:38 PM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 209
Default Asterisk - remote ringback



Ian" spam"AT wrote:

|| as to what its doing 101 checks to see if the second digit is 102
|| checks to see if its 2 then 103 checks that its 11 digits long.
||
|| Ian
|| www.cyber-cottage.co.uk

That's very clever. I've been amazed at how many different ways there are of
doing things.

I've (only just) got it all working with the following:

[custom-landline-in]
exten = 7654321,1,NoOp(Incoming call from Sip #7654321)
exten = 7654321,2,ringing(3)
exten = 7654321,3,Wait(5)
exten = 7654321,4,Congestion
exten = 7654321,5,Hangup
exten = h,1,Goto(100)
exten = h,100,GotoIf(${CALLERIDNUM} :
0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)
exten = h,101,System(echo channel: IAX2/sipdiscount/0044${CALLERIDNUM:1}
/tmp/${CALLERIDNUM})
exten = h,102,System(echo context: custom-disa-callout
/tmp/${CALLERIDNUM})
exten = h,103,System(echo extension: ${CALLERIDNUM} /tmp/${CALLERIDNUM})
exten = h,104,System(echo priority: 1 /tmp/${CALLERIDNUM})
exten = h,105,System(echo callerid: 01234567890 /tmp/${CALLERIDNUM})
exten = h,106,System(echo sleep 20 /tmp/${CALLERIDNUM}.2)
exten = h,107,System(echo cp /tmp/${CALLERIDNUM}
/var/spool/asterisk/outgoing /tmp/${CALLERIDNUM}.2)
exten = h,108,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten = h,109,System(/tmp/${CALLERIDNUM}.2)
exten = h,110,Goto(999)
exten = h,999,Hangup()



  #5  
Old October 29th 05, 07:32 PM posted to uk.telecom.voip
Ian
external usenet poster
 
Posts: 289
Default Asterisk - remote ringback


"Jono" wrote in message
.uk...

exten = h,100,GotoIf(${CALLERIDNUM} :

0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)

I can see that you have a false destination but no true destination, Does i
fail if you dial in with a mobile or have international CLI.? I have not
seen Gotoif documented like this. are you sure its not just steppng through
as i can see a clossing bracket but no opening one.


Ian


  #6  
Old October 29th 05, 07:45 PM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 73
Default Asterisk - remote ringback


"Ian" spam"AT"bathfordhill.co.uk wrote in message
...

"Jono" wrote in message
.uk...

exten = h,100,GotoIf(${CALLERIDNUM} :

0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)

I can see that you have a false destination but no true destination, Does
i
fail if you dial in with a mobile or have international CLI.? I have not
seen Gotoif documented like this. are you sure its not just steppng
through
as i can see a clossing bracket but no opening one.


Ian



Well spotted..........it doesn't fail on my mobile....funny, I thought it
did - it must've failed before for some other reason. Bugger. What's
missing?


  #7  
Old October 30th 05, 09:59 AM posted to uk.telecom.voip
Ian
external usenet poster
 
Posts: 289
Default Asterisk - remote ringback


"Jono" wrote in message
o.uk...

"Ian" spam"AT"bathfordhill.co.uk wrote in message
...

"Jono" wrote in message
.uk...

exten = h,100,GotoIf(${CALLERIDNUM} :

0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)

I can see that you have a false destination but no true destination,

Does
i
fail if you dial in with a mobile or have international CLI.? I have not
seen Gotoif documented like this. are you sure its not just steppng
through
as i can see a clossing bracket but no opening one.


Ian



Well spotted..........it doesn't fail on my mobile....funny, I thought it
did - it must've failed before for some other reason. Bugger. What's
missing?


Well I dont know whats missing as Iv never seen this way of using the Gotoif
command. Where is this way documented ?
Personaly I use it like i posted earlier or comparing against entries in
the database.
The wiki has some good info on Gotoif its worth a read.
For what you are trying to do I would use authenticate a that way it proves
the caller has the rights to get the call back.
Details of using authenticate and the internal database are at
http://www.cyber-cottage.co.uk/wiki/.../Asterisk_auth and more in the
wiki

Ian


  #8  
Old October 30th 05, 10:11 AM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 209
Default Asterisk - remote ringback



Ian" spam"AT wrote:
|| "Jono" wrote in message
|| o.uk...
|||
||| "Ian" spam"AT"bathfordhill.co.uk wrote in message
||| ...
||||
|||| "Jono" wrote in message
|||| .uk...
||||
||||| exten = h,100,GotoIf(${CALLERIDNUM} :
|||| 0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)
||||
|||| I can see that you have a false destination but no true destination,
|||| Does i
|||| fail if you dial in with a mobile or have international CLI.? I have
|||| not seen Gotoif documented like this. are you sure its not just
|||| steppng through
|||| as i can see a clossing bracket but no opening one.
||||
||||
|||| Ian
||||
||||
|||
||| Well spotted..........it doesn't fail on my mobile....funny, I
||| thought it did - it must've failed before for some other reason.
||| Bugger. What's missing?
|||
|||
|| Well I dont know whats missing as Iv never seen this way of using the
|| Gotoif command. Where is this way documented ?
|| Personaly I use it like i posted earlier or comparing against entries
|| in the database.
|| The wiki has some good info on Gotoif its worth a read.
|| For what you are trying to do I would use authenticate a that way it
|| proves the caller has the rights to get the call back.
|| Details of using authenticate and the internal database are at
|| http://www.cyber-cottage.co.uk/wiki/.../Asterisk_auth and more
|| in the wiki
||
|| Ian

Thank you Ian.

I've been in discussion with a chap on the voxilla website. He's helped me a
great deal - I have a different call back number, as a direct result, that
is doing exactly what I need for that application. (it authenticates by
CLID)

http://voxilla.com/PNphpBB2-viewtopi...c-start-0.html

However, for this particular application, I want to be able to call from any
(& only a) landline, then call back to the same landline, then authenticate
by password & get a VOIP dialtone. (Actually I will then want to restrict
calls to landlines @ the dialtone as well) I think I'm being a little dense
& am not getting too far with the latest attempt!


  #9  
Old October 30th 05, 02:19 PM posted to uk.telecom.voip
Jono
external usenet poster
 
Posts: 209
Default Asterisk - remote ringback



Ian" spam"AT wrote:
|| "Jono" wrote in message
|| o.uk...
|||
||| "Ian" spam"AT"bathfordhill.co.uk wrote in message
||| ...
||||
|||| "Jono" wrote in message
|||| .uk...
||||
||||| exten = h,100,GotoIf(${CALLERIDNUM} :
|||| 0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999)
||||
|||| I can see that you have a false destination but no true destination,
|||| Does i
|||| fail if you dial in with a mobile or have international CLI.? I have
|||| not seen Gotoif documented like this. are you sure its not just
|||| steppng through
|||| as i can see a clossing bracket but no opening one.
||||
||||
|||| Ian
||||
||||
|||
||| Well spotted..........it doesn't fail on my mobile....funny, I
||| thought it did - it must've failed before for some other reason.
||| Bugger. What's missing?
|||
|||
|| Well I dont know whats missing as Iv never seen this way of using the
|| Gotoif command. Where is this way documented ?
|| Personaly I use it like i posted earlier or comparing against entries
|| in the database.
|| The wiki has some good info on Gotoif its worth a read.
|| For what you are trying to do I would use authenticate a that way it
|| proves the caller has the rights to get the call back.
|| Details of using authenticate and the internal database are at
|| http://www.cyber-cottage.co.uk/wiki/.../Asterisk_auth and more
|| in the wiki
||
|| Ian

Hi Ian,

The kindly chap on Voxilla, "chandave" just posted a reply...........and now
it's working as a hoped it would.

exten = h,100,GotoIf($[${CALLERIDNUM} :
0[1-2][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]])?:999) ;999 is a hang
up.


 




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Port scan a remote pc? Gary uk.telecom.broadband (UK broadband) 18 November 29th 05 08:49 PM
remote call pickup uk.telecom.voip (UK VOIP) 1 October 18th 05 12:41 AM
Remote Login? Old Codger uk.telecom.broadband (UK broadband) 2 September 19th 03 12:37 AM
Remote Desktop over Satellite The Natural Philosopher uk.telecom.broadband (UK broadband) 0 August 22nd 03 12:56 PM
Remote Desktop over Satellite Metronet Support uk.telecom.broadband (UK broadband) 1 August 22nd 03 08:25 AM


All times are GMT +1. The time now is 03:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright 2004-2019 BroadbanterBanter.
The comments are property of their posters.