[asterisk-users] Problem with Read() ?

Jeremy Gault, KD4NED (Senior Engineer) jeremy at voiceopia.com
Thu Jul 17 11:48:12 CDT 2014


All,

I have a weird situation here and haven't been able to turn up any useful
information in searches, so I thought I'd post to the list.

Essentially, I have a customer who wants us to forward some of their calls
to various cell phones. Normally, I'd use FollowMe() for this (that's how
most of our customers are set up.) However, this particular customer has
some requirements that make it impractical to use FollowMe() as far as I
could tell, so I had to engineer a dialplan-based solution instead. Of
note, they DO want the call recipient (on a cell phone) to have to press a
key to confirm the call, so that calls don't end up in personal voice mail
boxes.

So, this is what I did:

I setup a custom context within their configuration to send these forwarded
calls to. Can't remember off the top of my head why I had to use a custom
context as opposed to sending it to the SIP provider directly, but I'm
pretty sure there was a reason. Here's the custom context:

[hosted-1004-outcall]
exten =>
_NXXNXXXXXX,1,Dial(SIP/sip-provider/+1${EXTEN},60,rU(hosted-1004-ccall))
same => n,Busy()

Now, whenever I want to forward a call to a cell phone (or more), I use:

Dial(Local/5555551212 at hosted-1004-outcall
&Local/5555551213 at hosted-1004-outcall)

This sends the call to both phones simultaneously, using the above Dial()
code. As you can see, I'm using the U option to call a subroutine on the
*callee* (cell phone user) when they answer. The code for that is:

[hosted-1004-ccall]
exten => s,1,Read(MOT,pbx/1004/ccall,1,in,3,5)
same => n,GotoIf($["${MOT}" == "1"]?10)
same => n,Set(GOSUB_RESULT=CONTINUE)
same => n,Return()
same => 10,Set(GOSUB_RESULT=)
same => n,Return()
exten => h,1,Set(GOSUB_RESULT=CONTINUE)
same => n,Return()
exten => i,1,Set(GOSUB_RESULT=CONTINUE)
same => n,Return()

The idea here being that "pbx/1004/ccall" is played to the cell phone user
(basically letting them know to press 1 to take the call.) If they press 1,
we return with no result and the call gets connected. Otherwise we return
with CONTINUE and the call is rejected (by the local channel) as busy, and
the next step in the dial plan continues (go to office voice mail -- which
isn't listed here.)

Anyway, this has all worked fine and dandy for quite some time. However, in
the past few weeks I've been getting complaints that whenever they press 1,
nothing happens, and the menu is simply repeated. Eventually it exceeds the
timeout/maximum tries and disconnects.

I've tried testing this with my cell phone, with my cable company phone, IP
phones, etc. Same result.

I've even upgraded from 11.7.0 to 11.11.0 just today (in case there was a
bugfix for it) -- same problem.

What's weird is that I can set up a DID to call Read() and it works fine.
It just seems to not hear (for lack of a better term) the digits when being
called as the U parameter to dial.

FWIW, I have also tested NOT using the Local/NXXNXXXXXX dialing and
actually using a Dial to our upstream carrier, still with the U option, and
same results. So, I honestly don't think it is an issue with using Local
channels.

Any thoughts? Am I just blatantly missing something? Or is something broke?

Thanks in advance. :)

-- 
Jeremy Gault, KD4NED
Senior Engineer, Voiceopia
office: (423) 509-8000 x 102
toll-free: (866) 928-4078 x 102
fax: (423) 244-0565
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140717/49be4b00/attachment.html>


More information about the asterisk-users mailing list