tbrummell
Guru
- Joined
- Jan 8, 2011
- Messages
- 1,280
- Reaction score
- 340
Hey all! long time no see! Work has been, well, work, always busy with no end in sight.
I have so many DID's that I kind of lost track of my DID's with DryVoip. They are no longer working with the solution I posted years ago to use a certain context, so now I must roll my own context for them. I found in their SIP header they are including a new one:
This is effectively your DID identifier.
I contacted DryVoip support hoping they'd have a simple solution, but all they came back with is "I suggest you try ${PJSIP_HEADER(read,X-DryVoIP-DNID)}".
So, I've been messing with the from-pstn-toheader context, trying to modify it to my needs.
Does anyone know what I need to do to make that last line (I'm using PJSIP) effectively read the DNID header from DryVoip and send the call back in to from-pstn? I'm pulling my hair out for something that is probably really, really simple.
I have so many DID's that I kind of lost track of my DID's with DryVoip. They are no longer working with the solution I posted years ago to use a certain context, so now I must roll my own context for them. I found in their SIP header they are including a new one:
Code:
X-DryVoIP-DNID: 6135551212
I contacted DryVoip support hoping they'd have a simple solution, but all they came back with is "I suggest you try ${PJSIP_HEADER(read,X-DryVoIP-DNID)}".
So, I've been messing with the from-pstn-toheader context, trying to modify it to my needs.
Code:
[from-pstn-toheader]
exten => _.,1,NoOp(Attempting to extract DID from SIP To header)
exten => _.,n,gotoif($["${CHANNEL(channeltype)}"="SIP"]?SIP)
exten => _.,n,gotoif($["${CHANNEL(channeltype)}"="PJSIP"]?PJSIP)
exten => _.,n,NoOp(Unable to determine SIP channel type)
exten => _.,n,goto(from-pstn,${EXTEN},1))
exten => _.,n(SIP),Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
exten => _.,n(PJSIP),Goto(from-pstn,${CUT(CUT(PJSIP_HEADER(read,To),@,1),:,2)},1)
Does anyone know what I need to do to make that last line (I'm using PJSIP) effectively read the DNID header from DryVoip and send the call back in to from-pstn? I'm pulling my hair out for something that is probably really, really simple.