No Specific number, just to pass the call onto the trunk.
So we are using this for mobiles asking the caller to use their mobile as it is free rather then using the trunk, so after the caller presses the digits, they would get a thankyou and then the number and call would be passed to trunk to complete the call.
I don’t have a clue what your attempting here, but the only place where you can use the Trunks destination is on an Inbound Route, otherwise it will fail as you have already learned. You can create a new Custom Destination with a target of:
outbound-allroutes,${FROM_DID},1
And send your caller to this Custom Destination it should work to send the call outbound.
I’m trying to user user interaction before calling mobiles so it is 07.
Here is the worKflow in more detail
User is calling 07XXXXXXXXX
Outbound Route (Dial Plan (07.) >IVR (Digits Pressed)>Announcement>Trunk to pass the call onto the provider.
I don’t have to go to the announcments and can go from the IVR to the outbound trunk, however this dosen’t work either.
I did try your custom destination and this just hanged up the call see the log bellow
Executing [s@app-announcement-1:4] NoOp(“SIP/9002-0000019a”, “Playing announcement out to trunk”) in new stack
– Executing [s@app-announcement-1:5] Playback(“SIP/9002-0000019a”, “auth-thankyou,noanswer”) in new stack
– <SIP/9002-0000019a> Playing ‘auth-thankyou.ulaw’ (language ‘en’)
– Executing [s@app-announcement-1:6] Goto(“SIP/9002-0000019a”, “outbound-allroutes,1”) in new stack
– Goto (outbound-allroutes,s,1)
[2018-09-05 11:57:25] WARNING[9431][C-00000023]: pbx.c:4461 __ast_pbx_run: Channel ‘SIP/9002-0000019a’ sent to invalid extension but no invalid handler: context,exten,priority=outbound-allroutes,s,1
If I could chime in here for a second… that’s how you end up with multi-thousand dollar phone bills.
What you are trying to do is a “Trunk-to-trunk” route, where you call in on one trunk, and then dial out on another route. By design, this normally isn’t allowed; that is how toll fraud happens.
As @lgaetz pointed out, this would normally be accomplished with a custom destination, that way you keep control over what number is being dialed.
One way to do it, however, would be to have a “soft phone” that would allow a mobile to register with your PBX, and then it would become an extension that could dial out.
At the IVR the user presses two digits(1*) which if correct forwards the call onto anouncments which works, after the announcment is played the call will then need to go onto an outbound trunk now this is where it fails, it seems like the 07 number the user is dialling isn’t getting through ( as in the number to hand off to the trunk)
Example:
The user dials 07 121212121, then gets to an IVR, then presses two digits, and then you want to play an announcement and then send 121212121 out the trunk?
UK mobile numbers begin with 07, So the user would dial 07983504466 for example, this would be filtered via dial patterns tot he IVR, where the user has to dial two buttons to pass the call through, then they get a thankyou message, after the thankyou we would like the 07983504466 number the extension/user dialled to be forwarded onto the trunk. The IVR is used because calling uk mobiles on trunk providers isn’t cheap, and the have to press certain digits to allow the call through.
You want to add a PIN to the outbound route for cell phones?
That seems like something the system should do out of the box.
If using a PIN is too easy, you could write a custom context that would simulate a PIN. That way, you could control all aspects of the interaction - the announcement, the get-digits, the comparison, etc.
Pin is a great idea however I would still need an IVR message telling users which digits to press and also advising them to use a cell phone rather then the voip system
I think I understand. You don’t want an IVR, you just want an announcement before it dials.
So something like Station --> Announcement --> Outbound Route
That should be easy enough to do with a dialplan.
The IVR (Interactive Voice Response) isn’t really doing anything in your scenario. No need for a “call tree” or any such thing… you just want to play a message to the station that is dialing.