Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAZOO-3208: track other leg, just don't bind #685

Closed
wants to merge 1 commit into from

Conversation

jamesaimonetti
Copy link
Member

@onnet See if this patch works for you. It is lighter weight than your approach, and takes advantage of the fact that we had the information, we just discarded it!

@onnet
Copy link
Contributor

onnet commented Dec 20, 2014

To make this patch play MOH to transferee, the next additions needed in my case:

-spec maybe_handle_aleg_code(state()) -> 'ok'.
maybe_handle_aleg_code(#state{numbers=Ns
,other_leg=OtherLeg
,patterns=Ps
,a_collected_dtmf = Collected
,call=Call
,call_id=CallId
}) ->
lager:debug("a DTMF timeout, let's check '~s'", [Collected]),
case has_metaflow(Collected, Ns, Ps) of
'false' -> lager:debug("no handler for '~s', unarming", [Collected]);
{'number', N} -> handle_number_metaflow(whapps_call:set_other_leg_call_id(OtherLeg, Call), N, CallId);
{'pattern', P} -> handle_pattern_metaflow(whapps_call:set_other_leg_call_id(OtherLeg, Call), P, CallId)
end.

handle_channel_bridged(#state{other_leg='undefined'}=State, _JObj, OtherLeg) ->
State#state{other_leg=OtherLeg};
handle_channel_bridged(#state{other_leg=_OL, call_id=_CallId}=State, _JObj, _OtherLeg) ->
State.

@jamesaimonetti
Copy link
Member Author

@onnet thanks for the report; let me try this patch locally and add it here if I find similar results. And thanks for testing this out!

@onnet
Copy link
Contributor

onnet commented Dec 22, 2014

Hi James,

No thanks needed, just kick someone to give me an answer to this thread instead :))

https://groups.google.com/forum/#!topic/2600hz-dev/iGqJzOWKMp0

Please, please, please ...
... planning to write cb_call_recordings.erl for third_party_bigcouch stored call recordings, but feel that it could be a waste of time if it will be decided to store call recordings at MODB

Sory for impatience :)

Regards,
Kirill

@jamesaimonetti
Copy link
Member Author

@onnet I am able to get the MOH without your patch above. Can you re-test using a recent 3.18 build to see if the issue is fixed for you? I'm going to close this pull request in the meantime as the work has been merged in.

@jamesaimonetti jamesaimonetti deleted the KAZOO-3208 branch January 5, 2015 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants