jaxl-python 0.0.52__py3-none-any.whl → 0.0.53__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jaxl/api/client/_scm_version.py +2 -2
- jaxl/api/client/api/v1/v1_calls_dtmf_create.py +127 -0
- jaxl/api/client/models/call_dtmf_request_request.py +67 -0
- jaxl/api/resources/apps.py +52 -0
- jaxl/api/resources/calls.py +29 -0
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/METADATA +56 -3
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/RECORD +11 -9
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/WHEEL +0 -0
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/entry_points.txt +0 -0
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/licenses/LICENSE.md +0 -0
- {jaxl_python-0.0.52.dist-info → jaxl_python-0.0.53.dist-info}/top_level.txt +0 -0
jaxl/api/client/_scm_version.py
CHANGED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (c) 2010-present by Jaxl Innovations Private Limited.
|
|
3
|
+
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms,
|
|
7
|
+
with or without modification, is strictly prohibited.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from http import HTTPStatus
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
12
|
+
|
|
13
|
+
import httpx
|
|
14
|
+
|
|
15
|
+
from ... import errors
|
|
16
|
+
from ...client import AuthenticatedClient, Client
|
|
17
|
+
from ...models.call_dtmf_request_request import CallDtmfRequestRequest
|
|
18
|
+
from ...types import Response
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _get_kwargs(
|
|
22
|
+
id: int,
|
|
23
|
+
*,
|
|
24
|
+
client: AuthenticatedClient,
|
|
25
|
+
json_body: CallDtmfRequestRequest,
|
|
26
|
+
) -> Dict[str, Any]:
|
|
27
|
+
url = "{}/v1/calls/{id}/dtmf/".format(client.base_url, id=id)
|
|
28
|
+
|
|
29
|
+
headers: Dict[str, str] = client.get_headers()
|
|
30
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
31
|
+
|
|
32
|
+
json_json_body = json_body.to_dict()
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
"method": "post",
|
|
36
|
+
"url": url,
|
|
37
|
+
"headers": headers,
|
|
38
|
+
"cookies": cookies,
|
|
39
|
+
"timeout": client.get_timeout(),
|
|
40
|
+
"json": json_json_body,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
|
|
45
|
+
if response.status_code == HTTPStatus.OK:
|
|
46
|
+
return None
|
|
47
|
+
if response.status_code == HTTPStatus.NOT_FOUND:
|
|
48
|
+
return None
|
|
49
|
+
if client.raise_on_unexpected_status:
|
|
50
|
+
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
|
|
51
|
+
else:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
|
|
56
|
+
return Response(
|
|
57
|
+
status_code=HTTPStatus(response.status_code),
|
|
58
|
+
content=response.content,
|
|
59
|
+
headers=response.headers,
|
|
60
|
+
parsed=_parse_response(client=client, response=response),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def sync_detailed(
|
|
65
|
+
id: int,
|
|
66
|
+
*,
|
|
67
|
+
client: AuthenticatedClient,
|
|
68
|
+
json_body: CallDtmfRequestRequest,
|
|
69
|
+
) -> Response[Any]:
|
|
70
|
+
"""Send DTMF digits into an active call.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
id (int):
|
|
74
|
+
json_body (CallDtmfRequestRequest):
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
78
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
Response[Any]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
kwargs = _get_kwargs(
|
|
85
|
+
id=id,
|
|
86
|
+
client=client,
|
|
87
|
+
json_body=json_body,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
response = httpx.request(
|
|
91
|
+
verify=client.verify_ssl,
|
|
92
|
+
**kwargs,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return _build_response(client=client, response=response)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
async def asyncio_detailed(
|
|
99
|
+
id: int,
|
|
100
|
+
*,
|
|
101
|
+
client: AuthenticatedClient,
|
|
102
|
+
json_body: CallDtmfRequestRequest,
|
|
103
|
+
) -> Response[Any]:
|
|
104
|
+
"""Send DTMF digits into an active call.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
id (int):
|
|
108
|
+
json_body (CallDtmfRequestRequest):
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[Any]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
kwargs = _get_kwargs(
|
|
119
|
+
id=id,
|
|
120
|
+
client=client,
|
|
121
|
+
json_body=json_body,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
125
|
+
response = await _client.request(**kwargs)
|
|
126
|
+
|
|
127
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (c) 2010-present by Jaxl Innovations Private Limited.
|
|
3
|
+
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms,
|
|
7
|
+
with or without modification, is strictly prohibited.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
11
|
+
|
|
12
|
+
import attr
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="CallDtmfRequestRequest")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@attr.s(auto_attribs=True)
|
|
18
|
+
class CallDtmfRequestRequest:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
digits (str): DTMF digits to send into the call, e.g. "1", "123#".
|
|
22
|
+
Alphabet: 0-9 * # A-D, at most 32.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
digits: str
|
|
26
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
29
|
+
digits = self.digits
|
|
30
|
+
|
|
31
|
+
field_dict: Dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"digits": digits,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
43
|
+
d = src_dict.copy()
|
|
44
|
+
digits = d.pop("digits")
|
|
45
|
+
|
|
46
|
+
call_dtmf_request_request = cls(
|
|
47
|
+
digits=digits,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
call_dtmf_request_request.additional_properties = d
|
|
51
|
+
return call_dtmf_request_request
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def additional_keys(self) -> List[str]:
|
|
55
|
+
return list(self.additional_properties.keys())
|
|
56
|
+
|
|
57
|
+
def __getitem__(self, key: str) -> Any:
|
|
58
|
+
return self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
61
|
+
self.additional_properties[key] = value
|
|
62
|
+
|
|
63
|
+
def __delitem__(self, key: str) -> None:
|
|
64
|
+
del self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __contains__(self, key: str) -> bool:
|
|
67
|
+
return key in self.additional_properties
|
jaxl/api/resources/apps.py
CHANGED
|
@@ -49,6 +49,32 @@ DUMMY_RESPONSE = JaxlWebhookResponse(prompt=[" . "], num_characters=0)
|
|
|
49
49
|
|
|
50
50
|
logger = logging.getLogger(__name__)
|
|
51
51
|
|
|
52
|
+
# BaseJaxlApp hooks that only ever fire over the `/stream/` websocket. An app
|
|
53
|
+
# overriding any of them expects a stream; if none opens, tell the developer
|
|
54
|
+
# (see `_warn_if_stream_never_opens`).
|
|
55
|
+
STREAMING_HANDLERS = (
|
|
56
|
+
"on_stream_connect",
|
|
57
|
+
"handle_speech_detection",
|
|
58
|
+
"handle_audio_chunk",
|
|
59
|
+
"handle_speech_chunks",
|
|
60
|
+
"handle_speech_segment",
|
|
61
|
+
"handle_transcription",
|
|
62
|
+
"handle_stream_mark",
|
|
63
|
+
)
|
|
64
|
+
# How long after the SETUP webhook Jaxl normally takes to open `/stream/`
|
|
65
|
+
# (it opens it right after the setup response; seconds, generous for slow
|
|
66
|
+
# links and grout).
|
|
67
|
+
STREAM_OPEN_GRACE_S = 8.0
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def streaming_handlers_overridden(app: BaseJaxlApp) -> List[str]:
|
|
71
|
+
"""Names of the streaming hooks this app implements (overrides)."""
|
|
72
|
+
return [
|
|
73
|
+
name
|
|
74
|
+
for name in STREAMING_HANDLERS
|
|
75
|
+
if getattr(type(app), name, None) is not getattr(BaseJaxlApp, name, None)
|
|
76
|
+
]
|
|
77
|
+
|
|
52
78
|
warnings.filterwarnings(
|
|
53
79
|
"ignore",
|
|
54
80
|
message="FP16 is not supported on CPU; using FP32 instead",
|
|
@@ -198,6 +224,28 @@ def _start_server(
|
|
|
198
224
|
app.hangup = _hangup # type: ignore[method-assign]
|
|
199
225
|
app.send_mark = _send_mark # type: ignore[method-assign]
|
|
200
226
|
|
|
227
|
+
streaming_handlers = streaming_handlers_overridden(app)
|
|
228
|
+
|
|
229
|
+
async def _warn_if_stream_never_opens(call_id: int) -> None:
|
|
230
|
+
"""F-193 (2026-09-25): the #1 silent failure for new SDK users — the
|
|
231
|
+
app implements streaming handlers, the webhook fires, and then
|
|
232
|
+
nothing: no audio, no error. Cause: the IVR was registered as a
|
|
233
|
+
plain webhook URL, so Jaxl never opens `/stream/` (that needs
|
|
234
|
+
`?stream` in the IVR URL). Say so, loudly, once per call."""
|
|
235
|
+
await asyncio.sleep(STREAM_OPEN_GRACE_S)
|
|
236
|
+
if call_id in wss:
|
|
237
|
+
return
|
|
238
|
+
logger.warning(
|
|
239
|
+
"⚠️ call#%s: your app implements %s but Jaxl never opened the "
|
|
240
|
+
"/stream/ websocket for this call in %.0fs. Streaming needs a "
|
|
241
|
+
"STREAMING webhook IVR — re-create it with `?stream` (or "
|
|
242
|
+
"`?stream&conv` for conversational apps) in the URL, e.g. "
|
|
243
|
+
"`jaxl ivrs create --message \"https://<host>/webhook/?stream\"`.",
|
|
244
|
+
call_id,
|
|
245
|
+
", ".join(streaming_handlers),
|
|
246
|
+
STREAM_OPEN_GRACE_S,
|
|
247
|
+
)
|
|
248
|
+
|
|
201
249
|
@server.api_route(
|
|
202
250
|
"/webhook/",
|
|
203
251
|
methods=["POST", "DELETE"],
|
|
@@ -219,6 +267,10 @@ def _start_server(
|
|
|
219
267
|
elif req.data:
|
|
220
268
|
response = await app.handle_user_data(req)
|
|
221
269
|
else:
|
|
270
|
+
if streaming_handlers and req.state.call_id not in wss:
|
|
271
|
+
asyncio.get_running_loop().create_task(
|
|
272
|
+
_warn_if_stream_never_opens(req.state.call_id)
|
|
273
|
+
)
|
|
222
274
|
response = await app.handle_setup(req)
|
|
223
275
|
elif req.event == JaxlWebhookEvent.OPTION:
|
|
224
276
|
assert request.method == "POST"
|
jaxl/api/resources/calls.py
CHANGED
|
@@ -26,6 +26,7 @@ from jaxl.api.client.api.v1 import (
|
|
|
26
26
|
v1_calls_tags_create,
|
|
27
27
|
v1_calls_token_create,
|
|
28
28
|
v1_calls_transfer_create,
|
|
29
|
+
v1_calls_dtmf_create,
|
|
29
30
|
v1_calls_tts_create,
|
|
30
31
|
v1_calls_usage_retrieve,
|
|
31
32
|
v1_calls_reschedule_create,
|
|
@@ -56,6 +57,9 @@ from jaxl.api.client.models.call_token_response import CallTokenResponse
|
|
|
56
57
|
from jaxl.api.client.models.call_transfer_request_request import (
|
|
57
58
|
CallTransferRequestRequest,
|
|
58
59
|
)
|
|
60
|
+
from jaxl.api.client.models.call_dtmf_request_request import (
|
|
61
|
+
CallDtmfRequestRequest,
|
|
62
|
+
)
|
|
59
63
|
from jaxl.api.client.models.call_tts_request_request import (
|
|
60
64
|
CallTtsRequestRequest,
|
|
61
65
|
)
|
|
@@ -325,6 +329,19 @@ def calls_tts(args: Dict[str, Any]) -> Response[Any]:
|
|
|
325
329
|
)
|
|
326
330
|
|
|
327
331
|
|
|
332
|
+
def calls_dtmf(args: Dict[str, Any]) -> Response[Any]:
|
|
333
|
+
"""Send DTMF digits into an active call (e.g. drive the far side's IVR)."""
|
|
334
|
+
return v1_calls_dtmf_create.sync_detailed(
|
|
335
|
+
id=args["call_id"],
|
|
336
|
+
client=jaxl_api_client(
|
|
337
|
+
JaxlApiModule.CALL,
|
|
338
|
+
credentials=args.get("credentials", None),
|
|
339
|
+
auth_token=args.get("auth_token", None),
|
|
340
|
+
),
|
|
341
|
+
json_body=CallDtmfRequestRequest(digits=str(args["digits"])),
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
328
345
|
def calls_tag_add(args: Dict[str, Any]) -> Response[CallTagResponse]:
|
|
329
346
|
return v1_calls_tags_create.sync_detailed(
|
|
330
347
|
call_id=args["call_id"],
|
|
@@ -678,6 +695,18 @@ def _subparser(parser: argparse.ArgumentParser) -> None:
|
|
|
678
695
|
)
|
|
679
696
|
calls_tts_parser.set_defaults(func=calls_tts, _arg_keys=["call_id", "prompt"])
|
|
680
697
|
|
|
698
|
+
calls_dtmf_parser = subparsers.add_parser(
|
|
699
|
+
"dtmf", help="Send DTMF digits into an active call"
|
|
700
|
+
)
|
|
701
|
+
calls_dtmf_parser.add_argument("--call-id", type=int, required=True, help="Call ID")
|
|
702
|
+
calls_dtmf_parser.add_argument(
|
|
703
|
+
"--digits",
|
|
704
|
+
type=str,
|
|
705
|
+
required=True,
|
|
706
|
+
help="Digits to send, e.g. 1 or 123# (0-9 * # A-D, max 32)",
|
|
707
|
+
)
|
|
708
|
+
calls_dtmf_parser.set_defaults(func=calls_dtmf, _arg_keys=["call_id", "digits"])
|
|
709
|
+
|
|
681
710
|
calls_get_parser = subparsers.add_parser("get", help="Get a call detail")
|
|
682
711
|
calls_get_parser.add_argument(
|
|
683
712
|
"--call-id",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaxl-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.53
|
|
4
4
|
Summary: Official Python SDK and CLI for interfacing with the Jaxl API. Manage calls, messages, IVRs, devices, teams, payments, campaigns, streaming transcriptions and AI Agents. Built on OpenAPI, it offers both generated API clients and Pythonic wrappers for ease of use.
|
|
5
5
|
Home-page: https://github.com/jaxl-innovations-private-limited/jaxl-python
|
|
6
6
|
Download-URL: https://github.com/jaxl-innovations-private-limited/jaxl-python/archive/main.zip
|
|
@@ -331,12 +331,16 @@ jaxl calls add --call-id 1234 --email <someone@mycompany.com>
|
|
|
331
331
|
|
|
332
332
|
### Remove External Phone Number from an Active Call
|
|
333
333
|
|
|
334
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
335
|
+
|
|
334
336
|
```bash
|
|
335
337
|
jaxl calls remove --call-id 1234 --e164 +CC<Mobile Number>
|
|
336
338
|
```
|
|
337
339
|
|
|
338
340
|
### Remove Agent from an Active Call
|
|
339
341
|
|
|
342
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
343
|
+
|
|
340
344
|
```bash
|
|
341
345
|
jaxl calls remove --call-id 1234 --email <someone@mycompany.com>
|
|
342
346
|
```
|
|
@@ -348,8 +352,25 @@ jaxl calls tts --call-id 1234 \
|
|
|
348
352
|
--prompt "Hello, this text was injected in the middle of an active call"
|
|
349
353
|
```
|
|
350
354
|
|
|
355
|
+
> Works on Jaxl-carried (SIP) calls of your own organization. The prompt is split on
|
|
356
|
+
> `.` into sentences and spoken to the call by Jaxl's TTS. Not available on calls
|
|
357
|
+
> carried by a BYO Twilio/Exotel account (the API returns 400).
|
|
358
|
+
|
|
359
|
+
### Send DTMF Digits into an Active Call
|
|
360
|
+
|
|
361
|
+
Drive the far side's IVR from your app (e.g. "press 1 for sales"):
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
jaxl calls dtmf --call-id 1234 --digits "1"
|
|
365
|
+
jaxl calls dtmf --call-id 1234 --digits "4521#"
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
> Alphabet `0-9 * # A-D`, at most 32 digits. Jaxl-carried (SIP) calls only.
|
|
369
|
+
|
|
351
370
|
### Play Audio File in an Active Call
|
|
352
371
|
|
|
372
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
373
|
+
|
|
353
374
|
```bash
|
|
354
375
|
jaxl calls play --call-id 1234 --audio /path/to/a/file/on/local/disk/or/public/url
|
|
355
376
|
```
|
|
@@ -358,6 +379,8 @@ jaxl calls play --call-id 1234 --audio /path/to/a/file/on/local/disk/or/public/u
|
|
|
358
379
|
|
|
359
380
|
### Mute a Participant in an Active Call
|
|
360
381
|
|
|
382
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
383
|
+
|
|
361
384
|
Mute a specific cellular user in a call.
|
|
362
385
|
|
|
363
386
|
```bash
|
|
@@ -372,6 +395,8 @@ jaxl calls mute --call-id 1235 --email <someone@mycompany.com>
|
|
|
372
395
|
|
|
373
396
|
### Unmute a Participant in an Active Call
|
|
374
397
|
|
|
398
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
399
|
+
|
|
375
400
|
Unmute a specific cellular user in a call.
|
|
376
401
|
|
|
377
402
|
```bash
|
|
@@ -386,6 +411,8 @@ jaxl calls unmute --call-id 1235 --email <someone@mycompany.com>
|
|
|
386
411
|
|
|
387
412
|
### Hold a Participant in an Active Call
|
|
388
413
|
|
|
414
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
415
|
+
|
|
389
416
|
Put a cellular user on-hold in a call
|
|
390
417
|
|
|
391
418
|
```bash
|
|
@@ -400,6 +427,8 @@ jaxl calls hold --call-id 1235 --email <someone@mycompany.com>
|
|
|
400
427
|
|
|
401
428
|
### Unhold a Participant in an Active Call
|
|
402
429
|
|
|
430
|
+
> **Coming soon** — documented ahead of the backend: this command is not in the CLI yet and there is no server-side participant control behind it today (tracked as F-193 in the Jaxl backend). Use `jaxl calls transfer` / `hangup` meanwhile.
|
|
431
|
+
|
|
403
432
|
Unhold a cellular user in a call
|
|
404
433
|
|
|
405
434
|
```bash
|
|
@@ -424,12 +453,28 @@ Webhook IVRs can be used to programatically control the lifecycle of incoming an
|
|
|
424
453
|
Jaxl will invoke configured webhook URL for subscribed call events. Handle the webhook request and
|
|
425
454
|
use Jaxl SDK to continue and customise the call flows.
|
|
426
455
|
|
|
427
|
-
To create a webhook IVR, use a `https://` URL as `--message` flag
|
|
456
|
+
To create a webhook IVR, use a `https://` URL as `--message` flag. Jaxl SDK apps
|
|
457
|
+
(`jaxl apps run`) serve the webhook at **`/webhook/`** and the realtime stream at
|
|
458
|
+
**`/stream/`** on the same host, so register the `/webhook/` URL of your app:
|
|
428
459
|
|
|
429
460
|
```bash
|
|
430
|
-
|
|
461
|
+
# Plain webhook IVR (call lifecycle events only)
|
|
462
|
+
jaxl ivrs create --message "https://<your-public-host>/webhook/"
|
|
463
|
+
|
|
464
|
+
# Streaming webhook IVR — REQUIRED for the realtime audio / speech /
|
|
465
|
+
# transcription examples below: `?stream` makes Jaxl also open the
|
|
466
|
+
# `/stream/` websocket (derived from your webhook URL) for every call
|
|
467
|
+
jaxl ivrs create --message "https://<your-public-host>/webhook/?stream"
|
|
468
|
+
|
|
469
|
+
# Conversational streaming IVR — your app also SPEAKS back on that
|
|
470
|
+
# websocket (AI agents): add `&conv`
|
|
471
|
+
jaxl ivrs create --message "https://<your-public-host>/webhook/?stream&conv"
|
|
431
472
|
```
|
|
432
473
|
|
|
474
|
+
> Without `?stream` no websocket is opened and streaming handlers never fire —
|
|
475
|
+
> silently. Since `jaxl-python` 1.x the SDK app logs a warning when a streaming
|
|
476
|
+
> handler is implemented but no stream arrives for a call.
|
|
477
|
+
|
|
433
478
|
Next, assign a number to webhook IVR as shown previously under [Assign a Phone Number to IVR by ID](#assign-a-phone-number-to-ivr-by-id). Now, all incoming calls on the number will start with
|
|
434
479
|
webhook before proceeding further.
|
|
435
480
|
|
|
@@ -439,18 +484,26 @@ See [examples](https://github.com/jaxl-innovations-private-limited/jaxl-python/t
|
|
|
439
484
|
|
|
440
485
|
### Realtime Streaming Audio
|
|
441
486
|
|
|
487
|
+
> Requires a **streaming** webhook IVR (`?stream`` in the IVR URL — see above).
|
|
488
|
+
|
|
442
489
|
Refer to [examples](https://github.com/jaxl-innovations-private-limited/jaxl-python/tree/main/examples) directory for working streaming audio examples.
|
|
443
490
|
|
|
444
491
|
### Realtime Streaming Speech Segments
|
|
445
492
|
|
|
493
|
+
> Requires a **streaming** webhook IVR (`?stream`` in the IVR URL — see above).
|
|
494
|
+
|
|
446
495
|
Refer to [examples](https://github.com/jaxl-innovations-private-limited/jaxl-python/tree/main/examples) directory for working streaming speech segments examples.
|
|
447
496
|
|
|
448
497
|
### Realtime Streaming Transcriptions per Speech Segment
|
|
449
498
|
|
|
499
|
+
> Requires a **streaming** webhook IVR (`?stream`` in the IVR URL — see above).
|
|
500
|
+
|
|
450
501
|
Refer to [examples](https://github.com/jaxl-innovations-private-limited/jaxl-python/tree/main/examples) directory for working streaming transcription per speech segment examples.
|
|
451
502
|
|
|
452
503
|
### AI Agent: Realtime Transcriptions STT ➡️ LLM/MCP ➡️ TTS
|
|
453
504
|
|
|
505
|
+
> Requires a **streaming** webhook IVR (`?stream`&conv` in the IVR URL — see above).
|
|
506
|
+
|
|
454
507
|
Refer to [examples](https://github.com/jaxl-innovations-private-limited/jaxl-python/tree/main/examples) directory for working AI Agent examples.
|
|
455
508
|
|
|
456
509
|
### List Subscriptions Payments
|
|
@@ -5,7 +5,7 @@ jaxl/api/base.py,sha256=fggyIuPKlU5eHFsAZUIamLNHXIUFvSKISSIEf3WL3hs,12803
|
|
|
5
5
|
jaxl/api/cli.py,sha256=9ecMKhnPJs61xIYS9sKeWzhIcdbHtAytuyC2OLAygPA,1917
|
|
6
6
|
jaxl/api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
jaxl/api/client/__init__.py,sha256=7jOLlcgIXqZFJErDmmFt_fPHYWSdy38G_XsV3dda650,354
|
|
8
|
-
jaxl/api/client/_scm_version.py,sha256=
|
|
8
|
+
jaxl/api/client/_scm_version.py,sha256=1CS9m8A9Hjx3ZSEzkahUiU7qCXHy_prD5KFbccgrFs0,513
|
|
9
9
|
jaxl/api/client/client.py,sha256=7G25dWTFlmly61VSLw1gEOGet5Mi0VvKAXq5LsLdDl0,2874
|
|
10
10
|
jaxl/api/client/errors.py,sha256=BNjx09agcQ7yXGrhCFFvh4XIZj4WRHugJHspVPxpgPg,483
|
|
11
11
|
jaxl/api/client/types.py,sha256=4mCOKg5tLufDkbRhM3PqU99uQAzOZKVsmxZt2Ent4Dc,1176
|
|
@@ -16,6 +16,7 @@ jaxl/api/client/api/v1/v1_app_organizations_providers_list.py,sha256=wHEPyjgW5KO
|
|
|
16
16
|
jaxl/api/client/api/v1/v1_appusers_me_retrieve.py,sha256=qVwF2kfo6WmEN6FzRIabGCSjFltZnEEmofvLIvbfles,3695
|
|
17
17
|
jaxl/api/client/api/v1/v1_calls_add_create.py,sha256=vvMpJ9LRmnyX61opIV5G1PT08L_OHF7cjKghNivOhdg,3241
|
|
18
18
|
jaxl/api/client/api/v1/v1_calls_audio_retrieve.py,sha256=e5mzAE0bY51Zi_9t7QNhe1EPdTdFr-_GeNRVaY1zjMI,4320
|
|
19
|
+
jaxl/api/client/api/v1/v1_calls_dtmf_create.py,sha256=16vyLDwyuVffIB4rcwP52dp0KwQbLI_AJt_SDQfH87M,3263
|
|
19
20
|
jaxl/api/client/api/v1/v1_calls_hangup_retrieve.py,sha256=F5fa5GgdinkNmaLBehqBUCbbH4iArOqfGu_aP7jM-sw,2913
|
|
20
21
|
jaxl/api/client/api/v1/v1_calls_list.py,sha256=aEH8sZ0Rx-qMDCN81hTFl8GKhdEdllnTwUhBh3_dCHk,18554
|
|
21
22
|
jaxl/api/client/api/v1/v1_calls_messages_create.py,sha256=HQ0F5ugxQRDD6uxo_t78wag-_FIi13gm9J6HxkmZJ6c,3272
|
|
@@ -65,6 +66,7 @@ jaxl/api/client/models/call.py,sha256=Y_g_xNBh-41LAkr5wDUiRNiZhLSwa3XD7rcUMgNkhU
|
|
|
65
66
|
jaxl/api/client/models/call_add_request_request.py,sha256=lUXSJ1O8ZXUkJovtdUu4qrKvdYf8N-pCK1AwCnM3C3A,2375
|
|
66
67
|
jaxl/api/client/models/call_audio_reason.py,sha256=ZQ61jSqkDTnFYtlvbXRNrTc7oZCbWG7tpuB1tpevwBQ,1699
|
|
67
68
|
jaxl/api/client/models/call_cost.py,sha256=jhquLU5H1UVhFXJyzYIRy5_xGxNE2zN7OFbsRMozHP4,1922
|
|
69
|
+
jaxl/api/client/models/call_dtmf_request_request.py,sha256=qR9dcnSQ53NWYy581mijteqpeeuCVT909i7gTcxitmM,1736
|
|
68
70
|
jaxl/api/client/models/call_location_epoch.py,sha256=vQPuPYlau-OvMFfTQrE0j3Pho7u3hqyTZ64eUuQQSzM,1720
|
|
69
71
|
jaxl/api/client/models/call_message_request_request.py,sha256=ew4zbh5GtQbq80yDIRjoXb6Lh19Aw8aLDWvX8z9Kass,2940
|
|
70
72
|
jaxl/api/client/models/call_message_request_type_enum.py,sha256=hPLKrhgeSq5Sj84xSPMJXpEHqtA6cBl8vhCte9fM9U0,385
|
|
@@ -241,8 +243,8 @@ jaxl/api/client/models/why_enum.py,sha256=nKw6yrNvfnHxV2LWz7h_xp6FjeV8FpAJIQL1xV
|
|
|
241
243
|
jaxl/api/resources/__init__.py,sha256=MbzLavKsovxqCnuO7OCNr2uhm3nteST28LQpvW1S320,200
|
|
242
244
|
jaxl/api/resources/_constants.py,sha256=zsljJi9LXNjyCgGcL_jgSQ7gZ1aJXVfKb23KiHwr8wA,245
|
|
243
245
|
jaxl/api/resources/accounts.py,sha256=mqw6_qjbt_N13egeD5JvNmpCIWZOv3NHgeqmgnav4kI,2529
|
|
244
|
-
jaxl/api/resources/apps.py,sha256=
|
|
245
|
-
jaxl/api/resources/calls.py,sha256=
|
|
246
|
+
jaxl/api/resources/apps.py,sha256=IwmhxJPjz7GSSVYtfh-qzj0b4hq-R2UPZUZ8zXIpRF0,22515
|
|
247
|
+
jaxl/api/resources/calls.py,sha256=UGOaCXCLZPqy3ZNBf-07hqvzvW1KsX-JVAwd4gpwmW4,29554
|
|
246
248
|
jaxl/api/resources/campaigns.py,sha256=ZEuFLDp1jmt-Puljm7GD1TdKv-fIuwYCqVstbOgqo5g,8139
|
|
247
249
|
jaxl/api/resources/devices.py,sha256=flLQ5I7grYYG42xYINj5dSgA05cSQFx0kD-8qU2Qq3M,1299
|
|
248
250
|
jaxl/api/resources/ivrs.py,sha256=DFfbcabRJnP87zPJeBqmlhxo3wJbKgkzp10WB4DYUEg,9672
|
|
@@ -255,9 +257,9 @@ jaxl/api/resources/payments.py,sha256=DDu0LmUo4cLTNLHcf2J-Ih1WcrNBldzbNKNigYdFBX
|
|
|
255
257
|
jaxl/api/resources/phones.py,sha256=HR6lz7-b6j4Z4pIZKfpgUpMm1eXtDPS0dhBnvnEZw_k,7475
|
|
256
258
|
jaxl/api/resources/silence.py,sha256=U1GTAJBafjdL61z1fgjD5GXFSsKXVBs6lVp58mlbegk,5859
|
|
257
259
|
jaxl/api/resources/teams.py,sha256=PR3dHFhC-W1bJzWLc97b9MbX89163Biz27JuJq3XiOw,1666
|
|
258
|
-
jaxl_python-0.0.
|
|
259
|
-
jaxl_python-0.0.
|
|
260
|
-
jaxl_python-0.0.
|
|
261
|
-
jaxl_python-0.0.
|
|
262
|
-
jaxl_python-0.0.
|
|
263
|
-
jaxl_python-0.0.
|
|
260
|
+
jaxl_python-0.0.53.dist-info/licenses/LICENSE.md,sha256=T-fbGlACj45IBNzz3JCcFAsJdCA09zve6JwLoPCaDPY,192
|
|
261
|
+
jaxl_python-0.0.53.dist-info/METADATA,sha256=jnDQQytvv5KA-oD4Urk8O2Ox7MP6hCU84oWxGmiuO50,21362
|
|
262
|
+
jaxl_python-0.0.53.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
263
|
+
jaxl_python-0.0.53.dist-info/entry_points.txt,sha256=XhFRJWzAME-V-gKGYOonsWfjGB7MxrBSZFaRqaq2lx8,50
|
|
264
|
+
jaxl_python-0.0.53.dist-info/top_level.txt,sha256=VrCYX65XRJnrYiNjD5ely6zLf5YGbyhMtQ0SozbLn24,5
|
|
265
|
+
jaxl_python-0.0.53.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|