Hi, following section 19.1.6 in RFC 3261 and section 4 in RFC 3966 I
coded a tel2sip converter. I hope the following real example is
correct:


--------------------------------
@tel1 = "tel:+34666555444;Ext=200;isub=+123;custom-param=YEAH"

@tel2 = "tel:+(34)66-655-5444;ISUB=+123;CUSTOM-param=yeah;ext=200"

; ### Comparing 2 TEL URI's:
;          - Number must match (after removing visual separators).
;          - All parameters must match.

@tel1 == @tel2
=> true


; ### Converting TEL 2 SIP:
;          - Username becomes the TEL number (after removing visual
separatrors).
;          - TEL parameters are converted to downcase.
;          - TEL parameter "isub" becomes the first parameter (if exists).
;          - TEL parameter "ext" becomes the second parameter (if exists).
;          - Other TEL parameters are sort alphabetically.
;          - TEL parameters are appended to the SIP user part.
;          - "user=phone" is added as SIP URI parameter.

@sip1 = tel2sip(@tel1, "mydomain.org")
=> 
"sip:+34666555444;isub=+123;ext=200;[email protected];user=phone"

@sip2 = tel2sip(@tel2, "mydomain.org")
=> 
"sip:+34666555444;isub=+123;ext=200;[email protected];user=phone"

@sip1 == @sip2
=> true
--------------------------------

I hope the above is correct. Do I miss something?

Thanks a lot.


-- 
Iñaki Baz Castillo
<[email protected]>

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to