Inbound Dial Plan: Detect dialed destination number
Posted: Tue Apr 27, 2010 3:32 am
Within an inbound ("sys.In") dial plan... does anyone know how to detect the dialed number (the destination number, NOT caller id)?
I know with outbound you can simply look at req.URI.User.to_s, but not the case with inbound... the latter returns sip info (instead of the phone #).
For example if you dial my phone number YYYY, which in turn triggers my inbound dial plan... I want to print out number YYYY.
Should be simple, right?
I've already looked at these to no avail:
I know with outbound you can simply look at req.URI.User.to_s, but not the case with inbound... the latter returns sip info (instead of the phone #).
For example if you dial my phone number YYYY, which in turn triggers my inbound dial plan... I want to print out number YYYY.
Should be simple, right?
I've already looked at these to no avail:
TIA!req.URI - The SIP URI for the incoming request.
req.URI.User - The user portion of the request URI this is the value used in the non-Ruby dial plans as ${EXTEN} or ${dst}.
req.URI.Host - The host portion of the request URI.
req.Header - The SIP Headers for the incoming request.
req.Header.From - The SIP From header for the incoming request.
req.Header.From.FromURI - The URI portion of the From header.
req.Header.From.FromName - The name portion of the From header.
req.Header.To - The SIP To header for the incoming request.
req.Header.To.ToURI - The URI portion of the To header.
req.Header.To.ToName - The name portion of the To header.
req.Header.Contact[0] - The first Contact header in the incoming Request.
req.Header.Contact[0].ContactURI - The URI of the first Contact header.
req.Header.Contact[0].ContactName - The Name of the first Contact header.
req.Header.CSeq
req.Header.CallId