[asterisk-bugs] [JIRA] (ASTERISK-17179) [patch] IMS TEL URI incoming INVITE RFC 3966 not recognized
Geert Van Pamel (JIRA)
noreply at issues.asterisk.org
Wed Feb 19 22:06:03 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-17179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215461#comment-215461 ]
Geert Van Pamel commented on ASTERISK-17179:
--------------------------------------------
Well, I think the solution to this is easy:
(extract from RFC3966)
There are two ways to label the context: via a global number or any
number of its leading digits (e.g., "+33") and via a domain name,
e.g., "houston.example.com". The choice between the two is left to
the "owner" of the local number and is governed by whether there is a
global number or domain name that is a valid identifier for a
particular local number.
Since we receive already a global number; we just copy it into the context (domain).
So we can code this as follows: ( added *dom = uri;* )
} else if ( '+' == uri[0] ) { /* TEL URI INVITE RFC3966 patch */
userinfo = uri; /* Global number without context or domain */
*dom = uri;* /* Global number */
c = strchr(uri, ';'); /* Any further parameters? */
if ( c ) { *c++ = '\0'; uri = c; } else { uri = ""; }
}
> [patch] IMS TEL URI incoming INVITE RFC 3966 not recognized
> -----------------------------------------------------------
>
> Key: ASTERISK-17179
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-17179
> Project: Asterisk
> Issue Type: Improvement
> Components: Channels/chan_sip/Interoperability
> Affects Versions: 11.5.1, 12.0.0
> Environment: All platforms
> Reporter: Geert Van Pamel
> Labels: INVITE, PATCH, RFC3966, RFC5341, SIP, TEL, URI
> Attachments: asterisk_10.1.3_chan_sip_diff.txt, asterisk_10.1.3_reqresp_parser_diff.txt, asterisk-11.5.1-chan_sip-diff.txt, asterisk-11.5.1-reqresp_parser-diff.txt, asterisk-12.0.0-chan_sip-RFC3966_patch.txt, asterisk-12.0.0-reqresp_parser-RFC3966_patch.txt, asterisk-1.6.2.7-sip_chan.dif, asterisk-1.8.13.1-chan_sip-diff.txt, asterisk-1.8.13.1-reqresp_parser-diff.txt, chan_sip-asterisk_1.6.2.9-2ubuntu2.1-diff.txt, chan_sip-asterisk-1.6.2.9.txt, chan_sip-diff.txt
>
>
> This problem exists in ALL versions of Asterisk.
> Asterisk seems *not* to support RFC 3966 TEL URI for INCOMING INVITEs. X-Lite and other clients like Bria are compliant with RFC 3966.
> When an IMS server sends an incoming TEL URI INVITE I get the following errors, and the incoming call is disconnected (number busy).
> Here you find part of an (incoming) INVITE request and sip debug output:
> From: <*tel:0987654321;phone-context=+32987654321*>;tag=tag-etc
> CSeq: 1 INVITE
> P-Asserted-Identity: <tel:0987654321>
> P-Called-Party-ID: <sip:+3212345678 at ...>
> Diversion: <sip:+3212345678 at ...;user=phone>;reason="extension";privacy="off";counter=1
> Using INVITE request as basis request -
> Nov 13 17:52:05 NOTICE[27459]: chan_sip.c:6973 check_user_full: *From address missing 'sip:', using it anyway*
> Nov 13 17:52:05 WARNING[27459]: chan_sip.c:6525 get_destination: Huh? Not a SIP header (*tel:0987654321;phone-context=+32987654321*)?
> RDNIS is +3212345678
> SIP/2.0 404 Not Found
> Actually I found out that Asterisk is indeed not conform to the RFC 3966 standard.
> I have solved the problem by patching chan_sip.c and reqresp_parser.c -- see patch in code attachments.
> I have changed the following functions:
> * check_user_full
> * get_destination
> * parse_uri OR parse_uri_full (depending on the Asterisk version)
> When ;phone-context= is provided in the incoming tel:uri then we can extract the calling number for further call handling.
> Now IMS and Asterisk are talking to each other without problems.
> More information:
> http://forums.digium.com/viewtopic.php?f=1&t=76432&sid=6d53062361c22079757c53ccc73d3132
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list