-
barney__
mc_ what's happening is the ecall fs route park, which is only based on the inbound channel sets the Account-Billing in the ecall ETS
-
barney__
the authz_response handler only sets "Channel-Authorized" true/false
-
barney__
_ = ecallmgr_fs_channel:set_authorized(CallId, was_authorized(AuthorizeReply)),
-
barney__
case AuthorizeReply of
-
barney__
{'true', JObj} ->
-
barney__
AccountBilling = kz_json:get_value(<<"Account-Billing">>, JObj),
-
barney__
ResellerBilling = kz_json:get_value(<<"Reseller-Billing">>, JObj),
-
barney__
_ = ecallmgr_fs_channel:set_billing(CallId, AccountBilling, ResellerBilling),
-
barney__
AuthorizeReply;
-
barney__
_ ->
-
barney__
AuthorizeReply
-
barney__
end.
-
barney__
i've added this and it all now works
-
Ysean
Is anyone successfully using kazoo 4.3 number manager with telnyx to search for and order IPs? This used to work and it stopped some time ago. I see Telnyx updated their API. Is there a way we can get this working again?
-
Ysean
Am I going to have to download the kazoo source, modify the knm_telnyx_util.erl file and compile who knows what to get an updated erlang binary that I can use to replace the outdated API calls?
-
barney__
do you know what's changed?
-
Ysean
they went from an APIv1 to APIv2 and the calls appear to be different.
-
barney__
probably the authentication too
-
barney__
do you have the spec for v1 and v2?
-
barney__
-
barney__
doens't look that complicated to change
-
barney__
basically you need to change the auth headers to a bearer and wrap the payload in data: {} and change the endpoint format
-
barney__
what version of kazoo are you running and which ETS version?
-
barney__
you'll need to change this too core/kazoo_number_manager/src/carriers/knm_telnyx.erl
-
barney__
as all the endpoints have changed
-
Ysean
api v2 is documented so yeah... simple enough. I just didn't want to have to compile junk
-
Ysean
I'm 4.3-142 on this cluster.
-
Ysean
erlang v22
-
Ysean
You say easy... I say "is it time to learn erlang?" haha
-
barney__
lol...that's what i said about 2 years ago.. massive learning curve :)
-
Ysean
haha
-
Ysean
I think I'd pay someone to made the mods at this point.
-
barney__
happy to discuss :)
-
Ysean
Like, I may be willing to spend a day working to figure it out. But, if I can't do it in a day...
-
gontran
nice one, barney__; re account billing patch
-
barney__
thanks gontran
-
gontran
if you and Ysean are discussing a deal for updating the telnyx integration, would you bring me into the conversation? either my day job or myself may be interested to contribute time or monies.
-
Ysean
I'm not opposed
-
gontran
cool; if you all get discussing via IRC, please bring me in; otherwise feel free to hit me up on `gontran⊙lc`
-
Ysean
gontran, speak with barney__
-
barney__
mc_ can I assume that an account id and user id always be unique ?
-
barney__
mc_ next question, what would you say was the fastest/best way to check an account exists? kzd_accounts:fetch(AccountId)
-
mc_
barney__: yes, we use 32 char alpha-numeric strings, so 36^32 ~= 6.334028666297328e49 combinations
-
mc_
barney__: if you just want existence, kz_datamgr:db_exists/1
-
mc_
if you want the account doc or not_found, fetch is good