[Home]

Summary:ASTERISK-27188: PJSIP realtime
Reporter:Slava Bendersky (volga629)Labels:
Date Opened:2017-08-08 13:30:41Date Closed:2017-08-08 13:37:47
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_realtime
Versions:13.9.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Fedora Server 25 x86_64. [root@pbx00 asterisk]# rpm -qa | grep asterisk asterisk-pjsip-13.9.1-5.fc25.1.x86_64 asterisk-voicemail-odbc-13.9.1-5.fc25.1.x86_64 asterisk-alembic-13.9.1-5.fc25.1.x86_64 asterisk-voicemail-13.9.1-5.fc25.1.x86_64 asterisk-mysql-13.9.1-5.fc25.1.x86_64 asterisk-ael-13.9.1-5.fc25.1.x86_64 asterisk-sounds-core-en-g729-1.5.0-1.fc24.noarch asterisk-sounds-extra-en-1.5.1-1.fc25.noarch asterisk-sip-13.9.1-5.fc25.1.x86_64 asterisk-dahdi-13.9.1-5.fc25.1.x86_64 asterisk-sounds-core-en-ulaw-1.5.0-1.fc24.noarch asterisk-13.9.1-5.fc25.1.x86_64 asterisk-curl-13.9.1-5.fc25.1.x86_64 asterisk-sounds-core-en-wav-1.5.0-1.fc24.noarch asterisk-odbc-13.9.1-5.fc25.1.x86_64 Attachments:
Description:Hello Everyone,
I am trying configure PJSIP realtime and parameter outbound_proxy is not parsed correctly. That prevent from configure endpoint correctly.

Here mysql information output
{code:title=MySQL|borderStyle=solid}

MariaDB [asterisk]> UPDATE ps_endpoints SET outbound_proxy = 'sip:10.30.100.28:5060\\;transport=udp\\;lr' WHERE aors = '8422-10';
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [asterisk]> select * from ps_endpoints where  id = '8422-10'\G
*************************** 1. row ***************************
                          tech_id: 12
                               id: 8422-10
                            te_id: 4
                        transport: transport-udp
                             aors: 8422-10
                             auth: 8422-10
                          context: authenticated
                         disallow: all
                            allow: ulaw:20
                     direct_media: no
            connected_line_method: NULL
              direct_media_method: NULL
    direct_media_glare_mitigation: NULL
      disable_direct_media_on_nat: NULL
                        dtmf_mode: auto
           external_media_address: NULL
                      force_rport: yes
                      ice_support: NULL
                      identify_by: NULL
                        mailboxes: 8422@10
                      moh_suggest: NULL
                    outbound_auth: NULL
                   outbound_proxy: sip:10.30.100.28:5060\;transport=udp\;lr
                  rewrite_contact: yes
                         rtp_ipv6: NULL
                    rtp_symmetric: yes
                   send_diversion: NULL
                         send_pai: NULL
                        send_rpid: NULL
                    timers_min_se: NULL
                           timers: NULL
              timers_sess_expires: NULL
                         callerid: Colpbx User2 <8422>
                 callerid_privacy: NULL
                     callerid_tag: NULL
                           100rel: NULL
                    aggregate_mwi: NULL
                 trust_id_inbound: NULL
                trust_id_outbound: NULL
                        use_ptime: NULL
                         use_avpf: NULL
                 media_encryption: NULL
                  inband_progress:
                       call_group: NULL
                     pickup_group: NULL
                 named_call_group: NULL
               named_pickup_group: NULL
             device_state_busy_at: NULL
                       fax_detect: NULL
                        t38_udptl: NULL
                     t38_udptl_ec: NULL
            t38_udptl_maxdatagram: NULL
                    t38_udptl_nat: NULL
                   t38_udptl_ipv6: NULL
                        tone_zone: NULL
                         language:
              one_touch_recording: NULL
                record_on_feature: NULL
               record_off_feature: NULL
                       rtp_engine: NULL
                   allow_transfer: NULL
                  allow_subscribe: yes
                        sdp_owner: NULL
                      sdp_session: NULL
                        tos_audio: NULL
                        tos_video: NULL
                   sub_min_expiry: NULL
                      from_domain: colpbx.lan
                        from_user: NULL
                    mwi_from_user: NULL
                      dtls_verify: NULL
                       dtls_rekey: NULL
                   dtls_cert_file: NULL
                 dtls_private_key: NULL
                      dtls_cipher: NULL
                     dtls_ca_file: NULL
                     dtls_ca_path: NULL
                       dtls_setup: NULL
                      srtp_tag_32: NULL
                    media_address: NULL
                  redirect_method: NULL
                          set_var: NULL
                  message_context: NULL
                        force_avp: NULL
     media_use_received_transport: NULL
                      accountcode: 10
      media_encryption_optimistic: NULL
                    user_eq_phone: NULL
                   rpid_immediate: NULL
                g726_non_standard: NULL
                    rtp_keepalive: NULL
                      rtp_timeout: NULL
                 rtp_timeout_hold: NULL
        bind_rtp_to_media_address: NULL
                        cos_audio: NULL
                        cos_video: NULL
                             deny: NULL
                           permit: NULL
                              acl: NULL
                     contact_deny: NULL
                   contact_permit: NULL
                      contact_acl: NULL
              voicemail_extension: NULL
mwi_subscribe_replaces_unsolicited: NULL
                subscribe_context: NULL
               fax_detect_timeout: NULL
                     contact_user: NULL
             asymmetric_rtp_codec: NULL
1 row in set (0.00 sec)
{code}

Asterisk cli output

{code:title=asterisk_cli|borderStyle=solid}


[root@pbx00 asterisk]# asterisk -rvvv
Asterisk 13.9.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.9.1 currently running on pbx00 (pid = 4353)
pbx00*CLI>
pbx00*CLI>
pbx00*CLI> pjsip reload
Module 'res_pjsip.so' reloaded successfully.
Module 'res_pjsip_authenticator_digest.so' reloaded successfully.
Module 'res_pjsip_endpoint_identifier_ip.so' reloaded successfully.
Module 'res_pjsip_mwi.so' reloaded successfully.
Module 'res_pjsip_notify.so' reloaded successfully.
Module 'res_pjsip_outbound_publish.so' reloaded successfully.
Module 'res_pjsip_publish_asterisk.so' reloaded successfully.
Module 'res_pjsip_outbound_registration.so' reloaded successfully.
   -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Aug  8 13:26:49] NOTICE[9377]: sorcery.c:1374 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
   -- Reloading module 'res_pjsip_authenticator_digest.so' (PJSIP authentication resource)
   -- Reloading module 'res_pjsip_endpoint_identifier_ip.so' (PJSIP IP endpoint identifier)
   -- Reloading module 'res_pjsip_mwi.so' (PJSIP MWI resource)
   -- Reloading module 'res_pjsip_notify.so' (CLI/AMI PJSIP NOTIFY Support)
   -- Reloading module 'res_pjsip_outbound_publish.so' (PJSIP Outbound Publish Support)
   -- Reloading module 'res_pjsip_publish_asterisk.so' (PJSIP Asterisk Event PUBLISH Support)
   -- Reloading module 'res_pjsip_outbound_registration.so' (PJSIP Outbound Registration Support)
pbx00*CLI> pjsip show endpoint 8422-10

Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
   I/OAuth:  <AuthId/UserName...........................................................>
       Aor:  <Aor............................................>  <MaxContact>
     Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
 Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
  Identify:  <Identify/Endpoint.........................................................>
       Match:  <ip/cidr.........................>
   Channel:  <ChannelId......................................>  <State.....>  <Time.....>
       Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

Endpoint:  8422-10/8422                                         Not in use    0 of inf
    InAuth:  8422-10/8422-10
       Aor:  8422-10                                            1
 Transport:  transport-udp             udp      0      0  0.0.0.0:5080


ParameterName                      : ParameterValue
==========================================================
100rel                             : yes
accountcode                        : 10
aggregate_mwi                      : true
allow                              : (ulaw)
allow_subscribe                    : true
allow_transfer                     : true
aors                               : 8422-10
auth                               : 8422-10
bind_rtp_to_media_address          : false
call_group                         :
callerid                           : "Colpbx User2" <8422>
callerid_privacy                   : allowed_not_screened
callerid_tag                       :
connected_line_method              : invite
context                            : authenticated
cos_audio                          : 0
cos_video                          : 0
device_state_busy_at               : 0
direct_media                       : false
direct_media_glare_mitigation      : none
direct_media_method                : invite
disable_direct_media_on_nat        : false
dtls_ca_file                       :
dtls_ca_path                       :
dtls_cert_file                     :
dtls_cipher                        :
dtls_fingerprint                   : SHA-256
dtls_private_key                   :
dtls_rekey                         : 0
dtls_setup                         : active
dtls_verify                        : No
dtmf_mode                          : auto
fax_detect                         : false
force_avp                          : false
force_rport                        : true
from_domain                        : colpbx.lan
from_user                          :
g726_non_standard                  : false
ice_support                        : false
identify_by                        : username
inband_progress                    : false
language                           :
mailboxes                          : 8422@10
media_address                      :
media_encryption                   : no
media_encryption_optimistic        : false
media_use_received_transport       : false
message_context                    :
moh_suggest                        : default
mwi_from_user                      :
mwi_subscribe_replaces_unsolicited : false
named_call_group                   :
named_pickup_group                 :
one_touch_recording                : false
outbound_auth                      :
outbound_proxy                     : lr
pickup_group                       :
record_off_feature                 : automixmon
record_on_feature                  : automixmon
rewrite_contact                    : true
rpid_immediate                     : false
rtp_engine                         : asterisk
rtp_ipv6                           : false
rtp_keepalive                      : 0
rtp_symmetric                      : true
rtp_timeout                        : 0
rtp_timeout_hold                   : 0
sdp_owner                          : -
sdp_session                        : Asterisk
send_diversion                     : true
send_pai                           : false
send_rpid                          : false
set_var                            :
srtp_tag_32                        : false
sub_min_expiry                     : 0
t38_udptl                          : false
t38_udptl_ec                       : none
t38_udptl_ipv6                     : false
t38_udptl_maxdatagram              : 0
t38_udptl_nat                      : false
timers                             : yes
timers_min_se                      : 90
timers_sess_expires                : 1800
tone_zone                          :
tos_audio                          : 0
tos_video                          : 0
transport                          : transport-udp
trust_id_inbound                   : false
trust_id_outbound                  : false
use_avpf                           : false
use_ptime                          : false
user_eq_phone                      : false
voicemail_extension                :

pbx00*CLI>

{code}
Comments:By: Asterisk Team (asteriskteam) 2017-08-08 13:30:43.310-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Asterisk Team (asteriskteam) 2017-08-08 13:30:45.301-0500

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: Joshua C. Colp (jcolp) 2017-08-08 13:37:47.921-0500

This is not a bug but due to the way realtime works. It uses ";" to separate multiple values for the same option. As a result it has to be specified used the hex equivalent instead.

The string would therefore be like:

sip:test.com%3Blr

Where "%3B" is equivalent to ";"

By: Slava Bendersky (volga629) 2017-08-08 13:41:03.684-0500

Hello Joshua,
Is it documented any where ?

By: Asterisk Team (asteriskteam) 2017-08-08 13:41:04.279-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Slava Bendersky (volga629) 2017-08-08 13:43:41.141-0500

I tried change based on you comment


   -- Added contact 'sip:8422-10@10.30.100.42:5060;rinstance=8B7EFC83' to AOR '8422-10' with expiration of 600 seconds
Contact 8422-10/sip:8422-10@10.30.100.42:5060;rinstance=8B7EFC83 has been created
[Aug  8 13:40:35] ERROR[10067]: res_pjsip.c:2959 create_out_of_dialog_request: Unable to apply outbound proxy on request NOTIFY to endpoint 8422-10 as outbound proxy URI 'sip:10.30.100.28:5060\%3Btransport=udp\%3Blr' is not valid
[Aug  8 13:40:35] WARNING[10067]: res_pjsip_mwi.c:379 send_unsolicited_mwi_notify_to_contact: Unable to create unsolicited NOTIFY request to endpoint 8422-10 URI sip:8422-10@10.30.100.42:5060;rinstance=8B7EFC83


By: Joshua C. Colp (jcolp) 2017-08-08 13:52:12.475-0500

I don't know if it is documented anywhere, but if you have any suggestions for where to do so then leave a comment on that wiki page. As well the Issue tracker isn't a support forum so I'm closing this out.

By: Peter Fern (pdf) 2018-10-23 00:42:01.289-0500

For posterity, the correct escaping is `^3B` rather than `%3B`, having just jumped through this hoop myself.