[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-users
Subject:    Re: [SR-Users] How to insert user=phone header INVITE TO FROM
From:       Henning Westerholt <hw () skalatan ! de>
Date:       2021-08-18 6:55:32
Message-ID: PAXPR05MB8558CF5A374F3DBE83A1A942C5FF9 () PAXPR05MB8558 ! eurprd05 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hello,

look at the uac module – there are uac_replace_from/to function to achieve this.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of César Matheus
Sent: Tuesday, August 17, 2021 10:26 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] How to insert user=phone header INVITE TO FROM

Hi list.

mY provider asks me to insert user = phone in my header. because it requires to \
receive my INVITE with user = phone in TO and FROM

However, I add the user = phone in my configuration like this:
$ ru = "sip:" + $ rU + "@" + $ sel (cfg_get.pstn1.gw_ip) + ":"
                                                                         + $ sel \
(cfg_get.pstn1.gw_port) + "; user = phone";

but only the INVITE appears, not in the TO or FROM.

INVITE sip: 09872323232@X.Y.X.K<mailto:09872323232@X.Y.X.K>: 5060; user = phone SIP / \
2.0

From: <sip: XXXXYYYYY@172.20.12.4<mailto:XXXXYYYYY@172.20.12.4>: 5060>; tag = \
                15552444533876
To: <sip: 09872323232@172.20.12.2<mailto:09872323232@172.20.12.2>: 5060>

You can help me solve it.

Thanks.

--
César Matheus


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.E-MailFormatvorlage19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span \
style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">look at the \
uac module – there are uac_replace_from/to function to achieve \
this.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p> \
</o:p></span></p> <p class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Henning Westerholt – </span><span \
style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span \
lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span \
lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio \
services – </span><span style="mso-fareast-language:EN-US"><a \
href="https://gilawa.com/"><span lang="EN-GB" \
style="color:#0563C1">https://gilawa.com</span></a></span><span \
style="mso-fareast-language:EN-US"> <span lang="EN-GB"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <div \
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p \
class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users \
&lt;sr-users-bounces@lists.kamailio.org&gt; <b>On Behalf Of </b>César Matheus<br>
<b>Sent:</b> Tuesday, August 17, 2021 10:26 PM<br>
<b>To:</b> sr-users@lists.kamailio.org<br>
<b>Subject:</b> [SR-Users] How to insert user=phone header INVITE TO \
FROM<o:p></o:p></p> </div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi list.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">mY provider asks me to insert user = \
phone in my header. because it requires to receive my INVITE with user = phone in TO \
and FROM<br> <br>
However, I add the user = phone in my configuration like this:<br>
$ ru = &quot;sip:&quot; + $ rU + &quot;@&quot; + $ sel (cfg_get.pstn1.gw_ip) + \
&quot;:&quot;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;+ $ sel (cfg_get.pstn1.gw_port) + &quot;; user = \
phone&quot;;<br> <br>
but only the INVITE appears, not in the TO or FROM.<br>
<br>
INVITE sip: <a href="mailto:09872323232@X.Y.X.K">09872323232@X.Y.X.K</a>: 5060; user \
= phone SIP / 2.0<br> <br>
From: &lt;sip: <a href="mailto:XXXXYYYYY@172.20.12.4">XXXXYYYYY@172.20.12.4</a>: \
                5060&gt;; tag = 15552444533876<br>
To: &lt;sip: <a href="mailto:09872323232@172.20.12.2">09872323232@172.20.12.2</a>: \
5060&gt;<o:p></o:p></p> </div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
You can help me solve it.<br>
<br>
Thanks.<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">César Matheus<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--===============1950336931==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic