[OpenSIPS-Users] replace From

volga629 at networklab.ca volga629 at networklab.ca
Tue Nov 12 21:17:05 EST 2019


Hello Everyone,
Which way will be correct to replace From with alias.

Code

        # Check valid DID is present
        alias_db_find("dbaliases", $fu, $avp(from_alias), "r");
        xlog("Found DID ~> $avp(from_alias)\r");
        if($avp(from_alias)) {
                uac_replace_from( , $avp(from_alias));
        } else {
                sl_send_reply(404, "Assigned did is required\n\r");
                exit;
        }

I see in log

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: Found DID ~> 
sip:4384783197 at dev-sip.networklab.tld
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:uac:w_replace_from: dsp=(nil) (len=0) , uri=0x7ffde612a6c0 (len=37)
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:uac:replace_uri: 
uri to replace [sip:452390 at dev-sip.networklab.tld], replacement is 
[sip:4384783197 at dev-sip.networklab.tld], enclosed=0
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:uac:replace_uri: 
encode is=<AAAAAAAGCgcOCHNVXEFtFwwGAx0MBFkBFx8bDhBFGA0GLnRsZA--> len=52
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:rr:add_rr_param: 
adding (;vsf=AAAAAAAGCgcOCHNVXEFtFwwGAx0MBFkBFx8bDhBFGA0GLnRsZA--)

But original  from still in place

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: sending submit_sm
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: *FROM: 452390*
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: TO:  destination number
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: MESSAGE: Hello type = 
65537

Any help thank you.

volga629

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20191112/9029603d/attachment.html>


More information about the Users mailing list