Asterisk - The Open Source Telephony Project
18.5.0
|
Public Member Functions | |
def | __init__ (self, line, retry_interval, max_attempts, outbound_proxy) |
def | parse (self, line) |
def | parse_host_part (self, host_part) |
def | parse_user_part (self, user_part) |
def | write (self, pjsip, nmapped) |
Data Fields | |
authuser | |
domain | |
expiry | |
extension | |
max_attempts | |
outbound_proxy | |
peer | |
port | |
protocol | |
retry_interval | |
secret | |
Class for parsing and storing information in a register line in sip.conf.
Definition at line 945 of file sip_to_pjsip.py.
def __init__ | ( | self, | |
line, | |||
retry_interval, | |||
max_attempts, | |||
outbound_proxy | |||
) |
Definition at line 949 of file sip_to_pjsip.py.
def parse | ( | self, | |
line | |||
) |
Initial parsing routine for register lines in sip.conf. This splits the line into the part before the host, and the part after the '@' symbol. These two parts are then passed to their own parsing routines
Definition at line 955 of file sip_to_pjsip.py.
References Registration.parse_host_part(), and Registration.parse_user_part().
def parse_host_part | ( | self, | |
host_part | |||
) |
Parsing routine for the part after the final '@' in a register line. The strategy is to use partition calls to peel away the data starting from the right and working to the left.
Definition at line 974 of file sip_to_pjsip.py.
Referenced by Registration.parse().
def parse_user_part | ( | self, | |
user_part | |||
) |
Parsing routine for the part before the final '@' in a register line. The only mandatory part of this line is the user portion. The strategy here is to start by using partition calls to remove everything to the right of the user, then finish by using rpartition calls to remove everything to the left of the user.
Definition at line 986 of file sip_to_pjsip.py.
Referenced by Registration.parse().
def write | ( | self, | |
pjsip, | |||
nmapped | |||
) |
Write parsed registration data into a section in pjsip.conf Most of the data in self will get written to a registration section. However, there will also need to be an auth section created if a secret or authuser is present. General mapping of values: A combination of self.host and self.port is server_uri A combination of self.user, self.domain, and self.domainport is client_uri self.expiry is expiration self.extension is contact_user self.protocol will map to one of the mapped transports self.secret and self.authuser will result in a new auth section, and outbound_auth will point to that section. XXX self.peer really doesn't map to anything :(
Definition at line 1027 of file sip_to_pjsip.py.
References Registration.authuser, sip_registry.authuser, sip_subscription_mwi.authuser, minivm_account.domain, domain.domain, Registration.domain, sip_pvt.domain, blind_transfer_cb_data.domain, iax2_peer.expiry, chan_iax2_pvt.expiry, Registration.expiry, iax2_dpcache.expiry, sip_pvt.expiry, sip_registry.expiry, gosub_stack_frame.extension, unistim_device.extension, Registration.extension, ast_uri.host, srv_record.host, srv_entry.host, ast_dns_srv_record.host, ast_sip_transport_state.host, acl.host, cops_cmts.host, ast_sip_transport.host, ooh323_pvt.host, chan_iax2_pvt.host, websocket_client.host, Registration.max_attempts, Registration.outbound_proxy, iax_template.port, misdn_stack.port, ooh323_pvt.port, ooh323_peer.port, hold_info.port, misdn_bchannel.port, open_receive_channel_ack_message_ip4.port, open_receive_channel_ack_message_ip6.port, robin_list.port, iax2_registry.port, sip_proxy.port, sip_via.port, Registration.port, parsed_dial_string.port, sms_s.protocol, sip_via.protocol, Registration.protocol, Registration.retry_interval, iax2_user.secret, iax2_peer.secret, iax2_registry.secret, chan_iax2_pvt.secret, sip_auth.secret, Registration.secret, sip_peer.secret, sip_registry.secret, sip_subscription_mwi.secret, create_addr_info.secret, sip_to_pjsip.set_value(), uriparams.user, contact.user, iax_template.user, icalendar_pvt.user, caldav_pvt.user, exchangecal_pvt.user, ast_calendar_tech.user, parking_limits_pvt.user, ewscal_pvt.user, ooh323_pvt.user, sip_outbound_publisher.user, http_route.user, ast_xmpp_client_config.user, confbridge_hook_data.user, and dtmf_menu_hook_pvt.user.
authuser |
Definition at line 1010 of file sip_to_pjsip.py.
Referenced by Registration.write().
Definition at line 1025 of file sip_to_pjsip.py.
Referenced by Registration.write().
expiry |
Definition at line 984 of file sip_to_pjsip.py.
Referenced by Registration.write().
Definition at line 981 of file sip_to_pjsip.py.
Referenced by Registration.write().
max_attempts |
Definition at line 951 of file sip_to_pjsip.py.
Referenced by Registration.write().
outbound_proxy |
Definition at line 952 of file sip_to_pjsip.py.
Referenced by Registration.write().
peer |
Definition at line 994 of file sip_to_pjsip.py.
port |
Definition at line 982 of file sip_to_pjsip.py.
Referenced by Registration.write().
protocol |
Definition at line 995 of file sip_to_pjsip.py.
Referenced by Registration.write().
retry_interval |
Definition at line 950 of file sip_to_pjsip.py.
Referenced by Registration.write().
secret |
Definition at line 1017 of file sip_to_pjsip.py.
Referenced by Registration.write().