[asterisk-bugs] [JIRA] (ASTERISK-28175) PJSIP support for TEL (RFC 3966)

ast (JIRA) noreply at issues.asterisk.org
Tue Nov 20 07:41:47 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=245513#comment-245513 ] 

ast commented on ASTERISK-28175:
--------------------------------

I noticed the Wiki Bot identified PJSIP_PARSE_URI(uri,type)

Searching version 16.0.1 there is a lot of places where this is mentioned.   Can someone provide some guidance. Gaining an understanding the data structures and best debugging practices / scripts would be helpful too.

---------------------------------
./channels/chan_pjsip.c - found matches...
        if (!(contact->uri = pjsip_parse_uri(packet->pool, tmp.ptr, tmp.slen, PJSIP_PARSE_URI_AS_NAMEADDR))) {
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip.c - found matches...
        if (!(uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0)) ||
--
        dlg->local.info->uri = pjsip_parse_uri(dlg->pool, dlg->local.info_str.ptr, dlg->local.info_str.slen, 0);
--
                        contact_hdr->uri = pjsip_parse_uri(rdata->tp_info.pool, (char *)contact,
--
        sip_uri = pjsip_parse_uri(pool, remote_uri.ptr, remote_uri.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip_messaging.c - found matches...
        parsed_name_addr = (pjsip_name_addr *) pjsip_parse_uri(tdata->pool, to, strlen(to),
--
        parsed_name_addr = (pjsip_name_addr *) pjsip_parse_uri(tdata->pool, from,
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip_outbound_publish.c - found matches...
        if (!(parsed = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0))) {
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip_outbound_registration.c - found matches...
        if (!(uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0)) ||
--        uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);
--
        uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);
--
                uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip_refer.c - found matches...
         * as pjsip_parse_uri require a NULL terminated uri
--
        target = pjsip_parse_uri(rdata->tp_info.pool, uri, uri_size - 1, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./res/res_pjsip_registrar.c - found matches...
        pjsip_uri *contact_uri = pjsip_parse_uri(details->pool, (char*)contact->uri, strlen(contact->uri), 0);
--
        hdr->uri = pjsip_parse_uri(tdata->pool, uri.ptr, uri.slen, PJSIP_PARSE_URI_AS_NAMEADDR);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/include/pjsip/sip_parser.h - found matches...
    /** If this option is specified, function #pjsip_parse_uri will return
--
    /** If this option is specified, function #pjsip_parse_uri and other
--
typedef void* (pjsip_parse_uri_func)(pj_scanner *scanner, pj_pool_t *pool,
--
                                                pjsip_parse_uri_func *func);
--
                                                  pjsip_parse_uri_func *func);
--
PJ_DECL(pjsip_uri*) pjsip_parse_uri( pj_pool_t *pool,
--
PJ_DECL(void) pjsip_parse_uri_param_imp(pj_scanner *scanner, pj_pool_t *pool,
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsip/sip_dialog.c - found matches...
    dlg->target = pjsip_parse_uri(dlg->pool, tmp.ptr, tmp.slen, 0);
--
    dlg->local.info->uri = pjsip_parse_uri(dlg->pool,
--
    dlg->remote.info->uri = pjsip_parse_uri(dlg->pool,
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsip/sip_parser.c - found matches...
    pjsip_parse_uri_func    *parse;
--
static pjsip_parse_uri_func* find_uri_handler(const pj_str_t *scheme)
--
                                               pjsip_parse_uri_func *func)
--
PJ_DEF(pjsip_uri*) pjsip_parse_uri( pj_pool_t *pool,
--
PJ_DEF(void) pjsip_parse_uri_param_imp( pj_scanner *scanner, pj_pool_t *pool,
--
    pjsip_parse_uri_param_imp(scanner, pool, pname, pvalue,
--
            pjsip_parse_uri_func *func = find_uri_handler(&scheme);
--
        pjsip_parse_uri_func *func;
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsip/sip_util.c - found matches...
        target = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen, 0);
--
        from->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen,
--
        to->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen,
--
    uri = pjsip_parse_uri(tdata->pool, dst_uri.ptr, dst_uri.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsip-simple/publishc.c - found matches...
    pubc->target_uri = pjsip_parse_uri( pubc->pool, tmp.ptr, tmp.slen, 0);
--
    pubc->from_hdr->uri = pjsip_parse_uri(pubc->pool, tmp.ptr, tmp.slen,
--
    pubc->to_hdr->uri = pjsip_parse_uri(pubc->pool, tmp.ptr, tmp.slen,
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsip-ua/sip_reg.c - found matches...
    regc->srv_url = pjsip_parse_uri( regc->pool, tmp.ptr, tmp.slen, 0);
--
    regc->from_hdr->uri = pjsip_parse_uri(regc->pool, tmp.ptr, tmp.slen,
--
    regc->to_hdr->uri = pjsip_parse_uri(regc->pool, tmp.ptr, tmp.slen,
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsua-lib/pjsua_acc.c - found matches...
                    pjsip_parse_uri(acc->pool, acc_cfg->id.ptr,
--
        reg_uri = pjsip_parse_uri(acc->pool, acc_cfg->reg_uri.ptr,
--
                        pjsip_parse_uri(acc->pool, cfg->id.ptr, cfg->id.slen,
--
        reg_uri = pjsip_parse_uri(acc->pool, cfg->reg_uri.ptr,
--
    uri = pjsip_parse_uri(tmp_pool, tmp.ptr, tmp.slen, 0);
--
        uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsua-lib/pjsua_call.c - found matches...
        uri = pjsip_parse_uri(tmp_pool, dup.ptr, dup.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsua-lib/pjsua_core.c - found matches...
    p = pjsip_parse_uri(pool, url, len, 0);
--
    p = pjsip_parse_uri(pool, url, len, 0);
--
    uri_obj = pjsip_parse_uri(tmp_pool, tmp_uri.ptr, tmp_uri.slen, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/pjsua-lib/pjsua_pres.c - found matches...
    uri = pjsip_parse_uri(pool, input.ptr, input.slen, 0);
--
    url = (pjsip_name_addr*)pjsip_parse_uri(buddy->pool, tmp.ptr, tmp.slen,
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip/src/test/uri_test.c - found matches...
    parsed_uri = pjsip_parse_uri(pool, input, entry->len, 0);
--
                          "<tt>pjsip_parse_uri()</tt> per second "
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip-apps/src/python/_pjsua.c - found matches...
    uri = pjsip_parse_uri(pool, tmp, strlen(tmp), 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip-apps/src/samples/footprint.c - found matches...
    pjsip_parse_uri(NULL, NULL, 0, 0);
- - - - - - - - - - - - - - - - -
---------------------------------
./third-party/pjproject/source/pjsip-apps/src/samples/pjsip-perf.c - found matches...
    p = pjsip_parse_uri(pool, url, len, 0);
- - - - - - - - - - - - - - - - -





> PJSIP support for TEL (RFC 3966)
> --------------------------------
>
>                 Key: ASTERISK-28175
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28175
>             Project: Asterisk
>          Issue Type: New Feature
>      Security Level: None
>          Components: Resources/res_pjsip_session
>    Affects Versions: 16.0.0, 16.0.1
>         Environment: Ubuntu 18.0.1 LTS
>            Reporter: ast
>            Severity: Critical
>              Labels: pjsip
>
> Essentially set up pjsip.conf to register to ITSP and made an endpoint to receive incoming calls.
> Unfortunately received response advising that TEL is unknown or at least not a ‘SIP’ URI, actual SIP error phrase is “416 Unsupported URI Scheme”.
> Chan_SIP is RFC 3966 compliant from what I can see but i would like to use PJSIP because there are more features, and after trialing running both together the system is unreliable. My preference is to just use PJSIP.
>     Optus NBN Australia
>     PJSIP Logging enabled
>     <— Received SIP request (1697 bytes) from UDP:210.49.225.101:5060 —>
>     INVITE sip:+61732103210 at 192.168.1.100:5060;line={weirdnumbers} SIP/2.0
>     Max-Forwards: 65
>     Via: SIP/2.0/UDP 210.49.225.101:5060;branch={weirdnumbers}
>     To: “SIPLineUser SIPLineUser” tel:+6173210321
>     From: “Anonymous” sip:anonymous at anonymous.invalid;tag={weirdnumbers}
>     Call-ID: {weirdnumbers}@10.194.0.25
>     CSeq: 1 INVITE
>     Contact: sip:sgc_c at 210.49.225.101;transport=udp
>     Record-Route: sip:210.49.225.101;transport=udp;lr
>     Min-Se: 900
>     Privacy: id
>     Session-Expires: 1800
>     Supported: com.nortelnetworks.firewall
>     Supported: p-3rdpartycontrol
>     Supported: nosec
>     Supported: join
>     Supported: x-nortel-sipvc
>     Supported: gin
>     Supported: com.nortelnetworks.im.encryption
>     Supported: 100rel
>     Supported: resource-priority
>     Supported: replaces
>     User-Agent: Nortel SESM 19.0.1.0
>     Content-Type: application/sdp
>     Content-Length: 574
>     X-Nt-Service: brdplayed=yes
>     X-Nt-Corr-Id: {weirdnumber}@10.194.0.25
>     X-Nortel-Profile: DEFAULT
>     Allow: ACK, BYE, CANCEL, INVITE, OPTIONS, INFO, SUBSCRIBE, REFER, NOTIFY, PRACK, UPDATE
>     v=0
>     o=- 3257871432 3257871432 IN IP4 210.49.225.101
>     s=-
>     e=unknown at invalid.net
>     c=IN IP4 210.49.123.41
>     t=0 0
>     m=audio 48426 RTP/AVP 8 0 18 101 110 111
>     b=AS:80
>     a=rtpmap:8 PCMA/8000
>     a=rtpmap:0 PCMU/8000
>     a=rtpmap:18 G729/8000
>     a=fmtp:18 annexb=no
>     a=rtpmap:101 telephone-event/8000
>     a=ptime:20
>     a=maxptime:20
>     a=3gOoBTC
>     a=rtpmap:110 AMR/8000
>     a=fmtp:110 mode-change-period=2; mode-change-capability=2; mode-change-neighbor=1; max-red=0
>     a=rtpmap:111 AMR/8000
>     a=fmtp:111 octet-align=1; mode-change-period=2; mode-change-capability=2; mode-change-neighbor=1; max-red=0
>     <— Transmitting SIP response (534 bytes) to UDP:210.49.225.101:5060 —>
>     SIP/2.0 416 Unsupported URI Scheme
>     Via: SIP/2.0/UDP 210.49.225.101:5060;received=210.49.225.101;branch={weirdnumbers}
>     Record-Route: sip:210.49.225.101;transport=udp;lr
>     Call-ID: {weirdnumbers}@10.194.0.25
>     From: “Anonymous” sip:anonymous at anonymous.invalid;tag={weirdnumbers}
>     To: “SIPLineUser SIPLineUser” tel:+6173210321;tag={weirdnumbers}
>     CSeq: 1 INVITE
>     Server: “{User_Agent}”
>     Content-Length: 0
>     <— Received SIP request (489 bytes) from UDP:210.49.225.101:5060 —>
>     ACK sip:+61732103210 at 192.168.2.22:5060;line={weirdnumbers} SIP/2.0
>     Max-Forwards: 70
>     Via: SIP/2.0/UDP 210.49.225.101:5060;received=210.49.225.101;branch={weirdnumbers}
>     To: “SIPLineUser SIPLineUser” tel:+61732103210;tag={weirdnumbers}
>     From: “Anonymous” sip:anonymous at anonymous.invalid;tag={weirdnumbers}
>     Call-ID: {weirdnumbers}@10.194.0.25
>     CSeq: 1 ACK
>     Content-Length: 0
>     *CLI> pjsip set logger off
>     PJSIP Logging disabled
> I’m hoping someone whos awsome and a wizard with Asterisk can help me out with a configuration setting or advise if its possible to patch the source code for Asterisk 16.0.1 to permit the correct handling of a tel: uri invite.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list