# Route header pjsip

**URL:** <https://community.asterisk.org/t/route-header-pjsip/87005>\
**Category:** Asterisk SIP\
**Created:** [January 4, 2021, 7:04pm UTC](https://community.asterisk.org/t/route-header-pjsip/87005 "2021-01-04T19:04:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![learbia](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@learbia](https://community.asterisk.org/u/learbia)\
**Post date:** [January 4, 2021, 7:04pm UTC](https://community.asterisk.org/t/route-header-pjsip/87005/1 "2021-01-04T19:04:44Z")

</div>

Hello, I have a TRUNK with register and I need put route field in header of REGISTER.

Like this image

 ![image](https://global.discourse-cdn.com/asterisk/original/2X/7/785dc5caf44d65165dd8de110f9adfb84f4afbb4.jpeg)

How Can I add this ?

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [January 4, 2021, 9:08pm UTC](https://community.asterisk.org/t/route-header-pjsip/87005/2 "2021-01-04T21:08:45Z")

</div>

outbound\_proxy is the only thing that might achieve that. Your second red splodge would need to be the URI of the proxy and the first hop for the request.

---

<div class="post-metadata">

**Author:** ![learbia](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@learbia](https://community.asterisk.org/u/learbia)\
**Post date:** [January 5, 2021, 12:21am UTC](https://community.asterisk.org/t/route-header-pjsip/87005/3 "2021-01-05T00:21:47Z")

</div>

I did try it, but dont work.

type=registration  
auth\_rejection\_permanent=false  
max\_retries=10000000  
outbound\_auth=auth\_TEST  
server\_uri=sip:551434362690@xxx.xx.net.br:5060  
client\_uri=sip:551434362690@xxx.xx.net.br  
line=yes  
endpoint=TEST  
transport = transport-udp  
retry\_interval=15  
expiration=3600  
forbidden\_retry\_interval=10  
fatal\_retry\_interval=10  
contact\_user=TEST  
outbound\_proxy=sbc.xxx.com.br:5090

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [January 5, 2021, 12:52am UTC](https://community.asterisk.org/t/route-header-pjsip/87005/4 "2021-01-05T00:52:24Z")

</div>

The only other option would be to use the add header functions, but I’m not sure I’d advise that, as I think Route is a header that the system should be managing.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [January 5, 2021, 9:55am UTC](https://community.asterisk.org/t/route-header-pjsip/87005/5 "2021-01-05T09:55:52Z")

</div>

You would need to state and show what actually happens with that configuration, as well you likely want:

```auto
\;lr

```

At the end of the outbound\_proxy URI to do loose routing.

---

<div class="post-metadata">

**Author:** ![learbia](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@learbia](https://community.asterisk.org/u/learbia)\
**Post date:** [January 6, 2021, 12:46am UTC](https://community.asterisk.org/t/route-header-pjsip/87005/6 "2021-01-06T00:46:30Z")

</div>

Hello Jcolp I did put “sip:” before ip and works!

outbound\_proxy=sip:xxx.xxx.com:5090

Thanks  
@david551 -Thank for answer.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 5, 2021, 12:46am UTC](https://community.asterisk.org/t/route-header-pjsip/87005/7 "2021-02-05T00:46:42Z")

</div>

Closed on February 5, 2021, 12:46am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
