Command Builders

Command wrappers and helpers

switchio.commands.build_originate_cmd(dest_url, uuid_str=None, profile='external', gateway=None, app_name='park', app_arg_str='', dp_exten=None, dp_type='xml', dp_context='default', proxy=None, endpoint='sofia', timeout=60, caller_id='Mr_switchio', caller_id_num='1112223333', codec='PCMU', abs_codec='', xheaders=None, **kwargs)

Return a formatted originate command string conforming to the syntax dictated by mod_commands of the form:

originate <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]

dest_url : str
call destination url with format <username_uri>@<domain>:<port>
profile : str
sofia profile (UA) name to use for making outbound call
dp_extension: str
destination dp extension where the originating session (a-leg) will processed just after the call is answered
originate command : string or callable
full cmd string if uuid_str is not None, else callable f(uuid_str) -> full cmd string