Sip show peer question-- Description instead of username

Sip show peer shows the username and the connectin details. Is it possible to show the description in the show peers info instead of the username?

Thanks

What do you mean by “the description”?

If you mean the bit that precedes the <> on a normal From header, I’m not sure it is normal to include that on a REGiSTER, and it would only be available if it were a dynamic host that had actually registered. It is certainly not kept as a parsed out field.

What I want to see is the Name that is given to that extension. instead of 1200 I want to see Jodie in some kind of connection screen, similar to SIP show peers Sorry if I wasn’t clear

It seems you want to see the caller id information. You must type sip show peer 100 , assuming 100 is a SIP peer.

Also this could work
root@asterisk-dominicana:~# asterisk -x " sip show peer 100" | grep -i callerid
Callerid : “John” <100>

Yes the callerid info is what I want, but I want to show all the sip peers callerid in a single table

There is no command to accomplish this task, on Asterisk .This can be done using any scripting language.

OK Thanks for your time

Yes but you will have to edit the source of chan_sip and recompile.

I think you will have to modify line 19499 and the block starting at line 19611, I think you might be able to use the variable “callerid_name”

There is a Description column in sip show peers way over on the right.

Just set the description field to be the same as callerid in the peer’s section in sip.conf, and it’ll show up on the far right of sip show peers.

1 Like

Thanks Troy I will check that out.