예제 #1
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_context(dom):
    """
    <context>pbxfoo</context>
    """
    return firstElementTextByTagName(dom, "context")
예제 #2
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_domain_name(dom):
    """
    <domain_name>pbx.foo.com</domain_name>
    """
    return firstElementTextByTagName(dom, "domain_name")
예제 #3
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_account_id(dom):
    """
    <account_id>1</account_id>
    """
    return firstElementTextByTagName(dom, "account_id")
예제 #4
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_uuid(dom):
    """
    <uuid>ed18eda4-24bf-11dc-913a-37ac3cdbbaa7</uuid>
    """
    return firstElementTextByTagName(dom, "uuid")
예제 #5
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_chan_name(dom):
    """
    <chan_name>sofia/mydomain.com/[email protected]</chan_name>
    """
    return firstElementTextByTagName(dom, "chan_name")
예제 #6
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_callerid_number_field(dom):
    """
    <caller_id_number>0000000000</caller_id_number>
    """
    element_text = firstElementTextByTagName(dom, "caller_id_number")
    return element_text
예제 #7
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_time_field(dom, field_name):
    """
    <answered_time>1182956765107959</answered_time>
    """
    element_text = firstElementTextByTagName(dom, field_name)
    return msepoch2datetime(int(element_text))
예제 #8
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_context(dom):
    """
    <context>pbxfoo</context>
    """
    return firstElementTextByTagName(dom, "context")
예제 #9
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_destination_number_field(dom):
    """
    <destination_number>mydomain.com/[email protected]</destination_number>    
    """
    element_text = firstElementTextByTagName(dom, "destination_number")
    return element_text
예제 #10
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_domain_name(dom):
    """
    <domain_name>pbx.foo.com</domain_name>
    """
    return firstElementTextByTagName(dom, "domain_name")
예제 #11
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_account_id(dom):
    """
    <account_id>1</account_id>
    """
    return firstElementTextByTagName(dom, "account_id")
예제 #12
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_chan_name(dom):
    """
    <chan_name>sofia/mydomain.com/[email protected]</chan_name>
    """
    return firstElementTextByTagName(dom, "chan_name")
예제 #13
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_uuid(dom):
    """
    <uuid>ed18eda4-24bf-11dc-913a-37ac3cdbbaa7</uuid>
    """
    return firstElementTextByTagName(dom, "uuid")
예제 #14
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_time_field(dom, field_name):
    """
    <answered_time>1182956765107959</answered_time>
    """
    element_text = firstElementTextByTagName(dom, field_name)
    return msepoch2datetime(int(element_text))
예제 #15
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_callerid_number_field(dom):
    """
    <caller_id_number>0000000000</caller_id_number>
    """
    element_text = firstElementTextByTagName(dom, "caller_id_number")
    return element_text
예제 #16
0
파일: cdrutil.py 프로젝트: hecatae/wikipbx
def get_destination_number_field(dom):
    """
    <destination_number>mydomain.com/[email protected]</destination_number>    
    """
    element_text = firstElementTextByTagName(dom, "destination_number")
    return element_text