[asterisk-bugs] [JIRA] (ASTERISK-26988) res_pjsip_session: user_eq_phone adds double user=phone parameters to URIs on re-Invite

dtryba (JIRA) noreply at issues.asterisk.org
Thu May 11 09:02:57 CDT 2017


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

dtryba commented on ASTERISK-26988:
-----------------------------------

I've been playing in ./res/res_pjsip.c with the function ast_sip_add_usereqphone. This function doesn't check if there is already a param called user present, but trying to check if it already exists in (I guessed) sip_uri->other_param reveals the param is never present. 

Also when changing the case of the user and phone constants reveals that the new casing is present for both user params:
INVITE sip:+3140xxxxxxx at ims.imscore.net:5060;user=phone;transport=udp SIP/2.0
INVITE sip:+3140xxxxxxx at 109.235.32.45;uSEr=pHONe SIP/2.0
INVITE sip:+3140xxxxxxx at sip.itco.nl;user=pHONe;uSEr=pHONe 

So the doubles seem related to the ast_sip_add_usereqphone function. But I have no clue where to look further.


> res_pjsip_session: user_eq_phone adds double user=phone parameters to URIs on re-Invite
> ---------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26988
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26988
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_session
>    Affects Versions: 13.14.1
>         Environment: Debian/stretch with repository supplied Asterisk 13.14.1~dfsg-1
> There are no updates/patches for user_eq_phone either Debian specific or from 13.41.1 to 13.15 as far as I can see.
>            Reporter: dtryba
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: dialplan.txt, full.txt, invites.txt, pjsip.conf.txt
>
>
> Asterisk in a setup as proxy/sbc between customer and upstream provider, where upstream demands the use of user=phone for URIs containing phonenumbers. Only the endpoint definitions for upstream contain the "user_eq_phone = yes" option.
> INVITE from upstream to Asterisk. R-URI/To/From/PAI containt the user=phone params. INVITE from Asterisk to customer, the user=phone gets stripped from all URIs. The 1xx/200OK from customer lack user=phone, but gets added by Asterisk to upstream. So far so good.
> The customer endpoint is a fax, that re-INVITEs for t38. The re-INVITE lack user=phone. Asterisk adds "user=phone;user=phone" to relevant URIs
> Upstream provider answers with a "400 Bad Request" and the connection is terminated (by both upstream as Asterisk). 



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



More information about the asterisk-bugs mailing list