Can't set sendrpid=pia on some peers

Hi Guys,

I have two peers in sip.conf as follows:

[code][hidingusername1]
disallow=all
allow=alaw
type=friend
username=hidingusername1
;username=hidingusername
secret=hidingpassword
host=sipconnect.internode.on.net
context=incoming
qualify=yes
transfer=no
insecure=port,invite
fromuser=hidingusername
sendrpid=pia

[hidingusername2]
disallow=all
allow=alaw
type=friend
username=hidingusername2
secret=hidingpassword
host=asterisk1.faktortel.com.au
context=incoming
qualify=yes
transfer=no
insecure=port,invite
fromuser=hidingusername2
sendrpid=pai[/code]

They are identical other than the peer name, the host, the username and the password.

However when I do a sip show peer, they have different sendrpid settings:

[root@server2 asterisk]# asterisk -rx "sip show peer hidingusername1" | grep Send Send RPID : No [root@server2 asterisk]# asterisk -rx "sip show peer hidingusername2" | grep Send Send RPID : Yes

And sure enough when I dial to hidingusername1, the P-Asserted-Identity field is not sent. I know I can set it manually in extensions.conf with the SipAddHeader(P-Asserted-Identity sip:${CALLERIDNUM}) instruction, but I’d like to know why sip.conf is listening to my sendrpid parameter on one peer but not the other.

Thanks,

Sverre

a SIP debug could help in this situation , and too this articles could be interesting for you voip-info.org/wiki/view/P-As … -ID+header

voip-info.org/wiki/view/Aste … +trustrpid

I’ve read the article but it doesn’t explain why two seemingly identical peers would behave differently. Here is a SIP debug of the two INVITE messages, modified slightly for privacy:

[code]Reliably Transmitting (no NAT) to 203.2.134.10:5060:
INVITE sip:0412345678@sipconnect.internode.on.net SIP/2.0
Via: SIP/2.0/UDP 111.223.238.171:5060;branch=z9hG4bK209a07bd
Max-Forwards: 70
From: “0312345678” sip:hidingusername1@111.223.238.171;tag=as313ac554
To: sip:0412345678@sipconnect.internode.on.net
Contact: sip:hidingusername1@111.223.238.171:5060
Call-ID: 5d29e330243b75c7797cf721024dac81@111.223.238.171:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.2.1
Date: Mon, 14 Oct 2013 04:43:22 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Type: application/sdp
Content-Length: 239

v=0
o=root 920431426 920431426 IN IP4 111.223.238.171
s=Asterisk PBX 11.2.1
c=IN IP4 111.223.238.171
t=0 0
m=audio 10370 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

—[/code]

[code]INVITE sip:0412345678@asterisk6.faktortel.com.au SIP/2.0
Via: SIP/2.0/UDP 111.223.238.171:5060;branch=z9hG4bK5c53b4df
Max-Forwards: 70
From: “0312345678” sip:hidingusername2@111.223.238.171;tag=as4f7279c2
To: sip:0412345678@asterisk6.faktortel.com.au
Contact: sip:hidingusername2@111.223.238.171:5060
Call-ID: 7ee08a3d56456b5d7a0d7c9b51c3c57b@111.223.238.171:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.2.1
Date: Mon, 14 Oct 2013 07:18:29 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
P-Asserted-Identity: “0312345678” sip:0312345678@111.223.238.171
Content-Type: application/sdp
Content-Length: 241

v=0
o=root 1654856392 1654856392 IN IP4 111.223.238.171
s=Asterisk PBX 11.2.1
c=IN IP4 111.223.238.171
t=0 0
m=audio 17224 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


[/code]

Check the “sendrpid=” settings in sip.conf again:

[hidingusername1]
...
sendrpid=pia

[hidingusername2]
...
sendrpid=pai

I think you have a typo in the settings …

Andd in the subject. P-Asserted-Identity abbreviates to pai, not pia.

Wow I’m an idiot. Thank you so much!