Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: ldkeen on June 17, 2010, 12:13:03 AM
-
Sorry if this has been asked before, but I've searched everywhere and can't find what I'm looking for. I have a Call Group for my mobile and currently I just log into the server manager and change the inbound route for the trunk to the Call Group number. I need to allow the kids to do this also but I don't want them logging into the server manager. Is there a way to program an extension so I can dial a number and have the system effectively route the inbound pstn calls to the call group (my mobile).
Lloyd
-
Can't they just *21*xxxx to the group Lloyd?
-
Sorry, I forgot to mention the inbound route is going to a Call Group (3 extensions), so *21 wont work. Thanks anyway.
-
Doh! didn't think of that.
My call groups are all automated.
I've had no need to do that here........
I can't think of any way to do that other than the way you already do..
-
Is there a way to program an extension so I can dial a number and have the system effectively route the inbound pstn calls to the call group (my mobile).
Here's a way...
Send your trunk call to a custom app. All you need is a state indicator (i.e. where should I send this call?), a state changer. and a state switcher..
1. Add a global variable (in headers->extensions.conf; let's call it MYGLOBAL
2. write a custom app to add a couple of custom feature keys, to set MYGLOBAL, and a switcher to flip the calls...
exten=>*1000,1,SET(GLOBAL(MYGLOBAL)=4000)
exten=>*1001,1,SET(GLOBAL(MYGLOBAL)=4001)
exten=>s,1,GoTo(extensions,${MYGLOBAL})
exten=>s,2,Hangup
I'm sure this isn't syntactically correct but you get the idea, and it sorts your problem in 4 lines of code. Now, you can dial *1000 to set destination 4000 (which could be an extension or a call group, doesn't matter) and *1001 to set destination *1001. You can set as many as yoiu like.
The s extension does the switching.
Kind Regards
S
-
Another way would be to do what I have done if the callers number is displayed
Set up a "PTT_CLID" trunk with the Callers number
-
Thanks for that Jeff, I'll check it out, but gippsweb reply got me thinking.. The trunk is a Telstra PSTN so if I dial the trunk preselect (67) followed by *21xxxxxxxxxx# this should activate the Telstra Call Forward facility, but it seems I have some sort of problem with Dahdi. I can receive incoming calls but can't make outgoing. I get the following:
Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
Anyway, I think I'm on the right track. Thanks heaps guys.
Lloyd
-
The one downside to that Lloyd, is that you'd be paying Telstras rates for the diversion instead of the VoIP providers..
I quite like Jeff's idea with the custom app....
-
Hey Jeff,
Thanks heaps for that, worked like a dream. Here's what we have done:
Create a custom app called "divert" with the following (where 5300 and 5301 are call groups aliases):
exten=>*1000,1,SET(GLOBAL(REDIRECT)=5300)
exten=>*1000,2,Playback(call-forwarding)
exten=>*1000,3,Playback(cancelled)
exten=>*1001,1,SET(GLOBAL(REDIRECT)=5301)
exten=>*1001,2,Playback(call-forwarding)
exten=>*1001,3,Playback(activated)
exten=>s,1,agi(selintra,OutCluster,${REDIRECT})
exten=>s,2,Hangup
Point both open and closed trunk settings to this custom app.
Add the following to extensions.conf header
REDIRECT=5300
Note: The setting does not survive a commit or restart.
Rgds, Lloyd
-
Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
In /etc/asterisk/dahdi-channels.conf had to change:
context=from-pstn
to
context=mainmenu
Lloyd
-
I'd need to see more of the console log. - the dial really
Also - what do you get when you do dahdi show status
Best
S
-
Sorry, I was a bit vague, changing the context fixed the problem. Outgoing calls are now working.
Thanks anyway, Lloyd
-
from-pstn should work
there is an alias context in extensions for from-pstn and it just includes mainmenu (or should).
Kind Regards
S