[OpenSIPS-Users] smpp manipulation of A and B number.

johan de clercq johan at democon.be
Thu Jul 25 04:19:49 EDT 2019


Can it be that you use Ru instead of the To header ? 


-----Original Message-----
From: Users <users-bounces at lists.opensips.org> On Behalf Of Razvan Crainea
Sent: Thursday, July 25, 2019 9:43 AM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] smpp manipulation of A and B number.

Hi, Johan!

Yes, the modules do not see the uac_change_from/to() changes - these changes only reflect in the message sent downstream.
Therefore, the only way to sort this out is to "loop" the message back to OpenSIPS, after the normalization. To do that, after using uac_replace_from/to(), you can send the message back to OpenSIPS using:

$dd = "OWN_SIP_IP";

And then "catch" this message as soon as possible in your script and send it to the SMPP, using something like:

if (is_method("MESSAGE") && $si == "OWN_SIP_IP")
	send_smpp_message("SMPP");

Hope this helps.

Best regards,
Răzvan

On 7/25/19 9:41 AM, johan de clercq wrote:
>  From and to header changes when you call uac_change_from and uac_change_to are not taken into account.
> 
> Is there a wasy that I can resend  the message through the request-route and will this force the from and to header to be adapted in the request.
> 
>      xlog("callid=$ci: Route[normalize]: we drop 0,00,+ from $fU, result is var(from)");
>      dp_translate(1,$fU,$var(from));
>      if ($var(from)==NULL or $var(from)=='' or $var(from)=='<null>')
>      {
>          xlog("callid=$ci: Route[normalize]: result dp_translate for from header var(from) $var(from) == NULL -> from header user $fU from $fu has correct format");
>      }
>      else
>      {
>          $avp(from)="sip:"+$var(from)+"@"+$fd;
>          xlog("callid=$ci: Route[normalize]: result dp_translate for from header var(from) $var(from) -> from header user $fU from $fu has incorrect format , we use var(from) $var(from) in the avp; avp(from) becomes $avp(from)");
>          xlog("callid=$ci: Route[normalize]: we change fu $fu to avp(from) $avp(from)");
>          uac_replace_from( , "$avp(from)");
>      }
> ...
>      xlog("callid=$ci: Route[normalize]: result after normalization tu 
> $tu, fu  $fu");
> 
> 
> 
> 
> we drop 0,00,+ from +33333333, result is var(from) result dp_translate 
> for from header var(from) 33333333 -> from header user +33333333 from 
> sip:+ +33333333 at xxxx has incorrect format, we use var(from) 33333333  
> in the avp; avp(from) becomes sip: 33333333 @xxxx we change fu sip:+ 33333333 @xxxx to avp(from) sip: 33333333 at xxxx ...
> result after normalization tu sip: .... , fu  sip:+33333333 at xxxx
> 
> 
> -----Original Message-----
> From: Users <users-bounces at lists.opensips.org> On Behalf Of Razvan 
> Crainea
> Sent: Wednesday, July 24, 2019 10:17 AM
> To: users at lists.opensips.org
> Subject: Re: [OpenSIPS-Users] smpp manipulation of A and B number.
> 
> Hi, Johan!
> 
> Unfortunately the current code is only able to get the from and to fields that are present in the From and To headers in the request. So unless that request doesn't come in with a +, there's nothing you can do.
> This looks however as a necessary feature, so can you please open a feature request for this on our ticketing system:
> 
> https://github.com/OpenSIPS/opensips/issues
> 
> Best regards,
> Razvan
> 
> On 7/24/19 9:40 AM, johan de clercq wrote:
>> Hello,
>>
>> When a message is sent over smpp, then the A and B number always get 
>> + in front.
>>
>> Is there a way that I can change this behavior ?
>>
>> Basically, I want to get rid of the + that is put in front.
>>
>> cid:F3100D46-F00D-4610-87ED-3E91DA790A82
>>
>> Johan De Clercq, Managing Director
>> Democon bvba - Ooigemstraat 41 - 8780 Oostrozebeke
>>
>> Tel +3256980990– GSM +32478720104
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> 
> --
> Răzvan Crainea
> OpenSIPS Core Developer
>     http://www.opensips-solutions.com
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list