extract DID from SIP header

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

This entry was posted in Asterisk, FreePBX and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *