# How do I set the a-number in the from \<sip:?

**URL:** <https://community.asterisk.org/t/how-do-i-set-the-a-number-in-the-from-sip/10014>\
**Category:** Asterisk Support\
**Created:** [October 20, 2006, 3:53pm UTC](https://community.asterisk.org/t/how-do-i-set-the-a-number-in-the-from-sip/10014 "2006-10-20T15:53:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickecarlsson](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mickecarlsson](https://community.asterisk.org/u/mickecarlsson)\
**Post date:** [October 20, 2006, 3:53pm UTC](https://community.asterisk.org/t/how-do-i-set-the-a-number-in-the-from-sip/10014/1 "2006-10-20T15:53:41Z")

</div>

Hi,

Our SIP provider require this:  
"The number shall be sent in format 0+NSN@PBXipaddress in the SIP From-header  
Ex From: sip:0812345678@121.122.123.124

I have added some extensions but when I try to dial out on my trunk the header looks like this:  
From: sip:1401@121.122.123.124 where 1401 is my extension. I figure that I need to replace the extensionnumber with the callerID before i send it to the trunk, but where do I do that?

One of my extension:  
[1402]  
username=1234  
type=friend  
secret=1234  
record\_out=Adhoc  
record\_in=Adhoc  
qualify=yes  
port=5060  
nat=never  
mailbox=1234@device  
host=dynamic  
dtmfmode=rfc2833  
context=from-internal  
canreinvite=no  
callerid=1234 \<1234\>

Dialing using this:  
exten =\> \_0.,1,Dial(SIP/${EXTEN}@mysip-provider.com)  
exten =\> \_0.,2,Congestion

Mikael

---

<div class="post-metadata">

**Author:** ![IronHelix](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@IronHelix](https://community.asterisk.org/u/IronHelix)\
**Post date:** [October 20, 2006, 6:28pm UTC](https://community.asterisk.org/t/how-do-i-set-the-a-number-in-the-from-sip/10014/2 "2006-10-20T18:28:48Z")

</div>

you could try  
fromuser=yournumbertoputbeforethe@

---

<div class="post-metadata">

**Author:** ![mickecarlsson](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mickecarlsson](https://community.asterisk.org/u/mickecarlsson)\
**Post date:** [October 23, 2006, 4:29pm UTC](https://community.asterisk.org/t/how-do-i-set-the-a-number-in-the-from-sip/10014/3 "2006-10-23T16:29:05Z")

</div>

Nope, did not work, fromuser works only if type=peer and I have type=friend. What I did to solve it was to modify the settings for the extension by modifying callerid=1234 \<0812345678\>:

[1402]  
username=1234  
type=friend  
secret=1234  
record\_out=Adhoc  
record\_in=Adhoc  
qualify=yes  
port=5060  
nat=never  
mailbox=1234@device  
host=dynamic  
dtmfmode=rfc2833  
context=from-internal  
canreinvite=no  
callerid=1402 \<0812345678\>
