Some providers put the DID in the TO: field.
To extract DID form SIP header use new context:
[from-pstn-toheader]
exten => s,1,Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
and in incoming trunk set
context=from-pstn-toheader
Some providers put the DID in the TO: field.
To extract DID form SIP header use new context:
[from-pstn-toheader]
exten => s,1,Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
and in incoming trunk set
context=from-pstn-toheader