Hello,
On 17.04.17 08:38, Narayan P wrote: > > Hi Daniel, > > > I am attaching here my sip trace at client side.Request you to see this. > > My client IP in register request is 125.16.231.74 and the server on > which kamailio is running is 185.122.205.178. > > > I want my contact header to be > <sip:OTT919620649614@185.122.205.178:5070;lr> > > > I am using avp_subst() function to replace this.But kamailio is not > starting. > If kamailio is not starting, then there is something wrong in the config. Can you look in the syslog (/var/log/syslog or /var/log/messages) and see what error messages are printed there? Cheers, Daniel > Please reply if I am in wrong way or have different understanding as I > am very new to kamailio. > > > Thanks, > > Narayan > > > > ------------------------------------------------------------------------ > *From:* Narayan P > *Sent:* Friday, April 14, 2017 12:54:25 PM > *To:* sr-us...@lists.sip-router.org > *Cc:* moco...@gmail.com > *Subject:* RE: Not able to replace route_uri in contact header uri > > Hi Daniel, > > Thanks for your response. > > I mean to say, > In my register request the route header i.e. route_uri is > <sip:185.122.205.178> and contact header is 3333@172.22.13.41. > I want my contact header to be 3333@185.122.205.178. > So how can I replace the contact header's only domain part with > route_uri.the user part of the contact header remains same. > > > Thanks, > Narayan > ________________________________________ > From: Narayan P > Sent: Thursday, April 13, 2017 11:13 AM > To: sr-us...@lists.sip-router.org > Subject: Re: Not able to replace route_uri in contact header uri > > Hi , > > Can anybody help me how to replace the domain part of $route-uri in > contact header . > > I am using avp_subst().But kamailio is not starting. > > > I am new to kamailio.Any help will be highly appreciated. > > > Thanks, > > Narayan > > ________________________________ > From: Narayan P > Sent: Wednesday, April 12, 2017 8:17:02 AM > To: sr-us...@lists.sip-router.org > Subject: Not able to replace route_uri in contact header uri > > > Hi All, > > I am using pjsip client and kamailiio,both running on different > servers.I want to replace the uri on which pjsip is running with the > uri on which kamailio is running in contact header. > I put some logs on route[REGISTRAR] and able to see the $route_uri as > kamailio server uri($avp(s:fs) and $hdr(Contact) as pjsip server uri > ($avp(s:contact).But I am not able to replace the uri with avp_subst() > function. > > Can anybody help me how to replace the uri or with any any other function. > > Below I have put the snippet of config file. > > > # Handle SIP registrations > route[REGISTRAR] { > if (!is_method("REGISTER")) return; > > if(isflagset(FLT_NATS)) { > setbflag(FLB_NATB); > #!ifdef WITH_NATSIPPING > # do SIP NAT pinging > setbflag(FLB_NATSIPPING); > #!endif > } > xlog("Narayan: before sending contact\n"); > $avp(s:contact) = $hdr(Contact); > $avp(s:fs) = $route_uri; > xlog("Narayan: Forced socket is $avp(s:fs)\n"); > xlog("Narayan: contact header is $avp(s:contact)\n"); > avp_subst("$avp(s:contact)/avp(s:contac)/g", > "/(.*)@(.*)/$route_uri/"); > #avp_pushto("$ru/domain","$fd"); > #rewritehostport("185.122.206.62:5060"); > t_on_reply("MANAGE_REPLY"); > t_relay(); > #if (!save("location")) { > # sl_reply_error(); > #} > exit; > } > > > Any suggestion will be highly appreciated. > > > Thanks, > Narayan > > -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users