cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7617
Views
0
Helpful
11
Replies

Custom Outbound Caller ID in ATAs

cybersaga
Level 1
Level 1

I understand from this thread that the Cisco ATAs do not have any configurable field to specify which phone number should be sent as the caller ID on outbound calls.

Are there any plans to add such a field?

To be more specific, I have a SPA112 and I'd like a way to configure what is sent in either P-Asserted-Identity, P-Preferred-Identity or Remote-Party-ID.

1 Accepted Solution

Accepted Solutions

It seems there is more musinderstanding than call direction only. The caller name and number needs to be configured - of course. SPA112 can't guess the caller name not number from aether.

But the PBX may not honor the caller name nor number sent by device. The PBX may force different name and number according the PBX's configuration.

So,

  1. configre the caller name and id on device
  2. verify the name and number is sent to PBX during INVITE (you need to catch the SIP packets to see the content)

If the SPA112 is sending called id and number according your wishes, but called person see something other, ask your's PBX administrator for help.

View solution in original post

11 Replies 11

cybersaga
Level 1
Level 1

I think I misunderstood what was going on in that other thread - it seems to be about inbound calls. So forget that I liked to it.

I'm just talking about outbound calls.

It seems there is more musinderstanding than call direction only. The caller name and number needs to be configured - of course. SPA112 can't guess the caller name not number from aether.

But the PBX may not honor the caller name nor number sent by device. The PBX may force different name and number according the PBX's configuration.

So,

  1. configre the caller name and id on device
  2. verify the name and number is sent to PBX during INVITE (you need to catch the SIP packets to see the content)

If the SPA112 is sending called id and number according your wishes, but called person see something other, ask your's PBX administrator for help.

Oops, I didn't mean to mark that as the correct answer. I hit the wrong button.

But anyway, here's the issue: My VoIP provider expects the From value to contain my account ID, not my phone number. If I put my phone number in the 'User ID' field, the SPA112 uses that value in the From as part of the REGISTER call, and that messes up my registration.

Here's what happens for the REGISTER call if I have my phone number in the 'User ID' field, my account ID in the 'Auth ID' field, and 'Use Auth ID' set to yes:

REGISTER sip:sip.ca.anveo.com SIP/2.0

Via: SIP/2.0/UDP 192.168.1.158:5060;branch=z9hG4bK-684306d6

From: "My Name" <>1905myphone@sip.ca.anveo.com>;tag=23d415b13edc3da1o0

To: "My Name" <>1905myphone@sip.ca.anveo.com>

Call-ID: 1d168acf-a1101da6@192.168.1.158

CSeq: 20718 REGISTER

Max-Forwards: 70

Authorization: Digest username="83myaccountID",realm="anveo.com",nonce="UUunLlFLpgKB0AzxptSwPZpNqHs54Ikw",uri="sip:sip.ca.anveo.com",algorithm=MD5,response="c22d734497d9731c72d3612912c6225c"

Contact: "My Name" <1905MYPHONE>;expires=180

P-Station-Name: ;mac=acf2c536a8e4; sn=CCQ16460L1M

User-Agent: Cisco/SPA112-1.3.1(003)

P-Station-Name:  ;mac=acf2c536a8e4; display=""; sn=CCQ16460L1M

Content-Length: 0

Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER

Supported: replaces

SIP/2.0 403 Forbidden auth ID

Via: SIP/2.0/UDP 192.168.1.158:5060;branch=z9hG4bK-684306d6;rport=5060;received=108.my.ip

From: "My Name" <>1905myphone@sip.ca.anveo.com>;tag=23d415b13edc3da1o0

To: "My Name" <>1905myphone@sip.ca.anveo.com>;tag=a1766e4537c6d6082807422b1789bf43.7a3b

Call-ID: 1d168acf-a1101da6@192.168.1.158

CSeq: 20718 REGISTER

Server: kamailio (3.3.4 (x86_64/linux))

Content-Length: 0

If I'm going to send them a phone number to use as the caller ID, they expect it come as part of the INVITE in one of the P-Asserted-Identity, P-Preferred-Identity, or Remote-Party-ID only, and not the From.

So I'm looking for a way to put my phone number in one of those, without affecting what is in the From.

I have no SPA112 here just now, so I can't verify, but if I remember corrrectly then "Display Name" value is used in P-Station-Name.

But I see two P-Station-Name lines in your packet.

P-Station-Name: ;mac=acf2c536a8e4; sn=CCQ16460L1M
P-Station-Name:  ;mac=acf2c536a8e4; display=""; sn=CCQ16460L1M

Unless it's copy&paste bug, it's firmware bug. It may (or may not) confuse your server.

Here is what a successfull REGISTER looks like, when I have my account ID in the 'User ID' instead of my phone number:

REGISTER sip:sip.ca.anveo.com SIP/2.0

Via: SIP/2.0/UDP 192.168.1.158:5060;branch=z9hG4bK-bf67333c

From: "My Name" <>83myaccountID@sip.ca.anveo.com>;tag=8e2b1e384cadf656o0

To: "My Name" <>83myaccountID@sip.ca.anveo.com>

Call-ID: 1d168acf-a1101da6@192.168.1.158

CSeq: 21159 REGISTER

Max-Forwards: 70

Authorization: Digest username="83myaccountID",realm="anveo.com",nonce="UUxqalFMaT5V/d3VkrKyaHr6WWgK3ivV",uri="sip:sip.ca.anveo.com",algorithm=MD5,response="ff233c311dd83875e45d6d6d56697c56"

Contact: "My Name" <83MYACCOUNTID>;expires=180

P-Station-Name: ;mac=acf2c536a8e4; sn=CCQ16460L1M

User-Agent: Cisco/SPA112-1.3.1(003)

P-Station-Name:  ;mac=acf2c536a8e4; display=""; sn=CCQ16460L1M

Content-Length: 0

Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER

Supported: replaces

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.168.1.158:5060;branch=z9hG4bK-bf67333c;rport=5060;received=108.my.ip

From: "My Name" <>83myaccountID@sip.ca.anveo.com>;tag=8e2b1e384cadf656o0

To: "My Name" <>83myaccountID@sip.ca.anveo.com>;tag=a1766e4537c6d6082807422b1789bf43.ffdc

Call-ID: 1d168acf-a1101da6@192.168.1.158

CSeq: 21159 REGISTER

Contact: <83MYACCOUNTID>;expires=180;received="sip:108.my.ip:5060"

Server: kamailio (3.3.4 (x86_64/linux))

Content-Length: 0

That has the duplicate P-Station-Name too, but they seem to be ok with it.

But of course, like that, my phone number is nowhere in an INVITE either.

I ended up skimming through the SIP specification, and I found that the User ID is actually part of the authentication process. From pages 45-46:

8.2.2.1 To and Request-URI

   The To header field identifies the original recipient of the request
   designated by the user identified in the From field.  The original
   recipient may or may not be the UAS processing the request, due to
   call forwarding or other proxy operations.  A UAS MAY apply any
   policy it wishes to determine whether to accept requests when the To
   header field is not the identity of the UAS.  However, it is
   RECOMMENDED that a UAS accept requests even if they do not recognize
   the URI scheme (for example, a tel: URI) in the To header field, or
   if the To header field does not address a known or current user of
   this UAS.  If, on the other hand, the UAS decides to reject the
   request, it SHOULD generate a response with a 403 (Forbidden) status
   code and pass it to the server transaction for transmission.

So the issue here is that when I change the User ID, it uses that in the 'To' field, which changes how it authenticates, meaning it doesn't authenticate, hence the 403.

So to have the ability to specify the phone number at all, the ATA would need a new field that only sends the phone number in the appropriate headers during an INVITE, and doesn't affect the REGISTER at all.

I don't suppose there's a chance of this happening eh?

I'm guessing the silence means a no?

I'm not sure. I got lost in the problem.

You claimed that your provider expect user-id in From: and caller-id in P-Station-Name.

P-Station-Name is taken from Station Name. If I will set Station name to "Ustredna TEST" then the REGISTER packet will look like this:

REGISTER sip:10.B.C.1:5060 SIP/2.0

From: "6018" ;tag=ce2aebb4a48624fbo0

To: "6018"

Authorization: Digest username="DEV-6018",realm="test.sip.mff.cuni.cz",nonce="141c3772",

   uri="sip:10.250.250.1:5060",algorithm=MD5,response="d6a320488f37acb05ad8eef315f6e7fc"

Contact: "6018" ;expires=3600

User-Agent: Cisco/SPA112-1.3.2(009)

P-Station-Name: Ustredna TEST ;mac=c40acbbc3e90; display="Ustredna TEST"; sn=CCQ162102LR

...

If your provider take caller id from P-Station-Name header, then the caller id is registed on provider's PBX now.

P-Station-Name is not sent in INVITE. I know no SIP device (Cisco or non-Cisco branch) sending P-Station-Name in INVITE. So I assume your provider doesn't require nor accept such header in INVITE. If your provider require the caller id to be specified by

P-Station-Name then it is must be the one P-Station-Name sent as part of REGISTER. I told you how to set it to arbitrary value. It change no From: nor Authorization/username value so your abiklity to authenticate should not be affected.

I'm not sure what you are asking for now.

I'm sorry, I know I've been a little over-verbose, but what I'm looking for is summed up in my first post:

I'd like a way to configure what is sent in either P-Asserted-Identity, P-Preferred-Identity or Remote-Party-ID.

Those are the only headers I'm interested in modifying. I don't see any existing appropriate field that will only change one of those headers on INVITE and not anything else.

OK, I will try to explain relationship between configuration and content of packets. Note, I'm not Cisco's developper, so the informations are based on avaiable documentation and observation of SPA112/1.3.2(009) device. Packets are shortened to contain relevant lines only.

Configuration 1:

TagValue
Station NameUstredna TEST
Display Name6018d
User IDDEV-6018u
Use Auth IDYes
Auth IDDEV-6018a
SIP URI6018@spa112
Proxy

10.A.B.1:5060

Register Expires3600
Invite Expires240

REGISTER sip:10.A.B.1:5060 SIP/2.0

From: "6018d" <>6018@spa112>;tag=60a5b96492fa357co0

To: "6018d" <>6018@spa112>

Authorization: Digest username="DEV-6018a",

  realm="test.sip.X.Y.cz",nonce="5ee044a2",

  uri="sip:10.A.B.1:5060",algorithm=MD5,

  response="3dc8e49907314be826fe11f78e9fb0ce"

Contact: "6018d" <>DEV-6018u@10.P.Q.11:5060>;

  expires=3600

P-Station-Name: Ustredna TEST ;mac=c4........90;

  display="Ustredna TEST"; sn=CCQ......LR

INVITE sip:callednumber@10.A.B.1:5060 SIP/2.0

From: "6018d" <>6018@spa112>;tag=60a5b96492fa357co0

To: <>callednumber@10.A.B.1>

Authorization: Digest username="DEV-6018a",

  realm="test.sip.X.Y.cz",nonce="5ee044a2",

  uri="sip:10.A.B.1:5060",algorithm=MD5,

  response="3dc8e49907314be826fe11f78e9fb0ce"

Contact: "6018d" <>DEV-6018u@10.P.Q.11:5060;

  ref=DEV-6018u>

Expires: 240

Remote-Party-ID: "6018d" <>6018@spa112>;

  screen=yes;party=calling

In the case of Use Auth ID=No the User ID is used in the place of Auth ID.

If PAID is configured instead of RPID, then P-Asserted-Identity header is used instead of Remote-Party-ID (but based on simmilar values).

Unless CLIR active, the caller name in From, P-Asserted-Identity, Remote-Party-ID is the same.

P-Preferred-Identity is not sent by SPA112.

If login name is not the same as caller number, then User ID should set to caller number, Auth ID to login name and Use Auth ID should be 'yes'. Provider must use Authorization: username= value as login name.

Some providers are not able to used Authorization: username for the purpose of authentication, so From: must be used. Then loginname needs to be same as caller number.

Last resort solution - provider will ignore the caller number in From: replacing it by a value from it's own internal database (based on user wishes).

If provider can't prefer Authorization login name against From name AND can't replace caller number from From: by other number according your's requirements, then you are out of luck. Search for a more user friendly provider.

Well, in short, the answer to your question is "No".

I figured as much. Thanks for the info.