<div dir="ltr"><b>Hello, I am quite new to opensips.</b><div style><b>My current task requires complete transformation of DIDs.</b></div><div style><b>I am using opensips 1.6 and the dialplan module.</b></div><div style><b>The DID is transformed correctly but I get a strange response to the sip invite (see below)</b></div>
<div style><b><br></b></div><div style><b>I assume its a simple config issue, I havn't been able to find many drouting examples online and most of them involve variables which I dont understand. </b></div><div style><b><br>
</b></div><div style><b>Any hints appreciated</b></div><div style><b><br></b></div><div style><b>relevant configs:</b></div><div style><br></div><div style><div>modparam ("dialplan", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")</div>
<div>modparam ("dialplan", "table_name", "dialplan")</div><div><br></div><div><b><br></b></div><div style><b>This is how I call dp_translate </b></div><div style><br></div><div style><div> if (src_ip==4.4.4.4) || (src_ip==5.5.5.5) { </div>
<div> dp_translate ("1"); <b> ##Do I need more parameters here?</b></div><div> rewritehostport( "<a href="http://6.6.6.6:5061">6.6.6.6:5061</a>");</div><div>
route(1);</div><div><br></div><div> }</div><div><br></div><div style><b>dialplan rule:</b></div><div style><br></div><div style><div style>'1', '1', '0', '0', '13129245555', '11', '', '16155555555', ''</div>
<div style><br></div><div style><b>the calls is then passed to an asterisk pbx</b></div><div style><b><br></b></div><div style><b>The main function seems to be working properly, and the invite to asterisk looks like this </b><b>(the dialplan has replaced the DID)</b></div>
<div style><br></div><div style><div><div>U 207.182.132.xxx:5060 -> 206.222.7.xxx:5061</div><div>INVITE sip:16155555555@206.222.7.xxx:5061;user=phone SIP/2.0.</div><div>Record-Route: <sip:207.182.132.xxx;lr=on>.</div>
<div>Record-Route: <sip:216.66.79.xx;lr;ftag=gK0f629023;did=012.00d5527>.</div><div>Via: SIP/2.0/UDP 207.182.132.xxx;branch=z9hG4bK59c8.843a2614.0.</div><div>Via: SIP/2.0/UDP 216.66.79.xx;branch=z9hG4bK59c8.4a5dcc82.0.</div>
<div>Via: SIP/2.0/UDP 74.120.95.xxx:5060;branch=z9hG4bK0fB2d616c8782204e36.</div><div>From: "ttmmff11" <sip:+16617480xxx@74.120.95.xxx;user=phone>;tag=gK0f629023.</div><div>To: <sip:+13129245555@216.66.79.xx;user=phone>.</div>
<div>Call-ID: 1963953326_77183542@74.120.95.xxx.</div><div>CSeq: 29022 INVITE.</div><div>Max-Forwards: 64.</div><div>Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS.</div><div>Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed.</div>
<div>Contact: "ttmmff11" <sip:+16617480240@74.120.95.xxx:5060>.</div><div>Supported: timer,100rel,replaces.</div><div>Session-Expires: 1800.</div><div>Min-SE: 90.</div><div>Content-Length: 234.</div><div>
Content-Disposition: session; handling=required.</div><div>Content-Type: application/sdp.</div><div>.</div><div>v=0.</div><div>o=Sonus_UAC 9864 544 IN IP4 74.120.95.195.</div><div>s=SIP Media Capabilities.</div><div>c=IN IP4 74.120.95.199.</div>
<div>t=0 0.</div><div>m=audio 8786 RTP/AVP 0 101.</div><div>a=rtpmap:0 PCMU/8000.</div><div>a=rtpmap:101 telephone-event/8000.</div><div>a=fmtp:101 0-15.</div><div>a=sendrecv.</div><div>a=maxptime:20.</div></div><div><br>
</div></div><div style><b>But the response from asterisk has strange formatting and the invite from opensips keeps looping</b></div><div style><b><br></b></div><div style><div>I 206.222.7.xxx -> 207.182.132.xxx 3:3</div>
<div>....E.....@.=.................b.INVITE sip:16155555555@206.222.7.xxx:5061;user=phone SIP/2.0.</div><div>Record-Route: <sip:207.182.132.xxx;lr=on>.</div><div>Record-Route: <sip:216.66.79.xx;lr;ftag=gK0f629023;did=012.00d5527>.</div>
<div>Via: SIP/2.0/UDP 207.182.132.xxx;branch=z9hG4bK59c8.843a2614.0.</div><div>Via: SIP/2.0/UDP 216.66.79.xx;branch=z9hG4bK59c8.4a5dcc82.0.</div><div>Via: SIP/2.0/UDP 74.120.95.xxx:5060;branch=z9hG4bK0fB2d616c8782204e36.</div>
<div>From: "ttmmff11" <sip:+16617480240@74.120.95.xxx;user=phone>;tag=gK0f629023.</div><div>To: <sip:+13129245555@216.66.79.xx;user=phone>.</div><div>Call-ID: 1963953326_77183</div></div><div style><br>
</div><div style><br></div><div><br></div></div></div></div></div>