Show username instead of extension - SIP Show Peer


Instead of the marked extensions i need to show the name. ~ Screenshot.


There are no extensions in that screen shot (also, please include such information, as inline text, not out of line images).

If by username, you mean the user part of the address of record, that normally has to match the name in sip.conf.

I mean , instead of

101/101 D Yes Yes A 1025 OK (23 ms)

I need , 101/John D Yes Yes A 1025 OK (23 ms)

I’m not sure what it would break but you could overload the defaultuser field for each peer with the name you wanted to show.

so in sip.conf for your peer


There are 100 of user ? Do i need to do that manually ?

Yes you would have to manually do it.

The alternative would be to modify the source of asterisk and recompile, I think it’s the PEERS_FORMAT2 format string in channels/chan_sip.c but I’m not 100% as to where the modification would need to be made.

Where is the file located and how to recompil

Get Outlook for Android

The chan_sip.c file is located in the channels subdirectory of your asterisk source.


You would modify it and then execute a make in the source directory and it should re-compile, then either copy the modified file to the modules directory and restart asterisk or do a make install and restart asterisk.