Use octstr_format(http://someurl.com/myscript.php?msgid=%s 
<http://someurl.com/myscript.php?msgid=%25s> ”, msgid);

 

This is if msgid is a string. If it is an integer use %d instead of %s.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Saurabh Pandey
Sent: dinsdag 29 april 2014 13:41
To: users@kannel.org
Subject: SMS ID and DLR-URL concatenation issue

 

Hi everyone,

this should be very simple for an expert C programmer to fix. I am trying to 
edit source of Opensmppbox.c to suit my requirements, but I am very poor in C. 
What I had was:

msg->sms.dlr_url = octstr_create("http://someurl.com/myscript.php";);

and it was working fine. In my dlr-table this URL was inserted as dlr-url and 
was fired when I received DLR. Now what I need is:

msg->sms.dlr_url = 
octstr_create("http://someurl.com/myscript.php?msgid="+msgid);

where msgid is fetched above like this:

msgid = generate_smppid(msg,box->version);
msgid = octstr_duplicate(msgid);

Issue: How do I append msgid to my dlr url and pass it. I used strcpy/strcat 
but it gives me incompatible pointer type errors. 

Please help me here. Thanks a lot in advance.

-Sam

Reply via email to