How can I hear the IP address of the device I am dialing from?

Maybe this feature is built-in?
Or you need to write a Dial Plan?
Thanks

This is a common feature of consumer ATAs, where it will playback the local IP of the device. There is no stock feature code to read back the SIP contact IP.

entirely depends on what you are using.

if its headless, there’s a dialing code usually (I believe the grandstream HT7xx and HT8xx the code is *** 0 2 , but I could be wrong)

if its a softphone - you don’t need to dial to get it, get it from the phone/computer.

if its a hardphone with a display, just go through the menues,

I know you can read an IP address on any device depending on the model through the display, but I was looking for another way that it would work in hearing the address

Anyway I got it, I thought there was a general way to do this that would work for all devices via code
Thank you

Crude dialplan you can use. Works for pjsip endpoints only:

[from-internal-custom]

exten => 4477,1,Noop(Entering user defined context from-internal-custom in extensions_custom.conf)
exten => 4477,n,Set(ext_ip=${CUT(CHANNEL(pjsip,remote_addr),:,1)})       ; ip addess of dialing extension
exten => 4477,n,Set(ext_ip=${STRREPLACE(ext_ip,.,*)})
exten => 4477,n,Answer
exten => 4477,n,SayDigits(${ext_ip})
exten => 4477,n,Hangup
3 Likes

if you believe in it enough, id encourage you to make a feature request and/or build it out yourself :slight_smile:

Thank you very much!
It helped me a lot to understand the direction
But I don’t have pjsip, I have chan_sip
Do you know another way to retrieve the device’s IP address?

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_CHANNEL

You should be moving to Chan_PJSIP. Chan_SIP has basically no support or updates from Asterisk. It only receives community support and the last few updates submitted cause regression of other issues once fixed.

It also goes away from Asterisk completely in v21 due for release in 2023.

!Thank you for all the information

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.