[asterisk-users] Getting 'username' of sip peer

Deepesh D deep.d2010 at gmail.com
Wed May 26 12:18:18 CDT 2010


Hello,

I have a few entries for sip peers in sip.conf with different name and
username, like

[TestSIPUser]
type=peer
host=dynamic
username=testuser
secret=1234
context=test_context

[TestNewUser]
type=peer
host=dynamic
username=newsipuser
secret=3456
context=test_context

When a call is made from any of these peers I want to get the username
of the peer.
for eg:- If a call is being made from 'TestSIPUser' then I want to be
able to get the value 'testuser'

Is it possible to get the value of 'username' of the peer in the
dialplan using some application/function ?

Thanks,
Deepesh



More information about the asterisk-users mailing list