Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
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, minivm_account.domain, Registration.domain, ast_sip_transport.domain, ast_sip_domain_alias.domain, ast_http_digest.domain, iax2_peer.expiry, chan_iax2_pvt.expiry, iax2_dpcache.expiry, Registration.expiry, gosub_stack_frame.extension, unistim_device.extension, Registration.extension, ast_cel_event_record.extension, rtp_extmap.extension, ast_ari_channels_originate_args.extension, ast_ari_channels_originate_with_id_args.extension, ast_ari_channels_continue_in_dialplan_args.extension, stasis_app_control_continue_data.extension, ooh323_pvt.host, chan_iax2_pvt.host, ast_dns_srv_record.host, ast_sip_transport_state.host, ast_sip_transport.host, srv_entry.host, ast_uri.host, websocket_client.host, acl.host, srv_record.host, Registration.max_attempts, Registration.outbound_proxy, ast_sip_contact.outbound_proxy, ast_sip_aor.outbound_proxy, ast_sip_endpoint.outbound_proxy, ast_sip_outbound_publish.outbound_proxy, sip_outbound_registration.outbound_proxy, ooh323_pvt.peer, chan_iax2_pvt.peer, parsed_dial_string.peer, Registration.peer, ast_cel_event_record.peer, oprmode.peer, ast_channel_snapshot.peer, ast_bridge_thread_obj.peer, ast_exten.peer, dial_target.peer, ooh323_pvt.port, ooh323_peer.port, iax2_registry.port, parsed_dial_string.port, iax_template.port, Registration.port, ast_dns_srv_record.port, srv_entry.port, stun_addr.port, ast_uri.port, multicast_control_packet.port, ast_xmpp_client_config.port, srv_record.port, sms_s.protocol, Registration.protocol, dundi_answer.protocol, ast_aeap_client_config.protocol, return_reason_data.protocol, Registration.retry_interval, sip_outbound_registration.retry_interval, sip_outbound_registration_client_state.retry_interval, iax2_user.secret, iax2_peer.secret, iax2_registry.secret, chan_iax2_pvt.secret, create_addr_info.secret, Registration.secret, ast_manager_user.secret, caldav_pvt.secret, ewscal_pvt.secret, exchangecal_pvt.secret, icalendar_pvt.secret, sip_to_pjsip.set_value(), ooh323_pvt.user, confbridge_hook_data.user, dtmf_menu_hook_pvt.user, iax_template.user, ast_calendar_tech.user, parking_limits_pvt.user, caldav_pvt.user, ewscal_pvt.user, exchangecal_pvt.user, icalendar_pvt.user, http_route.user, sip_outbound_publisher.user, and ast_xmpp_client_config.user.
Referenced by MultiOrderedConfigParser.write().
authuser |
Definition at line 1010 of file sip_to_pjsip.py.
Referenced by Registration.write().
domain |
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.
Referenced by Registration.write().
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().