How to get span ID for dahdi channels?

Hey Everyone,

Can anyone please let me know if there is any variable available in asterisk through which we can get span ID for incoming dahdi channels as shown below?

Accepting call from ‘XXXXXXXXXX’ to ‘s’ on channel 0/2, span 1

However its showing in the verbose but i could not find any kind of variable for asterisk which can mention span ID.

Can anyone please let me know?

[quote][Mar 18 12:29:47] DEBUG[24736] dsp.c: dsp busy pattern set to 0,0 [Mar 18 12:29:47] VERBOSE[24736] logger.c: -- Accepting call from 'XXXXXXXXXX' to 's' on channel 0/2, span 1 [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:1] Set("DAHDI/2-1", "__FROM_DID=s") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:2] Gosub("DAHDI/2-1", "app-blacklist-check|s|1") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@app-blacklist-check:1] LookupBlacklist("DAHDI/2-1", "") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@app-blacklist-check:2] GotoIf("DAHDI/2-1", "0?blacklisted") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@app-blacklist-check:3] Return("DAHDI/2-1", "") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:3] ExecIf("DAHDI/2-1", "1 |Set|CALLERID(name)=XXXXXXXXXX") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:4] Set("DAHDI/2-1", "__CALLINGPRES_SV=allowed") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:5] SetCallerPres("DAHDI/2-1", "allowed_not_screened") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Executing [s@from-pstn:6] Goto("DAHDI/2-1", "app-blackhole|congestion|1") in new stack [Mar 18 12:29:47] VERBOSE[13697] logger.c: -- Goto (app-blackhole,congestion,1)[/quote][quote][/quote]

Hi,

I got solution for this.
We can use ${CHANNEL(dahdi_span)} to get span ID, It works great.

May be helpful to anyone who is looking for same solution.

Thanks